Go to the documentation of this file.
41 #ifndef __ARCH_ARM_ISA_HH__
42 #define __ARCH_ARM_ISA_HH__
53 #include "debug/Checkpoint.hh"
54 #include "enums/DecoderFlavor.hh"
55 #include "enums/VecRegRenameMode.hh"
59 struct DummyArmISADeviceParams;
82 std::unique_ptr<BaseISADevice>
timer;
141 std::bitset<NUM_MISCREG_INFOS> &
info;
396 std::bitset<NUM_MISCREG_INFOS> &
i)
418 if (cpsr.width == 0) {
448 panic(
"Unrecognized mode setting in CPSR.\n");
464 void clear32(
const ArmISAParams *
p,
const SCTLR &sctlr_rst);
465 void clear64(
const ArmISAParams *
p);
529 if (!cpsr.sp &&
el !=
EL0)
541 panic(
"Invalid exception level");
594 warn(
"User mode does not have SPSR\n");
610 warn(
"User mode does not have SPSR\n");
635 warn(
"Trying to access SPSR in an invalid mode: %d\n",
678 if (pmselr.sel == 31)
685 panic(
"Unrecognized misc. register.\n");
693 flat_idx += secureReg ? 2 : 1;
778 int reg_as_int =
static_cast<int>(
reg);
791 return std::make_pair(flat_idx, 0);
803 return std::make_pair(lower, upper);
816 DPRINTF(Checkpoint,
"Serializing Arm Misc Registers\n");
823 DPRINTF(Checkpoint,
"Unserializing Arm Misc Registers\n");
848 Enums::VecRegRenameMode
865 static Enums::VecRegRenameMode
868 auto arm_isa =
dynamic_cast<const ArmISA::ISA *
>(isa);
870 return arm_isa->vecRegRenameMode();
873 static Enums::VecRegRenameMode
chain userSecureWrite(bool v=true) const
void setupThreadContext()
chain monNonSecure(bool v=true) const
int flattenCCIndex(int reg) const
chain reads(bool v) const
const IntRegMap IntReg64Map
chain privSecureRead(bool v=true) const
std::pair< int, int > getMiscIndices(int misc_reg) const
@ MISCREG_CNTHPS_TVAL_EL2
void initializeMiscRegMetadata()
chain res1(uint64_t mask) const
chain banked64(bool v=true) const
Enums::DecoderFlavor decoderFlavor() const
int flattenMiscIndex(int reg) const
chain hypWrite(bool v=true) const
chain user(bool v=true) const
@ VecElemClass
Vector Register Native Elem lane.
Enums::VecRegRenameMode vecRegRenameMode() const
Base class for devices that use the MiscReg interfaces.
static SelfDebug * getSelfDebug(ThreadContext *tc)
RegVal miscRegs[NumMiscRegs]
std::bitset< NUM_MISCREG_INFOS > & info
std::unique_ptr< BaseISADevice > gicv3CpuInterface
static ExceptionLevel currEL(const ThreadContext *tc)
chain hypE2H(bool v=true) const
const IntRegMap IntRegUndMap
chain allPrivileges(bool v=true) const
void setMiscReg(int misc_reg, RegVal val)
static bool inSecureState(SCR scr, CPSR cpsr)
chain mutex(bool v=true) const
chain monSecureRead(bool v=true) const
chain mapsTo(uint32_t l, uint32_t u=0) const
int redirectRegVHE(ThreadContext *tc, int misc_reg)
Returns the enconcing equivalent when VHE is implemented and HCR_EL2.E2H is enabled and executing at ...
@ MISCREG_CNTHPS_CVAL_EL2
chain monE2HRead(bool v=true) const
chain monE2H(bool v=true) const
Helper structure to get the vector register mode for a given ISA.
unsigned sveVL
SVE vector length in quadwords.
chain res0(uint64_t mask) const
RegVal readMiscRegNoEffect(int misc_reg) const
static void zeroSveVecRegUpperPart(VecRegContainer &vc, unsigned eCount)
void takeOverFrom(ThreadContext *new_tc, ThreadContext *old_tc) override
const RegIndex & elemIndex() const
Elem accessor.
void addressTranslation(TLB::ArmTranslationType tran_type, BaseTLB::Mode mode, Request::Flags flags, RegVal val)
Register ID: describe an architectural register with its class and index.
std::unique_ptr< BaseISADevice > timer
const Enums::VecRegRenameMode _vecRegRenameMode
virtual BaseISA * getIsaPtr()=0
bool haveGICv3CpuIfc() const
Returns true if the ISA has a GICv3 cpu interface.
bool impdefAsNop
If true, accesses to IMPLEMENTATION DEFINED registers are treated as NOP hence not causing UNDEFINED ...
@ MISCREG_CNTHVS_TVAL_EL2
chain userSecureRead(bool v=true) const
chain exceptUserMode() const
chain privRead(bool v=true) const
@ FloatRegClass
Floating-point register.
void serialize(CheckpointOut &cp) const override
Serialize an object.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
const IntRegMap IntRegHypMap
chain privNonSecureRead(bool v=true) const
DummyISADevice dummyDevice
Dummy device for to handle non-existing ISA devices.
const IntRegMap IntRegUsrMap
chain hypE2HRead(bool v=true) const
void clear32(const ArmISAParams *p, const SCTLR &sctlr_rst)
chain unverifiable(bool v=true) const
chain monNonSecureWrite(bool v=true) const
Dummy device that prints a warning when it is accessed.
int snsBankedIndex64(MiscRegIndex reg, bool ns) const
chain banked(bool v=true) const
static int flattenIntRegModeIndex(int reg)
static Enums::VecRegRenameMode init(const BaseISA *)
BaseISADevice & getGICv3CPUInterface()
static Enums::VecRegRenameMode init(const BaseISA *isa)
chain privSecureWrite(bool v=true) const
const IntRegIndex * intRegMap
static ExceptionLevel opModeToEL(OperatingMode mode)
@ MISCREG_CNTHVS_CVAL_EL2
chain unimplemented() const
void clear64(const ArmISAParams *p)
RegId flattenRegId(const RegId ®Id) const
#define SERIALIZE_ARRAY(member, size)
chain hypRead(bool v=true) const
chain monNonSecureRead(bool v=true) const
const IntRegMap IntRegMonMap
chain highest(ArmSystem *const sys) const
void setMiscRegNoEffect(int misc_reg, RegVal val)
const IntRegMap IntRegAbtMap
int flattenFloatIndex(int reg) const
chain hypE2HWrite(bool v=true) const
@ IntRegClass
Integer register.
chain rao(uint64_t mask) const
int flattenIntIndex(int reg) const
chain monSecure(bool v=true) const
chain hyp(bool v=true) const
void updateRegMap(CPSR cpsr)
@ CCRegClass
Condition-code register.
chain userNonSecureRead(bool v=true) const
BaseISADevice & getGenericTimer()
int flattenVecIndex(int reg) const
SelfDebug * getSelfDebug() const
chain writes(bool v) const
const typedef MiscRegLUTEntryInitializer & chain
@ MiscRegClass
Control (misc) register.
@ VecRegClass
Vector Register.
chain raz(uint64_t mask) const
const IntRegMap IntRegFiqMap
chain monE2HWrite(bool v=true) const
#define UNSERIALIZE_ARRAY(member, size)
GenericISA::DelaySlotPCState< MachInst > PCState
void initID64(const ArmISAParams *p)
chain warnNotFail(bool v=true) const
chain privNonSecure(bool v=true) const
chain implemented(bool v=true) const
@ MISCREG_PMXEVTYPER_PMCCFILTR
void unserialize(CheckpointIn &cp) override
Unserialize an object.
chain bankedChild(bool v=true) const
const IntRegMap IntRegIrqMap
chain privNonSecureWrite(bool v=true) const
const MiscRegLUTEntryInitializer InitReg(uint32_t reg)
std::ostream CheckpointOut
void startup() override
startup() is the final initialization call before simulation.
RegVal readMiscReg(int misc_reg)
chain mon(bool v=true) const
const RegIndex & index() const
Index accessors.
void addressTranslation64(TLB::ArmTranslationType tran_type, BaseTLB::Mode mode, Request::Flags flags, RegVal val)
struct MiscRegLUTEntry & entry
unsigned getCurSveVecLenInBits() const
chain monSecureWrite(bool v=true) const
void initID32(const ArmISAParams *p)
chain priv(bool v=true) const
const IntRegMap IntRegSvcMap
chain privSecure(bool v=true) const
const RegClass & classValue() const
Class accessor.
MiscRegLUTEntryInitializer(struct MiscRegLUTEntry &e, std::bitset< NUM_MISCREG_INFOS > &i)
chain secure(bool v=true) const
static Enums::VecRegRenameMode mode(const ArmISA::PCState &pc)
bitset< NUM_MISCREG_INFOS > miscRegInfo[NUM_MISCREGS]
const Params * params() const
const Enums::DecoderFlavor _decoderFlavor
int flattenVecElemIndex(int reg) const
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
static std::vector< struct MiscRegLUTEntry > lookUpMiscReg
Metadata table accessible via the value of the register.
#define panic(...)
This implements a cprintf based panic() function.
static bool equalsInit(const BaseISA *isa1, const BaseISA *isa2)
int flattenVecPredIndex(int reg) const
unsigned getCurSveVecLenInBitsAtReset() const
chain nonSecure(bool v=true) const
chain userNonSecureWrite(bool v=true) const
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17