aarch64: provide virt2phys command

Use AT commands to translate virtual to physical addresses based on
current MMU configuration.

Change-Id: I1bbd7d674c435541b617b17022fa9f7f0f01bdab
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
This commit is contained in:
Matthias Welwarsky
2016-10-06 15:05:53 +02:00
parent fc3ce94bba
commit 2b56f4f656
4 changed files with 89 additions and 2 deletions

View File

@@ -96,6 +96,13 @@
#define SYSTEM_TTBR0_EL3 0b1111000100000000
#define SYSTEM_TTBR1_EL1 0b1100000100000001
/* ARMv8 address translation */
#define SYSTEM_PAR_EL1 0b1100001110100000
#define SYSTEM_ATS12E0R 0b0110001111000110
#define SYSTEM_ATS12E1R 0b0110001111000100
#define SYSTEM_ATS1E2R 0b0110001111000000
#define SYSTEM_ATS1E3R 0b0111001111000000
#define ARMV8_MRS_DSPSR(Rt) (0xd53b4500 | (Rt))
#define ARMV8_MSR_DSPSR(Rt) (0xd51b4500 | (Rt))
#define ARMV8_MRS_DLR(Rt) (0xd53b4520 | (Rt))