aboutsummaryrefslogtreecommitdiff
path: root/tip22/tftpload.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2008-02-16 14:59:27 +0100
committerGuido Guenther <agx@sigxcpu.org>2008-02-16 14:59:27 +0100
commit8cbc42e7e42f8b22115f06de9a50e727f5092eaa (patch)
tree66cb077a3b910f8d4596ef2d3617839340e498d0 /tip22/tftpload.c
parentf16a9c28cbdcbd6a1ada41bebebf946b7938ec63 (diff)
apply an IP22 tftploader hack so the kernel+d-i initrd fit into the reserved space
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452798 Tip22 finds this memory map on IP22: 1) Free Memory(3) segment found at (0x88002000,0x88740000) 2) Free Memory(3) segment found at (0x88800000,0x89002000) 3) Free Memory(3) segment found at (0x896f2000,0x94000000) (1) is where the running kernel + initrd goes. (2) is where we tell the prom to download the tftpboot image to and (3) is lots of free space. The 64bit kernel (7MB) is just so much bigger than the 32bit one. This hack puts the tftp boot file into (3) and the initrd into (2) - it succesfully boots a kernel with an initramfs on my R5K Indy. I'll have to change some of the reservation code so we don't waste so much ram before I can fix this for real though.
Diffstat (limited to 'tip22/tftpload.c')
-rw-r--r--tip22/tftpload.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tip22/tftpload.c b/tip22/tftpload.c
index 86bf111..37ca7d1 100644
--- a/tip22/tftpload.c
+++ b/tip22/tftpload.c
@@ -320,7 +320,12 @@ void _start(LONG argc, CHAR * argv[], CHAR * envp[])
kernel_entry = (void (*)(int, CHAR *[], CHAR *[]))CopyKernel(&kernel_end);
/* align to page boundary */
+#if (SUBARCH != IP22)
rd_vaddr = (char*)(((kernel_end + PAGE_SIZE) / PAGE_SIZE ) * PAGE_SIZE);
+#else
+ rd_vaddr = (char*)0x88800000;
+#endif
+
copyRamdisk( rd_vaddr, (char*)&__rd_start, rd_size);
/* tell the kernel about the ramdisk */