From: Nikos Nikoleris <nikos.nikoleris@arm.com>
To: kvm@vger.kernel.org
Cc: mark.rutland@arm.com, jade.alglave@arm.com,
luc.maranget@inria.fr, andre.przywara@arm.com,
alexandru.elisei@arm.com, drjones@redhat.com
Subject: [kvm-unit-tests PATCH v3 2/2] arm: Add support for the DEVICE_nGRE and NORMAL_WT memory types
Date: Tue, 10 Nov 2020 18:09:24 +0000 [thread overview]
Message-ID: <20201110180924.95106-3-nikos.nikoleris@arm.com> (raw)
In-Reply-To: <20201110180924.95106-1-nikos.nikoleris@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
lib/arm64/asm/pgtable-hwdef.h | 2 ++
arm/cstart64.S | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/arm64/asm/pgtable-hwdef.h b/lib/arm64/asm/pgtable-hwdef.h
index c31bc11..48a1d1a 100644
--- a/lib/arm64/asm/pgtable-hwdef.h
+++ b/lib/arm64/asm/pgtable-hwdef.h
@@ -153,5 +153,7 @@
#define MT_DEVICE_GRE 2
#define MT_NORMAL_NC 3 /* writecombine */
#define MT_NORMAL 4
+#define MT_NORMAL_WT 5
+#define MT_DEVICE_nGRE 6
#endif /* _ASMARM64_PGTABLE_HWDEF_H_ */
diff --git a/arm/cstart64.S b/arm/cstart64.S
index 6610779..0428014 100644
--- a/arm/cstart64.S
+++ b/arm/cstart64.S
@@ -154,6 +154,8 @@ halt:
* DEVICE_GRE 010 00001100
* NORMAL_NC 011 01000100
* NORMAL 100 11111111
+ * NORMAL_WT 101 10111011
+ * DEVICE_nGRE 110 00001000
*/
#define MAIR(attr, mt) ((attr) << ((mt) * 8))
@@ -184,7 +186,9 @@ asm_mmu_enable:
MAIR(0x04, MT_DEVICE_nGnRE) | \
MAIR(0x0c, MT_DEVICE_GRE) | \
MAIR(0x44, MT_NORMAL_NC) | \
- MAIR(0xff, MT_NORMAL)
+ MAIR(0xff, MT_NORMAL) | \
+ MAIR(0xbb, MT_NORMAL_WT) | \
+ MAIR(0x08, MT_DEVICE_nGRE)
msr mair_el1, x1
/* TTBR0 */
--
2.17.1
next prev parent reply other threads:[~2020-11-10 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 18:09 [kvm-unit-tests PATCH v3 0/2] arm: MMU extentions to enable litmus7 Nikos Nikoleris
2020-11-10 18:09 ` [kvm-unit-tests PATCH v3 1/2] arm: Add mmu_get_pte() to the MMU API Nikos Nikoleris
2020-11-11 10:18 ` Alexandru Elisei
2020-11-10 18:09 ` Nikos Nikoleris [this message]
2020-11-11 11:40 ` [kvm-unit-tests PATCH v3 0/2] arm: MMU extentions to enable litmus7 Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201110180924.95106-3-nikos.nikoleris@arm.com \
--to=nikos.nikoleris@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=andre.przywara@arm.com \
--cc=drjones@redhat.com \
--cc=jade.alglave@arm.com \
--cc=kvm@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.