diff options
author | wma <wma@FreeBSD.org> | 2016-03-01 08:15:00 +0000 |
---|---|---|
committer | wma <wma@FreeBSD.org> | 2016-03-01 08:15:00 +0000 |
commit | ad7622cfab408f2eb3eb50f016ab3383cb0f5990 (patch) | |
tree | 7066e6455d29a1d226b57faff5ef23e0ffea6136 /sys/arm64 | |
parent | 8076bc06d9994f207d949c72cb92b3919d1a3f37 (diff) | |
download | FreeBSD-src-ad7622cfab408f2eb3eb50f016ab3383cb0f5990.zip FreeBSD-src-ad7622cfab408f2eb3eb50f016ab3383cb0f5990.tar.gz |
Enable SRE_EL2 on ARM64
Enable system register access for EL2. Alpine-V2 is
the first device requiring this to be enabled.
It is also in-sync with Linux initialization code,
and compatible with Alpine-V2 uboot requirements.
Obtained from: Semihalf
Submitted by: Michal Stanek <mst@semihalf.com>
Sponsored by: Annapurna Labs
Approved by: cognet (mentor)
Reviewed by: wma
Differential revision: https://reviews.freebsd.org/D5394
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/locore.S | 1 | ||||
-rw-r--r-- | sys/arm64/include/armreg.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 87abee1..b1fd3ae 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -265,6 +265,7 @@ drop_to_el1: mrs x2, icc_sre_el2 orr x2, x2, #ICC_SRE_EL2_EN /* Enable access from insecure EL1 */ + orr x2, x2, #ICC_SRE_EL2_SRE /* Enable system registers */ msr icc_sre_el2, x2 2: diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 405f3bb..8b2bc92 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -131,6 +131,7 @@ #define ICC_SRE_EL1_SRE (1U << 0) /* ICC_SRE_EL2 */ +#define ICC_SRE_EL2_SRE (1U << 0) #define ICC_SRE_EL2_EN (1U << 3) /* ID_AA64DFR0_EL1 */ |