initrd breaks with exactly 512M of ram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I realize this is a very unique situation, but the initrd code breaks with
exactly 512M of RAM mapped from 0 to 512M: 

Determined physical RAM map:
 memory: 20000000 @ 00000000 (usable)
Initial ramdisk at: 0x8023a000 (629389 bytes)
initrd extends beyond end of memory (0x802d3a8d > 0x80000000)

Here is a little patch - instead of converting the PFN to a physical
address it converts the initrd_end to a PFN.

Thanks,
Jason

Index: setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.96
diff -u -r1.96 setup.c
--- setup.c	2001/12/02 11:34:38	1.96
+++ setup.c	2002/01/10 08:01:18
@@ -921,7 +928,7 @@
 		printk("Initial ramdisk at: 0x%p (%lu bytes)\n",
 		       (void *)initrd_start, 
 		       initrd_size);
-		if ((void *)initrd_end > phys_to_virt(PFN_PHYS(max_low_pfn))) {
+		if (PFN_UP(__pa(initrd_end)) >= max_low_pfn) {
 			printk("initrd extends beyond end of memory "
 			       "(0x%lx > 0x%p)\ndisabling initrd\n",
 			       initrd_end,




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux