aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2005-05-01 11:58:51 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:51 -0400
commitf9ba70535dc12d9eb57d466a2ecd749e16eca866 (patch)
tree7032500f7697e37e8e93869bdcefd4ab5473a136 /arch
parentbe9e68703c53fece406bc2e40976a5cfe2a8e77f (diff)
[PATCH] Increase number of e820 entries hard limit from 32 to 128
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/boot/setup.S6
-rw-r--r--arch/x86_64/boot/setup.S6
-rw-r--r--arch/x86_64/kernel/head64.c4
-rw-r--r--arch/x86_64/kernel/setup64.c3
4 files changed, 9 insertions, 10 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
index a934ab32bf8e..caa1fde6904e 100644
--- a/arch/i386/boot/setup.S
+++ b/arch/i386/boot/setup.S
@@ -164,7 +164,7 @@ ramdisk_max: .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
164trampoline: call start_of_setup 164trampoline: call start_of_setup
165 .align 16 165 .align 16
166 # The offset at this point is 0x240 166 # The offset at this point is 0x240
167 .space (0x7ff-0x240+1) # E820 & EDD space (ending at 0x7ff) 167 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
168# End of setup header ##################################################### 168# End of setup header #####################################################
169 169
170start_of_setup: 170start_of_setup:
@@ -333,9 +333,9 @@ jmpe820:
333 # sizeof(e820rec). 333 # sizeof(e820rec).
334 # 334 #
335good820: 335good820:
336 movb (E820NR), %al # up to 32 entries 336 movb (E820NR), %al # up to 128 entries
337 cmpb $E820MAX, %al 337 cmpb $E820MAX, %al
338 jnl bail820 338 jae bail820
339 339
340 incb (E820NR) 340 incb (E820NR)
341 movw %di, %ax 341 movw %di, %ax
diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S
index 3e838be9dbe7..75d4d2ad93b3 100644
--- a/arch/x86_64/boot/setup.S
+++ b/arch/x86_64/boot/setup.S
@@ -160,7 +160,7 @@ ramdisk_max: .long 0xffffffff
160trampoline: call start_of_setup 160trampoline: call start_of_setup
161 .align 16 161 .align 16
162 # The offset at this point is 0x240 162 # The offset at this point is 0x240
163 .space (0x7ff-0x240+1) # E820 & EDD space (ending at 0x7ff) 163 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
164# End of setup header ##################################################### 164# End of setup header #####################################################
165 165
166start_of_setup: 166start_of_setup:
@@ -412,9 +412,9 @@ jmpe820:
412 # sizeof(e820rec). 412 # sizeof(e820rec).
413 # 413 #
414good820: 414good820:
415 movb (E820NR), %al # up to 32 entries 415 movb (E820NR), %al # up to 128 entries
416 cmpb $E820MAX, %al 416 cmpb $E820MAX, %al
417 jnl bail820 417 jae bail820
418 418
419 incb (E820NR) 419 incb (E820NR)
420 movw %di, %ax 420 movw %di, %ax
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c
index 6cad46c98a23..77df2ccb08f1 100644
--- a/arch/x86_64/kernel/head64.c
+++ b/arch/x86_64/kernel/head64.c
@@ -29,8 +29,6 @@ static void __init clear_bss(void)
29 (unsigned long) __bss_end - (unsigned long) __bss_start); 29 (unsigned long) __bss_end - (unsigned long) __bss_start);
30} 30}
31 31
32extern char x86_boot_params[2048];
33
34#define NEW_CL_POINTER 0x228 /* Relative to real mode data */ 32#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
35#define OLD_CL_MAGIC_ADDR 0x90020 33#define OLD_CL_MAGIC_ADDR 0x90020
36#define OLD_CL_MAGIC 0xA33F 34#define OLD_CL_MAGIC 0xA33F
@@ -44,7 +42,7 @@ static void __init copy_bootdata(char *real_mode_data)
44 int new_data; 42 int new_data;
45 char * command_line; 43 char * command_line;
46 44
47 memcpy(x86_boot_params, real_mode_data, 2048); 45 memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE);
48 new_data = *(int *) (x86_boot_params + NEW_CL_POINTER); 46 new_data = *(int *) (x86_boot_params + NEW_CL_POINTER);
49 if (!new_data) { 47 if (!new_data) {
50 if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) { 48 if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) {
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
index b5305b04bc40..678b7ac33b8b 100644
--- a/arch/x86_64/kernel/setup64.c
+++ b/arch/x86_64/kernel/setup64.c
@@ -12,6 +12,7 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/bootmem.h> 13#include <linux/bootmem.h>
14#include <linux/bitops.h> 14#include <linux/bitops.h>
15#include <asm/bootsetup.h>
15#include <asm/pda.h> 16#include <asm/pda.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
17#include <asm/processor.h> 18#include <asm/processor.h>
@@ -26,7 +27,7 @@
26#include <asm/mman.h> 27#include <asm/mman.h>
27#include <asm/numa.h> 28#include <asm/numa.h>
28 29
29char x86_boot_params[2048] __initdata = {0,}; 30char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
30 31
31cpumask_t cpu_initialized __initdata = CPU_MASK_NONE; 32cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
32 33