diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-26 21:52:53 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-26 21:52:53 +1000 |
commit | c49888203d7a316cb947bb8a1cf2ae191f28bcd3 (patch) | |
tree | 7e2962af5e6978361f04161c5d6fc3765fd21e77 /arch/ppc/boot | |
parent | bbd0abda9cc689a54df509aae00000bbb2a1a7d1 (diff) | |
download | kernel_samsung_smdk4412-c49888203d7a316cb947bb8a1cf2ae191f28bcd3.zip kernel_samsung_smdk4412-c49888203d7a316cb947bb8a1cf2ae191f28bcd3.tar.gz kernel_samsung_smdk4412-c49888203d7a316cb947bb8a1cf2ae191f28bcd3.tar.bz2 |
powerpc: Fixes to get the Longtrail CHRP a bit further
Talk about buggy firmware... the OF on the Longtrail returns 0
from the claim client service rather than -1 when the claim fails.
It also has no device_type on the /memory node and blows up if
the output buffer for package-to-path is too big.
This also fixes a bug with calling alloc_up with align == 0, where
we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0.
Lastly, we now check the return value (in r3) from calling the
prom, and return -1 from call_prom if we get a negative value back.
That is supposed to indicate that the requested client service
doesn't exist.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/boot')
-rw-r--r-- | arch/ppc/boot/of1275/claim.c | 1 | ||||
-rw-r--r-- | arch/ppc/boot/openfirmware/chrpmain.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc/boot/of1275/claim.c b/arch/ppc/boot/of1275/claim.c index e060292..13169a5 100644 --- a/arch/ppc/boot/of1275/claim.c +++ b/arch/ppc/boot/of1275/claim.c @@ -29,6 +29,7 @@ claim(unsigned int virt, unsigned int size, unsigned int align) args.virt = virt; args.size = size; args.align = align; + args.ret = (void *) 0; (*of_prom_entry)(&args); return args.ret; } diff --git a/arch/ppc/boot/openfirmware/chrpmain.c b/arch/ppc/boot/openfirmware/chrpmain.c index effe4a0..245dbd9 100644 --- a/arch/ppc/boot/openfirmware/chrpmain.c +++ b/arch/ppc/boot/openfirmware/chrpmain.c @@ -78,7 +78,7 @@ boot(int a1, int a2, void *prom) begin_avail = avail_high = avail_ram; end_avail = scratch + sizeof(scratch); printf("gunzipping (0x%p <- 0x%p:0x%p)...", dst, im, im+len); - gunzip(dst, 0x400000, im, &len); + gunzip(dst, PROG_SIZE - PROG_START, im, &len); printf("done %u bytes\n\r", len); printf("%u bytes of heap consumed, max in use %u\n\r", avail_high - begin_avail, heap_max); |