41 #ifndef __ARCH_ARM_INTERRUPT_HH__
42 #define __ARCH_ARM_INTERRUPT_HH__
51 #include "debug/Interrupt.hh"
52 #include "params/ArmInterrupts.hh"
90 panic(
"int_num out of bounds\n");
93 panic(
"No support for other interrupt indexes\n");
105 panic(
"int_num out of bounds\n");
108 panic(
"No support for other interrupt indexes\n");
135 if (!(
intStatus || hcr.va || hcr.vi || hcr.vf))
143 amo = (no_vhe || hcr.e2h == 0);
144 fmo = (no_vhe || hcr.e2h == 0);
145 imo = (no_vhe || hcr.e2h == 0);
154 bool allowVIrq = !cpsr.i &&
imo && !
isSecure && !isHypMode;
155 bool allowVFiq = !cpsr.f &&
fmo && !
isSecure && !isHypMode;
156 bool allowVAbort = !cpsr.a &&
amo && !
isSecure && !isHypMode;
158 if ( !(
intStatus || (hcr.vi && allowVIrq) || (hcr.vf && allowVFiq) ||
159 (hcr.va && allowVAbort)) )
171 (hcr.va && allowVAbort) ||
185 uint64_t maskedIntStatus;
192 virtWake |= hcr.va && hcr.amo;
194 return maskedIntStatus || virtWake;
226 panic(
"Interrupt number out of range.\n");
242 amo = (no_vhe || hcr.e2h == 0);
243 fmo = (no_vhe || hcr.e2h == 0);
244 imo = (no_vhe || hcr.e2h == 0);
256 bool allowVIrq = !cpsr.i &&
imo && !
isSecure && !isHypMode;
257 bool allowVFiq = !cpsr.f &&
fmo && !
isSecure && !isHypMode;
258 bool allowVAbort = !cpsr.a &&
amo && !
isSecure && !isHypMode;
265 return std::make_shared<Interrupt>();
267 return std::make_shared<VirtualInterrupt>();
269 return std::make_shared<FastInterrupt>();
271 return std::make_shared<VirtualFastInterrupt>();
273 return std::make_shared<SystemError>();
274 if (hcr.va && allowVAbort)
275 return std::make_shared<VirtualDataAbort>(
279 return std::make_shared<Reset>();
281 return std::make_shared<ArmSev>();
283 panic(
"intStatus and interrupts not in sync\n");
304 #endif // __ARCH_ARM_INTERRUPT_HH__