aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/boot/main.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
commit6b995751c2e851d2bc9c277b5884d0adb519e31d (patch)
tree7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /arch/ppc64/boot/main.c
parent6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff)
parentd27ba47e7e8c466c18983a1779d611f82d6a354f (diff)
Merge branch 'master'
Diffstat (limited to 'arch/ppc64/boot/main.c')
-rw-r--r--arch/ppc64/boot/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c
index c1dc876bccab..e0dde24a72ce 100644
--- a/arch/ppc64/boot/main.c
+++ b/arch/ppc64/boot/main.c
@@ -203,8 +203,15 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp)
203 if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) 203 if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0)
204 break; 204 break;
205 } 205 }
206 vmlinux.size = (unsigned long)elf64ph->p_filesz; 206 vmlinux.size = (unsigned long)elf64ph->p_filesz +
207 vmlinux.memsize = (unsigned long)elf64ph->p_memsz; 207 (unsigned long)elf64ph->p_offset;
208 /* We need to claim the memsize plus the file offset since gzip
209 * will expand the header (file offset), then the kernel, then
210 * possible rubbish we don't care about. But the kernel bss must
211 * be claimed (it will be zero'd by the kernel itself)
212 */
213 vmlinux.memsize = (unsigned long)elf64ph->p_memsz +
214 (unsigned long)elf64ph->p_offset;
208 printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux.memsize); 215 printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux.memsize);
209 vmlinux.addr = try_claim(vmlinux.memsize); 216 vmlinux.addr = try_claim(vmlinux.memsize);
210 if (vmlinux.addr == 0) { 217 if (vmlinux.addr == 0) {