Disable PMA execute and nonidempotent features (#2385)

This commit is contained in:
JeanRochCoulon 2024-07-23 17:57:22 +02:00 committed by GitHub
parent d4809a7e2b
commit 04ebfbd713
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View file

@ -391,11 +391,15 @@ package config_pkg;
function automatic logic is_inside_execute_regions(cva6_cfg_t Cfg, logic [63:0] address);
// if we don't specify any region we assume everything is accessible
logic [NrMaxRules-1:0] pass;
pass = '0;
for (int unsigned k = 0; k < Cfg.NrExecuteRegionRules; k++) begin
pass[k] = range_check(Cfg.ExecuteRegionAddrBase[k], Cfg.ExecuteRegionLength[k], address);
if (Cfg.NrExecuteRegionRules == 0) begin
pass = '0;
for (int unsigned k = 0; k < Cfg.NrExecuteRegionRules; k++) begin
pass[k] = range_check(Cfg.ExecuteRegionAddrBase[k], Cfg.ExecuteRegionLength[k], address);
end
return |pass;
end else begin
return 1;
end
return |pass;
endfunction : is_inside_execute_regions
function automatic logic is_inside_cacheable_regions(cva6_cfg_t Cfg, logic [63:0] address);

View file

@ -65,10 +65,10 @@ package cva6_config_pkg;
PMPAddrRstVal: {64{64'h0}},
PMPEntryReadOnly: 64'd0,
NOCType: config_pkg::NOC_TYPE_AXI4_ATOP,
NrNonIdempotentRules: unsigned'(2),
NrNonIdempotentRules: unsigned'(0),
NonIdempotentAddrBase: 1024'({64'b0, 64'b0}),
NonIdempotentLength: 1024'({64'b0, 64'b0}),
NrExecuteRegionRules: unsigned'(3),
NrExecuteRegionRules: unsigned'(0),
ExecuteRegionAddrBase: 1024'({64'h8000_0000, 64'h1_0000, 64'h0}),
ExecuteRegionLength: 1024'({64'h40000000, 64'h10000, 64'h1000}),
NrCachedRegionRules: unsigned'(1),