Implemented software-requested DMA block transfers, fixes #405, and also fixes UMBPCI's DMACHK ISA DMA tests;
Reworked a few things and re-implemented memory write protection in the SCAT emulation, to require less unusual mappings; Removed two files that should not be there; Made sure all graphics cards' memory mappings are mapped as MEM_MAPPING_EXTERNAL; Added MEM_MAPPING_ROMCS flag to signal that a mapping responds to MEMCS* and made the BIOS and Intel flash mappings use it.
This commit is contained in:
@@ -821,6 +821,23 @@ writememql(uint32_t addr, uint64_t val)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
mem_mapping_is_romcs(uint32_t addr, int write)
|
||||
{
|
||||
mem_mapping_t *map;
|
||||
|
||||
if (write)
|
||||
map = write_mapping[addr >> MEM_GRANULARITY_BITS];
|
||||
else
|
||||
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
|
||||
|
||||
if (map)
|
||||
return !!(map->flags & MEM_MAPPING_ROMCS);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
uint8_t
|
||||
mem_readb_phys(uint32_t addr)
|
||||
{
|
||||
@@ -1415,12 +1432,12 @@ mem_add_bios(void)
|
||||
mem_mapping_add(&bios_mapping, 0xe0000, 0x20000,
|
||||
mem_read_bios,mem_read_biosw,mem_read_biosl,
|
||||
mem_write_null,mem_write_nullw,mem_write_nulll,
|
||||
&rom[0x20000], MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM, 0);
|
||||
&rom[0x20000], MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM|MEM_MAPPING_ROMCS, 0);
|
||||
} else {
|
||||
mem_mapping_add(&bios_mapping, biosaddr, biosmask + 1,
|
||||
mem_read_bios,mem_read_biosw,mem_read_biosl,
|
||||
mem_write_null,mem_write_nullw,mem_write_nulll,
|
||||
rom, MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM, 0);
|
||||
rom, MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM|MEM_MAPPING_ROMCS, 0);
|
||||
}
|
||||
|
||||
if (AT) {
|
||||
@@ -1428,7 +1445,7 @@ mem_add_bios(void)
|
||||
mem_read_bios,mem_read_biosw,mem_read_biosl,
|
||||
mem_write_null,mem_write_nullw,mem_write_nulll,
|
||||
rom,
|
||||
MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM, 0);
|
||||
MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM|MEM_MAPPING_ROMCS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user