Add LoadCapPageFault exception cases
This commit is contained in:
@@ -1122,7 +1122,8 @@ module mkCsrFile #(Data hartid)(CsrFile);
|
||||
excInstAccessFault, excInstPageFault,
|
||||
excLoadAddrMisaligned, excLoadAccessFault,
|
||||
excStoreAddrMisaligned, excStoreAccessFault,
|
||||
excLoadPageFault, excStorePageFault, excStoreCapPageFault: return addr;
|
||||
excLoadPageFault, excStorePageFault,
|
||||
excStoreCapPageFault, excLoadCapPageFault: return addr;
|
||||
|
||||
default: return 0;
|
||||
endcase);
|
||||
|
||||
@@ -243,6 +243,7 @@ function TlbPermissionCheck hasVMPermission(
|
||||
fault = True;
|
||||
end
|
||||
if (cap) begin
|
||||
if (!fault) excCode = excLoadCapPageFault;
|
||||
// check for invalid PTE encodings
|
||||
if ((!pte_upper_type.cap_readable && pte_upper_type.cap_read_gen) ||
|
||||
(pte_upper_type.cap_readable && !pte_upper_type.cap_read_mod &&
|
||||
|
||||
Reference in New Issue
Block a user