Fix zImage boot on old Pegasos firmware
PATCH 1/1 Fix zImage boot on old Pegasos firmware
If a claim fails, the Pegasos firmware pretends it never even made it into the prom, rather than indicating that it tried and failed.
Signed-off-by David Woodhouse <[email protected]>
arch/powerpc/boot/prom.c +6 -1
@@ -116,6 +116,7 @@ finddevice(const char *name)void *claim (unsigned long virt,unsigned long size,unsigned long align) { +int ret;struct prom_args {char *service;int nargs;
@@ -132,7 +133,11 @@ claim(unsigned long virt, unsigned long args.virt = virt; args.size = size; args.align = align; - (*prom)(&args); + ret = (*prom)(&args); +/* The original Pegasos II firmware claims that the call never made +it into the prom, rather than returning failure correctly */ +if (ret) +return (void *)-1 ;return args.ret; }
Signature · 1 line
dwmw2