From 7dea79535c87b68b5fc6143190d09b8fc364f2aa Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Jun 2011 21:43:36 -0400 Subject: inorder: implement trap handling --- src/cpu/inorder/resources/cache_unit.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/cpu/inorder/resources/cache_unit.cc') diff --git a/src/cpu/inorder/resources/cache_unit.cc b/src/cpu/inorder/resources/cache_unit.cc index c1a3590be..760fdb134 100644 --- a/src/cpu/inorder/resources/cache_unit.cc +++ b/src/cpu/inorder/resources/cache_unit.cc @@ -441,9 +441,10 @@ CacheUnit::doTLBAccess(DynInstPtr inst, CacheReqPtr cache_req, int acc_size, cache_req->tlbStall = true; + // schedule a time to process the tlb miss. + // latency hardcoded to 1 (for now), but will be updated + // when timing translation gets added in scheduleEvent(slot_idx, 1); - - cpu->trap(inst->fault, tid, inst); } else { DPRINTF(InOrderTLB, "[tid:%i]: [sn:%i] virt. addr %08p translated " "to phys. addr:%08p.\n", tid, inst->seqNum, @@ -1072,6 +1073,11 @@ CacheUnitEvent::process() CacheUnit* tlb_res = dynamic_cast(resource); assert(tlb_res); + //@todo: eventually, we should do a timing translation w/ + // hw page table walk on tlb miss + DPRINTF(Fault, "Handling Fault %s\n", inst->fault->name()); + inst->fault->invoke(tlb_res->cpu->tcBase(tid), inst->staticInst); + tlb_res->tlbBlocked[tid] = false; tlb_res->cpu->pipelineStage[stage_num]-> -- cgit v1.2.3