- Timestamp:
- Oct 12, 2015 10:32:18 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
r48674 r58172 25 25 // PIIX4 Power Management Base Address 26 26 // 27 #ifndef VBOX 27 28 UINT32 mPmba = 0x400; 29 #else 30 UINT32 mPmba = 0x4000; 31 #endif 28 32 29 33 #define PCI_BAR_IO 0x1 … … 41 45 42 46 **/ 47 #ifndef VBOX 43 48 RETURN_STATUS 44 49 EFIAPI … … 68 73 return RETURN_SUCCESS; 69 74 } 75 #else 76 RETURN_STATUS 77 EFIAPI 78 AcpiTimerLibConstructor ( 79 VOID 80 ) 81 { 82 UINT8 u8Device = 7; 83 UINT16 u16VendorID = 0; 84 UINT16 u16DeviceID = 0; 85 u16VendorID = PciRead16(PCI_LIB_ADDRESS(0, u8Device, 0, 0)); 86 u16DeviceID = PciRead16(PCI_LIB_ADDRESS(0, u8Device, 0, 2)); 87 if ( u16VendorID != 0x8086 88 || u16DeviceID != 0x7113) 89 return RETURN_ABORTED; 90 91 if (PciRead8 (PCI_LIB_ADDRESS (0,u8Device,0,0x80)) & 1) { 92 mPmba = PciRead32 (PCI_LIB_ADDRESS (0, u8Device, 0, 0x40)); 93 ASSERT (mPmba & PCI_BAR_IO); 94 DEBUG((DEBUG_INFO, "%a:%d mPmba:%x\n", __FUNCTION__, __LINE__, mPmba)); 95 mPmba &= ~PCI_BAR_IO; 96 DEBUG((DEBUG_INFO, "%a:%d mPmba:%x\n", __FUNCTION__, __LINE__, mPmba)); 97 } else { 98 PciAndThenOr32 (PCI_LIB_ADDRESS (0,u8Device,0,0x40), 99 (UINT32) ~0xfc0, mPmba); 100 PciOr8 (PCI_LIB_ADDRESS (0,u8Device,0,0x04), 0x01); 101 DEBUG((DEBUG_INFO, "%a:%d mPmba:%x\n", __FUNCTION__, __LINE__, mPmba)); 102 } 103 104 // 105 // ACPI Timer enable is in Bus 0, Device ?, Function 3 106 // 107 PciOr8 (PCI_LIB_ADDRESS (0,u8Device,0,0x80), 0x01); 108 return RETURN_SUCCESS; 109 } 110 #endif 70 111 71 112 /** -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc
r48727 r58172 67 67 [LibraryClasses] 68 68 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 69 !ifndef $(VBOX)70 69 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 71 !else72 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf73 !endif74 70 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf 75 71 BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf … … 389 385 MdeModulePkg/Universal/Metronome/Metronome.inf { 390 386 <LibraryClasses> 391 !ifndef $(VBOX)392 387 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 393 !else394 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf395 !endif396 388 } 397 389 398 390 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf { 399 391 <LibraryClasses> 400 !ifndef $(VBOX)401 392 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 402 !else403 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf404 !endif405 393 } 406 394 407 395 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf { 408 396 <LibraryClasses> 409 !ifndef $(VBOX)410 397 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 411 !else412 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf413 !endif414 398 !ifdef $(CSM_ENABLE) 415 399 NULL|OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc
r48727 r58172 66 66 [LibraryClasses] 67 67 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 68 !ifndef $(VBOX)69 68 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 70 !else71 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf72 !endif73 69 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf 74 70 BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf … … 389 385 MdeModulePkg/Universal/Metronome/Metronome.inf { 390 386 <LibraryClasses> 391 !ifndef $(VBOX)392 387 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 393 !else394 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf395 !endif396 388 } 397 389 398 390 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf { 399 391 <LibraryClasses> 400 !ifndef $(VBOX)401 392 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 402 !else403 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf404 !endif405 393 } 406 394 407 395 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf { 408 396 <LibraryClasses> 409 !ifndef $(VBOX)410 397 TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf 411 !else412 TimerLib|VBoxPkg/Library/AcpiTimerLib/AcpiTimerLib.inf413 !endif414 398 !ifdef $(CSM_ENABLE) 415 399 NULL|OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf
Note:
See TracChangeset
for help on using the changeset viewer.