Merge pull request #5683 from smunaut/pci-bus-fixes

PCI bus improvements : Allow device to see full size access
This commit is contained in:
Jonathan Campbell 2025-05-05 15:02:41 -07:00 committed by GitHub
commit 383ed6e4cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -84,7 +84,7 @@ public:
/* NTS: If I recall, this virtual function call means that we'll call the
* C++ subclass's config_read() NOT our own--right? */
for (Bitu i=0;i < iolen;i++)
v += ((config_read((uint8_t)(regnum+i),1)&0xFF) << ((iolen-i-1)*8));
v += ((config_read((uint8_t)(regnum+i),1)&0xFF) << (i*8));
}
return v;

View File

@ -346,8 +346,9 @@ static void InitializePCI(void) {
PCI_ReadHandler[0].Install(0xcf8,read_pci_addr,IO_MD);
// install PCI-register read/write handlers
for (Bitu ct=0;ct<4;ct++) {
PCI_WriteHandler[1+ct].Install(0xcfc+ct,write_pci,IO_MB);
PCI_ReadHandler[1+ct].Install(0xcfc+ct,read_pci,IO_MB);
Bitu msk = IO_MB | ((ct & 1) ? 0 : IO_MW) | ((ct & 3) ? 0 : IO_MD);;
PCI_WriteHandler[1+ct].Install(0xcfc+ct,write_pci,msk);
PCI_ReadHandler[1+ct].Install(0xcfc+ct,read_pci,msk);
}
callback_pci.Install(&PCI_PM_Handler,CB_IRETD,"PCI PM");