42#include "debug/ArmTme.hh"
49using namespace ArmISA;
55 trace::InstRecord *traceData)
const
58 const uint64_t htm_depth = xc->getHtmTransactionalDepth();
60 DPRINTF(ArmTme,
"tme depth is %d\n", htm_depth);
64 const uint64_t htm_uid = xc->getHtmTransactionUid();
65 fault = std::make_shared<GenericHtmFailureFault>(
80 fault = xc->initiateMemMgmtCmd(memAccessFlags);
88 trace::InstRecord *traceData)
const
93 ThreadContext *tc = xc->tcBase();
94 const uint64_t htm_depth = xc->getHtmTransactionalDepth();
100 fault = std::make_shared<IllegalInstSetStateFault>();
104 if (!xc->inHtmTransactionalState()) {
105 fault = std::make_shared<IllegalInstSetStateFault>();
112 if (htm_depth == 1) {
115 HTMCheckpoint *armcpt =
116 dynamic_cast<HTMCheckpoint*
>(cpt.get());
117 assert(armcpt !=
nullptr);
120 armcpt->destinationRegister(
dest);
122 tc->getIsaPtr()->globalClearExclusive();
128 uint64_t final_val = Dest64;
129 if (traceData) { traceData->setData(
intRegClass, final_val); }
140 const uint64_t htm_depth = xc->getHtmTransactionalDepth();
144 fault = std::make_shared<IllegalInstSetStateFault>();
152 assert(!xc->inHtmTransactionalState());
154 assert(xc->inHtmTransactionalState());
157 uint64_t final_val = Dest64;
159 if (traceData) { traceData->setData(
intRegClass, final_val); }
171 if (!xc->inHtmTransactionalState()) {
172 fault = std::make_shared<IllegalInstSetStateFault>();
178 fault = xc->initiateMemMgmtCmd(memAccessFlags);
185 trace::InstRecord *traceData)
const
194 fault = std::make_shared<IllegalInstSetStateFault>();
198 auto tme_checkpoint =
static_cast<HTMCheckpoint*
>(
199 xc->tcBase()->getHtmCheckpointPtr().get());
200 tme_checkpoint->cancelReason(
imm);
202 fault = std::make_shared<GenericHtmFailureFault>(
203 xc->getHtmTransactionUid(),
212 trace::InstRecord *traceData)
const
215 const uint64_t htm_depth = xc->getHtmTransactionalDepth();
218 if (!xc->inHtmTransactionalState()) {
219 fault = std::make_shared<IllegalInstSetStateFault>();
222 DPRINTF(ArmTme,
"tme depth is %d\n", htm_depth);
234 fault = xc->initiateMemMgmtCmd(memAccessFlags);
241 trace::InstRecord *traceData)
const
245 ThreadContext *tc = xc->tcBase();
246 const uint64_t htm_depth = xc->getHtmTransactionalDepth();
252 fault = std::make_shared<IllegalInstSetStateFault>();
256 if (htm_depth == 1) {
257 auto tme_checkpoint =
static_cast<HTMCheckpoint*
>(
258 xc->tcBase()->getHtmCheckpointPtr().get());
260 assert(tme_checkpoint);
261 assert(tme_checkpoint->valid());
263 tme_checkpoint->reset();
264 tc->getIsaPtr()->globalClearExclusive();
ISA-specific types for hardware transactional memory.
Fault initiateAcc(ExecContext *, trace::InstRecord *) const
Fault completeAcc(PacketPtr, ExecContext *, trace::InstRecord *) const
Fault completeAcc(PacketPtr, ExecContext *, trace::InstRecord *) const
Fault initiateAcc(ExecContext *, trace::InstRecord *) const
Fault initiateAcc(ExecContext *, trace::InstRecord *) const
Fault completeAcc(PacketPtr, ExecContext *, trace::InstRecord *) const
Fault execute(ExecContext *, trace::InstRecord *) const
static const int MAX_HTM_DEPTH
@ STRICT_ORDER
The request is required to be strictly ordered by CPU models and is non-speculative.
@ PHYSICAL
The virtual address is also the physical address.
@ HTM_COMMIT
The request commits a HTM transaction.
@ HTM_CANCEL
The request cancels a HTM transaction.
@ NO_ACCESS
The request should not cause a memory access.
@ HTM_START
hardware transactional memory
gem5::Flags< FlagsType > Flags
constexpr RegClass intRegClass
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
void getMemLE(PacketPtr pkt, MemT &mem, trace::InstRecord *traceData)
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
constexpr decltype(nullptr) NoFault
Declaration of a request, the overall memory request consisting of the parts of the request that are ...