Skip to content

Commit a75afff

Browse files
committed
hv_exc: Pass through dangerous CYC_OVRD writes to Python
This makes it easier to experiment with the sleep/WFI stuff. Signed-off-by: Hector Martin <[email protected]>
1 parent 40ae642 commit a75afff

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

proxyclient/m1n1/hv/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ def handle_msr(self, ctx, iss=None):
658658
MDSCR_EL1,
659659
}
660660
ro = {
661+
CYC_OVRD_EL1,
661662
ACC_CFG_EL1,
662663
ACC_OVRD_EL1,
663664
}

src/hv_exc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,12 @@ static bool hv_handle_msr(struct exc_info *ctx, u64 iss)
270270
if (is_read) {
271271
regs[rt] = mrs(SYS_IMP_APL_CYC_OVRD);
272272
} else {
273-
msr(SYS_IMP_APL_CYC_OVRD,
274-
regs[rt] & ~(CYC_OVRD_DISABLE_WFI_RET | CYC_OVRD_FIQ_MODE_MASK));
275273
if (regs[rt] & (CYC_OVRD_DISABLE_WFI_RET | CYC_OVRD_FIQ_MODE_MASK))
276-
printf("msr(SYS_IMP_APL_CYC_OVRD, 0x%08lx): Filtered WFI RET disable and/or "
277-
"FIQ mode\n",
278-
regs[rt]);
274+
return false;
275+
msr(SYS_IMP_APL_CYC_OVRD, regs[rt]);
279276
}
280277
return true;
281278
/* clang-format off */
282-
283279
/* IPI handling */
284280
SYSREG_PASS(SYS_IMP_APL_IPI_CR_EL1)
285281
/* clang-format on */

0 commit comments

Comments
 (0)