|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: drop use of E801 memory "map" (and alike)
commit 925fdb0870f7c211c00caabbe9e4dae35cc19a01
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 7 15:09:47 2021 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 7 15:09:47 2021 +0100
x86: drop use of E801 memory "map" (and alike)
ACPI mandates use of E820 (or newer, e.g. EFI), and in fact firmware
has been observed to include E820_ACPI ranges in what E801 reports as
available (really "configured") memory. Since all 64-bit systems ought
to support ACPI, drop our use of older BIOS and boot loader interfaces.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/boot/mem.S | 45 ++++-----------------------------------------
xen/arch/x86/setup.c | 22 ----------------------
xen/include/asm-x86/e820.h | 1 -
3 files changed, 4 insertions(+), 64 deletions(-)
diff --git a/xen/arch/x86/boot/mem.S b/xen/arch/x86/boot/mem.S
index 5b9ab5c1de..a2db7b5d4d 100644
--- a/xen/arch/x86/boot/mem.S
+++ b/xen/arch/x86/boot/mem.S
@@ -4,8 +4,6 @@
#define E820_BIOS_MAX 128
get_memory_map:
-
-.Lmeme820:
xorl %ebx, %ebx # continuation counter
movw $bootsym(bios_e820map), %di # point into the whitelist
# so we can have the bios
@@ -17,14 +15,14 @@ get_memory_map:
pushw %ds # data record.
popw %es
int $0x15
- jc .Lmem88
+ jc .Ldone
cmpl $SMAP,%eax # check the return is `SMAP'
- jne .Lmem88
+ jne .Ldone
incw bootsym(bios_e820nr)
cmpw $E820_BIOS_MAX, bootsym(bios_e820nr) # up to this many entries
- jae .Lmem88
+ jae .Ldone
movw %di,%ax
addw $20,%ax
@@ -32,38 +30,7 @@ get_memory_map:
testl %ebx,%ebx # check to see if
jnz 1b # %ebx is set to EOF
-.Lmem88:
- movb $0x88, %ah
- int $0x15
- movw %ax,bootsym(highmem_kb)
-
-.Lmeme801:
- stc # fix to work around buggy
- xorw %cx,%cx # BIOSes which don't clear/set
- xorw %dx,%dx # carry on pass/error of
- # e801h memory size call
- # or merely pass cx,dx though
- # without changing them.
- movw $0xe801, %ax
- int $0x15
- jc .Lint12
-
- testw %cx, %cx # Kludge to handle BIOSes
- jnz 1f # which report their extended
- testw %dx, %dx # memory in AX/BX rather than
- jnz 1f # CX/DX. The spec I have read
- movw %ax, %cx # seems to indicate AX/BX
- movw %bx, %dx # are more reasonable anyway...
-1: movzwl %dx, %edx
- shll $6,%edx # and go from 64k to 1k chunks
- movzwl %cx, %ecx
- addl %ecx, %edx # add in lower memory
- movl %edx,bootsym(highmem_kb) # store extended memory size
-
-.Lint12:
- int $0x12
- movw %ax,bootsym(lowmem_kb)
-
+.Ldone:
ret
.align 4
@@ -71,7 +38,3 @@ GLOBAL(bios_e820map)
.fill E820_BIOS_MAX*20,1,0
GLOBAL(bios_e820nr)
.long 0
-GLOBAL(lowmem_kb)
- .long 0
-GLOBAL(highmem_kb)
- .long 0
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 5cdb0f0f92..ad65167864 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1059,28 +1059,6 @@ void __init noreturn __start_xen(unsigned long mbi_p)
bytes += map->size + 4;
}
}
- else if ( bootsym(lowmem_kb) )
- {
- memmap_type = "Xen-e801";
- e820_raw.map[0].addr = 0;
- e820_raw.map[0].size = bootsym(lowmem_kb) << 10;
- e820_raw.map[0].type = E820_RAM;
- e820_raw.map[1].addr = 0x100000;
- e820_raw.map[1].size = bootsym(highmem_kb) << 10;
- e820_raw.map[1].type = E820_RAM;
- e820_raw.nr_map = 2;
- }
- else if ( mbi->flags & MBI_MEMLIMITS )
- {
- memmap_type = "Multiboot-e801";
- e820_raw.map[0].addr = 0;
- e820_raw.map[0].size = mbi->mem_lower << 10;
- e820_raw.map[0].type = E820_RAM;
- e820_raw.map[1].addr = 0x100000;
- e820_raw.map[1].size = mbi->mem_upper << 10;
- e820_raw.map[1].type = E820_RAM;
- e820_raw.nr_map = 2;
- }
else
panic("Bootloader provided no memory information\n");
diff --git a/xen/include/asm-x86/e820.h b/xen/include/asm-x86/e820.h
index 52916fb75d..9d8f1ba960 100644
--- a/xen/include/asm-x86/e820.h
+++ b/xen/include/asm-x86/e820.h
@@ -36,7 +36,6 @@ extern struct e820map e820;
extern struct e820map e820_raw;
/* These symbols live in the boot trampoline. */
-extern unsigned int lowmem_kb, highmem_kb;
extern struct e820map bios_e820map[];
extern unsigned int bios_e820nr;
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |