41#ifndef __ARCH_ARM_INTERRUPT_HH__
42#define __ARCH_ARM_INTERRUPT_HH__
49#include "debug/Interrupt.hh"
50#include "enums/ArmExtension.hh"
51#include "params/ArmInterrupts.hh"
96 panic(
"int_num out of bounds\n");
99 panic(
"No support for other interrupt indexes\n");
111 panic(
"int_num out of bounds\n");
114 panic(
"No support for other interrupt indexes\n");
148 if (!(
intStatus || hcr.va || hcr.vi || hcr.vf))
172 uint64_t masked_int_status;
179 virt_wake |= hcr.va && hcr.amo;
181 return masked_int_status || virt_wake;
212 panic(
"Interrupt number out of range.\n");
225 return std::make_shared<Interrupt>();
228 return std::make_shared<VirtualInterrupt>();
230 return std::make_shared<FastInterrupt>();
233 return std::make_shared<VirtualFastInterrupt>();
235 return std::make_shared<SystemError>();
237 return std::make_shared<VirtualDataAbort>(
241 return std::make_shared<Reset>();
243 return std::make_shared<ArmSev>();
245 panic(
"intStatus and interrupts not in sync\n");
@ AsynchronousExternalAbort
bool checkInterrupts() const override
uint32_t getISR(HCR hcr, CPSR cpsr, SCR scr)
bool takeInt64(InterruptTypes int_type) const
void updateIntrInfo() override
bool takeInt(InterruptTypes int_type) const
bool takeInt32(InterruptTypes int_type) const
void clear(int int_num, int index) override
bool interrupts[NumInterruptTypes]
bool takeVirtualInt64(InterruptTypes int_type) const
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void post(int int_num, int index) override
bool takeVirtualInt(InterruptTypes int_type) const
bool checkRaw(InterruptTypes interrupt) const
Check the state of a particular interrupt, ignoring CPSR masks.
ArmInterruptsParams Params
bool takeVirtualInt32(InterruptTypes int_type) const
bool checkWfiWake(HCR hcr, CPSR cpsr, SCR scr) const
This function is used to check if a wfi operation should sleep.
Fault getInterrupt() override
Interrupts(const Params &p)
virtual RegVal readMiscReg(RegIndex misc_reg)=0
#define panic(...)
This implements a cprintf based panic() function.
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
ExceptionLevel currEL(const ThreadContext *tc)
Returns the current Exception Level (EL) of the provided ThreadContext.
bool EL2Enabled(ThreadContext *tc)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::ostream CheckpointOut
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)