arm64: Reorganize payload entry code and related Kconfigs

Rename Kconfig options for secmon and spintable to be prefixed with
ARM64_ instead of ARCH_, which seems to be the standard throughout the
rest of coreboot (e.g. ARM_LPAE or X86_BOOTBLOCK_SIMPLE). I think this
provides a clearer separation between generic options that are selected
by the architecture (e.g. a hypothetical ARCH_HAS_FEATURE_X similar to
some of the MAINBOARD_HAS_... we have) and options that only make sense
in the context of a single architecture.

Change-Id: I38c2efab833f252adbb7b61ef0af60ab25b768b0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5067e47bc03f04ad2dba044f022716e0fc62bb9e
Original-Change-Id: I1b2038acc0d054716a3c580ce97ea8e9a45abfa2
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/270783
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/10242
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Julius Werner 2015-05-07 16:59:31 -07:00 committed by Patrick Georgi
parent 75515eaa4b
commit f1df50edf3
9 changed files with 14 additions and 13 deletions

View File

@ -28,12 +28,13 @@ config ARM64_BOOTBLOCK_CUSTOM
bool
default n
config ARCH_USE_SECURE_MONITOR
config ARM64_USE_SECURE_MONITOR
bool
default n
select RELOCATABLE_MODULES
depends on ARCH_RAMSTAGE_ARM64
config ARCH_SPINTABLE
config ARM64_USE_SPINTABLE
bool
default n
depends on ARCH_RAMSTAGE_ARM64

View File

@ -153,7 +153,7 @@ ramstage-y += ../../lib/memcpy.c
ramstage-y += ../../lib/memmove.c
ramstage-y += stage_entry.S
ramstage-y += cpu-stubs.c
ramstage-$(CONFIG_ARCH_SPINTABLE) += spintable.c spintable_asm.S
ramstage-$(CONFIG_ARM64_USE_SPINTABLE) += spintable.c spintable_asm.S
ramstage-y += transition.c transition_asm.S
rmodules_arm64-y += ../../lib/memset.c

View File

@ -21,7 +21,7 @@
subdirs-y += lib/
subdirs-$(CONFIG_ARCH_USE_SECURE_MONITOR) += secmon/
subdirs-$(CONFIG_ARM64_USE_SECURE_MONITOR) += secmon/
armv8_flags = -march=armv8-a -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8
@ -92,7 +92,7 @@ ramstage-y += cpu.S
ramstage-y += exception.c
ramstage-y += mmu.c
ramstage-$(CONFIG_ARCH_USE_SECURE_MONITOR) += secmon_loader.c
ramstage-$(CONFIG_ARM64_USE_SECURE_MONITOR) += secmon_loader.c
ramstage-c-ccopts += $(armv8_flags)
ramstage-S-ccopts += $(armv8_asm_flags)

View File

@ -37,7 +37,7 @@ endif
ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV8_64),y)
ramstage-y += $(lib_access)
ifeq ($(CONFIG_ARCH_USE_SECURE_MONITOR),y)
ifeq ($(CONFIG_ARM64_USE_SECURE_MONITOR),y)
secmon-y += $(lib_access)
endif

View File

@ -25,7 +25,7 @@ struct spintable_attributes {
void *addr;
};
#if IS_ENABLED(CONFIG_ARCH_SPINTABLE)
#if IS_ENABLED(CONFIG_ARM64_USE_SPINTABLE)
/* Initialize spintable with provided monitor address. */
void spintable_init(void *monitor_address);
@ -33,7 +33,7 @@ void spintable_init(void *monitor_address);
/* Return NULL on failure, otherwise the spintable info. */
const struct spintable_attributes *spintable_get_attributes(void);
#else /* IS_ENABLED(CONFIG_SPINTABLE) */
#else /* IS_ENABLED(CONFIG_ARM64_USE_SPINTABLE) */
static inline void spintable_init(void *monitor_address) {}
static inline const struct spintable_attributes *spintable_get_attributes(void)
@ -41,7 +41,7 @@ static inline const struct spintable_attributes *spintable_get_attributes(void)
return NULL;
}
#endif /* IS_ENABLED(CONFIG_SPINTABLE) */
#endif /* IS_ENABLED(CONFIG_ARM64_USE_SPINTABLE) */
/* Start spinning on the non-boot CPUs. */
void spintable_start(void);

View File

@ -33,7 +33,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select MAINBOARD_HAS_CHROMEOS
select VIRTUAL_DEV_SWITCH
select BOARD_ROMSIZE_KB_4096
select ARCH_SPINTABLE
select ARM64_USE_SPINTABLE
select CHROMEOS_VBNV_EC
config MAINBOARD_DIR

View File

@ -34,7 +34,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select MAINBOARD_HAS_CHROMEOS
select BOARD_ROMSIZE_KB_8192
select VIRTUAL_DEV_SWITCH
select ARCH_SPINTABLE
select ARM64_USE_SPINTABLE
select CHROMEOS_VBNV_EC
config MAINBOARD_DIR

View File

@ -16,7 +16,7 @@ config SOC_NVIDIA_TEGRA132
select ARM_BOOTBLOCK_CUSTOM
select DYNAMIC_CBMEM
select SMP
select ARCH_USE_SECURE_MONITOR
select ARM64_USE_SECURE_MONITOR
select GENERIC_GPIO_LIB
if SOC_NVIDIA_TEGRA132

View File

@ -96,7 +96,7 @@ ramstage-y += ramstage.c
ramstage-y += mmu_operations.c
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
ramstage-y += ../tegra/usb.c
ramstage-$(CONFIG_ARCH_USE_SECURE_MONITOR) += secmon.c
ramstage-$(CONFIG_ARM64_USE_SECURE_MONITOR) += secmon.c
secmon-y += 32bit_reset.S
secmon-y += cpu.c