arch/x86: Enable ebda library for romstage and postcar
This patch provides a kconfig option as EARLY_EBDA_INIT to ensures user can make use of EBDA library even during early boot stages like romstage, postcar. Change-Id: I603800a531f56b6ebd460d5951c35a645fbfe492 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/21388 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
5d2928cdab
commit
c7590cd9f3
|
@ -135,6 +135,15 @@ config PRERAM_CBMEM_CONSOLE_SIZE
|
||||||
help
|
help
|
||||||
Increase this value if preram cbmem console is getting truncated
|
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
|
config PC80_SYSTEM
|
||||||
bool
|
bool
|
||||||
default y if ARCH_X86
|
default y if ARCH_X86
|
||||||
|
|
|
@ -209,6 +209,7 @@ romstage-y += boot.c
|
||||||
romstage-y += cbmem.c
|
romstage-y += cbmem.c
|
||||||
romstage-y += cbfs_and_run.c
|
romstage-y += cbfs_and_run.c
|
||||||
romstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += cpu_common.c
|
romstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += cpu_common.c
|
||||||
|
romstage-$(CONFIG_EARLY_EBDA_INIT) += ebda.c
|
||||||
romstage-y += memcpy.c
|
romstage-y += memcpy.c
|
||||||
romstage-y += memmove.c
|
romstage-y += memmove.c
|
||||||
romstage-y += memset.c
|
romstage-y += memset.c
|
||||||
|
@ -283,6 +284,7 @@ postcar-y += boot.c
|
||||||
postcar-y += cbfs_and_run.c
|
postcar-y += cbfs_and_run.c
|
||||||
postcar-y += cbmem.c
|
postcar-y += cbmem.c
|
||||||
postcar-y += cpu_common.c
|
postcar-y += cpu_common.c
|
||||||
|
postcar-$(CONFIG_EARLY_EBDA_INIT) += ebda.c
|
||||||
postcar-y += exit_car.S
|
postcar-y += exit_car.S
|
||||||
postcar-y += memcpy.c
|
postcar-y += memcpy.c
|
||||||
postcar-y += memmove.c
|
postcar-y += memmove.c
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef __ARCH_EBDA_H
|
#ifndef __ARCH_EBDA_H
|
||||||
#define __ARCH_EBDA_H
|
#define __ARCH_EBDA_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define X86_BDA_SIZE 0x200
|
#define X86_BDA_SIZE 0x200
|
||||||
#define X86_BDA_BASE ((void *)0x400)
|
#define X86_BDA_BASE ((void *)0x400)
|
||||||
#define X86_EBDA_SEGMENT ((void *)0x40e)
|
#define X86_EBDA_SEGMENT ((void *)0x40e)
|
||||||
|
|
|
@ -1179,8 +1179,13 @@ void dev_initialize(void)
|
||||||
printk(BIOS_INFO, "Initializing devices...\n");
|
printk(BIOS_INFO, "Initializing devices...\n");
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_ARCH_X86)
|
#if IS_ENABLED(CONFIG_ARCH_X86)
|
||||||
/* Ensure EBDA is prepared before Option ROMs. */
|
/*
|
||||||
setup_default_ebda();
|
* Initialize EBDA area in ramstage if early
|
||||||
|
* initialization is not done.
|
||||||
|
*/
|
||||||
|
if (!IS_ENABLED(CONFIG_EARLY_EBDA_INIT))
|
||||||
|
/* Ensure EBDA is prepared before Option ROMs. */
|
||||||
|
setup_default_ebda();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* First call the mainboard init. */
|
/* First call the mainboard init. */
|
||||||
|
|
Loading…
Reference in New Issue