VirtualBox

Changeset 84799 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jun 11, 2020 3:19:35 PM (5 years ago)
Author:
vboxsync
Message:

VBox/pci.h: Add macros for device and bus masks from the bus:device:function value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pci.h

    r83941 r84799  
    458458#define VBOX_PCI_MAX_DEVICES        32
    459459/** The device number shift count for a device+function number. */
     460#define VBOX_PCI_DEVFN_FUN_MASK     0x7
     461/** The device number shift count for a device+function number. */
    460462#define VBOX_PCI_DEVFN_DEV_SHIFT    3
    461 /** The device number shift count for a device+function number. */
    462 #define VBOX_PCI_DEVFN_FUN_MASK     0x7
     463/** The device number mask for a device+function number. */
     464#define VBOX_PCI_DEVFN_DEV_MASK     0x1f
    463465/** The bus number shift count for a bus+device+function number. */
    464466#define VBOX_PCI_BUS_SHIFT          0xc
     467/** The bus number mask a bus+device+function number. */
     468#define VBOX_PCI_BUS_MASK           0xff
    465469/** Make a device+function number.   */
    466470#define VBOX_PCI_DEVFN_MAKE(a_uPciDevNo, a_uPciFunNo) (((a_uPciDevNo) << VBOX_PCI_DEVFN_DEV_SHIFT) | (a_uPciFunNo))
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