summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/oflib.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 19:53:16 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-18 19:53:16 +0200
commit9b610fda0df5d0f0b0c64242e37441ad1b384aac (patch)
tree0ea14b15f2e6546f37fe18d8ac3dc83077ec0e55 /arch/powerpc/boot/oflib.c
parentb8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
downloadlinux-stable-9b610fda0df5d0f0b0c64242e37441ad1b384aac.tar.gz
linux-stable-9b610fda0df5d0f0b0c64242e37441ad1b384aac.tar.bz2
linux-stable-9b610fda0df5d0f0b0c64242e37441ad1b384aac.zip
Merge branch 'linus' into timers/nohz
Diffstat (limited to 'arch/powerpc/boot/oflib.c')
-rw-r--r--arch/powerpc/boot/oflib.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c
index 95b8fd69a403..b0ec9cf3eaaf 100644
--- a/arch/powerpc/boot/oflib.c
+++ b/arch/powerpc/boot/oflib.c
@@ -168,8 +168,19 @@ void *of_claim(unsigned long virt, unsigned long size, unsigned long align)
void *of_vmlinux_alloc(unsigned long size)
{
- void *p = malloc(size);
-
+ unsigned long start = (unsigned long)_start, end = (unsigned long)_end;
+ void *addr;
+ void *p;
+
+ /* With some older POWER4 firmware we need to claim the area the kernel
+ * will reside in. Newer firmwares don't need this so we just ignore
+ * the return value.
+ */
+ addr = of_claim(start, end - start, 0);
+ printf("Trying to claim from 0x%lx to 0x%lx (0x%lx) got %p\r\n",
+ start, end, end - start, addr);
+
+ p = malloc(size);
if (!p)
fatal("Can't allocate memory for kernel image!\n\r");