All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: Kconfig: Disable ARM_VIRT extension if XIP_KERNEL
@ 2026-04-28 21:58 Rob Herring (Arm)
  0 siblings, 0 replies; only message in thread
From: Rob Herring (Arm) @ 2026-04-28 21:58 UTC (permalink / raw)
  To: Russell King
  Cc: Arnd Bergmann, Vishnu Banavath, linux-arm-kernel, linux-kernel

From: Vishnu Banavath <vishnu.banavath@arm.com>

XIP is intended to execute kernel inplace and typically from
flash and is used mostly on low memory devices.

.macro  store_primary_cpu_mode  reg1, reg2, reg3
        mrs     \reg1, cpsr
        and     \reg1, \reg1, #MODE_MASK
        adr     \reg2, .L__boot_cpu_mode_offset
        ldr     \reg3, [\reg2]
        str     \reg1, [\reg2, \reg3]

As text section is in flash memory and data section is in RAM.
L__boot_cpu_mode_offset would evaluate to address based
on virtual addresses provided by linker script. At this stage
the MMU is OFF.

The logic used based stored @L__boot_cpu_mode_offset on the offset
between the  boot_cpu_mode in data section and the location of
L__boot_cpu_mode_offset can't be used along with PC to fetch the value
of boot_cpu_mode doesn't work.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
This patch is from Alif E8 SoC tree which I'm working on. It's 
originally from corstone700 trees.

 arch/arm/mm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 7b27ee9482b3..e2f5d3d7d3fb 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -705,6 +705,7 @@ config ARM_THUMBEE
 
 config ARM_VIRT_EXT
 	bool
+	depends on MMU && !XIP_KERNEL
 	default y if CPU_V7
 	help
 	  Enable the kernel to make use of the ARM Virtualization
-- 
2.53.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-28 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 21:58 [PATCH] ARM: Kconfig: Disable ARM_VIRT extension if XIP_KERNEL Rob Herring (Arm)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.