arch|cpu/x86: Add Kconfig option for x86 reset vector
Prepare for an implementation supporting the reset vector in RAM and not the traditional 0xfffffff0. Add a Kconfig symbol that can be used in place of hardcoded values. Change-Id: I6a814f7179ee4251aeeccb2555221616e944e03d Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37485 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
4ba70a7575
commit
67910db907
|
@ -87,6 +87,16 @@ config AP_IN_SIPI_WAIT
|
||||||
default n
|
default n
|
||||||
depends on ARCH_X86 && SMP
|
depends on ARCH_X86 && SMP
|
||||||
|
|
||||||
|
config X86_RESET_VECTOR
|
||||||
|
hex
|
||||||
|
depends on ARCH_X86
|
||||||
|
default 0xfffffff0
|
||||||
|
help
|
||||||
|
Specify the location of the x86 reset vector. In traditional devices
|
||||||
|
this must match the architectural reset vector to produce a bootable
|
||||||
|
image. Nontraditional designs may use this to position the reset
|
||||||
|
vector into its desired location.
|
||||||
|
|
||||||
config RESET_VECTOR_IN_RAM
|
config RESET_VECTOR_IN_RAM
|
||||||
bool
|
bool
|
||||||
depends on ARCH_X86
|
depends on ARCH_X86
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
rom : ORIGIN = 0xffff0000, LENGTH = 64K
|
rom : ORIGIN = CONFIG_X86_RESET_VECTOR - 0xfff0, LENGTH = 64K
|
||||||
}
|
}
|
||||||
|
|
||||||
TARGET(binary)
|
TARGET(binary)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
. = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
|
. = (CONFIG_X86_RESET_VECTOR - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 0x10;
|
||||||
.id (.): {
|
.id (.): {
|
||||||
KEEP(*(.id))
|
KEEP(*(.id))
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ SECTIONS
|
||||||
#include EARLY_MEMLAYOUT
|
#include EARLY_MEMLAYOUT
|
||||||
#elif ENV_BOOTBLOCK
|
#elif ENV_BOOTBLOCK
|
||||||
/* arch/x86/bootblock.ld contains the logic for the ROMCC_BOOTBLOCK linking. */
|
/* arch/x86/bootblock.ld contains the logic for the ROMCC_BOOTBLOCK linking. */
|
||||||
BOOTBLOCK(0xffffffff - CONFIG_C_ENV_BOOTBLOCK_SIZE + 1,
|
BOOTBLOCK(CONFIG_X86_RESET_VECTOR - CONFIG_C_ENV_BOOTBLOCK_SIZE + 0x10,
|
||||||
CONFIG_C_ENV_BOOTBLOCK_SIZE)
|
CONFIG_C_ENV_BOOTBLOCK_SIZE)
|
||||||
|
|
||||||
#include EARLY_MEMLAYOUT
|
#include EARLY_MEMLAYOUT
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
. = 0xffffffc0;
|
. = CONFIG_X86_RESET_VECTOR - 0x30; /* 0xffffffc0 */
|
||||||
.fit_pointer (.): {
|
.fit_pointer (.): {
|
||||||
KEEP(*(.fit_pointer))
|
KEEP(*(.fit_pointer))
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,14 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* _RESET_VECTOR: typically the top of the ROM */
|
||||||
* _ROMTOP : The top of the ROM used where we
|
|
||||||
* need to put the reset vector.
|
|
||||||
*/
|
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
/* Trigger an error if I have an unuseable start address */
|
/* Trigger an error if I have an unuseable start address */
|
||||||
_bogus = ASSERT(_start16bit >= 0xffff0000, "_start16bit too low. Please report.");
|
_TOO_LOW = CONFIG_X86_RESET_VECTOR - 0xfff0;
|
||||||
_ROMTOP = 0xfffffff0;
|
_bogus = ASSERT(_start16bit >= _TOO_LOW, "_start16bit too low. Please report.");
|
||||||
. = _ROMTOP;
|
|
||||||
|
. = CONFIG_X86_RESET_VECTOR;
|
||||||
.reset . : {
|
.reset . : {
|
||||||
*(.reset);
|
*(.reset);
|
||||||
. = 15;
|
. = 15;
|
||||||
|
|
Loading…
Reference in New Issue