ia64/xen-unstable

changeset 12985:3d7759a9247f

[XEN][POWERPC] Fix systemsim-gpul failure to boot
This patch fixes the fencepost error and adds a check for the failure to
initialize the allocator, which would have make Mark's FTB much easier
to debug.
This works for me on the public systemsim-gpul release.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Also fixes Maple, was just getting luck.
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Mon Dec 11 19:43:18 2006 -0500 (2006-12-11)
parents 3d93083e3934
children 5d052711af78
files xen/arch/powerpc/boot_of.c
line diff
     1.1 --- a/xen/arch/powerpc/boot_of.c	Tue Dec 12 13:54:00 2006 -0600
     1.2 +++ b/xen/arch/powerpc/boot_of.c	Mon Dec 11 19:43:18 2006 -0500
     1.3 @@ -608,7 +608,7 @@ static ulong boot_of_mem_init(void)
     1.4                  if (size_cells == 2 && (r < l) )
     1.5                      size = (size << 32) | reg[r++];
     1.6                  
     1.7 -                if (r >= l)
     1.8 +                if (r > l)
     1.9                      break;  /* partial line.  Skip */
    1.10  
    1.11                  boot_of_alloc_init(p, addr_cells, size_cells);
    1.12 @@ -1290,6 +1290,7 @@ multiboot_info_t __init *boot_of_init(
    1.13  {
    1.14      static multiboot_info_t mbi;
    1.15      void *oft;
    1.16 +    int r;
    1.17  
    1.18      of_vec = vec;
    1.19      of_msr = orig_msr;
    1.20 @@ -1316,7 +1317,9 @@ multiboot_info_t __init *boot_of_init(
    1.21      of_printf("%s: _start %p _end %p 0x%lx\n", __func__, _start, _end, r6);
    1.22  
    1.23      boot_of_fix_maple();
    1.24 -    boot_of_mem_init();
    1.25 +    r = boot_of_mem_init();
    1.26 +    if (r == 0)
    1.27 +        of_panic("failure to initialize memory allocator");
    1.28      boot_of_bootargs(&mbi);
    1.29      oft = boot_of_module(r3, r4, &mbi);
    1.30      boot_of_cpus();