Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88687
b: refs/heads/master
c: 320a6b2
h: refs/heads/master
i:
  88685: 0c09ef2
  88683: 1b6a86e
  88679: 60dc16e
  88671: ba18315
v: v3
  • Loading branch information
Alexander van Heukelum authored and Ingo Molnar committed Apr 17, 2008
1 parent b6a17ff commit 633fad8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6eb62b6924b99ec7da97fb6f554685a9ad6dce4
refs/heads/master: 320a6b2efceccb652befca0b1c9a92d6e4256ef6
8 changes: 4 additions & 4 deletions trunk/arch/x86/kernel/e820_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,10 @@ static int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
return -1;

do {
unsigned long start = biosmap->addr;
unsigned long size = biosmap->size;
unsigned long end = start + size;
unsigned long type = biosmap->type;
u64 start = biosmap->addr;
u64 size = biosmap->size;
u64 end = start + size;
u32 type = biosmap->type;

/* Overflow in 64 bits? Ignore the memory map. */
if (start > end)
Expand Down
28 changes: 23 additions & 5 deletions trunk/arch/x86/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,30 @@ static void __init copy_bootdata(char *real_mode_data)
/*
* The BIOS places the EBDA/XBDA at the top of conventional
* memory, and usually decreases the reported amount of
* conventional memory (int 0x12) too.
* conventional memory (int 0x12) too. This also contains a
* workaround for Dell systems that neglect to reserve EBDA.
* The same workaround also avoids a problem with the AMD768MPX
* chipset: reserve a page before VGA to prevent PCI prefetch
* into it (errata #56). Usually the page is reserved anyways,
* unless you have no PS/2 mouse plugged in.
*/
static __init void reserve_ebda(void)
static void __init reserve_ebda_region(void)
{
unsigned int lowmem, ebda_addr;

/* To determine the position of the EBDA and the */
/* end of conventional memory, we need to look at */
/* the BIOS data area. In a paravirtual environment */
/* that area is absent. We'll just have to assume */
/* that the paravirt case can handle memory setup */
/* correctly, without our help. */
#ifdef CONFIG_PARAVIRT
if ((boot_params.hdr.version >= 0x207) &&
(boot_params.hdr.hardware_subarch != 0)) {
return;
}
#endif

/* end of low (conventional) memory */
lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES);
lowmem <<= 10;
Expand All @@ -80,8 +98,8 @@ static __init void reserve_ebda(void)
lowmem = 0x9f000;

/* Paranoia: should never happen, but... */
if (lowmem >= 0x100000)
lowmem = 0xa0000;
if ((lowmem == 0) || (lowmem >= 0x100000))
lowmem = 0x9f000;

/* reserve all memory between lowmem and the 1MB mark */
reserve_early(lowmem, 0x100000, "BIOS reserved");
Expand Down Expand Up @@ -140,7 +158,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
}

reserve_ebda();
reserve_ebda_region();

/*
* At this point everything still needed from the boot loader
Expand Down

0 comments on commit 633fad8

Please sign in to comment.