summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorShuo Liu <shuo.liu@intel.com>2022-07-05 02:37:16 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-10-02 14:15:19 +0000
commitb90fac1cfe2fc858e60b6875752ea9dc69b72850 (patch)
treeb5cae74cc656d47db46e6e319f3dcd3f32b59968 /src/arch
parenta0975050fa01d9dd5d20531de9727a694eb60e4c (diff)
arch/x86: Shadow ROM tables into EBDA
For platforms without writable PAM-F segment support (e.g. some simics virtual platforms), put ROM table pointers (e.g. ACPI/SMBIOS low pointers) into EBDA. Signed-off-by: Shuo Liu <shuo.liu@intel.com> Signed-off-by: Gang Chen <gang.c.chen@intel.com> Signed-off-by: Jincheng Li <jincheng.li@intel.com> Change-Id: I2aac74708279813f9a848044d470fdc980ea4305 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84322 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/Kconfig7
-rw-r--r--src/arch/x86/tables.c11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 4737e3cca1..2db526e34c 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -439,4 +439,11 @@ config DEFAULT_EBDA_SIZE
default 0x400
help
The default value of EBDA size is 0x400.
+
+config SHADOW_ROM_TABLE_TO_EBDA
+ bool
+ default n
+ help
+ For platforms without writable PAM-F segment support. Put ROM table
+ pointers (e.g. ACPI/SMBIOS low pointers) into EBDA.
endif
diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c
index 273263820b..e47f1bce97 100644
--- a/src/arch/x86/tables.c
+++ b/src/arch/x86/tables.c
@@ -192,7 +192,12 @@ static uintptr_t forwarding_table = FORWARDING_TABLE_ADDR;
void arch_write_tables(uintptr_t coreboot_table)
{
size_t sz;
- unsigned long rom_table_end = 0xf0000;
+ unsigned long rom_table_end;
+
+ if (CONFIG(SHADOW_ROM_TABLE_TO_EBDA))
+ rom_table_end = CONFIG_DEFAULT_EBDA_SEGMENT << 4;
+ else
+ rom_table_end = 0xf0000;
/* This table must be between 0x0f0000 and 0x100000 */
if (CONFIG(GENERATE_PIRQ_TABLE))
@@ -224,4 +229,8 @@ void bootmem_arch_add_ranges(void)
const uintptr_t base = 0;
bootmem_add_range(base, forwarding_table - base, BM_MEM_TABLE);
+
+ /* Reserve Extend BIOS Data Area (EBDA) region explicitly */
+ bootmem_add_range((uintptr_t)CONFIG_DEFAULT_EBDA_SEGMENT << 4,
+ CONFIG_DEFAULT_EBDA_SIZE, BM_MEM_TABLE);
}