VirtualBox

Changeset 81128 in vbox


Ignore:
Timestamp:
Oct 7, 2019 1:40:52 PM (5 years ago)
Author:
vboxsync
Message:

Devices/BIOS: Enable pci_write_config_* for the upcoming virtio driver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/pciutil.c

    r78052 r81128  
    195195}
    196196
    197 #if 0 /* Disabled to save space because they are not needed. Might become useful in the future. */
    198197void pci_write_config_byte(uint8_t bus, uint8_t dev_fn, uint8_t reg, uint8_t val)
    199198{
     
    203202void pci_write_config_dword(uint8_t bus, uint8_t dev_fn, uint8_t reg, uint32_t val)
    204203{
     204#if VBOX_BIOS_CPU >= 80386
    205205    pci_write_cfgd((PCIBIOS_ID << 8) | PCIBIOS_WRITE_CONFIG_DWORD, (bus << 8) | dev_fn, reg, val);
    206 }
    207 #endif /* 0 */
     206#else
     207    pci_write_cfgw((PCIBIOS_ID << 8) | PCIBIOS_WRITE_CONFIG_WORD, (bus << 8) | dev_fn, reg, val & 0xffff);
     208    pci_write_cfgw((PCIBIOS_ID << 8) | PCIBIOS_WRITE_CONFIG_WORD, (bus << 8) | dev_fn, reg + 2, val >> 16);
     209#endif
     210}
     211
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette