mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm64: head.S: Fix wrong enable_boot_cpu_mm() code movement
Some addressed comments on enable_boot_cpu_mm() were reintroduced
back during the code movement from arm64/head.S to arm64/mmu/head.S.
We should drop the unreachable code, move the 'mov lr, x5' closer to
'b remove_identity_mapping' so it is clearer that it will return,
and update the in-code comment accordingly.
Fixes: 6734327d76 ("xen/arm64: Split and move MMU-specific head.S to mmu/head.S")
Reported-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
This commit is contained in:
1 parent
39113a8a23
commit
405cff8491
1 file changed
+3
-8
@@ -329,7 +329,6 @@ ENTRY(enable_boot_cpu_mm)
|
||||
load_paddr x0, boot_pgtable
|
||||
|
||||
bl enable_mmu
|
||||
mov lr, x5
|
||||
|
||||
/*
|
||||
* The MMU is turned on and we are in the 1:1 mapping. Switch
|
||||
@@ -338,19 +337,15 @@ ENTRY(enable_boot_cpu_mm)
|
||||
ldr x0, =1f
|
||||
br x0
|
||||
1:
|
||||
mov lr, x5
|
||||
/*
|
||||
* The 1:1 map may clash with other parts of the Xen virtual memory
|
||||
* layout. As it is not used anymore, remove it completely to
|
||||
* avoid having to worry about replacing existing mapping
|
||||
* afterwards. Function will return to primary_switched.
|
||||
* afterwards. Function will return to the virtual address requested
|
||||
* by the caller.
|
||||
*/
|
||||
b remove_identity_mapping
|
||||
|
||||
/*
|
||||
* Below is supposed to be unreachable code, as "ret" in
|
||||
* remove_identity_mapping will use the return address in LR in advance.
|
||||
*/
|
||||
b fail
|
||||
ENDPROC(enable_boot_cpu_mm)
|
||||
|
||||
/*
|
||||
|
||||