aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-10-12 10:52:48 -0400
committerTom Rini <trini@konsulko.com>2019-10-12 10:52:48 -0400
commit9189d6f1e9c4ae40a14558636ed7b59b53c4c885 (patch)
tree88cf3ab7d7c967e2de9cdfd9cc9a3e8c99cb64c0 /arch
parent0c9cc5155cb5027ae17ace986f349e2f0d1fb9a3 (diff)
parentc443f56cc699f25feb4618791730d11a0eb6280a (diff)
downloadu-boot-9189d6f1e9c4ae40a14558636ed7b59b53c4c885.zip
u-boot-9189d6f1e9c4ae40a14558636ed7b59b53c4c885.tar.gz
u-boot-9189d6f1e9c4ae40a14558636ed7b59b53c4c885.tar.bz2
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Remember the device being emulated for Sandbox PCI - Update Kconfig options for FSP 1.0 - Drop RESET_BASE and RESET_SEG_SIZE that are no longer used
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/Kconfig19
-rw-r--r--arch/x86/cpu/config.mk2
-rw-r--r--arch/x86/cpu/resetvec.S3
-rw-r--r--arch/x86/lib/mrccache.c15
-rw-r--r--arch/x86/lib/spl.c2
-rw-r--r--arch/x86/lib/tpl.c2
6 files changed, 17 insertions, 26 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 47bf28c..17a6fe6 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -207,11 +207,6 @@ config RESET_SEG_START
depends on X86_RESET_VECTOR
default 0xffff0000
-config RESET_SEG_SIZE
- hex
- depends on X86_RESET_VECTOR
- default 0x10000
-
config RESET_VEC_LOC
hex
depends on X86_RESET_VECTOR
@@ -397,7 +392,7 @@ endchoice
config FSP_FILE
string "Firmware Support Package binary filename"
- depends on HAVE_FSP
+ depends on FSP_VERSION1
default "fsp.bin"
help
The filename of the file to use as Firmware Support Package binary
@@ -405,7 +400,7 @@ config FSP_FILE
config FSP_ADDR
hex "Firmware Support Package binary location"
- depends on HAVE_FSP
+ depends on FSP_VERSION1
default 0xfffc0000
help
FSP is not Position Independent Code (PIC) and the whole FSP has to
@@ -418,7 +413,7 @@ config FSP_ADDR
config FSP_TEMP_RAM_ADDR
hex
- depends on HAVE_FSP
+ depends on FSP_VERSION1
default 0x2000000
help
Stack top address which is used in fsp_init() after DRAM is ready and
@@ -426,14 +421,14 @@ config FSP_TEMP_RAM_ADDR
config FSP_SYS_MALLOC_F_LEN
hex
- depends on HAVE_FSP
+ depends on FSP_VERSION1
default 0x100000
help
Additional size of malloc() pool before relocation.
config FSP_USE_UPD
bool
- depends on HAVE_FSP
+ depends on FSP_VERSION1
default y
help
Most FSPs use UPD data region for some FSP customization. But there
@@ -442,7 +437,7 @@ config FSP_USE_UPD
config FSP_BROKEN_HOB
bool
- depends on HAVE_FSP
+ depends on FSP_VERSION1
help
Indicate some buggy FSPs that does not report memory used by FSP
itself as reserved in the resource descriptor HOB. Select this to
@@ -600,7 +595,7 @@ config VGA_BIOS_ADDR
config HAVE_VBT
bool "Add a Video BIOS Table (VBT) image"
- depends on HAVE_FSP
+ depends on FSP_VERSION1
help
Select this option if you have a Video BIOS Table (VBT) image that
you would like to add to your ROM. This is normally required if you
diff --git a/arch/x86/cpu/config.mk b/arch/x86/cpu/config.mk
index 22416f3..8f9814c 100644
--- a/arch/x86/cpu/config.mk
+++ b/arch/x86/cpu/config.mk
@@ -7,10 +7,8 @@ CROSS_COMPILE ?= i386-linux-
# DO NOT MODIFY THE FOLLOWING UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
LDPPFLAGS += -DRESET_SEG_START=$(CONFIG_RESET_SEG_START)
-LDPPFLAGS += -DRESET_SEG_SIZE=$(CONFIG_RESET_SEG_SIZE)
LDPPFLAGS += -DRESET_VEC_LOC=$(CONFIG_RESET_VEC_LOC)
LDPPFLAGS += -DSTART_16=$(CONFIG_SYS_X86_START16)
-LDPPFLAGS += -DRESET_BASE="CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE)"
ifdef CONFIG_X86_64
ifndef CONFIG_SPL_BUILD
diff --git a/arch/x86/cpu/resetvec.S b/arch/x86/cpu/resetvec.S
index a52225d..cf97273 100644
--- a/arch/x86/cpu/resetvec.S
+++ b/arch/x86/cpu/resetvec.S
@@ -16,6 +16,3 @@ reset_vector:
cli
cld
jmp start16
-
- .org 0xf
- nop
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index be10762..33bb520 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -17,19 +17,20 @@
DECLARE_GLOBAL_DATA_PTR;
+static uint mrc_block_size(uint data_size)
+{
+ uint mrc_size = sizeof(struct mrc_data_container) + data_size;
+
+ return ALIGN(mrc_size, MRC_DATA_ALIGN);
+}
+
static struct mrc_data_container *next_mrc_block(
struct mrc_data_container *cache)
{
/* MRC data blocks are aligned within the region */
- u32 mrc_size = sizeof(*cache) + cache->data_size;
u8 *region_ptr = (u8 *)cache;
- if (mrc_size & (MRC_DATA_ALIGN - 1UL)) {
- mrc_size &= ~(MRC_DATA_ALIGN - 1UL);
- mrc_size += MRC_DATA_ALIGN;
- }
-
- region_ptr += mrc_size;
+ region_ptr += mrc_block_size(cache->data_size);
return (struct mrc_data_container *)region_ptr;
}
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 2baac91..7623fc9 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -113,7 +113,7 @@ void board_init_f(ulong flags)
ret = x86_spl_init();
if (ret) {
debug("Error %d\n", ret);
- hang();
+ panic("x86_spl_init fail");
}
#ifdef CONFIG_TPL
gd->bd = malloc(sizeof(*gd->bd));
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index cfefa78..d70f590 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -55,7 +55,7 @@ void board_init_f(ulong flags)
ret = x86_tpl_init();
if (ret) {
debug("Error %d\n", ret);
- hang();
+ panic("x86_tpl_init fail");
}
/* Uninit CAR and jump to board_init_f_r() */