Don't translate invalid vaddrs in the DTLB.
This commit is contained in:
@@ -473,7 +473,13 @@ module mkDTlb#(
|
||||
else if (vm_info.sv39) begin
|
||||
let vpn = getVpn(r.addr);
|
||||
let trans_result = tlb.translate(vpn, vm_info.asid);
|
||||
if (trans_result.hit) begin
|
||||
if (!validVirtualAddress(r.addr)) begin
|
||||
// page fault
|
||||
Exception fault = r.write ? excStorePageFault : excLoadPageFault;
|
||||
pendWait[idx] <= None;
|
||||
pendResp[idx] <= tuple3(?, Valid (fault), False);
|
||||
if(verbose) $display("[DTLB] req invalid virtual address: idx %d; ", idx, fshow(r));
|
||||
end else if (trans_result.hit) begin
|
||||
// TLB hit
|
||||
let entry = trans_result.entry;
|
||||
// check permission
|
||||
|
||||
Reference in New Issue
Block a user