43 #ifndef __ARCH_ARM_ISA_HH__
44 #define __ARCH_ARM_ISA_HH__
51 #include "debug/Checkpoint.hh"
53 #include "enums/DecoderFlavour.hh"
56 struct DummyArmISADeviceParams;
79 std::unique_ptr<BaseISADevice>
timer;
112 if (cpsr.width == 0) {
142 panic(
"Unrecognized mode setting in CPSR.\n");
162 bool secure_lookup, uint8_t target_el);
169 bool hyp, uint8_t target_el);
173 void clear64(
const ArmISAParams *
p);
192 if (!cpsr.sp && el !=
EL0)
204 panic(
"Invalid exception level");
236 warn(
"User mode does not have SPSR\n");
252 warn(
"User mode does not have SPSR\n");
277 warn(
"Trying to access SPSR in an invalid mode: %d\n",
320 if (pmselr.sel == 31)
327 panic(
"Unrecognized misc. register.\n");
335 flat_idx += secureReg ? 2 : 1;
347 return std::make_pair(flat_idx, 0);
359 return std::make_pair(lower, upper);
364 DPRINTF(Checkpoint,
"Serializing Arm Misc Registers\n");
376 DPRINTF(Checkpoint,
"Unserializing Arm Misc Registers\n");
const IntRegMap IntRegSvcMap
DummyISADevice dummyDevice
Dummy device for to handle non-existing ISA devices.
void tlbiALLN(ThreadContext *tc, bool hyp, uint8_t target_el)
bitset< NUM_MISCREG_INFOS > miscRegInfo[NUM_MISCREGS]
std::vector< struct MiscRegLUTEntry > lookUpMiscReg
Translation table accessible via the value of the register.
const IntRegMap IntReg64Map
void setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
std::pair< int, int > getMiscIndices(int misc_reg) const
MiscReg readMiscReg(int misc_reg, ThreadContext *tc)
Base class for devices that use the MiscReg interfaces.
Dummy device that prints a warning when it is accessed.
Some registers alias with others, and therefore need to be translated.
void assert64(ThreadContext *tc)
Register translation entry used in lookUpMiscReg.
void tlbiVA(ThreadContext *tc, MiscReg newVal, uint16_t asid, bool secure_lookup, uint8_t target_el)
int flattenCCIndex(int reg) const
void startup(ThreadContext *tc)
MiscReg miscRegs[NumMiscRegs]
const IntRegMap IntRegHypMap
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void tlbiALL(ThreadContext *tc, bool secure_lookup, uint8_t target_el)
void updateRegMap(CPSR cpsr)
const IntRegMap IntRegFiqMap
#define UNSERIALIZE_SCALAR(scalar)
void unserialize(CheckpointIn &cp)
Unserialize an object.
struct MiscRegLUTEntry entry
const IntRegIndex * intRegMap
static ExceptionLevel opModeToEL(OperatingMode mode)
std::unique_ptr< BaseISADevice > timer
#define SERIALIZE_ARRAY(member, size)
const IntRegMap IntRegUndMap
void tlbiMVA(ThreadContext *tc, MiscReg newVal, bool secure_lookup, bool hyp, uint8_t target_el)
const IntRegMap IntRegAbtMap
void serialize(CheckpointOut &cp) const
Serialize an object.
static int flattenIntRegModeIndex(int reg)
const Enums::DecoderFlavour _decoderFlavour
void assert32(ThreadContext *tc)
#define SERIALIZE_SCALAR(scalar)
#define UNSERIALIZE_ARRAY(member, size)
static const int NumArgumentRegs M5_VAR_USED
const IntRegMap IntRegUsrMap
const IntRegMap IntRegMonMap
std::ostream CheckpointOut
int flattenFloatIndex(int reg) const
Enums::DecoderFlavour decoderFlavour() const
void clear64(const ArmISAParams *p)
const Params * params() const
bool inSecureState(ThreadContext *tc)
int flattenIntIndex(int reg) const
const IntRegMap IntRegIrqMap
void setMiscRegNoEffect(int misc_reg, const MiscReg &val)
BaseISADevice & getGenericTimer(ThreadContext *tc)
int flattenMiscIndex(int reg) const
Abstract superclass for simulation objects.
MiscReg readMiscRegNoEffect(int misc_reg) const
static const struct MiscRegInitializerEntry MiscRegSwitch[]
Register table noting all translations.
virtual void startup()
startup() is the final initialization call before simulation.