42 #ifndef __CPU_TRANSLATION_HH__ 43 #define __CPU_TRANSLATION_HH__ 80 : outstanding(1), delay(false), isSplit(false), mainReq(_req),
81 sreqLow(NULL), sreqHigh(NULL), data(_data), res(_res), mode(_mode)
83 faults[0] = faults[1] =
NoFault;
95 : outstanding(2), delay(false), isSplit(true), mainReq(_req),
96 sreqLow(_sreqLow), sreqHigh(_sreqHigh), data(_data), res(_res),
99 faults[0] = faults[1] =
NoFault;
114 faults[
index] = fault;
116 if (isSplit && outstanding == 0) {
120 mainReq->setPaddr(sreqLow->getPaddr());
122 mainReq->setFlags(sreqLow->getFlags());
123 mainReq->setFlags(sreqHigh->getFlags());
125 return outstanding == 0;
149 faults[0] = faults[1] =
NoFault;
160 return mainReq->isStrictlyOrdered();
171 return mainReq->isPrefetch();
178 return mainReq->getPaddr();
189 return mainReq->getFlags();
214 template <
class ExecContextPtr>
224 : xc(_xc), state(_state), index(0)
230 : xc(_xc), state(_state), index(_index)
253 assert(mode == state->
mode);
254 if (state->
finish(fault, index)) {
257 req->setTranslateLatency();
259 xc->finishTranslation(state);
267 return xc->isSquashed();
271 #endif // __CPU_TRANSLATION_HH__ DataTranslation(ExecContextPtr _xc, WholeTranslationState *_state, int _index)
This class represents part of a data address translation.
bool squashed() const
This function is used by the page table walker to determine if it should translate the a pending requ...
unsigned getFlags()
Get the flags associated with this request.
Addr getPaddr() const
Get the physical address of this request.
decltype(nullptr) constexpr NoFault
WholeTranslationState(const RequestPtr &_req, uint8_t *_data, uint64_t *_res, BaseTLB::Mode _mode)
Single translation state.
std::shared_ptr< Request > RequestPtr
void deleteReqs()
Delete all requests that make up this translation.
void markDelayed()
Signal the translation state that the translation has been delayed due to a hw page table walk...
This class captures the state of an address translation.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
bool isPrefetch() const
Check if this request is a prefetch.
bool finish(const Fault &fault, int index)
Finish part of a translation.
DataTranslation(ExecContextPtr _xc, WholeTranslationState *_state)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Fault getFault() const
Determine whether this translation produced a fault.
WholeTranslationState(const RequestPtr &_req, const RequestPtr &_sreqLow, const RequestPtr &_sreqHigh, uint8_t *_data, uint64_t *_res, BaseTLB::Mode _mode)
Split translation state.
void setNoFault()
Remove all faults from the translation.
WholeTranslationState * state
std::shared_ptr< FaultBase > Fault
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode)
Finish this part of the translation and indicate that the whole translation is complete if the state ...
bool isStrictlyOrdered() const
Check if this request is strictly ordered device access.