|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 16/22] plat/kvm: Disable D-Cache before doing any change for Arm64
Disable the D-Cache before doing anything change, This will
help us to avoid doing clean the D-Cache for changed area.
Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
plat/kvm/arm/entry64.S | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/plat/kvm/arm/entry64.S b/plat/kvm/arm/entry64.S
index f1bbeb6..c1af0a4 100644
--- a/plat/kvm/arm/entry64.S
+++ b/plat/kvm/arm/entry64.S
@@ -43,6 +43,23 @@
.text
ENTRY(_libkvmplat_entry)
+ /*
+ * Disable the MMU. We may have entered the kernel with it on and
+ * will need to update the tables later. If this has been set up
+ * with anything other than a VA == PA map then this will fail,
+ * but in this case the code to find where we are running from
+ * would have also failed.
+ *
+ * Disable the D-Cache before doing anything change, This will
+ * make us avoid doing clean the D-Cache for changed area.
+ */
+ dsb sy
+ mrs x2, sctlr_el1
+ mov x3, #SCTLR_M|SCTLR_C
+ bic x2, x2, x3
+ msr sctlr_el1, x2
+ isb
+
/* Boot stack is placed after pagetable area temporarily */
ldr x26, =_end
add x26, x26, #PAGE_TABLE_SIZE
@@ -64,19 +81,6 @@ ENTRY(_libkvmplat_entry)
mov sp, x27
- /*
- * Disable the MMU. We may have entered the kernel with it on and
- * will need to update the tables later. If this has been set up
- * with anything other than a VA == PA map then this will fail,
- * but in this case the code to find where we are running from
- * would have also failed.
- */
- dsb sy
- mrs x2, sctlr_el1
- bic x2, x2, #SCTLR_M
- msr sctlr_el1, x2
- isb
-
/* Set the context id */
msr contextidr_el1, xzr
--
2.17.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |