From 5f37421ceb00ca1d96966e4bb8e53b2631f233a5 Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 20 Apr 2024 00:14:54 -0700 Subject: [PATCH] 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. --- devices/video/atirage.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devices/video/atirage.cpp b/devices/video/atirage.cpp index b93b1d2..64187b9 100644 --- a/devices/video/atirage.cpp +++ b/devices/video/atirage.cpp @@ -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;