20 #include <linux/kernel.h>
21 #include <linux/linkage.h>
28 #include <asm/bootinfo.h>
29 #include <asm/reboot.h>
31 #include <asm/smp-ops.h>
38 #define MAX_RAM_SIZE (~0ULL)
41 #ifdef CONFIG_64BIT_PHYS_ADDR
42 #define MAX_RAM_SIZE (~0ULL)
44 #define MAX_RAM_SIZE (0xffffffffULL)
47 #define MAX_RAM_SIZE (0x1fffffffULL)
51 #define SIBYTE_MAX_MEM_REGIONS 8
58 #ifdef CONFIG_BLK_DEV_INITRD
64 int warm = *(
int *)arg;
67 static int reboot_smp;
76 printk(
"Passing control back to CFE...\n");
78 printk(
"cfe_exit returned??\n");
85 static const int zero;
87 cfe_linux_exit((
void *)&zero);
92 static const int one = 1;
94 cfe_linux_exit((
void *)&one);
103 #ifdef CONFIG_BLK_DEV_INITRD
104 unsigned long initrd_pstart;
105 unsigned long initrd_pend;
112 panic(
"initrd out of addressable memory");
125 #ifdef CONFIG_BLK_DEV_INITRD
127 if ((initrd_pstart > addr) &&
128 (initrd_pstart < (addr +
size))) {
130 initrd_pstart - addr,
134 if ((initrd_pend > addr) &&
135 (initrd_pend < (addr + size))) {
137 (addr + size) - initrd_pend,
171 #ifdef CONFIG_BLK_DEV_INITRD
179 #ifdef CONFIG_BLK_DEV_INITRD
180 static int __init initrd_setup(
char *
str)
185 unsigned long initrd_size;
188 for (idx = 0; idx <
sizeof(rdarg)-1; idx++) {
189 if (!str[idx] || (str[idx] ==
' '))
break;
200 for (tmp = str; *tmp !=
'@'; tmp++) {
224 printk(
"Bad initrd argument. Disabling initrd\n");
241 unsigned int cfe_eptseal;
243 char **envp = (
char **)
fw_arg2;
256 cfe_ept = (
long)envp;
281 printk(
"CFE's entrypoint seal doesn't match. Spinning.");
294 printk(
"LINUX_CMDLINE not defined in cfe.");
299 #ifdef CONFIG_BLK_DEV_INITRD
305 while (*ptr ==
' ') {
308 if (!
strncmp(ptr,
"initrd=", 7)) {
312 while (*ptr && (*ptr !=
' ')) {
325 #if defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
328 #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)