atirage: prevent big-endian accesses outside VRAM.

The simplest solution is to cut the aperture size by the amount
of video RAM installed. This way, accesses to the big-endian
aperture located above the installed VRAM will be catched and
reported by the MMU.
This commit is contained in:
Maxim Poliakovski 2023-10-03 14:18:00 +02:00
parent 576912dd55
commit 47d2e235a3

View File

@ -152,7 +152,7 @@ void ATIRage::notify_bar_change(int bar_num)
if (this->aperture_base != (this->bars[bar_num] & 0xFFFFFFF0UL)) {
this->aperture_base = this->bars[0] & 0xFFFFFFF0UL;
this->host_instance->pci_register_mmio_region(this->aperture_base,
APERTURE_SIZE, this);
APERTURE_SIZE - this->vram_size, this);
LOG_F(INFO, "ATIRage: aperture address set to 0x%08X", this->aperture_base);
}
break;