41 #ifndef __ARCH_ARM_INTERRUPT_HH__
42 #define __ARCH_ARM_INTERRUPT_HH__
51 #include "debug/Interrupt.hh"
52 #include "params/ArmInterrupts.hh"
97 panic(
"int_num out of bounds\n");
100 panic(
"No support for other interrupt indexes\n");
112 panic(
"int_num out of bounds\n");
115 panic(
"No support for other interrupt indexes\n");
142 if (!(
intStatus || hcr.va || hcr.vi || hcr.vf))
150 amo = (no_vhe || hcr.e2h == 0);
151 fmo = (no_vhe || hcr.e2h == 0);
152 imo = (no_vhe || hcr.e2h == 0);
161 bool allowVIrq = !cpsr.i &&
imo && !
isSecure && !isHypMode;
162 bool allowVFiq = !cpsr.f &&
fmo && !
isSecure && !isHypMode;
163 bool allowVAbort = !cpsr.a &&
amo && !
isSecure && !isHypMode;
165 if ( !(
intStatus || (hcr.vi && allowVIrq) || (hcr.vf && allowVFiq) ||
166 (hcr.va && allowVAbort)) )
178 (hcr.va && allowVAbort) ||
192 uint64_t maskedIntStatus;
199 virtWake |= hcr.va && hcr.amo;
201 return maskedIntStatus || virtWake;
233 panic(
"Interrupt number out of range.\n");
249 amo = (no_vhe || hcr.e2h == 0);
250 fmo = (no_vhe || hcr.e2h == 0);
251 imo = (no_vhe || hcr.e2h == 0);
263 bool allowVIrq = !cpsr.i &&
imo && !
isSecure && !isHypMode;
264 bool allowVFiq = !cpsr.f &&
fmo && !
isSecure && !isHypMode;
265 bool allowVAbort = !cpsr.a &&
amo && !
isSecure && !isHypMode;
272 return std::make_shared<Interrupt>();
274 return std::make_shared<VirtualInterrupt>();
276 return std::make_shared<FastInterrupt>();
278 return std::make_shared<VirtualFastInterrupt>();
280 return std::make_shared<SystemError>();
281 if (hcr.va && allowVAbort)
282 return std::make_shared<VirtualDataAbort>(
286 return std::make_shared<Reset>();
288 return std::make_shared<ArmSev>();
290 panic(
"intStatus and interrupts not in sync\n");
311 #endif // __ARCH_ARM_INTERRUPT_HH__