Prevent instruction fetch to unexpected devices

This commit is contained in:
Peter Rugg
2020-07-10 17:34:58 +01:00
parent 5e9b478371
commit 6a317d1a00
4 changed files with 37 additions and 30 deletions

View File

@@ -118,7 +118,7 @@ module mkMMIO_AXI4_Adapter (MMIO_AXI4_Adapter_IFC);
// Technically the following check for legal IO addrs is not
// necessary; the AXI4 fabric should return a DECERR for illegal
// addrs; but not all AXI4 fabrics do the right thing.
if (soc_map.m_is_IO_addr (req.addr)) begin
if (soc_map.m_is_IO_addr (req.addr, False)) begin
AXI4_Size size = 8;
let mem_req_rd_addr = AXI4_ARFlit {arid: fabric_2x3_default_mid,
araddr: req.addr,
@@ -206,7 +206,7 @@ module mkMMIO_AXI4_Adapter (MMIO_AXI4_Adapter_IFC);
// Technically the following check for legal IO addrs is not
// necessary; the AXI4 fabric should return a DECERR for illegal
// addrs; but not all AXI4 fabrics do the right thing.
if (soc_map.m_is_IO_addr (req.addr)) begin
if (soc_map.m_is_IO_addr (req.addr, False)) begin
//fa_fabric_send_write_req (req.addr, truncate(pack(req.byteEn)), fromMemTaggedData(req.data));
// on first flit...
// ================

View File

@@ -91,7 +91,7 @@ module mkMMIOInst(MMIOInst);
method InstFetchTarget getFetchTarget(Addr phyPc);
let addr = getDataAlignedAddr(phyPc);
if (soc_map.m_is_IO_addr (phyPc)) begin
if (soc_map.m_is_IO_addr (phyPc, True)) begin
return IODevice;
end
else if(addr >= mainMemBaseAddr && (addr < mainMemBoundAddr) &&