target-arm: Add the HSTR_EL2 register

Add the Hypervisor System Trap Register for EL2.

This register is used early in the Linux boot and without it the kernel
aborts with a "Synchronous Abort" error.

Backports commit 2a5a9abd4bc45e2f4c62c77e07aebe53608c6915 from qemu
This commit is contained in:
Alistair Francis 2018-02-24 16:24:49 -05:00 committed by Lioncash
parent 495c39300c
commit 25daa5363e
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 5 additions and 0 deletions

View file

@ -280,6 +280,7 @@ typedef struct CPUARMState {
uint64_t far_el[4];
};
uint64_t hpfar_el2;
uint64_t hstr_el2;
union { /* Translation result. */
struct {
uint64_t _unused_par_0;

View file

@ -3064,6 +3064,8 @@ static const ARMCPRegInfo el3_no_el2_cp_reginfo[] = {
{ "HPFAR_EL2", 0,6,0, 3,4,4, ARM_CP_STATE_BOTH, ARM_CP_CONST,
PL2_RW, 0, NULL, 0, 0, {0, 0},
access_el3_aa32ns_aa64any },
{ "HSTR_EL2", 0,1,1, 3,4,3, ARM_CP_STATE_BOTH, ARM_CP_CONST,
PL2_RW, 0, NULL, 0 },
REGINFO_SENTINEL
};
@ -3232,6 +3234,8 @@ static const ARMCPRegInfo el2_cp_reginfo[] = {
access_el3_aa32ns },
{ "HPFAR_EL2", 0,6,0, 3,4,4, ARM_CP_STATE_AA64, 0,
PL2_RW, 0, NULL, 0, offsetof(CPUARMState, cp15.hpfar_el2) },
{ "HSTR_EL2", 15,1,1, 3,4,3, ARM_CP_STATE_BOTH, 0,
PL2_RW, 0, NULL, 0, offsetof(CPUARMState, cp15.hstr_el2) },
REGINFO_SENTINEL
};