Go to the documentation of this file.
41 #ifndef __ARCH_ARM_ISA_HH__
42 #define __ARCH_ARM_ISA_HH__
56 #include "debug/Checkpoint.hh"
57 #include "enums/DecoderFlavor.hh"
64 struct DummyArmISADeviceParams;
86 std::unique_ptr<BaseISADevice>
timer;
131 if (cpsr.width == 0) {
161 panic(
"Unrecognized mode setting in CPSR.\n");
170 void clear()
override;
212 warn(
"User mode does not have SPSR\n");
228 warn(
"User mode does not have SPSR\n");
253 warn(
"Trying to access SPSR in an invalid mode: %d\n",
296 if (pmselr.sel == 31)
303 panic(
"Unrecognized misc. register.\n");
309 flat_idx += secure_reg ? 2 : 1;
327 int reg_as_int =
static_cast<int>(
reg);
329 reg_as_int += (
release->
has(ArmExtension::SECURITY) && !
ns) ?
342 return std::make_pair(flat_idx, 0);
353 return std::make_pair(lower, upper);
372 template <
typename Elem>
376 static_assert(
sizeof(Elem) <=
sizeof(uint64_t),
377 "Elem type is too large.");
378 eCount *= (
sizeof(uint64_t) /
sizeof(Elem));
379 for (
int i = 16 /
sizeof(Elem);
i < eCount; ++
i) {
394 return new PCState(new_inst_addr);
425 Addr cacheBlockMask)
override;
427 Addr cacheBlockMask)
override;
431 Addr cacheBlockMask)
override;
void setMiscReg(RegIndex, RegVal val) override
PCStateBase * newPCState(Addr new_inst_addr=0) const override
void addressTranslation64(MMU::ArmTranslationType tran_type, BaseMMU::Mode mode, Request::Flags flags, RegVal val)
DummyISADevice dummyDevice
Dummy device for to handle non-existing ISA devices.
static void zeroSveVecRegUpperPart(Elem *v, unsigned eCount)
static SelfDebug * getSelfDebug(ThreadContext *tc)
ExceptionLevel currEL() const
Returns the current Exception Level (EL) of the ISA object.
unsigned getCurSmeVecLenInBitsAtReset() const
unsigned getCurSveVecLenInBits() const
std::unique_ptr< BaseISADevice > gicv3CpuInterface
void takeOverFrom(ThreadContext *new_tc, ThreadContext *old_tc) override
void handleLockedSnoop(PacketPtr pkt, Addr cacheBlockMask) override
bool inUserMode() const override
void updateRegMap(CPSR cpsr)
const ArmRelease * release
This could be either a FS or a SE release.
std::unique_ptr< BaseISADevice > timer
void copyRegsFrom(ThreadContext *src) override
unsigned getCurSveVecLenInBitsAtReset() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
unsigned sveVL
SVE vector length in quadwords.
void handleLockedRead(const RequestPtr &req) override
bool has(ArmExtension ext) const
void handleLockedSnoopHit() override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
std::vector< struct MiscRegLUTEntry > lookUpMiscReg(NUM_MISCREGS)
int snsBankedIndex64(MiscRegIndex reg, bool ns) const
void globalClearExclusive() override
GenericISA::DelaySlotPCState< 4 > PCState
std::pair< int, int > getMiscIndices(int misc_reg) const
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::shared_ptr< Request > RequestPtr
void addressTranslation(MMU::ArmTranslationType tran_type, BaseMMU::Mode mode, Request::Flags flags, RegVal val)
@ MISCREG_PMXEVTYPER_PMCCFILTR
void setMiscRegReset(RegIndex, RegVal val)
bool handleLockedWrite(const RequestPtr &req, Addr cacheBlockMask) override
BaseISADevice & getGICv3CPUInterface()
const RegId & mapIntRegId(RegIndex idx) const
void startup() override
startup() is the final initialization call before simulation.
RegVal readMiscReg(RegIndex idx) override
BaseISADevice & getGenericTimer()
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
enums::DecoderFlavor decoderFlavor() const
void initializeMiscRegMetadata()
unsigned getCurSmeVecLenInBits() const
void setupThreadContext()
const enums::DecoderFlavor _decoderFlavor
Metadata table accessible via the value of the register.
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
const MiscRegLUTEntryInitializer InitReg(uint32_t reg)
RegVal readMiscRegReset(RegIndex) const
RegVal miscRegs[NUM_MISCREGS]
unsigned smeVL
SME vector length in quadwords.
Dummy device that prints a warning when it is accessed.
SelfDebug * getSelfDebug() const
static bool inUserMode(CPSR cpsr)
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
uint64_t getExecutingAsid() const override
std::ostream CheckpointOut
int redirectRegVHE(int misc_reg)
Returns the enconcing equivalent when VHE is implemented and HCR_EL2.E2H is enabled and executing at ...
virtual BaseISA * getIsaPtr() const =0
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
RegVal readMiscRegNoEffect(RegIndex idx) const override
const ArmRelease * getRelease() const
bool inSecureState() const
Return true if the PE is in Secure state.
Register ID: describe an architectural register with its class and index.
bool impdefAsNop
If true, accesses to IMPLEMENTATION DEFINED registers are treated as NOP hence not causing UNDEFINED ...
#define panic(...)
This implements a cprintf based panic() function.
Base class for devices that use the MiscReg interfaces.
int flattenMiscIndex(int reg) const
Generated on Sun Jul 30 2023 01:56:47 for gem5 by doxygen 1.8.17