atirage: Add ability to read from PCI option rom.

Usually there is not PCI option rom if the chip is built-in to the motherboard such as in the Beige G3.
This commit is contained in:
joevt 2024-04-20 00:14:54 -07:00 committed by dingusdev
parent 6f64e729c8
commit 5f37421ceb
1 changed files with 9 additions and 0 deletions

View File

@ -591,6 +591,15 @@ uint32_t ATIRage::read(uint32_t rgn_start, uint32_t offset, int size)
return 0;
}
// memory mapped expansion ROM region
if (rgn_start == this->exp_rom_addr) {
if (offset < this->exp_rom_size)
return read_mem(&this->exp_rom_data[offset], size);
LOG_F(WARNING, "%s: read unmapped ROM region %08x.%c",
this->name.c_str(), offset, SIZE_ARG(size));
return 0;
}
LOG_F(WARNING, "%s: read unmapped aperture region %08x.%c",
this->name.c_str(), offset, SIZE_ARG(size));
return 0;