Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36363 )
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
arch/x86: Remove EARLY_EBDA_INIT support
This is unused now.
Change-Id: Ie8bc1d6761d66c5e1dda40c34c940cdba90646d2 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/x86/Kconfig M src/arch/x86/Makefile.inc M src/arch/x86/ebda.c M src/arch/x86/include/arch/ebda.h M src/arch/x86/tables.c M src/device/device.c 6 files changed, 3 insertions(+), 111 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/36363/1
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig index 8ce5977..4ea11ea 100644 --- a/src/arch/x86/Kconfig +++ b/src/arch/x86/Kconfig @@ -141,15 +141,6 @@ help Increase this value if preram cbmem console is getting truncated
-config EARLY_EBDA_INIT - bool - default n - help - Initialize BIOS EBDA area early in romstage to allow bootloader to - use this region for storing data which can be available across - various stages. If user is selecting this option then its users - responsibility to perform EBDA initialization call during romstage. - config PC80_SYSTEM bool default y if ARCH_X86 diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 612424d..e3aa7fe 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -226,7 +226,6 @@ romstage-y += cbmem.c romstage-y += cbfs_and_run.c romstage-y += cpu_common.c -romstage-$(CONFIG_EARLY_EBDA_INIT) += ebda.c romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += exception.c romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += idt.S romstage-y += memcpy.c @@ -266,7 +265,6 @@ postcar-y += cbfs_and_run.c postcar-y += cbmem.c postcar-y += cpu_common.c -postcar-$(CONFIG_EARLY_EBDA_INIT) += ebda.c postcar-$(CONFIG_IDT_IN_EVERY_STAGE) += exception.c postcar-$(CONFIG_IDT_IN_EVERY_STAGE) += idt.S postcar-y += exit_car.S diff --git a/src/arch/x86/ebda.c b/src/arch/x86/ebda.c index d1212f9..80909f6 100644 --- a/src/arch/x86/ebda.c +++ b/src/arch/x86/ebda.c @@ -39,43 +39,7 @@ * the top of conventional memory (below 1MB) */
-/* - * write_ebda_data is a wrapper function to write into EBDA area - * - * data = data to be written into EBDA area - * length = input data size. - */ -void write_ebda_data(const void *data, size_t length) -{ - void *ebda; - - if (!is_length_valid(length)) - die("Input data length is > EBDA default size (1KiB)!"); - - ebda = get_ebda_start(); - - memcpy(ebda, data, length); -} - -/* - * read_ebda_data is a wrapper function to read from EBDA area - * - * data = data read from EBDA area based on input size - * length = read data size. - */ -void read_ebda_data(void *data, size_t length) -{ - void *ebda; - - if (!is_length_valid(length)) - die("Input data length is > EBDA default size (1KiB)!"); - - ebda = get_ebda_start(); - - memcpy(data, ebda, length); -} - -void setup_ebda(u32 low_memory_size, u16 ebda_segment, u16 ebda_size) +static void setup_ebda(u32 low_memory_size, u16 ebda_segment, u16 ebda_size) { u16 low_memory_kb; u16 ebda_kb; diff --git a/src/arch/x86/include/arch/ebda.h b/src/arch/x86/include/arch/ebda.h index 534fb3d..6ee3332 100644 --- a/src/arch/x86/include/arch/ebda.h +++ b/src/arch/x86/include/arch/ebda.h @@ -27,27 +27,6 @@ #define DEFAULT_EBDA_SEGMENT 0xF600 #define DEFAULT_EBDA_SIZE 0x400
-void setup_ebda(u32 low_memory_size, u16 ebda_segment, u16 ebda_size); void setup_default_ebda(void);
-/* - * This read/write API only allows and assumes - * a single EBDA structure type for a platform. - */ - -/* - * write_ebda_data is a wrapper function to write into EBDA area - * - * data = data to be written into EBDA area - * length = input data size. - */ -void write_ebda_data(const void *data, size_t length); -/* - * read_ebda_data is a wrapper function to read from EBDA area - * - * data = data read from EBDA area based on input size - * length = read data size. - */ -void read_ebda_data(void *data, size_t length); - #endif diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c index ddb0710..55a4dd6 100644 --- a/src/arch/x86/tables.c +++ b/src/arch/x86/tables.c @@ -194,41 +194,6 @@ #define FORWARDING_TABLE_ADDR ((uintptr_t)0x500) static uintptr_t forwarding_table = FORWARDING_TABLE_ADDR;
-/* - * For EARLY_EBDA_INIT the BDA area will be wiped on the resume path which - * has the forwarding table entry. Therefore, when tables are written an - * entry is placed in cbmem that can be restored on OS resume to the proper - * location. - */ -static void stash_forwarding_table(uintptr_t addr, size_t sz) -{ - void *cbmem_addr = cbmem_add(CBMEM_ID_CBTABLE_FWD, sz); - - if (cbmem_addr == NULL) { - printk(BIOS_ERR, "Unable to allocate CBMEM forwarding entry.\n"); - return; - } - - memcpy(cbmem_addr, (void *)addr, sz); -} - -static void restore_forwarding_table(void *dest) -{ - const struct cbmem_entry *fwd_entry; - - fwd_entry = cbmem_entry_find(CBMEM_ID_CBTABLE_FWD); - - if (fwd_entry == NULL) { - printk(BIOS_ERR, "Unable to restore CBMEM forwarding entry.\n"); - return; - } - - memcpy(dest, cbmem_entry_start(fwd_entry), cbmem_entry_size(fwd_entry)); -} - -BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, - restore_forwarding_table, (void *)FORWARDING_TABLE_ADDR); - void arch_write_tables(uintptr_t coreboot_table) { size_t sz; diff --git a/src/device/device.c b/src/device/device.c index 333f1f0..5d9938f 100644 --- a/src/device/device.c +++ b/src/device/device.c @@ -1165,13 +1165,8 @@ printk(BIOS_INFO, "Initializing devices...\n");
#if CONFIG(ARCH_X86) - /* - * Initialize EBDA area in ramstage if early - * initialization is not done. - */ - if (!CONFIG(EARLY_EBDA_INIT)) - /* Ensure EBDA is prepared before Option ROMs. */ - setup_default_ebda(); + /* Ensure EBDA is prepared before Option ROMs. */ + setup_default_ebda(); #endif
/* First call the mainboard init. */
Hello Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36363
to look at the new patch set (#2).
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
arch/x86: Remove EARLY_EBDA_INIT support
This is unused now.
Change-Id: Ie8bc1d6761d66c5e1dda40c34c940cdba90646d2 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/x86/Kconfig M src/arch/x86/Makefile.inc M src/arch/x86/ebda.c M src/arch/x86/include/arch/ebda.h M src/arch/x86/tables.c M src/device/device.c 6 files changed, 3 insertions(+), 123 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/36363/2
Hello build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36363
to look at the new patch set (#15).
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
arch/x86: Remove EARLY_EBDA_INIT support
This is unused now.
Change-Id: Ie8bc1d6761d66c5e1dda40c34c940cdba90646d2 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/x86/Kconfig M src/arch/x86/Makefile.inc M src/arch/x86/ebda.c M src/arch/x86/include/arch/ebda.h M src/arch/x86/tables.c M src/device/device.c 6 files changed, 3 insertions(+), 123 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/36363/15
Hello build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36363
to look at the new patch set (#16).
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
arch/x86: Remove EARLY_EBDA_INIT support
This is unused now.
Change-Id: Ie8bc1d6761d66c5e1dda40c34c940cdba90646d2 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/x86/Kconfig M src/arch/x86/Makefile.inc M src/arch/x86/ebda.c M src/arch/x86/include/arch/ebda.h M src/arch/x86/tables.c M src/device/device.c 6 files changed, 3 insertions(+), 123 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/36363/16
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36363 )
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
Patch Set 20: Code-Review+2
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36363 )
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
Patch Set 20: Code-Review+1
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36363 )
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
Patch Set 26: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36363 )
Change subject: arch/x86: Remove EARLY_EBDA_INIT support ......................................................................
Patch Set 26: Code-Review+2