[POWERPC] Consolidate restore_sigmask
[pv_ops_mirror.git] / arch / powerpc / boot / cuboot-ebony.c
blob4464c5f67acb7e3747acf7ef790a4a0b0e360ef6
1 /*
2 * Old U-boot compatibility for Ebony
4 * Author: David Gibson <david@gibson.dropbear.id.au>
6 * Copyright 2007 David Gibson, IBM Corporatio.
7 * Based on cuboot-83xx.c, which is:
8 * Copyright (c) 2007 Freescale Semiconductor, Inc.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published
12 * by the Free Software Foundation.
15 #include "ops.h"
16 #include "stdio.h"
17 #include "44x.h"
19 #define TARGET_44x
20 #include "ppcboot.h"
22 static bd_t bd;
23 extern char _end[];
25 BSS_STACK(4096);
27 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
28 unsigned long r6, unsigned long r7)
30 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize;
31 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
33 memcpy(&bd, (bd_t *)r3, sizeof(bd));
34 loader_info.initrd_addr = r4;
35 loader_info.initrd_size = r4 ? r5 : 0;
36 loader_info.cmdline = (char *)r6;
37 loader_info.cmdline_len = r7 - r6;
39 simple_alloc_init(_end, avail_ram, 32, 64);
41 ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr);