Commit 36742fdd authored by Len Brown's avatar Len Brown

Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.7

into intel.com:/home/lenb/src/linux-acpi-test-2.6.8
parents 8cc48125 24e873af
......@@ -49,6 +49,7 @@
#include <asm/ist.h>
#include <asm/io.h>
#include "setup_arch_pre.h"
#include <bios_ebda.h>
/* This value is set up by the early boot code to point to the value
immediately after the boot time page tables. It contains a *physical*
......@@ -991,6 +992,17 @@ static void __init register_bootmem_low_pages(unsigned long max_low_pfn)
}
}
/*
* workaround for Dell systems that neglect to reserve EBDA
*/
static void __init reserve_ebda_region(void)
{
unsigned int addr;
addr = get_bios_ebda();
if (addr)
reserve_bootmem(addr, PAGE_SIZE);
}
static unsigned long __init setup_memory(void)
{
unsigned long bootmap_size, start_pfn, max_low_pfn;
......@@ -1037,6 +1049,9 @@ static unsigned long __init setup_memory(void)
*/
reserve_bootmem(0, PAGE_SIZE);
/* reserve EBDA region, it's a 4K region */
reserve_ebda_region();
/* could be an AMD 768MPX 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. */
......
......@@ -31,6 +31,7 @@
#include <asm/e820.h>
#include <asm/setup.h>
#include <asm/mmzone.h>
#include <bios_ebda.h>
struct pglist_data *node_data[MAX_NUMNODES];
bootmem_data_t node0_bdata;
......@@ -219,6 +220,17 @@ static unsigned long calculate_numa_remap_pages(void)
return reserve_pages;
}
/*
* workaround for Dell systems that neglect to reserve EBDA
*/
static void __init reserve_ebda_region_node(void)
{
unsigned int addr;
addr = get_bios_ebda();
if (addr)
reserve_bootmem_node(NODE_DATA(0), addr, PAGE_SIZE);
}
unsigned long __init setup_memory(void)
{
int nid;
......@@ -318,6 +330,9 @@ unsigned long __init setup_memory(void)
*/
reserve_bootmem_node(NODE_DATA(0), PAGE_SIZE, PAGE_SIZE);
/* reserve EBDA region, it's a 4K region */
reserve_ebda_region_node();
#ifdef CONFIG_ACPI_SLEEP
/*
* Reserve low memory region for sleep support.
......
......@@ -423,6 +423,20 @@ static inline void copy_edd(void)
}
#endif
#define EBDA_ADDR_POINTER 0x40E
static void __init reserve_ebda_region(void)
{
unsigned int addr;
/**
* there is a real-mode segmented pointer pointing to the
* 4K EBDA area at 0x40E
*/
addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER);
addr <<= 4;
if (addr)
reserve_bootmem_generic(addr, PAGE_SIZE);
}
void __init setup_arch(char **cmdline_p)
{
unsigned long low_mem_size;
......@@ -487,6 +501,9 @@ void __init setup_arch(char **cmdline_p)
*/
reserve_bootmem_generic(0, PAGE_SIZE);
/* reserve ebda region */
reserve_ebda_region();
#ifdef CONFIG_SMP
/*
* But first pinch a few for the stack/trampoline stuff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment