VirtualBox

Changeset 63879 in vbox for trunk/src/VBox/Devices/Bus


Ignore:
Timestamp:
Sep 19, 2016 11:28:45 AM (8 years ago)
Author:
vboxsync
Message:

DevPciIch9: play safe with BAR64 handling, it applies only to MEM regions but not IO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r63777 r63879  
    873873            continue;
    874874
    875         bool f64Bit = (pRegion->type & PCI_ADDRESS_SPACE_BAR64) != 0;
     875        bool f64Bit =    (pRegion->type & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO)))
     876                      == PCI_ADDRESS_SPACE_BAR64;
    876877
    877878        if (pRegion->type & PCI_ADDRESS_SPACE_IO)
     
    16281629    /* Read memory type first. */
    16291630    uint8_t uResourceType = ich9pciConfigRead(pGlobals, uBus, uDevFn, uReg, 1);
    1630     bool    f64Bit = (uResourceType & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO)))
     1631    bool    f64Bit =    (uResourceType & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO)))
    16311632                     == PCI_ADDRESS_SPACE_BAR64;
    16321633
     
    17701771                uint8_t u8ResourceType = ich9pciConfigRead(pGlobals, uBus, uDevFn, u32Address, 1);
    17711772
    1772                 bool f64Bit = (u8ResourceType & PCI_ADDRESS_SPACE_BAR64) != 0;
     1773                bool f64Bit =    (u8ResourceType & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO)))
     1774                              == PCI_ADDRESS_SPACE_BAR64;
    17731775                bool fIsPio = ((u8ResourceType & PCI_COMMAND_IOACCESS) == PCI_COMMAND_IOACCESS);
    17741776                uint64_t cbRegSize64 = 0;
     
    24562458                    char szDescBuf[128];
    24572459
    2458                     bool f64Bit = !!(pRegion->type & PCI_ADDRESS_SPACE_BAR64);
     2460                    bool f64Bit =    (pRegion->type & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO)))
     2461                                  == PCI_ADDRESS_SPACE_BAR64;
    24592462                    if (pRegion->type & PCI_ADDRESS_SPACE_IO)
    24602463                    {
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