Bugfix in MMIOPlatform.bsv for instruction-fetch from IO addrs

Detail: an "instruction-fetch" response from mmioplatform to core
should be an "InstFetch". This was true for successful fabric reads,
but on error responses it was wrongly returned as a "DataAccess"
response.  This was causing a deadlock.
This commit is contained in:
rsnikhil
2019-04-17 15:29:10 -04:00
parent e9c04c7050
commit e7fbf32b38
177 changed files with 103548 additions and 94531 deletions

View File

@@ -47,7 +47,7 @@ DataAlignedAddr bootRomBaseAddr = getDataAlignedAddr(soc_map_struct.boot_rom_a
DataAlignedAddr msipBaseAddr = getDataAlignedAddr(soc_map_struct.near_mem_io_addr_base + 64'h_0000_0000);
DataAlignedAddr mtimecmpBaseAddr = getDataAlignedAddr(soc_map_struct.near_mem_io_addr_base + 64'h_0000_4000);
DataAlignedAddr mtimeBaseAddr = getDataAlignedAddr(soc_map_struct.near_mem_io_addr_base + 64'h_0000_bff8);
DataAlignedAddr mainMemBaseAddr = getDataAlignedAddr(soc_map_struct.mem0_controller_addr_base);
DataAlignedAddr mainMemBaseAddr = getDataAlignedAddr(soc_map_struct.main_mem_addr_base);
// XXX Each msip reg is 32-bit, while mtime and each mtimecmp are 64-bit. We
// assume Data is 64-bit. We hard code this relation in all MMIO logic.
@@ -61,7 +61,7 @@ DataAlignedAddr mainMemBaseAddr = getDataAlignedAddr(soc_map_struct.mem0_contr
DataAlignedAddr bootRomBoundAddr = bootRomBaseAddr +
fromInteger(valueof(TExp#(LgBootRomSzData)));
DataAlignedAddr mainMemBoundAddr = (mainMemBaseAddr +
getDataAlignedAddr(soc_map_struct.mem0_controller_addr_size));
getDataAlignedAddr(soc_map_struct.main_mem_addr_size));
DataAlignedAddr msipBoundAddr = msipBaseAddr +
fromInteger(valueof(TDiv#(CoreNum, 2)));
DataAlignedAddr mtimecmpBoundAddr = mtimecmpBaseAddr +

View File

@@ -77,15 +77,13 @@ module mkMMIOInst(MMIOInst);
method InstFetchTarget getFetchTarget(Addr phyPc);
let addr = getDataAlignedAddr(phyPc);
if (soc_map.m_is_IO_addr (phyPc)) begin
return IODevice;
end
else if(addr >= mainMemBaseAddr && (addr < mainMemBoundAddr) &&
addr != toHostAddr && addr != fromHostAddr) begin
return MainMem;
end
if(addr >= mainMemBaseAddr && (addr < mainMemBoundAddr) &&
addr != toHostAddr && addr != fromHostAddr)
begin
return MainMem;
end
else begin
return Fault;
return IODevice;
end
endmethod