mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen: arm: Annotate registers trapped by MDCR_EL2.TDOSA
Gather the affected handlers in a single place per trap type. Add some HSR_SYSREG and AArch32 defines for those registers (because I'd already typed them in when I realised I didn't need them). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@citrix.com>
This commit is contained in:
1 parent
3bc9ed8be2
commit
5a67a7930c
3 files changed
+45
-10
No files matched your search
+41
-10
@@ -1817,6 +1817,21 @@ static void do_cp14_32(struct cpu_user_regs *regs, const union hsr hsr)
|
||||
|
||||
switch ( hsr.bits & HSR_CP32_REGS_MASK )
|
||||
{
|
||||
/*
|
||||
* MDCR_EL2.TDOSA
|
||||
*
|
||||
* ARMv7 (DDI 0406C.b): B1.14.15
|
||||
* ARMv8 (DDI 0487A.d): D1-1509 Table D1-58
|
||||
*
|
||||
* Unhandled:
|
||||
* DBGOSLSR
|
||||
* DBGPRCR
|
||||
*/
|
||||
case HSR_CPREG32(DBGOSLAR):
|
||||
return handle_wo_wi(regs, r, cp32.read, hsr, 1);
|
||||
case HSR_CPREG32(DBGOSDLR):
|
||||
return handle_raz_wi(regs, r, cp32.read, hsr, 1);
|
||||
|
||||
case HSR_CPREG32(DBGDIDR):
|
||||
/*
|
||||
* Read-only register. Accessible by EL0 if DBGDSCRext.UDCCdis
|
||||
@@ -1856,12 +1871,8 @@ static void do_cp14_32(struct cpu_user_regs *regs, const union hsr hsr)
|
||||
case HSR_CPREG32(DBGWCR0):
|
||||
case HSR_CPREG32(DBGBVR1):
|
||||
case HSR_CPREG32(DBGBCR1):
|
||||
case HSR_CPREG32(DBGOSDLR):
|
||||
return handle_raz_wi(regs, r, cp32.read, hsr, 1);
|
||||
|
||||
case HSR_CPREG32(DBGOSLAR):
|
||||
return handle_wo_wi(regs, r, cp32.read, hsr, 1);
|
||||
|
||||
/*
|
||||
* CPTR_EL2.TTA
|
||||
*
|
||||
@@ -1943,6 +1954,18 @@ static void do_cp14_dbg(struct cpu_user_regs *regs, const union hsr hsr)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* MDCR_EL2.TDOSA
|
||||
*
|
||||
* ARMv7 (DDI 0406C.b): B1.14.15
|
||||
* ARMv8 (DDI 0487A.d): D1-1509 Table D1-58
|
||||
*
|
||||
* Unhandled:
|
||||
* DBGDTRTXint
|
||||
* DBGDTRRXint
|
||||
*
|
||||
* And all other unknown registers.
|
||||
*/
|
||||
gdprintk(XENLOG_ERR,
|
||||
"%s p14, %d, r%d, r%d, cr%d @ 0x%"PRIregister"\n",
|
||||
cp64.read ? "mrrc" : "mcrr",
|
||||
@@ -1997,6 +2020,20 @@ static void do_sysreg(struct cpu_user_regs *regs,
|
||||
case HSR_SYSREG_MDRAR_EL1:
|
||||
return handle_ro_raz(regs, x, hsr.sysreg.read, hsr, 1);
|
||||
|
||||
/*
|
||||
* MDCR_EL2.TDOSA
|
||||
*
|
||||
* ARMv8 (DDI 0487A.d): D1-1509 Table D1-58
|
||||
*
|
||||
* Unhandled:
|
||||
* OSLSR_EL1
|
||||
* DBGPRCR_EL1
|
||||
*/
|
||||
case HSR_SYSREG_OSLAR_EL1:
|
||||
return handle_wo_wi(regs, x, hsr.sysreg.read, hsr, 1);
|
||||
case HSR_SYSREG_OSDLR_EL1:
|
||||
return handle_raz_wi(regs, x, hsr.sysreg.read, hsr, 1);
|
||||
|
||||
/* RAZ/WI registers: */
|
||||
/* - Debug */
|
||||
case HSR_SYSREG_MDSCR_EL1:
|
||||
@@ -2006,8 +2043,6 @@ static void do_sysreg(struct cpu_user_regs *regs,
|
||||
/* - Watchpoints */
|
||||
HSR_SYSREG_DBG_CASES(DBGWVR):
|
||||
HSR_SYSREG_DBG_CASES(DBGWCR):
|
||||
/* - Double Lock Register */
|
||||
case HSR_SYSREG_OSDLR_EL1:
|
||||
/* - Perf monitors */
|
||||
case HSR_SYSREG_PMINTENSET_EL1:
|
||||
case HSR_SYSREG_PMINTENCLR_EL1:
|
||||
@@ -2049,10 +2084,6 @@ static void do_sysreg(struct cpu_user_regs *regs,
|
||||
*/
|
||||
return handle_raz_wi(regs, x, hsr.sysreg.read, hsr, 1);
|
||||
|
||||
/* Write only, Write ignore registers: */
|
||||
case HSR_SYSREG_OSLAR_EL1:
|
||||
return handle_wo_wi(regs, x, hsr.sysreg.read, hsr, 1);
|
||||
|
||||
case HSR_SYSREG_CNTP_CTL_EL0:
|
||||
case HSR_SYSREG_CNTP_TVAL_EL0:
|
||||
case HSR_SYSREG_CNTP_CVAL_EL0:
|
||||
|
||||
@@ -83,7 +83,9 @@
|
||||
#define DBGBVR1 p14,0,c0,c1,4 /* Breakpoint Value 1 */
|
||||
#define DBGBCR1 p14,0,c0,c1,5 /* Breakpoint Control 1 */
|
||||
#define DBGOSLAR p14,0,c1,c0,4 /* OS Lock Access */
|
||||
#define DBGOSLSR p14,0,c1,c1,4 /* OS Lock Status Register */
|
||||
#define DBGOSDLR p14,0,c1,c3,4 /* OS Double Lock */
|
||||
#define DBGPRCR p14,0,c1,c4,4 /* Debug Power Control Register */
|
||||
|
||||
/* CP14 CR0: */
|
||||
#define TEECR p14,6,c0,c0,0 /* ThumbEE Configuration Register */
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
#define HSR_SYSREG_MDSCR_EL1 HSR_SYSREG(2,0,c0,c2,2)
|
||||
#define HSR_SYSREG_MDRAR_EL1 HSR_SYSREG(2,0,c1,c0,0)
|
||||
#define HSR_SYSREG_OSLAR_EL1 HSR_SYSREG(2,0,c1,c0,4)
|
||||
#define HSR_SYSREG_OSLSR_EL1 HSR_SYSREG(2,0,c1,c1,4)
|
||||
#define HSR_SYSREG_OSDLR_EL1 HSR_SYSREG(2,0,c1,c3,4)
|
||||
#define HSR_SYSREG_DBGPRCR_EL1 HSR_SYSREG(2,0,c1,c4,4)
|
||||
#define HSR_SYSREG_MDCCSR_EL0 HSR_SYSREG(2,3,c0,c1,0)
|
||||
|
||||
#define HSR_SYSREG_DBGBVRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,4)
|
||||
|
||||