Changeset 77749 in vbox
- Timestamp:
- Mar 18, 2019 11:45:00 AM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePciExpressLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
r58466 r77749 25 25 VERSION_STRING = 1.0 26 26 LIBRARY_CLASS = PciExpressLib 27 CONSTRUCTOR = PciExpressLibConstructor 27 28 28 29 # -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePciExpressLib/PciExpressLib.c
r58466 r77749 36 36 #define ASSERT_INVALID_PCI_ADDRESS(A) \ 37 37 ASSERT (((A) & ~0xfffffff) == 0) 38 39 #ifdef VBOX 40 41 STATIC UINT64 mPciExpressBaseAddress; 42 43 RETURN_STATUS 44 EFIAPI 45 PciExpressLibConstructor ( 46 VOID 47 ) 48 { 49 // 50 // Accessing PciExpressBaseAddress as a dynamic PCD does not work 51 // because LibPcdGet64() worker tries to raise the TPL to 16 when 52 // it was already set to 31 by caller further up the chain. We need 53 // to read the value (which won't change) and cache it here. 54 // 55 mPciExpressBaseAddress = PcdGet64 (PcdPciExpressBaseAddress); 56 if (!mPciExpressBaseAddress) 57 return RETURN_LOAD_ERROR; 58 59 return RETURN_SUCCESS; 60 } 61 #endif 62 38 63 39 64 /** … … 83 108 ) 84 109 { 110 #ifdef VBOX 111 return (VOID*)(UINTN) mPciExpressBaseAddress; 112 #else 85 113 return (VOID*)(UINTN) PcdGet64 (PcdPciExpressBaseAddress); 114 #endif 86 115 } 87 116
Note:
See TracChangeset
for help on using the changeset viewer.