Changeset 34876 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2010 11:16:00 AM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Builtins.h
r32471 r34876 84 84 extern const PDMDEVREG g_DeviceEFI; 85 85 #endif 86 extern const PDMDEVREG g_DevicePciRaw; 86 87 87 88 extern const PDMDRVREG g_DrvMouseQueue; -
trunk/src/VBox/Devices/Makefile.kmk
r34768 r34876 272 272 Bus/MsiCommon.cpp \ 273 273 Bus/MsixCommon.cpp \ 274 Bus/DevPciRaw.cpp \ 274 275 Graphics/DevVGA.cpp \ 275 276 Storage/DevATA.cpp \ … … 533 534 Bus/MsiCommon.cpp \ 534 535 Bus/MsixCommon.cpp \ 536 Bus/DevPciRaw.cpp \ 535 537 Graphics/DevVGA.cpp \ 536 538 Input/DevPS2.cpp \ … … 636 638 Bus/MsiCommon.cpp \ 637 639 Bus/MsixCommon.cpp \ 640 Bus/DevPciRaw.cpp \ 638 641 Graphics/DevVGA.cpp \ 639 642 Input/DevPS2.cpp \ -
trunk/src/VBox/Main/include/BusAssignmentManager.h
r34331 r34876 21 21 22 22 #include "VBox/types.h" 23 #include "VBox/pci.h" 23 24 #include "VirtualBoxBase.h" 24 25 struct PciBusAddress26 {27 int iBus;28 int iDevice;29 int iFn;30 31 PciBusAddress()32 {33 clear();34 }35 36 PciBusAddress(int bus, int device, int fn)37 : iBus(bus), iDevice(device), iFn(fn)38 {39 }40 41 PciBusAddress& clear()42 {43 iBus = iDevice = iFn = -1;44 return *this;45 }46 47 bool operator<(const PciBusAddress &a) const48 {49 if (iBus < a.iBus)50 return true;51 52 if (iBus > a.iBus)53 return false;54 55 if (iDevice < a.iDevice)56 return true;57 58 if (iDevice > a.iDevice)59 return false;60 61 if (iFn < a.iFn)62 return true;63 64 if (iFn > a.iFn)65 return false;66 67 return false;68 }69 70 bool operator==(const PciBusAddress &a) const71 {72 return (iBus == a.iBus)73 && (iDevice == a.iDevice)74 && (iFn == a.iFn);75 }76 77 bool operator!=(const PciBusAddress &a) const78 {79 return (iBus != a.iBus)80 || (iDevice != a.iDevice)81 || (iFn != a.iFn);82 }83 84 bool valid() const85 {86 return (iBus != -1) && (iDevice != -1) && (iFn != -1);87 }88 89 LONG asLong() const90 {91 Assert(valid());92 return (iBus << 8) | (iDevice << 3) | iFn;93 }94 95 void fromLong(LONG value)96 {97 iBus = (value >> 8) & 0xff;98 iDevice = (value & 0xff) >> 3;99 iFn = (value & 7);100 }101 };102 25 103 26 class BusAssignmentManager
Note:
See TracChangeset
for help on using the changeset viewer.