Mem: Eliminate the NO_FAULT request flag.
This commit is contained in:
parent
bbbfdee2ed
commit
b8120f6c38
|
@ -144,7 +144,7 @@ DtbFault::invoke(ThreadContext *tc)
|
||||||
// read, like the EV5). The EV6 approach is cleaner and seems to
|
// read, like the EV5). The EV6 approach is cleaner and seems to
|
||||||
// work with EV5 PAL code, but not the other way around.
|
// work with EV5 PAL code, but not the other way around.
|
||||||
if (!tc->misspeculating() &&
|
if (!tc->misspeculating() &&
|
||||||
reqFlags.noneSet(Request::VPTE|Request::NO_FAULT)) {
|
reqFlags.noneSet(Request::VPTE | Request::PREFETCH)) {
|
||||||
// set VA register with faulting address
|
// set VA register with faulting address
|
||||||
tc->setMiscRegNoEffect(IPR_VA, vaddr);
|
tc->setMiscRegNoEffect(IPR_VA, vaddr);
|
||||||
|
|
||||||
|
|
|
@ -627,7 +627,7 @@ decode OPCODE default Unknown::unknown() {
|
||||||
format MiscPrefetch {
|
format MiscPrefetch {
|
||||||
0xf800: wh64({{ EA = Rb & ~ULL(63); }},
|
0xf800: wh64({{ EA = Rb & ~ULL(63); }},
|
||||||
{{ xc->writeHint(EA, 64, memAccessFlags); }},
|
{{ xc->writeHint(EA, 64, memAccessFlags); }},
|
||||||
mem_flags = NO_FAULT,
|
mem_flags = PREFETCH,
|
||||||
inst_flags = [IsMemRef, IsDataPrefetch,
|
inst_flags = [IsMemRef, IsDataPrefetch,
|
||||||
IsStore, MemWriteOp]);
|
IsStore, MemWriteOp]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -548,7 +548,7 @@ def format LoadOrPrefetch(memacc_code, ea_code = {{ EA = Rb + disp; }},
|
||||||
pf_flags = makeList(pf_flags)
|
pf_flags = makeList(pf_flags)
|
||||||
inst_flags = makeList(inst_flags)
|
inst_flags = makeList(inst_flags)
|
||||||
|
|
||||||
pf_mem_flags = mem_flags + pf_flags + ['NO_FAULT']
|
pf_mem_flags = mem_flags + pf_flags + ['PREFETCH']
|
||||||
pf_inst_flags = inst_flags + ['IsMemRef', 'IsLoad',
|
pf_inst_flags = inst_flags + ['IsMemRef', 'IsLoad',
|
||||||
'IsDataPrefetch', 'MemReadOp']
|
'IsDataPrefetch', 'MemReadOp']
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,7 @@ def format StoreUnalignedMemory(memacc_code, ea_code = {{ EA = (Rs + disp) & ~3;
|
||||||
|
|
||||||
def format Prefetch(ea_code = {{ EA = Rs + disp; }},
|
def format Prefetch(ea_code = {{ EA = Rs + disp; }},
|
||||||
mem_flags = [], pf_flags = [], inst_flags = []) {{
|
mem_flags = [], pf_flags = [], inst_flags = []) {{
|
||||||
pf_mem_flags = mem_flags + pf_flags + ['NO_FAULT']
|
pf_mem_flags = mem_flags + pf_flags + ['PREFETCH']
|
||||||
pf_inst_flags = inst_flags + ['IsMemRef', 'IsLoad',
|
pf_inst_flags = inst_flags + ['IsMemRef', 'IsLoad',
|
||||||
'IsDataPrefetch', 'MemReadOp']
|
'IsDataPrefetch', 'MemReadOp']
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ CheckerCPU::checkFlags(Request *req)
|
||||||
{
|
{
|
||||||
// Remove any dynamic flags that don't have to do with the request itself.
|
// Remove any dynamic flags that don't have to do with the request itself.
|
||||||
unsigned flags = unverifiedReq->getFlags();
|
unsigned flags = unverifiedReq->getFlags();
|
||||||
unsigned mask = LOCKED | PHYSICAL | VPTE | ALTMODE | UNCACHEABLE | NO_FAULT;
|
unsigned mask = LOCKED | PHYSICAL | VPTE | ALTMODE | UNCACHEABLE | PREFETCH;
|
||||||
flags = flags & (mask);
|
flags = flags & (mask);
|
||||||
if (flags == req->getFlags()) {
|
if (flags == req->getFlags()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -353,8 +353,14 @@ AtomicSimpleCPU::read(Addr addr, T &data, unsigned flags)
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
|
|
||||||
//If there's a fault, return it
|
//If there's a fault, return it
|
||||||
if (fault != NoFault)
|
if (fault != NoFault) {
|
||||||
return fault;
|
if (req->isPrefetch()) {
|
||||||
|
return NoFault;
|
||||||
|
} else {
|
||||||
|
return fault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//If we don't need to access a second cache line, stop now.
|
//If we don't need to access a second cache line, stop now.
|
||||||
if (secondAddr <= addr)
|
if (secondAddr <= addr)
|
||||||
{
|
{
|
||||||
|
@ -531,7 +537,11 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||||
assert(locked);
|
assert(locked);
|
||||||
locked = false;
|
locked = false;
|
||||||
}
|
}
|
||||||
return fault;
|
if (fault != NoFault && req->isPrefetch()) {
|
||||||
|
return NoFault;
|
||||||
|
} else {
|
||||||
|
return fault;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -273,6 +273,8 @@ TimingSimpleCPU::sendData(Fault fault, RequestPtr req,
|
||||||
{
|
{
|
||||||
_status = Running;
|
_status = Running;
|
||||||
if (fault != NoFault) {
|
if (fault != NoFault) {
|
||||||
|
if (req->isPrefetch())
|
||||||
|
fault = NoFault;
|
||||||
delete data;
|
delete data;
|
||||||
delete req;
|
delete req;
|
||||||
|
|
||||||
|
@ -315,6 +317,10 @@ TimingSimpleCPU::sendSplitData(Fault fault1, Fault fault2,
|
||||||
{
|
{
|
||||||
_status = Running;
|
_status = Running;
|
||||||
if (fault1 != NoFault || fault2 != NoFault) {
|
if (fault1 != NoFault || fault2 != NoFault) {
|
||||||
|
if (req1->isPrefetch())
|
||||||
|
fault1 = NoFault;
|
||||||
|
if (req2->isPrefetch())
|
||||||
|
fault2 = NoFault;
|
||||||
delete data;
|
delete data;
|
||||||
delete req1;
|
delete req1;
|
||||||
delete req2;
|
delete req2;
|
||||||
|
@ -360,6 +366,8 @@ TimingSimpleCPU::sendSplitData(Fault fault1, Fault fault2,
|
||||||
void
|
void
|
||||||
TimingSimpleCPU::translationFault(Fault fault)
|
TimingSimpleCPU::translationFault(Fault fault)
|
||||||
{
|
{
|
||||||
|
// fault may be NoFault in cases where a fault is suppressed,
|
||||||
|
// for instance prefetches.
|
||||||
numCycles += tickToCycles(curTick - previousTick);
|
numCycles += tickToCycles(curTick - previousTick);
|
||||||
previousTick = curTick;
|
previousTick = curTick;
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,6 @@ class Request : public FastAlloc
|
||||||
/** This request is to a memory mapped register. */
|
/** This request is to a memory mapped register. */
|
||||||
static const FlagsType MMAPED_IPR = 0x00002000;
|
static const FlagsType MMAPED_IPR = 0x00002000;
|
||||||
|
|
||||||
/** The request should not cause a page fault. */
|
|
||||||
static const FlagsType NO_FAULT = 0x00010000;
|
|
||||||
/** The request should ignore unaligned access faults */
|
/** The request should ignore unaligned access faults */
|
||||||
static const FlagsType NO_ALIGN_FAULT = 0x00020000;
|
static const FlagsType NO_ALIGN_FAULT = 0x00020000;
|
||||||
/** The request should ignore unaligned access faults */
|
/** The request should ignore unaligned access faults */
|
||||||
|
|
Loading…
Reference in a new issue