Hi, On 18/09/2024 19:51, Ayan Kumar Halder wrote:
Secondary cpus initialization is not yet supported. Thus, we print an appropriate message and put the secondary cpus in WFE state.Signed-off-by: Ayan Kumar Halder <[email protected]> --- Changes from :- v1 - 1. NR_CPUS is defined as 1 for MPU 2. Added a message in enable_secondary_cpu_mm() xen/arch/Kconfig | 1 + xen/arch/arm/arm64/mpu/head.S | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig index 308ce129a8..8640b7ec8b 100644 --- a/xen/arch/Kconfig +++ b/xen/arch/Kconfig @@ -11,6 +11,7 @@ config NR_CPUS default "8" if ARM && RCAR3 default "4" if ARM && QEMU default "4" if ARM && MPSOC + default "1" if ARM && MPU default "128" if ARM help Controls the build-time size of various arrays and bitmaps diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S index ef55c8765c..3dfbbf8879 100644 --- a/xen/arch/arm/arm64/mpu/head.S +++ b/xen/arch/arm/arm64/mpu/head.S @@ -168,6 +168,16 @@ FUNC(enable_boot_cpu_mm) b 1b END(enable_boot_cpu_mm)+/*+ * Secondary cpu has not yet been supported on MPU systems. We will block the + * secondary cpu bringup at this stage.
Given that NR_CPUS is 1, this should not be reachable. How about the following comment:
"We don't yet support secondary CPUs bring-up. Implement a dummy helper to please the common code."
+ */
+ENTRY(enable_secondary_cpu_mm)
+1: PRINT("- SMP not enabled yet -\r\n")
You want the print to be outside of the loop. Otherwise, it will spam the console in the unlikely case the code is reached.
+ wfe + b 1b +ENDPROC(enable_secondary_cpu_mm) + /* * Local variables: * mode: ASM
Cheers, -- Julien Grall
