]> xenbits.xensource.com Git - people/royger/xen.git/commit
xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()
authorWei Chen <wei.chen@arm.com>
Mon, 28 Aug 2023 01:32:12 +0000 (09:32 +0800)
committerStefano Stabellini <stefano.stabellini@amd.com>
Fri, 8 Sep 2023 22:07:19 +0000 (15:07 -0700)
commitd2f8df5b3ede709f39498227f766574c241f3ee6
tree4754c0935cea07160ea763cb3cc4f128e6526c58
parentcba6d44a13d5e25334d164e27cb1b1d7674aa05e
xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()

At the moment, on MMU system, enable_mmu() will return to an
address in the 1:1 mapping, then each path is responsible to
switch to virtual runtime mapping. Then remove_identity_mapping()
is called on the boot CPU to remove all 1:1 mapping.

Since remove_identity_mapping() is not necessary on Non-MMU system,
and we also avoid creating empty function for Non-MMU system, trying
to keep only one codeflow in arm64/head.S, we move path switch and
remove_identity_mapping() in enable_mmu() on MMU system.

As the remove_identity_mapping should only be called for the boot
CPU only, so we introduce enable_boot_cpu_mm() for boot CPU and
enable_secondary_cpu_mm() for secondary CPUs in this patch.

Signed-off-by: Wei Chen <wei.chen@arm.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Ayan Kumar Halder <ayankuma@amd.com>
xen/arch/arm/arm64/head.S