diff options
Diffstat (limited to 'arch/powerpc/boot/main.c')
-rw-r--r-- | arch/powerpc/boot/main.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 05de6cfafeeb..8a60e13777d7 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -254,21 +254,15 @@ static void set_cmdline(char *buf) | |||
254 | struct platform_ops platform_ops; | 254 | struct platform_ops platform_ops; |
255 | struct dt_ops dt_ops; | 255 | struct dt_ops dt_ops; |
256 | struct console_ops console_ops; | 256 | struct console_ops console_ops; |
257 | struct loader_info loader_info; | ||
257 | 258 | ||
258 | void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | 259 | void start(void *sp) |
259 | { | 260 | { |
260 | struct addr_range vmlinux, initrd; | 261 | struct addr_range vmlinux, initrd; |
261 | kernel_entry_t kentry; | 262 | kernel_entry_t kentry; |
262 | char cmdline[COMMAND_LINE_SIZE]; | 263 | char cmdline[COMMAND_LINE_SIZE]; |
263 | unsigned long ft_addr = 0; | 264 | unsigned long ft_addr = 0; |
264 | 265 | ||
265 | memset(__bss_start, 0, _end - __bss_start); | ||
266 | memset(&platform_ops, 0, sizeof(platform_ops)); | ||
267 | memset(&dt_ops, 0, sizeof(dt_ops)); | ||
268 | memset(&console_ops, 0, sizeof(console_ops)); | ||
269 | |||
270 | if (platform_init(promptr, _dtb_start, _dtb_end)) | ||
271 | exit(); | ||
272 | if (console_ops.open && (console_ops.open() < 0)) | 266 | if (console_ops.open && (console_ops.open() < 0)) |
273 | exit(); | 267 | exit(); |
274 | if (platform_ops.fixups) | 268 | if (platform_ops.fixups) |
@@ -278,7 +272,8 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
278 | _start, sp); | 272 | _start, sp); |
279 | 273 | ||
280 | vmlinux = prep_kernel(); | 274 | vmlinux = prep_kernel(); |
281 | initrd = prep_initrd(vmlinux, a1, a2); | 275 | initrd = prep_initrd(vmlinux, loader_info.initrd_addr, |
276 | loader_info.initrd_size); | ||
282 | 277 | ||
283 | /* If cmdline came from zimage wrapper or if we can edit the one | 278 | /* If cmdline came from zimage wrapper or if we can edit the one |
284 | * in the dt, print it out and edit it, if possible. | 279 | * in the dt, print it out and edit it, if possible. |
@@ -298,7 +293,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
298 | if (ft_addr) | 293 | if (ft_addr) |
299 | printf(" flat tree at 0x%lx\n\r", ft_addr); | 294 | printf(" flat tree at 0x%lx\n\r", ft_addr); |
300 | else | 295 | else |
301 | printf(" using OF tree (promptr=%p)\n\r", promptr); | 296 | printf(" using OF tree (promptr=%p)\n\r", loader_info.promptr); |
302 | 297 | ||
303 | if (console_ops.close) | 298 | if (console_ops.close) |
304 | console_ops.close(); | 299 | console_ops.close(); |
@@ -307,7 +302,8 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
307 | if (ft_addr) | 302 | if (ft_addr) |
308 | kentry(ft_addr, 0, NULL); | 303 | kentry(ft_addr, 0, NULL); |
309 | else | 304 | else |
310 | kentry((unsigned long)initrd.addr, initrd.size, promptr); | 305 | kentry((unsigned long)initrd.addr, initrd.size, |
306 | loader_info.promptr); | ||
311 | 307 | ||
312 | /* console closed so printf below may not work */ | 308 | /* console closed so printf below may not work */ |
313 | printf("Error: Linux kernel returned to zImage boot wrapper!\n\r"); | 309 | printf("Error: Linux kernel returned to zImage boot wrapper!\n\r"); |