aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820_64.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@mailshack.com>2008-03-01 11:12:43 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:52 -0400
commit320a6b2efceccb652befca0b1c9a92d6e4256ef6 (patch)
treeaa8e2e2009d9ac63b5f36952c085db9a25197221 /arch/x86/kernel/e820_64.c
parentf6eb62b6924b99ec7da97fb6f554685a9ad6dce4 (diff)
x86: reserve end-of-conventional-memory to 1MB, 64-bit
This patch is an add-on to the 64-bit ebda patch. It makes the functions reserve_ebda_region (renamed from reserve_ebda) and copy_e820_map equal to the 32-bit versions of the previous patch. Changes: Use u64 and u32 for local variables in copy_e820_map. The amount of conventional memory and the start of the EBDA are detected by reading the BIOS data area directly. Paravirtual environments do not provide this area, so we bail out early in that case. They will just have to set up a correct memory map to start with. Add a safety net for zeroed out BIOS data area. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/e820_64.c')
-rw-r--r--arch/x86/kernel/e820_64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 8b914a833ac6..4a0953857cb2 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -621,10 +621,10 @@ static int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
621 return -1; 621 return -1;
622 622
623 do { 623 do {
624 unsigned long start = biosmap->addr; 624 u64 start = biosmap->addr;
625 unsigned long size = biosmap->size; 625 u64 size = biosmap->size;
626 unsigned long end = start + size; 626 u64 end = start + size;
627 unsigned long type = biosmap->type; 627 u32 type = biosmap->type;
628 628
629 /* Overflow in 64 bits? Ignore the memory map. */ 629 /* Overflow in 64 bits? Ignore the memory map. */
630 if (start > end) 630 if (start > end)