32#include "iris/detail/IrisCppAdapter.h"
33#include "iris/detail/IrisObjects.h"
43 iris::IrisConnectionInterface *iris_if,
44 const std::string &iris_path) :
72 panic_if(in == iris::IRIS_UINT64_MAX || out == iris::IRIS_UINT64_MAX,
73 "Canonical IRIS memory space numbers not found.");
75 return ThreadContext::translateAddress(paddr, out,
vaddr, in);
81 ThreadContext::initFromIrisInstance(resources);
100 ArmISA::CPSR orig_cpsr;
102 auto *non_const_this =
const_cast<CortexA76TC *
>(
this);
106 ArmISA::CPSR new_cpsr = orig_cpsr;
111 RegVal val = ThreadContext::readIntRegFlat(idx);
123 ArmISA::CPSR orig_cpsr;
127 ArmISA::CPSR new_cpsr = orig_cpsr;
132 ThreadContext::setIntRegFlat(idx,
val);
145 result = ((ArmISA::CPSR)result).nz;
148 result =
bits(result, 31, 28);
186 for (
auto &msn : msns) {
188 if (
id != iris::IRIS_UINT64_MAX)
192 "Unable to find address space(s) for breakpoints.");
697 { ArmISA::MISCREG_TLBI_VAE1IS_Xt,
"TLBI VAE1IS" },
698 { ArmISA::MISCREG_TLBI_ASIDE1IS_Xt,
"TLBI ASIDE1IS" },
699 { ArmISA::MISCREG_TLBI_VAAE1IS_Xt,
"TLBI VAAE1IS" },
700 { ArmISA::MISCREG_TLBI_VALE1IS_Xt,
"TLBI VALE1IS" },
701 { ArmISA::MISCREG_TLBI_VAALE1IS_Xt,
"TLBI VAALE1IS" },
703 { ArmISA::MISCREG_TLBI_VAE1_Xt,
"TLBI VAE1" },
704 { ArmISA::MISCREG_TLBI_ASIDE1_Xt,
"TLBI ASIDE1" },
705 { ArmISA::MISCREG_TLBI_VAAE1_Xt,
"TLBI VAAE1" },
706 { ArmISA::MISCREG_TLBI_VALE1_Xt,
"TLBI VALE1" },
707 { ArmISA::MISCREG_TLBI_VAALE1_Xt,
"TLBI VAALE1" },
708 { ArmISA::MISCREG_TLBI_IPAS2E1IS_Xt,
"TLBI IPAS2E1IS" },
709 { ArmISA::MISCREG_TLBI_IPAS2LE1IS_Xt,
"TLBI IPAS2LE1IS" },
711 { ArmISA::MISCREG_TLBI_VAE2IS_Xt,
"TLBI VAE2IS" },
713 { ArmISA::MISCREG_TLBI_VALE2IS_Xt,
"TLBI VALE2IS" },
715 { ArmISA::MISCREG_TLBI_IPAS2E1_Xt,
"TLBI IPAS2E1" },
716 { ArmISA::MISCREG_TLBI_IPAS2LE1_Xt,
"TLBI IPAS2LE1" },
718 { ArmISA::MISCREG_TLBI_VAE2_Xt,
"TLBI VAE2" },
720 { ArmISA::MISCREG_TLBI_VALE2_Xt,
"TLBI VALE2" },
723 { ArmISA::MISCREG_TLBI_VAE3IS_Xt,
"TLBI VAE3IS" },
724 { ArmISA::MISCREG_TLBI_VALE3IS_Xt,
"TLBI VALE3IS" },
726 { ArmISA::MISCREG_TLBI_VAE3_Xt,
"TLBI VAE3" },
727 { ArmISA::MISCREG_TLBI_VALE3_Xt,
"TLBI VALE3" },
938 { 0,
"V0" }, { 1,
"V1" }, { 2,
"V2" }, { 3,
"V3" },
939 { 4,
"V4" }, { 5,
"V5" }, { 6,
"V6" }, { 7,
"V7" },
940 { 8,
"V8" }, { 9,
"V9" }, { 10,
"V10" }, { 11,
"V11" },
941 { 12,
"V12" }, { 13,
"V13" }, { 14,
"V14" }, { 15,
"V15" },
942 { 16,
"V16" }, { 17,
"V17" }, { 18,
"V18" }, { 19,
"V19" },
943 { 20,
"V20" }, { 21,
"V21" }, { 22,
"V22" }, { 23,
"V23" },
944 { 24,
"V24" }, { 25,
"V25" }, { 26,
"V26" }, { 27,
"V27" },
945 { 28,
"V28" }, { 29,
"V29" }, { 30,
"V30" }, { 31,
"V31" }
virtual RegVal readCCRegFlat(RegIndex idx) const
ResourceIds flattenedIntIds
void extractResourceMap(ResourceIds &ids, const ResourceMap &resources, const IdxNameMap &idx_names)
void setMiscReg(RegIndex misc_reg, const RegVal val) override
std::map< std::string, iris::ResourceInfo > ResourceMap
std::map< int, std::string > IdxNameMap
iris::MemorySpaceId getMemorySpaceId(const Iris::CanonicalMsn &msn) const
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
iris::ResourceId extractResourceId(const ResourceMap &resources, const std::string &name)
virtual void setCCRegFlat(RegIndex idx, RegVal val)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
static IdxNameMap intReg32IdxNameMap
static IdxNameMap vecRegIdxNameMap
const std::vector< iris::MemorySpaceId > & getBpSpaceIds() const override
CortexA76TC(gem5::BaseCPU *cpu, int id, System *system, gem5::BaseMMU *mmu, gem5::BaseISA *isa, iris::IrisConnectionInterface *iris_if, const std::string &iris_path)
void setIntRegFlat(RegIndex idx, RegVal val) override
void setCCRegFlat(RegIndex idx, RegVal val) override
RegVal readIntRegFlat(RegIndex idx) const override
static IdxNameMap flattenedIntIdxNameMap
static IdxNameMap intReg64IdxNameMap
void initFromIrisInstance(const ResourceMap &resources) override
static IdxNameMap miscRegIdxNameMap
static std::vector< iris::MemorySpaceId > bpSpaceIds
static IdxNameMap ccRegIdxNameMap
RegVal readCCRegFlat(RegIndex idx) const override
bool translateAddress(Addr &paddr, Addr vaddr) override
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
constexpr T insertBits(T val, unsigned first, unsigned last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
ExceptionLevel currEL(const ThreadContext *tc)
Returns the current Exception Level (EL) of the provided ThreadContext.
bool isSecure(ThreadContext *tc)
@ MISCREG_ID_AA64PFR0_EL1
@ MISCREG_ID_AA64DFR0_EL1
@ MISCREG_ID_AA64DFR1_EL1
@ MISCREG_ID_AA64ISAR1_EL1
@ MISCREG_ID_AA64MMFR1_EL1
@ MISCREG_TLBI_VMALLS12E1
@ MISCREG_TLBI_VMALLS12E1IS
@ MISCREG_ID_AA64MMFR0_EL1
@ MISCREG_DBGCLAIMSET_EL1
@ MISCREG_DBGCLAIMCLR_EL1
@ MISCREG_ID_AA64AFR1_EL1
@ MISCREG_ID_AA64AFR0_EL1
@ MISCREG_ID_AA64ISAR0_EL1
@ MISCREG_DBGAUTHSTATUS_EL1
@ MISCREG_ID_AA64PFR1_EL1
@ PhysicalMemorySecureMsn
@ PhysicalMemoryNonSecureMsn
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.