arm: Refactor aarch64 table walk logic to remove redundancy
authorDylan Johnson <Dylan.Johnson@ARM.com>
Tue, 2 Aug 2016 09:38:02 +0000 (10:38 +0100)
committerDylan Johnson <Dylan.Johnson@ARM.com>
Tue, 2 Aug 2016 09:38:02 +0000 (10:38 +0100)
The functional case is already handled within the fetchDescriptor()
function. We can thus use that function for both atomic and functional
mode when we start the table walk.

Change-Id: Iacaed28cd9024d259fd37a58150efd00ff94d86e

src/arch/arm/table_walker.cc

index 4eb57c59afe7f76a8380b967c5da39210d64ef6d..f1a7ca2509b8841cfd1399734878f23cfa773732 100644 (file)
@@ -992,21 +992,11 @@ TableWalker::processWalkAArch64()
                 stateQueues[start_lookup_level].size());
         stateQueues[start_lookup_level].push_back(currState);
         currState = NULL;
-    } else if (!currState->functional) {
+    } else {
         fetchDescriptor(desc_addr, (uint8_t*)&currState->longDesc.data,
                         sizeof(uint64_t), flag, -1, NULL,
                         &TableWalker::doLongDescriptor);
         f = currState->fault;
-    } else {
-        RequestPtr req = new Request(desc_addr, sizeof(uint64_t), flag,
-                                     masterId);
-        PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
-        pkt->dataStatic((uint8_t*) &currState->longDesc.data);
-        port->sendFunctional(pkt);
-        doLongDescriptor();
-        delete req;
-        delete pkt;
-        f = currState->fault;
     }
 
     return f;