This was already implemented for AArch32 but it had been wrongly
removed by:
https://gem5-review.googlesource.com/c/public/gem5/+/31394
Change-Id: Ida303d5ccb5d8568ca4e7faaedf9b4efd1cd88b5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32636
Tested-by: kokoro <noreply+kokoro@google.com>
exec_output += PredOpExecute.subst(smcIop)
hvcCode = '''
+ HCR hcr = Hcr;
CPSR cpsr = Cpsr;
+ SCR scr = Scr;
// Filter out the various cases where this instruction isn't defined
if (!FullSystem || !ArmSystem::haveVirtualization(xc->tcBase()) ||
(cpsr.mode == MODE_USER) ||
- (isSecure(xc->tcBase()) && !IsSecureEL2Enabled(xc->tcBase()))) {
+ (isSecure(xc->tcBase()) && !IsSecureEL2Enabled(xc->tcBase())) ||
+ (ArmSystem::haveSecurity(xc->tcBase()) ? !scr.hce : hcr.hcd)) {
fault = disabledFault();
} else {
fault = std::make_shared<HypervisorCall>(machInst, imm);