]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Increase number of e820 entries hard limit from 32 to 128
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Sun, 1 May 2005 15:58:51 +0000 (08:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:58:51 +0000 (08:58 -0700)
The specifications that talk about E820 map doesn't have an upper limit on
the number of e820 entries.  But, today's kernel has a hard limit of 32.
With increase in memory size, we are seeing the number of E820 entries
reaching close to 32.  Patch below bumps the number upto 128.

The patch changes the location of EDDBUF in zero-page (as it comes after E820).
As, EDDBUF is not used by boot loaders, this patch should not have any effect
on bootloader-setup code interface.

Patch covers both i386 and x86-64.

Tested on:
* grub booting bzImage
* lilo booting bzImage with EDID info enabled
* pxeboot of bzImage

Side-effect:
bss increases by ~ 2K and init.data increases by ~7.5K
on all systems, due to increase in size of static arrays.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Documentation/i386/zero-page.txt
arch/i386/boot/setup.S
arch/x86_64/boot/setup.S
arch/x86_64/kernel/head64.c
arch/x86_64/kernel/setup64.c
include/asm-i386/e820.h
include/asm-i386/setup.h
include/asm-x86_64/bootsetup.h
include/asm-x86_64/e820.h
include/linux/edd.h

index 67c053a099ed4219a5f7fff253b81d9f0c17422d..df28c7416781ff664a542e780006279b542d64c8 100644 (file)
@@ -79,6 +79,6 @@ Offset        Type            Description
 0x22c   unsigned long  ramdisk_max
 0x230   16 bytes       trampoline
 0x290 - 0x2cf          EDD_MBR_SIG_BUFFER (edd.S)
-0x2d0 - 0x600          E820MAP
-0x600 - 0x7ff          EDDBUF (edd.S) for disk signature read sector
-0x600 - 0x7eb          EDDBUF (edd.S) for edd data
+0x2d0 - 0xd00          E820MAP
+0xd00 - 0xeff          EDDBUF (edd.S) for disk signature read sector
+0xd00 - 0xeeb          EDDBUF (edd.S) for edd data
index a934ab32bf8e4fcdcc586ff99a075febe8391269..caa1fde6904edc89eccdf49e693d8576aa9feecc 100644 (file)
@@ -164,7 +164,7 @@ ramdisk_max:        .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
 trampoline:    call    start_of_setup
                .align 16
                                        # The offset at this point is 0x240
-               .space  (0x7ff-0x240+1) # E820 & EDD space (ending at 0x7ff)
+               .space  (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
 # End of setup header #####################################################
 
 start_of_setup:
@@ -333,9 +333,9 @@ jmpe820:
        # sizeof(e820rec).
        #
 good820:
-       movb    (E820NR), %al                   # up to 32 entries
+       movb    (E820NR), %al                   # up to 128 entries
        cmpb    $E820MAX, %al
-       jnl     bail820
+       jae     bail820
 
        incb    (E820NR)
        movw    %di, %ax
index 3e838be9dbe78ba53933c5ef910bec2219a9ef37..75d4d2ad93b363a83f3a66346644a8ea716ea64f 100644 (file)
@@ -160,7 +160,7 @@ ramdisk_max:        .long 0xffffffff
 trampoline:    call    start_of_setup
                .align 16
                                        # The offset at this point is 0x240
-               .space  (0x7ff-0x240+1) # E820 & EDD space (ending at 0x7ff)
+               .space  (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
 # End of setup header #####################################################
 
 start_of_setup:
@@ -412,9 +412,9 @@ jmpe820:
        # sizeof(e820rec).
        #
 good820:
-       movb    (E820NR), %al                   # up to 32 entries
+       movb    (E820NR), %al                   # up to 128 entries
        cmpb    $E820MAX, %al
-       jnl     bail820
+       jae     bail820
 
        incb    (E820NR)
        movw    %di, %ax
index 6cad46c98a2340b5e4b606a56d08ea61a4925add..77df2ccb08f1632a02513030f6996ad2e292bfcf 100644 (file)
@@ -29,8 +29,6 @@ static void __init clear_bss(void)
               (unsigned long) __bss_end - (unsigned long) __bss_start);
 }
 
-extern char x86_boot_params[2048];
-
 #define NEW_CL_POINTER         0x228   /* Relative to real mode data */
 #define OLD_CL_MAGIC_ADDR      0x90020
 #define OLD_CL_MAGIC            0xA33F
@@ -44,7 +42,7 @@ static void __init copy_bootdata(char *real_mode_data)
        int new_data;
        char * command_line;
 
-       memcpy(x86_boot_params, real_mode_data, 2048); 
+       memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE);
        new_data = *(int *) (x86_boot_params + NEW_CL_POINTER);
        if (!new_data) {
                if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) {
index b5305b04bc4089384b174925e242f38637f3a25c..678b7ac33b8b3cbf6a824750fc42b982dc50e79f 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/string.h>
 #include <linux/bootmem.h>
 #include <linux/bitops.h>
+#include <asm/bootsetup.h>
 #include <asm/pda.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
@@ -26,7 +27,7 @@
 #include <asm/mman.h>
 #include <asm/numa.h>
 
-char x86_boot_params[2048] __initdata = {0,};
+char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
 
 cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
 
index 5c285aee729496d617cfeddbc9954e3a953205d6..edf65be21a9249a163e1fa187b6e79fa862cf054 100644 (file)
@@ -13,7 +13,7 @@
 #define __E820_HEADER
 
 #define E820MAP        0x2d0           /* our map */
-#define E820MAX        32              /* number of entries in E820MAP */
+#define E820MAX        128             /* number of entries in E820MAP */
 #define E820NR 0x1e8           /* # entries in E820MAP */
 
 #define E820_RAM       1
index 8814b54c75d4cb88e99987f7b5efc73130d5ecf9..7a32184d54bf414522d10976d9a7a7a0b4d47a1b 100644 (file)
@@ -16,7 +16,7 @@
 #define MAXMEM_PFN     PFN_DOWN(MAXMEM)
 #define MAX_NONPAE_PFN (1 << 20)
 
-#define PARAM_SIZE 2048
+#define PARAM_SIZE 4096
 #define COMMAND_LINE_SIZE 256
 
 #define OLD_CL_MAGIC_ADDR      0x90020
index b570a484dc50f61faeafb284874acb52111ce324..b829f7b534be8d856cea11e8545339912f914b7b 100644 (file)
@@ -2,7 +2,8 @@
 #ifndef _X86_64_BOOTSETUP_H
 #define _X86_64_BOOTSETUP_H 1
 
-extern char x86_boot_params[2048];
+#define BOOT_PARAM_SIZE                4096
+extern char x86_boot_params[BOOT_PARAM_SIZE];
 
 /*
  * This is set up by the setup-routine at boot-time
index 08f83a4b4f4ad19c98a88a0d37adeb17939eb5af..8e94edf0b9844096c99bf808b34270bcceefe0d1 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/mmzone.h>
 
 #define E820MAP        0x2d0           /* our map */
-#define E820MAX        32              /* number of entries in E820MAP */
+#define E820MAX        128             /* number of entries in E820MAP */
 #define E820NR 0x1e8           /* # entries in E820MAP */
 
 #define E820_RAM       1
index c6e6747a401d9a06f16f91acc5eba53c8a595539..162512b886f7e59d8fd038d3cf7bd478f2139f79 100644 (file)
@@ -32,7 +32,7 @@
 
 #define EDDNR 0x1e9            /* addr of number of edd_info structs at EDDBUF
                                   in boot_params - treat this as 1 byte  */
-#define EDDBUF 0x600           /* addr of edd_info structs in boot_params */
+#define EDDBUF 0xd00           /* addr of edd_info structs in boot_params */
 #define EDDMAXNR 6             /* number of edd_info structs starting at EDDBUF  */
 #define EDDEXTSIZE 8           /* change these if you muck with the structures */
 #define EDDPARMSIZE 74