privNonSecureRead(v);
return *this;
}
+ chain hypE2HSecureRead(bool v = true) const {
+ info[MISCREG_HYP_E2H_S_RD] = v;
+ return *this;
+ }
+ chain hypE2HNonSecureRead(bool v = true) const {
+ info[MISCREG_HYP_E2H_NS_RD] = v;
+ return *this;
+ }
chain hypE2HRead(bool v = true) const {
- info[MISCREG_HYP_E2H_RD] = v;
+ hypE2HSecureRead(v);
+ hypE2HNonSecureRead(v);
+ return *this;
+ }
+ chain hypE2HSecureWrite(bool v = true) const {
+ info[MISCREG_HYP_E2H_S_WR] = v;
+ return *this;
+ }
+ chain hypE2HNonSecureWrite(bool v = true) const {
+ info[MISCREG_HYP_E2H_NS_WR] = v;
return *this;
}
chain hypE2HWrite(bool v = true) const {
- info[MISCREG_HYP_E2H_WR] = v;
+ hypE2HSecureWrite(v);
+ hypE2HNonSecureWrite(v);
return *this;
}
chain hypE2H(bool v = true) const {
hypE2HWrite(v);
return *this;
}
+ chain hypSecureRead(bool v = true) const {
+ info[MISCREG_HYP_S_RD] = v;
+ return *this;
+ }
+ chain hypNonSecureRead(bool v = true) const {
+ info[MISCREG_HYP_NS_RD] = v;
+ return *this;
+ }
chain hypRead(bool v = true) const {
hypE2HRead(v);
- info[MISCREG_HYP_RD] = v;
+ hypSecureRead(v);
+ hypNonSecureRead(v);
+ return *this;
+ }
+ chain hypSecureWrite(bool v = true) const {
+ info[MISCREG_HYP_S_WR] = v;
+ return *this;
+ }
+ chain hypNonSecureWrite(bool v = true) const {
+ info[MISCREG_HYP_NS_WR] = v;
return *this;
}
chain hypWrite(bool v = true) const {
hypE2HWrite(v);
- info[MISCREG_HYP_WR] = v;
+ hypSecureWrite(v);
+ hypNonSecureWrite(v);
+ return *this;
+ }
+ chain hypSecure(bool v = true) const {
+ hypE2HSecureRead(v);
+ hypE2HSecureWrite(v);
+ hypSecureRead(v);
+ hypSecureWrite(v);
return *this;
}
chain hyp(bool v = true) const {
miscRegInfo[reg][MISCREG_MON_NS1_RD];
break;
case MODE_HYP:
- canRead = miscRegInfo[reg][MISCREG_HYP_RD];
+ canRead = miscRegInfo[reg][MISCREG_HYP_NS_RD];
break;
default:
undefined = true;
miscRegInfo[reg][MISCREG_MON_NS1_WR];
break;
case MODE_HYP:
- canWrite = miscRegInfo[reg][MISCREG_HYP_WR];
+ canWrite = miscRegInfo[reg][MISCREG_HYP_NS_WR];
break;
default:
undefined = true;
return secure ? miscRegInfo[reg][MISCREG_PRI_S_RD] :
miscRegInfo[reg][MISCREG_PRI_NS_RD];
case EL2:
- return el2_host ? miscRegInfo[reg][MISCREG_HYP_E2H_RD] :
- miscRegInfo[reg][MISCREG_HYP_RD];
+ if (el2_host) {
+ return secure ? miscRegInfo[reg][MISCREG_HYP_E2H_S_RD] :
+ miscRegInfo[reg][MISCREG_HYP_E2H_NS_RD];
+ } else {
+ return secure ? miscRegInfo[reg][MISCREG_HYP_S_RD] :
+ miscRegInfo[reg][MISCREG_HYP_NS_RD];
+ }
case EL3:
return el2_host ? miscRegInfo[reg][MISCREG_MON_E2H_RD] :
secure ? miscRegInfo[reg][MISCREG_MON_NS0_RD] :
return secure ? miscRegInfo[reg][MISCREG_PRI_S_WR] :
miscRegInfo[reg][MISCREG_PRI_NS_WR];
case EL2:
- return el2_host ? miscRegInfo[reg][MISCREG_HYP_E2H_WR] :
- miscRegInfo[reg][MISCREG_HYP_WR];
+ if (el2_host) {
+ return secure ? miscRegInfo[reg][MISCREG_HYP_E2H_S_WR] :
+ miscRegInfo[reg][MISCREG_HYP_E2H_NS_WR];
+ } else {
+ return secure ? miscRegInfo[reg][MISCREG_HYP_S_WR] :
+ miscRegInfo[reg][MISCREG_HYP_NS_WR];
+ }
case EL3:
return el2_host ? miscRegInfo[reg][MISCREG_MON_E2H_WR] :
secure ? miscRegInfo[reg][MISCREG_MON_NS0_WR] :
MISCREG_PRI_S_RD,
MISCREG_PRI_S_WR,
// Hypervisor mode
- MISCREG_HYP_RD,
- MISCREG_HYP_WR,
+ MISCREG_HYP_NS_RD,
+ MISCREG_HYP_NS_WR,
+ MISCREG_HYP_S_RD,
+ MISCREG_HYP_S_WR,
// Hypervisor mode, HCR_EL2.E2H == 1
- MISCREG_HYP_E2H_RD,
- MISCREG_HYP_E2H_WR,
+ MISCREG_HYP_E2H_NS_RD,
+ MISCREG_HYP_E2H_NS_WR,
+ MISCREG_HYP_E2H_S_RD,
+ MISCREG_HYP_E2H_S_WR,
// Monitor mode, SCR.NS == 0
MISCREG_MON_NS0_RD,
MISCREG_MON_NS0_WR,