diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm64/armv8/Kconfig | 12 | ||||
-rw-r--r-- | src/arch/arm64/stage_entry.S | 16 |
2 files changed, 4 insertions, 24 deletions
diff --git a/src/arch/arm64/armv8/Kconfig b/src/arch/arm64/armv8/Kconfig index 88cd8cd9dd..02a8dba93b 100644 --- a/src/arch/arm64/armv8/Kconfig +++ b/src/arch/arm64/armv8/Kconfig @@ -13,15 +13,3 @@ config ARCH_ROMSTAGE_ARMV8_64 config ARCH_RAMSTAGE_ARMV8_64 def_bool n select ARCH_RAMSTAGE_ARM64 - -config ARM64_CPUS_START_IN_EL3 - def_bool n - depends on ARCH_BOOTBLOCK_ARM_V8_64 || ARCH_ROMSTAGE_ARM_V8_64 || ARCH_RAMSTAGE_ARM_V8_64 - -config ARM64_CPUS_START_IN_EL2 - def_bool n - depends on ARCH_BOOTBLOCK_ARM_V8_64 || ARCH_ROMSTAGE_ARM_V8_64 || ARCH_RAMSTAGE_ARM_V8_64 - -config ARM64_CPUS_START_IN_EL1 - def_bool n - depends on ARCH_BOOTBLOCK_ARM_V8_64 || ARCH_ROMSTAGE_ARM_V8_64 || ARCH_RAMSTAGE_ARM_V8_64 diff --git a/src/arch/arm64/stage_entry.S b/src/arch/arm64/stage_entry.S index e323de5d96..301711e8f9 100644 --- a/src/arch/arm64/stage_entry.S +++ b/src/arch/arm64/stage_entry.S @@ -19,16 +19,8 @@ #include <arch/asm.h> - -#if CONFIG_ARM64_CPUS_START_IN_EL3 -#define SCTLR_ELx sctlr_el3 -#elif CONFIG_ARM64_CPUS_START_IN_EL2 -#define SCTLR_ELx sctlr_el2 -#elif CONFIG_ARM64_CPUS_START_IN_EL1 -#define SCTLR_ELx sctlr_el1 -#else -#error Need to know what ELx processor starts up in. -#endif +#define __ASSEMBLY__ +#include <arch/lib_helpers.h> #define STACK_SZ CONFIG_STACK_SIZE #define EXCEPTION_STACK_SZ CONFIG_STACK_SIZE @@ -109,12 +101,12 @@ ENTRY(arm64_c_environment) ENDPROC(arm64_c_environment) CPU_RESET_ENTRY(arm64_cpu_startup) - mrs x0, SCTLR_ELx + read_current x0, sctlr bic x0, x0, #(1 << 25) /* Little Endian */ bic x0, x0, #(1 << 19) /* XN not enforced */ bic x0, x0, #(1 << 12) /* Disable Instruction Cache */ bic x0, x0, #0xf /* Clear SA, C, A, and M */ - msr SCTLR_ELx, x0 + write_current sctlr, x0, x1 isb b arm64_c_environment ENDPROC(arm64_cpu_startup) |