diff options
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/virt-v7.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig index bd6108eec0..41c6639c13 100644 --- a/arch/arm/cpu/armv7/Kconfig +++ b/arch/arm/cpu/armv7/Kconfig @@ -7,14 +7,14 @@ config CPU_V7_HAS_VIRT bool config ARMV7_NONSEC - boolean "Enable support for booting in non-secure mode" if EXPERT + bool "Enable support for booting in non-secure mode" if EXPERT depends on CPU_V7_HAS_NONSEC default y ---help--- Say Y here to enable support for booting in non-secure / SVC mode. config ARMV7_BOOT_SEC_DEFAULT - boolean "Boot in secure mode by default" if EXPERT + bool "Boot in secure mode by default" if EXPERT depends on ARMV7_NONSEC default y if TEGRA ---help--- @@ -25,14 +25,14 @@ config ARMV7_BOOT_SEC_DEFAULT variable to "sec" or "nonsec". config ARMV7_VIRT - boolean "Enable support for hardware virtualization" if EXPERT + bool "Enable support for hardware virtualization" if EXPERT depends on CPU_V7_HAS_VIRT && ARMV7_NONSEC default y ---help--- Say Y here to boot in hypervisor (HYP) mode when booting non-secure. config ARMV7_LPAE - boolean "Use LPAE page table format" if EXPERT + bool "Use LPAE page table format" if EXPERT depends on CPU_V7 default n ---help--- diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index 9c533060b8..d33e5c61a9 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -54,10 +54,12 @@ static void relocate_secure_section(void) { #ifdef CONFIG_ARMV7_SECURE_BASE size_t sz = __secure_end - __secure_start; + unsigned long szflush = ALIGN(sz + 1, CONFIG_SYS_CACHELINE_SIZE); memcpy((void *)CONFIG_ARMV7_SECURE_BASE, __secure_start, sz); + flush_dcache_range(CONFIG_ARMV7_SECURE_BASE, - CONFIG_ARMV7_SECURE_BASE + sz + 1); + CONFIG_ARMV7_SECURE_BASE + szflush); protect_secure_section(); invalidate_icache_all(); #endif |