Commit 356fa0c6 authored by Akinobu Mita's avatar Akinobu Mita Committed by Ingo Molnar

x86: use get_bios_ebda()

Use get_bios_ebda().
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ae5830a6
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/kdebug.h> #include <asm/kdebug.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/bios_ebda.h>
static void __init zap_identity_mappings(void) static void __init zap_identity_mappings(void)
{ {
...@@ -49,7 +50,6 @@ static void __init copy_bootdata(char *real_mode_data) ...@@ -49,7 +50,6 @@ static void __init copy_bootdata(char *real_mode_data)
} }
} }
#define BIOS_EBDA_SEGMENT 0x40E
#define BIOS_LOWMEM_KILOBYTES 0x413 #define BIOS_LOWMEM_KILOBYTES 0x413
/* /*
...@@ -80,8 +80,7 @@ static void __init reserve_ebda_region(void) ...@@ -80,8 +80,7 @@ static void __init reserve_ebda_region(void)
lowmem <<= 10; lowmem <<= 10;
/* start of EBDA area */ /* start of EBDA area */
ebda_addr = *(unsigned short *)__va(BIOS_EBDA_SEGMENT); ebda_addr = get_bios_ebda();
ebda_addr <<= 4;
/* Fixup: bios puts an EBDA in the top 64K segment */ /* Fixup: bios puts an EBDA in the top 64K segment */
/* of conventional memory, but does not adjust lowmem. */ /* of conventional memory, but does not adjust lowmem. */
......
...@@ -389,7 +389,6 @@ unsigned long __init find_max_low_pfn(void) ...@@ -389,7 +389,6 @@ unsigned long __init find_max_low_pfn(void)
return max_low_pfn; return max_low_pfn;
} }
#define BIOS_EBDA_SEGMENT 0x40E
#define BIOS_LOWMEM_KILOBYTES 0x413 #define BIOS_LOWMEM_KILOBYTES 0x413
/* /*
...@@ -420,8 +419,7 @@ static void __init reserve_ebda_region(void) ...@@ -420,8 +419,7 @@ static void __init reserve_ebda_region(void)
lowmem <<= 10; lowmem <<= 10;
/* start of EBDA area */ /* start of EBDA area */
ebda_addr = *(unsigned short *)__va(BIOS_EBDA_SEGMENT); ebda_addr = get_bios_ebda();
ebda_addr <<= 4;
/* Fixup: bios puts an EBDA in the top 64K segment */ /* Fixup: bios puts an EBDA in the top 64K segment */
/* of conventional memory, but does not adjust lowmem. */ /* of conventional memory, but does not adjust lowmem. */
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/bios_ebda.h>
#include <asm/mach-summit/mach_mpparse.h> #include <asm/mach-summit/mach_mpparse.h>
static struct rio_table_hdr *rio_table_hdr __initdata; static struct rio_table_hdr *rio_table_hdr __initdata;
...@@ -140,8 +141,8 @@ void __init setup_summit(void) ...@@ -140,8 +141,8 @@ void __init setup_summit(void)
int i, next_wpeg, next_bus = 0; int i, next_wpeg, next_bus = 0;
/* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */ /* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */
ptr = *(unsigned short *)phys_to_virt(0x40Eul); ptr = get_bios_ebda();
ptr = (unsigned long)phys_to_virt(ptr << 4); ptr = (unsigned long)phys_to_virt(ptr);
rio_table_hdr = NULL; rio_table_hdr = NULL;
offset = 0x180; offset = 0x180;
......
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