Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
24e873af
Commit
24e873af
authored
Jul 07, 2004
by
Len Brown
Committed by
Len Brown
Jul 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] reserve EBDA for Dell BIOS that neglects to. (David Shaohua Li)
http://bugme.osdl.org/show_bug.cgi?id=2990
parent
e8a4a26a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
arch/i386/kernel/setup.c
arch/i386/kernel/setup.c
+15
-0
arch/i386/mm/discontig.c
arch/i386/mm/discontig.c
+15
-0
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/setup.c
+17
-0
No files found.
arch/i386/kernel/setup.c
View file @
24e873af
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include <asm/ist.h>
#include <asm/ist.h>
#include <asm/std_resources.h>
#include <asm/std_resources.h>
#include "setup_arch_pre.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
/* 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*
immediately after the boot time page tables. It contains a *physical*
...
@@ -808,6 +809,17 @@ static void __init register_bootmem_low_pages(unsigned long max_low_pfn)
...
@@ -808,6 +809,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
)
static
unsigned
long
__init
setup_memory
(
void
)
{
{
unsigned
long
bootmap_size
,
start_pfn
,
max_low_pfn
;
unsigned
long
bootmap_size
,
start_pfn
,
max_low_pfn
;
...
@@ -854,6 +866,9 @@ static unsigned long __init setup_memory(void)
...
@@ -854,6 +866,9 @@ static unsigned long __init setup_memory(void)
*/
*/
reserve_bootmem
(
0
,
PAGE_SIZE
);
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
/* 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,
PCI prefetch into it (errata #56). Usually the page is reserved anyways,
unless you have no PS/2 mouse plugged in. */
unless you have no PS/2 mouse plugged in. */
...
...
arch/i386/mm/discontig.c
View file @
24e873af
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <asm/e820.h>
#include <asm/e820.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mmzone.h>
#include <asm/mmzone.h>
#include <bios_ebda.h>
struct
pglist_data
*
node_data
[
MAX_NUMNODES
];
struct
pglist_data
*
node_data
[
MAX_NUMNODES
];
bootmem_data_t
node0_bdata
;
bootmem_data_t
node0_bdata
;
...
@@ -227,6 +228,17 @@ static unsigned long calculate_numa_remap_pages(void)
...
@@ -227,6 +228,17 @@ static unsigned long calculate_numa_remap_pages(void)
return
reserve_pages
;
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
)
unsigned
long
__init
setup_memory
(
void
)
{
{
int
nid
;
int
nid
;
...
@@ -301,6 +313,9 @@ unsigned long __init setup_memory(void)
...
@@ -301,6 +313,9 @@ unsigned long __init setup_memory(void)
*/
*/
reserve_bootmem_node
(
NODE_DATA
(
0
),
PAGE_SIZE
,
PAGE_SIZE
);
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
#ifdef CONFIG_ACPI_SLEEP
/*
/*
* Reserve low memory region for sleep support.
* Reserve low memory region for sleep support.
...
...
arch/x86_64/kernel/setup.c
View file @
24e873af
...
@@ -422,6 +422,20 @@ static inline void copy_edd(void)
...
@@ -422,6 +422,20 @@ static inline void copy_edd(void)
#define copy_edd() do {} while (0)
#define copy_edd() do {} while (0)
#endif
#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
)
void
__init
setup_arch
(
char
**
cmdline_p
)
{
{
unsigned
long
low_mem_size
;
unsigned
long
low_mem_size
;
...
@@ -486,6 +500,9 @@ void __init setup_arch(char **cmdline_p)
...
@@ -486,6 +500,9 @@ void __init setup_arch(char **cmdline_p)
*/
*/
reserve_bootmem_generic
(
0
,
PAGE_SIZE
);
reserve_bootmem_generic
(
0
,
PAGE_SIZE
);
/* reserve ebda region */
reserve_ebda_region
();
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
/*
/*
* But first pinch a few for the stack/trampoline stuff
* But first pinch a few for the stack/trampoline stuff
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment