arm64: Reorganize payload entry code and related Kconfigs

The secure monitor entry is now guarded by an explicit if
statement for its Kconfig rather than hiding than in the corresponding
header file. This makes it clear that there are two (soon three)
separate code paths here. Similar change for the optional spintable
feature in the "legacy" payload entry path.

[pg: split out from the patch linked below]

Change-Id: Ia1554959b3268b718a9606e2f79d8f22f336c94d
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/10248
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 59e7b42af7
commit 75515eaa4b
2 changed files with 3 additions and 12 deletions

View File

@ -30,16 +30,12 @@ struct spintable_attributes {
/* Initialize spintable with provided monitor address. */
void spintable_init(void *monitor_address);
/* Start spinning on the non-boot CPUS. */
void spintable_start(void);
/* Return NULL on failure, otherwise the spintable info. */
const struct spintable_attributes *spintable_get_attributes(void);
#else /* IS_ENABLED(CONFIG_SPINTABLE) */
static inline void spintable_init(void *monitor_address) {}
static inline void spintable_start(void) {}
static inline const struct spintable_attributes *spintable_get_attributes(void)
{
return NULL;
@ -47,4 +43,7 @@ static inline const struct spintable_attributes *spintable_get_attributes(void)
#endif /* IS_ENABLED(CONFIG_SPINTABLE) */
/* Start spinning on the non-boot CPUs. */
void spintable_start(void);
#endif /* __ARCH_SPINTABLE_H__ */

View File

@ -22,8 +22,6 @@
#include <arch/cpu.h>
#if IS_ENABLED(CONFIG_ARCH_USE_SECURE_MONITOR)
struct secmon_params {
size_t online_cpus;
struct cpu_action bsp;
@ -33,10 +31,4 @@ struct secmon_params {
void secmon_run(void (*entry)(void *), void *arg);
void soc_get_secmon_base_size(uint64_t *secmon_base, size_t *secmon_size);
#else
static inline void secmon_run(void (*entry)(void *), void *arg) {}
#endif /* IS_ENABLED(CONFIG_ARCH_USE_SECURE_MONITOR) */
#endif /*__ARCH_ARM64_ARMV8_SECMON__ */