Removed the redundant mem_write_null* functions (the few mappings that use them, now use NULL pointers instead) and made the _phys function used by DMA not write to the exec buffer if the address has no write mapping (as in that case, it's clearly not intended to be writable), fixes #1332.

This commit is contained in:
OBattler
2021-03-30 02:16:01 +02:00
parent 0cf651ff95
commit 345a61fa7c
5 changed files with 34 additions and 51 deletions

View File

@@ -1284,7 +1284,8 @@ _dma_write(uint32_t addr, uint8_t val, dma_t *dma_c)
dma_bm_write(addr, &val, 1, dma_transfer_size(dma_c));
} else {
mem_writeb_phys(addr, val);
mem_invalidate_range(addr, addr);
if (AT)
mem_invalidate_range(addr, addr);
}
}
@@ -1662,5 +1663,6 @@ dma_bm_write(uint32_t PhysAddress, const uint8_t *DataWrite, uint32_t TotalSize,
mem_write_phys((void *) bytes, PhysAddress + n, TransferSize);
}
mem_invalidate_range(PhysAddress, PhysAddress + TotalSize - 1);
if (AT)
mem_invalidate_range(PhysAddress, PhysAddress + TotalSize - 1);
}