Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103761
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
r48674 r58459 1 1 ## @file 2 # 3 # Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR> 2 # 8254 timer driver that provides Timer Arch protocol. 3 # 4 # Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> 4 5 # This program and the accompanying materials 5 6 # are licensed and made available under the terms and conditions of the BSD License … … 15 16 INF_VERSION = 0x00010005 16 17 BASE_NAME = Timer 18 MODULE_UNI_FILE = Timer.uni 17 19 FILE_GUID = f2765dec-6b41-11d5-8e71-00902707b35e 18 20 MODULE_TYPE = DXE_DRIVER … … 37 39 38 40 [Protocols] 39 gEfiCpuArchProtocolGuid 40 gEfiLegacy8259ProtocolGuid 41 gEfiTimerArchProtocolGuid 41 gEfiCpuArchProtocolGuid ## CONSUMES 42 gEfiLegacy8259ProtocolGuid ## CONSUMES 43 gEfiTimerArchProtocolGuid ## PRODUCES 42 44 43 45 [Depex] 44 46 gEfiCpuArchProtocolGuid AND gEfiLegacy8259ProtocolGuid 47 [UserExtensions.TianoCore."ExtraFiles"] 48 TimerExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/8254TimerDxe/Timer.c
r48674 r58459 2 2 Timer Architectural Protocol as defined in the DXE CIS 3 3 4 Copyright (c) 2005 - 201 0, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 220 220 if (TimerCount >= 65536) { 221 221 TimerCount = 0; 222 if (TimerPeriod >= DEFAULT_TIMER_TICK_DURATION) { 223 TimerPeriod = DEFAULT_TIMER_TICK_DURATION; 224 } 222 TimerPeriod = MAX_TIMER_TICK_DURATION; 225 223 } 226 224 // -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/8254TimerDxe/Timer.h
r48674 r58459 2 2 Private data structures 3 3 4 Copyright (c) 2005 - 201 0, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 34 34 // ---------------- * 1,000,000 uS/S = 54925.4 uS = 549254 * 100 ns 35 35 // 1,193,182 Hz 36 // 37 38 // 39 // The maximum tick duration for 8254 timer 40 // 41 #define MAX_TIMER_TICK_DURATION 549254 36 42 // 37 43 // The default timer tick duration is set to 10 ms = 100000 100 ns units -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/8259InterruptControllerDxe/8259.c
r48674 r58459 2 2 This contains the installation function for the driver. 3 3 4 Copyright (c) 2005 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 124 124 ) 125 125 { 126 UINT8 Mask; 127 126 UINT8 Mask; 127 EFI_TPL OriginalTpl; 128 129 OriginalTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); 128 130 // 129 131 // Set vector base for slave PIC … … 212 214 IoWrite8 (LEGACY_8259_CONTROL_REGISTER_SLAVE, LEGACY_8259_EOI); 213 215 IoWrite8 (LEGACY_8259_CONTROL_REGISTER_MASTER, LEGACY_8259_EOI); 216 217 gBS->RestoreTPL (OriginalTpl); 214 218 215 219 return EFI_SUCCESS; … … 414 418 ) 415 419 { 416 if ( Irq < Efi8259Irq0 ||Irq > Efi8259Irq15) {420 if ((UINT32)Irq > Efi8259Irq15) { 417 421 return EFI_INVALID_PARAMETER; 418 422 } … … 446 450 ) 447 451 { 448 if ( Irq < Efi8259Irq0 ||Irq > Efi8259Irq15) {452 if ((UINT32)Irq > Efi8259Irq15) { 449 453 return EFI_INVALID_PARAMETER; 450 454 } … … 479 483 ) 480 484 { 481 if ( Irq < Efi8259Irq0 ||Irq > Efi8259Irq15) {485 if ((UINT32)Irq > Efi8259Irq15) { 482 486 return EFI_INVALID_PARAMETER; 483 487 } … … 556 560 ) 557 561 { 558 if ( Irq < Efi8259Irq0 ||Irq > Efi8259Irq15) {562 if ((UINT32)Irq > Efi8259Irq15) { 559 563 return EFI_INVALID_PARAMETER; 560 564 } -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
r48674 r58459 1 1 ## @file 2 # 8259 Interrupt Controller driver 2 # 8259 Interrupt Controller driver that provides Legacy 8259 protocol. 3 3 # 4 # Copyright (c) 2005 - 201 1, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = Legacy8259 18 MODULE_UNI_FILE = Legacy8259.uni 18 19 FILE_GUID = 79CA4208-BBA1-4a9a-8456-E1E66A81484E 19 20 MODULE_TYPE = DXE_DRIVER … … 38 39 39 40 [Protocols] 40 gEfiLegacy8259ProtocolGuid # PROTOCOL ALWAYS_PRODUCED41 gEfiPciIoProtocolGuid 41 gEfiLegacy8259ProtocolGuid ## PRODUCES 42 gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES 42 43 43 44 [Pcd] 44 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask 45 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel 45 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask ## CONSUMES 46 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel ## CONSUMES 46 47 47 48 [Depex] 48 49 TRUE 49 50 51 [UserExtensions.TianoCore."ExtraFiles"] 52 Legacy8259Extra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
r48674 r58459 1 1 ## @file 2 # 3 # Component description file for the IDE Controller Init module.2 # IDE Controller Init driver that provide IDE_CONTROLLER_INIT protocol and will be used by 3 # IDE Bus driver to support platform dependent timing information. 4 4 # 5 # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 5 # Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR> 6 # This program and the accompanying materials 7 # are licensed and made available under the terms and conditions of the BSD License 8 # which accompanies this distribution. The full text of the license may be found at 9 # http://opensource.org/licenses/bsd-license.php 10 # 11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 # 14 14 ## 15 15 … … 17 17 INF_VERSION = 0x00010005 18 18 BASE_NAME = IdeController 19 MODULE_UNI_FILE = IdeController.uni 19 20 FILE_GUID = 99549F44-49BB-4820-B9D2-901329412D67 20 21 MODULE_TYPE = UEFI_DRIVER … … 46 47 47 48 [Protocols] 48 gEfiPciIoProtocolGuid 49 gEfiIdeControllerInitProtocolGuid 49 gEfiPciIoProtocolGuid ## BY_START 50 gEfiIdeControllerInitProtocolGuid ## TO_START 51 [UserExtensions.TianoCore."ExtraFiles"] 52 IdeControllerExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c
r48674 r58459 2 2 Timer Architectural Protocol module using High Precesion Event Timer (HPET) 3 3 4 Copyright (c) 2011 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 595 595 // 596 596 IoApicConfigureInterrupt (mTimerIrq, PcdGet8 (PcdHpetLocalApicVector), IO_APIC_DELIVERY_MODE_LOWEST_PRIORITY, TRUE, FALSE); 597 IoApicEnableInterrupt (mTimerIrq, TRUE); 597 598 } 598 599 -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
r48674 r58459 1 1 ## @file 2 # 3 # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 2 # Timer Architectural Protocol module using High Precesion Event Timer (HPET). 3 # 4 # Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR> 4 5 # This program and the accompanying materials 5 6 # are licensed and made available under the terms and conditions of the BSD License … … 15 16 INF_VERSION = 0x00010005 16 17 BASE_NAME = HpetTimerDxe 18 MODULE_UNI_FILE = HpetTimerDxe.uni 17 19 FILE_GUID = 6CE6B0DE-781C-4f6c-B42D-98346C614BEC 18 20 MODULE_TYPE = DXE_DRIVER … … 46 48 47 49 [Protocols] 48 gEfiTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED49 gEfiCpuArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED50 gEfiTimerArchProtocolGuid ## PRODUCES 51 gEfiCpuArchProtocolGuid ## CONSUMES 50 52 51 53 [FeaturePcd] 52 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetMsiEnable 53 54 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetMsiEnable ## CONSUMES 55 54 56 [Pcd] 55 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress 56 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetLocalApicVector 57 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetDefaultTimerPeriod 57 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress ## CONSUMES 58 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetLocalApicVector ## CONSUMES 59 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetDefaultTimerPeriod ## CONSUMES 58 60 59 61 [Depex] 60 62 gEfiCpuArchProtocolGuid 63 [UserExtensions.TianoCore."ExtraFiles"] 64 HpetTimerDxeExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
r48674 r58459 2 2 ISA ACPI Protocol Implementation 3 3 4 Copyright (c) 2006 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 102 102 // Table of ISA Controllers 103 103 // 104 EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[7] = { 0};104 EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[7] = {{{0, 0}, NULL}}; 105 105 106 106 /** -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
r48674 r58459 1 1 ## @file 2 # Component description file for PCAT ISA ACPI driver2 # IsaAcpi driver to install EFI_ISA_ACPI_PROTOCOL. 3 3 # 4 # Copyright (c) 2005 - 201 1, Intel Corporation. All rights reserved.<BR>5 # This program and the accompanying materials 6 # are licensed and made available under the terms and conditions of the BSD License 7 # which accompanies this distribution. The full text of the license may be found at 8 # http://opensource.org/licenses/bsd-license.php 9 # 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 4 # Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR> 5 # This program and the accompanying materials 6 # are licensed and made available under the terms and conditions of the BSD License 7 # which accompanies this distribution. The full text of the license may be found at 8 # http://opensource.org/licenses/bsd-license.php 9 # 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 # 13 13 # … … 17 17 INF_VERSION = 0x00010005 18 18 BASE_NAME = IsaAcpi 19 MODULE_UNI_FILE = IsaAcpi.uni 19 20 FILE_GUID = 38A0EC22-FBE7-4911-8BC1-176E0D6C1DBD 20 21 MODULE_TYPE = UEFI_DRIVER … … 34 35 BaseMemoryLib 35 36 PcdLib 36 37 37 38 [Sources] 38 39 PcatIsaAcpi.h … … 42 43 43 44 [Protocols] 44 gEfiPciIoProtocolGuid 45 gEfiIsaAcpiProtocolGuid 45 gEfiPciIoProtocolGuid ## TO_START 46 gEfiIsaAcpiProtocolGuid ## BY_START 46 47 47 48 [Pcd] 48 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom1Enable 49 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom2Enable 50 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2KeyboardEnable 51 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2MouseEnable 52 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyAEnable 53 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyBEnable 49 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom1Enable ## SOMETIMES_CONSUMES 50 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom2Enable ## SOMETIMES_CONSUMES 51 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2KeyboardEnable ## SOMETIMES_CONSUMES 52 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2MouseEnable ## SOMETIMES_CONSUMES 53 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyAEnable ## SOMETIMES_CONSUMES 54 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyBEnable ## SOMETIMES_CONSUMES 55 [UserExtensions.TianoCore."ExtraFiles"] 56 IsaAcpiExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
r48674 r58459 2 2 EFI PCAT ISA ACPI Driver for a Generic PC Platform 3 3 4 Copyright (c) 2006 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 207 207 } 208 208 209 Supports &= ( EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_IO_16);209 Supports &= (UINT64) (EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_IO_16); 210 210 if (Supports == 0 || Supports == (EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_IO_16)) { 211 211 Status = EFI_UNSUPPORTED; … … 357 357 } 358 358 359 Supports &= ( EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_IO_16);359 Supports &= (UINT64) (EFI_PCI_IO_ATTRIBUTE_ISA_IO | EFI_PCI_IO_ATTRIBUTE_ISA_IO_16); 360 360 361 361 PcatIsaAcpiDev->PciIo->Attributes ( -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/KbcResetDxe/Reset.inf
r48674 r58459 1 1 ## @file 2 # 3 # Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 2 # This driver implements Reset Architectural Protocol. 3 # 4 # It should depend on the ResetSystemLib instance that is implemented based on KBC. 5 # 6 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 4 7 # This program and the accompanying materials 5 8 # are licensed and made available under the terms and conditions of the BSD License … … 19 22 INF_VERSION = 0x00010005 20 23 BASE_NAME = KbcReset 24 MODULE_UNI_FILE = KbcReset.uni 21 25 FILE_GUID = 6F0198AA-1F1D-426D-AE3E-39AB633FCC28 22 26 MODULE_TYPE = DXE_RUNTIME_DRIVER … … 38 42 39 43 [Protocols] 40 gEfiResetArchProtocolGuid 44 gEfiResetArchProtocolGuid ## PRODUCES 41 45 42 46 [Depex] 43 47 TRUE 48 49 [UserExtensions.TianoCore."ExtraFiles"] 50 KbcResetExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
r48674 r58459 1 1 ## @file 2 # 2 # Library instance for I/O APIC library class 3 3 # 4 # Copyright (c) 2011 , Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = BaseIoApicLib 18 MODULE_UNI_FILE = BaseIoApicLib.uni 18 19 FILE_GUID = 58ED6E5A-E36A-462a-9ED6-6E62C9A26DF8 19 20 MODULE_TYPE = BASE … … 36 37 37 38 [Pcd] 38 gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress 39 gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress ## CONSUMES 40 -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
r48674 r58459 1 1 ## @file 2 # Library instance for ResetSystem library class for tPCAT systems2 # Library instance for ResetSystem library class for PCAT systems 3 3 # 4 # Copyright (c) 2006 - 201 0, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = ResetSystemLib 18 MODULE_UNI_FILE = ResetSystemLib.uni 18 19 FILE_GUID = EC4F3E59-F879-418b-9E4C-7D6F434714A0 19 20 MODULE_TYPE = BASE 20 21 VERSION_STRING = 1.0 21 LIBRARY_CLASS = ResetSystemLib 22 LIBRARY_CLASS = ResetSystemLib 22 23 23 24 # -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
r48674 r58459 2 2 # Library instance for SerialIo library class 3 3 # 4 # Copyright (c) 2006 - 201 0, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = PcAtSerialPortLib 18 MODULE_UNI_FILE = PcAtSerialPortLib.uni 18 19 FILE_GUID = 1B25AF84-1EA8-4b52-894E-BFA6880B97FF 19 20 MODULE_TYPE = BASE -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PcAtChipsetPkg.dec
r48674 r58459 5 5 # PcAt defacto standard. 6 6 # 7 # Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>7 # Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> 8 8 # 9 9 # This program and the accompanying materials … … 20 20 DEC_SPECIFICATION = 0x00010005 21 21 PACKAGE_NAME = PcAtChipsetPkg 22 PACKAGE_UNI_FILE = PcAtChipsetPkg.uni 22 23 PACKAGE_GUID = B728689A-52D3-4b8c-AE89-2CE5514CC6DC 23 PACKAGE_VERSION = 0. 224 PACKAGE_VERSION = 0.3 24 25 25 26 [Includes] … … 35 36 36 37 [PcdsFeatureFlag] 37 ## If TRUE, then the HPET Timer will be configured to use MSI interrupts if the HPET timer supports them. 38 # If FALSE, then the HPET Timer will be configued to use I/O APIC interrupts. 38 ## Indicates the HPET Timer will be configured to use MSI interrupts if the HPET timer supports them, or use I/O APIC interrupts.<BR><BR> 39 # TRUE - Configures the HPET Timer to use MSI interrupts if the HPET Timer supports them.<BR> 40 # FALSE - Configures the HPET Timer to use I/O APIC interrupts.<BR> 41 # @Prompt Configure HPET to use MSI. 39 42 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetMsiEnable|TRUE|BOOLEAN|0x00001000 40 43 41 44 [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, PcdsPatchableInModule] 42 ## Pcd8259LegacyModeMask defines the default mask value for platform. This value is determined 45 ## Pcd8259LegacyModeMask defines the default mask value for platform. This value is determined<BR><BR> 43 46 # 1) If platform only support pure UEFI, value should be set to 0xFFFF or 0xFFFE; 44 # Because only clock interrupt is allowed in legacy mode in pure UEFI platform. 45 # 2) If platform install CSM and use thunk module: 47 # Because only clock interrupt is allowed in legacy mode in pure UEFI platform.<BR> 48 # 2) If platform install CSM and use thunk module:<BR> 46 49 # a) If thunk call provided by CSM binary requires some legacy interrupt support, the corresponding bit 47 # should be opened as 0. 48 # For example, if keyboard interfaces provided CSM binary use legacy keyboard interrupt in 8259 bit 2, then49 # the value should be set to 0xFFFC 50 # should be opened as 0.<BR> 51 # For example, if keyboard interfaces provided CSM binary use legacy keyboard interrupt in 8259 bit 1, then 52 # the value should be set to 0xFFFC.<BR> 50 53 # b) If all thunk call provied by CSM binary do not require legacy interrupt support, value should be set 51 # to 0xFFFF or 0xFFFE. 54 # to 0xFFFF or 0xFFFE.<BR> 52 55 # 53 56 # The default value of legacy mode mask could be changed by EFI_LEGACY_8259_PROTOCOL->SetMask(). But it is rarely 54 57 # need change it except some special cases such as when initializing the CSM binary, it should be set to 0xFFFF to 55 # mask all legacy interrupt. Please restore the original legacy mask value if changing is made for these special case. 56 # 58 # mask all legacy interrupt. Please restore the original legacy mask value if changing is made for these special case.<BR> 59 # @Prompt 8259 Legacy Mode mask. 57 60 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask|0xFFFF|UINT16|0x00000001 58 61 59 62 ## Pcd8259LegacyModeEdgeLevel defines the default edge level for legacy mode's interrrupt controller. 63 # For the corresponding bits, 0 = Edge triggered and 1 = Level triggered. 64 # @Prompt 8259 Legacy Mode edge level. 60 65 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0000|UINT16|0x00000002 61 66 62 ## This PCD specifies whether we need enable IsaAcpiCom1 device. 67 ## Indicates if we need enable IsaAcpiCom1 device.<BR><BR> 68 # TRUE - Enables IsaAcpiCom1 device.<BR> 69 # FALSE - Doesn't enable IsaAcpiCom1 device.<BR> 70 # @Prompt Enable IsaAcpiCom1 device. 63 71 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom1Enable|TRUE|BOOLEAN|0x00000003 64 72 65 ## This PCD specifies whether we need enable IsaAcpiCom2 device. 73 ## Indicates if we need enable IsaAcpiCom2 device.<BR><BR> 74 # TRUE - Enables IsaAcpiCom2 device.<BR> 75 # FALSE - Doesn't enable IsaAcpiCom2 device.<BR> 76 # @Prompt Enable IsaAcpiCom12 device. 66 77 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiCom2Enable|TRUE|BOOLEAN|0x00000004 67 78 68 ## This PCD specifies whether we need enable IsaAcpiPs2Keyboard device. 79 ## Indicates if we need enable IsaAcpiPs2Keyboard device.<BR><BR> 80 # TRUE - Enables IsaAcpiPs2Keyboard device.<BR> 81 # FALSE - Doesn't enable IsaAcpiPs2Keyboard device.<BR> 82 # @Prompt Enable IsaAcpiPs2Keyboard device. 69 83 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2KeyboardEnable|TRUE|BOOLEAN|0x00000005 70 84 71 ## This PCD specifies whether we need enable IsaAcpiPs2Mouse device. 85 ## Indicates if we need enable IsaAcpiPs2Mouse device.<BR><BR> 86 # TRUE - Enables IsaAcpiPs2Mouse device.<BR> 87 # FALSE - Doesn't enable IsaAcpiPs2Mouse device.<BR> 88 # @Prompt Enable IsaAcpiPs2Mouse device. 72 89 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiPs2MouseEnable|TRUE|BOOLEAN|0x00000006 73 90 74 ## This PCD specifies whether we need enable IsaAcpiFloppyA device. 91 ## Indicates if we need enable IsaAcpiFloppyA device.<BR><BR> 92 # TRUE - Enables IsaAcpiFloppyA device.<BR> 93 # FALSE - Doesn't enable IsaAcpiFloppyA device.<BR> 94 # @Prompt Enable IsaAcpiFloppyA device. 75 95 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyAEnable|TRUE|BOOLEAN|0x00000007 76 96 77 ## This PCD specifies whether we need enable IsaAcpiFloppyB device. 97 ## Indicates if we need enable IsaAcpiFloppyB device.<BR><BR> 98 # TRUE - Enables IsaAcpiFloppyB device.<BR> 99 # FALSE - Doesn't enable IsaAcpiFloppyB device.<BR> 100 # @Prompt Enable IsaAcpiFloppyB device. 78 101 gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyBEnable|TRUE|BOOLEAN|0x00000008 79 102 80 103 ## This PCD specifies the base address of the HPET timer. 104 # @Prompt HPET base address. 81 105 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress|0xFED00000|UINT32|0x00000009 82 106 83 107 ## This PCD specifies the Local APIC Interrupt Vector for the HPET Timer. 108 # @Prompt HPET local APIC vector. 84 109 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetLocalApicVector|0x40|UINT8|0x0000000A 85 110 86 111 ## This PCD specifies the defaut period of the HPET Timer in 100 ns units. 87 112 # The default value of 100000 100 ns units is the same as 10 ms. 113 # @Prompt Default period of HPET timer. 88 114 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetDefaultTimerPeriod|100000|UINT64|0x0000000B 89 115 90 ## This PCD specifies the base address of the HPET timer. 116 ## This PCD specifies the base address of the IO APIC. 117 # @Prompt IO APIC base address. 91 118 gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress|0xFEC00000|UINT32|0x0000000C 119 120 ## This PCD specifies the minimal valid year in RTC. 121 # @Prompt Minimal valid year in RTC. 122 gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear|1998|UINT16|0x0000000D 123 124 ## This PCD specifies the maximal valid year in RTC. 125 # @Prompt Maximal valid year in RTC. 126 gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2099|UINT16|0x0000000E 92 127 128 [PcdsFixedAtBuild, PcdsPatchableInModule] 129 ## Defines the ACPI register set base address. 130 # The invalid 0xFFFF is as its default value. It must be configured to the real value. 131 # @Prompt ACPI Timer IO Port Address 132 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress |0xFFFF|UINT16|0x00000010 133 134 ## Defines the PCI Bus Number of the PCI device that contains the BAR and Enable for ACPI hardware registers. 135 # @Prompt ACPI Hardware PCI Bus Number 136 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBusNumber | 0x00| UINT8|0x00000011 137 138 ## Defines the PCI Device Number of the PCI device that contains the BAR and Enable for ACPI hardware registers. 139 # The invalid 0xFF is as its default value. It must be configured to the real value. 140 # @Prompt ACPI Hardware PCI Device Number 141 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciDeviceNumber | 0xFF| UINT8|0x00000012 142 143 ## Defines the PCI Function Number of the PCI device that contains the BAR and Enable for ACPI hardware registers. 144 # The invalid 0xFF is as its default value. It must be configured to the real value. 145 # @Prompt ACPI Hardware PCI Function Number 146 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciFunctionNumber | 0xFF| UINT8|0x00000013 147 148 ## Defines the PCI Register Offset of the PCI device that contains the Enable for ACPI hardware registers. 149 # The invalid 0xFFFF is as its default value. It must be configured to the real value. 150 # @Prompt ACPI Hardware PCI Register Offset 151 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciEnableRegisterOffset |0xFFFF|UINT16|0x00000014 152 153 ## Defines the bit mask that must be set to enable the APIC hardware register BAR. 154 # @Prompt ACPI Hardware PCI Bar Enable BitMask 155 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask | 0x00| UINT8|0x00000015 156 157 ## Defines the PCI Register Offset of the PCI device that contains the BAR for ACPI hardware registers. 158 # The invalid 0xFFFF is as its default value. It must be configured to the real value. 159 # @Prompt ACPI Hardware PCI Bar Register Offset 160 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset |0xFFFF|UINT16|0x00000016 161 162 ## Defines the offset to the 32-bit Timer Value register that resides within the ACPI BAR. 163 # @Prompt Offset to 32-bit Timer register in ACPI BAR 164 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiPm1TmrOffset |0x0008|UINT16|0x00000017 165 166 ## Defines the bit mask to retrieve ACPI IO Port Base Address 167 # @Prompt ACPI IO Port Base Address Mask 168 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddressMask |0xFFFE|UINT16|0x00000018 169 170 [UserExtensions.TianoCore."ExtraFiles"] 171 PcAtChipsetPkgExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PcAtChipsetPkg.dsc
r48674 r58459 2 2 # PC/AT Chipset Package 3 3 # 4 # Copyright (c) 2007 - 201 1, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # 6 6 # This program and the accompanying materials … … 17 17 PLATFORM_NAME = PcAtChipset 18 18 PLATFORM_GUID = a653167b-34d7-4b91-bfe3-f0c7608f48da 19 PLATFORM_VERSION = 0. 219 PLATFORM_VERSION = 0.3 20 20 DSC_SPECIFICATION = 0x00010005 21 21 OUTPUT_DIRECTORY = Build/PcAtChipset … … 33 33 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 34 34 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf 35 TimerLib| MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf35 TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf 36 36 UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf 37 37 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf … … 46 46 IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf 47 47 LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf 48 ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf 48 49 49 50 [Components] … … 56 57 PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf 57 58 PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf 59 PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf 60 PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf 58 61 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf 59 62 PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
r48674 r58459 2 2 RTC Architectural Protocol GUID as defined in DxeCis 0.96. 3 3 4 Copyright (c) 2006 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 105 105 UINTN DataSize; 106 106 UINT32 TimerVar; 107 BOOLEAN Enabled; 108 BOOLEAN Pending; 107 109 108 110 // … … 205 207 } 206 208 if (EFI_ERROR (Status)) { 209 // 210 // Report Status Code to indicate that the RTC has bad date and time 211 // 212 REPORT_STATUS_CODE ( 213 EFI_ERROR_CODE | EFI_ERROR_MINOR, 214 (EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_BAD_DATE_TIME) 215 ); 207 216 Time.Second = RTC_INIT_SECOND; 208 217 Time.Minute = RTC_INIT_MINUTE; … … 220 229 // 221 230 Status = PcRtcSetTime (&Time, Global); 222 if(!EFI_ERROR (Status)) { 231 if (EFI_ERROR (Status)) { 232 return EFI_DEVICE_ERROR; 233 } 234 235 // 236 // Reset wakeup time value to valid state when wakeup alarm is disabled and wakeup time is invalid. 237 // Global variable has already had valid SavedTimeZone and Daylight, 238 // so we can use them to get and set wakeup time. 239 // 240 Status = PcRtcGetWakeupTime (&Enabled, &Pending, &Time, Global); 241 if ((Enabled) || (!EFI_ERROR (Status))) { 223 242 return EFI_SUCCESS; 224 } else { 243 } 244 245 // 246 // When wakeup time is disabled and invalid, reset wakeup time register to valid state 247 // but keep wakeup alarm disabled. 248 // 249 Time.Second = RTC_INIT_SECOND; 250 Time.Minute = RTC_INIT_MINUTE; 251 Time.Hour = RTC_INIT_HOUR; 252 Time.Day = RTC_INIT_DAY; 253 Time.Month = RTC_INIT_MONTH; 254 Time.Year = RTC_INIT_YEAR; 255 Time.Nanosecond = 0; 256 Time.TimeZone = Global->SavedTimeZone; 257 Time.Daylight = Global->Daylight;; 258 259 // 260 // Acquire RTC Lock to make access to RTC atomic 261 // 262 if (!EfiAtRuntime ()) { 263 EfiAcquireLock (&Global->RtcLock); 264 } 265 // 266 // Wait for up to 0.1 seconds for the RTC to be updated 267 // 268 Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout)); 269 if (EFI_ERROR (Status)) { 270 if (!EfiAtRuntime ()) { 271 EfiReleaseLock (&Global->RtcLock); 272 } 225 273 return EFI_DEVICE_ERROR; 226 274 } 275 276 ConvertEfiTimeToRtcTime (&Time, RegisterB, &Century); 277 278 // 279 // Set the Y/M/D info to variable as it has no corresponding hw registers. 280 // 281 Status = EfiSetVariable ( 282 L"RTCALARM", 283 &gEfiCallerIdGuid, 284 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, 285 sizeof (Time), 286 &Time 287 ); 288 if (EFI_ERROR (Status)) { 289 if (!EfiAtRuntime ()) { 290 EfiReleaseLock (&Global->RtcLock); 291 } 292 return EFI_DEVICE_ERROR; 293 } 294 295 // 296 // Inhibit updates of the RTC 297 // 298 RegisterB.Bits.Set = 1; 299 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 300 301 // 302 // Set RTC alarm time registers 303 // 304 RtcWrite (RTC_ADDRESS_SECONDS_ALARM, Time.Second); 305 RtcWrite (RTC_ADDRESS_MINUTES_ALARM, Time.Minute); 306 RtcWrite (RTC_ADDRESS_HOURS_ALARM, Time.Hour); 307 308 // 309 // Allow updates of the RTC registers 310 // 311 RegisterB.Bits.Set = 0; 312 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 313 314 // 315 // Release RTC Lock. 316 // 317 if (!EfiAtRuntime ()) { 318 EfiReleaseLock (&Global->RtcLock); 319 } 320 return EFI_SUCCESS; 227 321 } 228 322 … … 386 480 return Status; 387 481 } 388 // 389 // Read Register B, and inhibit updates of the RTC 390 // 391 RegisterB.Data = RtcRead (RTC_ADDRESS_REGISTER_B); 392 RegisterB.Bits.Set = 1; 393 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 394 395 ConvertEfiTimeToRtcTime (&RtcTime, RegisterB, &Century); 396 397 RtcWrite (RTC_ADDRESS_SECONDS, RtcTime.Second); 398 RtcWrite (RTC_ADDRESS_MINUTES, RtcTime.Minute); 399 RtcWrite (RTC_ADDRESS_HOURS, RtcTime.Hour); 400 RtcWrite (RTC_ADDRESS_DAY_OF_THE_MONTH, RtcTime.Day); 401 RtcWrite (RTC_ADDRESS_MONTH, RtcTime.Month); 402 RtcWrite (RTC_ADDRESS_YEAR, (UINT8) RtcTime.Year); 403 RtcWrite (RTC_ADDRESS_CENTURY, Century); 404 405 // 406 // Allow updates of the RTC registers 407 // 408 RegisterB.Bits.Set = 0; 409 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 410 411 // 412 // Release RTC Lock. 413 // 414 if (!EfiAtRuntime ()) { 415 EfiReleaseLock (&Global->RtcLock); 416 } 417 // 418 // Set the variable that contains the TimeZone and Daylight fields 419 // 420 Global->SavedTimeZone = Time->TimeZone; 421 Global->Daylight = Time->Daylight; 422 482 483 // 484 // Write timezone and daylight to RTC variable 485 // 423 486 TimerVar = Time->Daylight; 424 487 TimerVar = (UINT32) ((TimerVar << 16) | (UINT16)(Time->TimeZone)); … … 430 493 &TimerVar 431 494 ); 432 ASSERT_EFI_ERROR (Status); 495 if (EFI_ERROR (Status)) { 496 if (!EfiAtRuntime ()) { 497 EfiReleaseLock (&Global->RtcLock); 498 } 499 return EFI_DEVICE_ERROR; 500 } 501 502 // 503 // Read Register B, and inhibit updates of the RTC 504 // 505 RegisterB.Data = RtcRead (RTC_ADDRESS_REGISTER_B); 506 RegisterB.Bits.Set = 1; 507 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 508 509 ConvertEfiTimeToRtcTime (&RtcTime, RegisterB, &Century); 510 511 RtcWrite (RTC_ADDRESS_SECONDS, RtcTime.Second); 512 RtcWrite (RTC_ADDRESS_MINUTES, RtcTime.Minute); 513 RtcWrite (RTC_ADDRESS_HOURS, RtcTime.Hour); 514 RtcWrite (RTC_ADDRESS_DAY_OF_THE_MONTH, RtcTime.Day); 515 RtcWrite (RTC_ADDRESS_MONTH, RtcTime.Month); 516 RtcWrite (RTC_ADDRESS_YEAR, (UINT8) RtcTime.Year); 517 RtcWrite (RTC_ADDRESS_CENTURY, Century); 518 519 // 520 // Allow updates of the RTC registers 521 // 522 RegisterB.Bits.Set = 0; 523 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 524 525 // 526 // Release RTC Lock. 527 // 528 if (!EfiAtRuntime ()) { 529 EfiReleaseLock (&Global->RtcLock); 530 } 531 // 532 // Set the variable that contains the TimeZone and Daylight fields 533 // 534 Global->SavedTimeZone = Time->TimeZone; 535 Global->Daylight = Time->Daylight; 433 536 434 537 return EFI_SUCCESS; … … 515 618 // Get the alarm info from variable 516 619 // 620 DataSize = sizeof (EFI_TIME); 517 621 Status = EfiGetVariable ( 518 622 L"RTCALARM", … … 628 732 } 629 733 // 630 // Read Register B, and inhibit updates of the RTC 631 // 632 RegisterB.Data = RtcRead (RTC_ADDRESS_REGISTER_B); 633 634 RegisterB.Bits.Set = 1; 635 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 734 // Read Register B 735 // 736 RegisterB.Data = RtcRead (RTC_ADDRESS_REGISTER_B); 636 737 637 738 if (Enable) { 638 739 ConvertEfiTimeToRtcTime (&RtcTime, RegisterB, &Century); 639 640 //641 // Set RTC alarm time642 //643 RtcWrite (RTC_ADDRESS_SECONDS_ALARM, RtcTime.Second);644 RtcWrite (RTC_ADDRESS_MINUTES_ALARM, RtcTime.Minute);645 RtcWrite (RTC_ADDRESS_HOURS_ALARM, RtcTime.Hour);646 647 RegisterB.Bits.Aie = 1;648 649 740 } else { 650 RegisterB.Bits.Aie = 0;651 741 // 652 742 // if the alarm is disable, record the current setting. … … 661 751 RtcTime.Daylight = Global->Daylight; 662 752 } 663 //664 // Allow updates of the RTC registers665 //666 RegisterB.Bits.Set = 0;667 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data);668 753 669 754 // … … 678 763 ); 679 764 if (EFI_ERROR (Status)) { 765 if (!EfiAtRuntime ()) { 766 EfiReleaseLock (&Global->RtcLock); 767 } 680 768 return EFI_DEVICE_ERROR; 681 769 } 770 771 // 772 // Inhibit updates of the RTC 773 // 774 RegisterB.Bits.Set = 1; 775 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 776 777 if (Enable) { 778 // 779 // Set RTC alarm time 780 // 781 RtcWrite (RTC_ADDRESS_SECONDS_ALARM, RtcTime.Second); 782 RtcWrite (RTC_ADDRESS_MINUTES_ALARM, RtcTime.Minute); 783 RtcWrite (RTC_ADDRESS_HOURS_ALARM, RtcTime.Hour); 784 785 RegisterB.Bits.Aie = 1; 786 787 } else { 788 RegisterB.Bits.Aie = 0; 789 } 790 // 791 // Allow updates of the RTC registers 792 // 793 RegisterB.Bits.Set = 0; 794 RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); 682 795 683 796 // … … 843 956 ) 844 957 { 845 if (Time->Year < 1998||846 Time->Year > 2099||958 if (Time->Year < PcdGet16 (PcdMinimalValidYear) || 959 Time->Year > PcdGet16 (PcdMaximalValidYear) || 847 960 Time->Month < 1 || 848 961 Time->Month > 12 || -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h
r48674 r58459 33 33 #include <Library/UefiRuntimeServicesTableLib.h> 34 34 #include <Library/PcdLib.h> 35 #include <Library/ReportStatusCodeLib.h> 35 36 36 37 -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
r48674 r58459 1 1 ## @file 2 # PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL. 2 3 # 3 # PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL. 4 # This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table. 5 # It will install a tagging protocol with gEfiRealTimeClockArchProtocolGuid. 4 6 # 5 # This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table. 6 # It will install a tagging protocol with gEfiRealTimeClockArchProtocolGuid. 7 # Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> 8 # This program and the accompanying materials 9 # are licensed and made available under the terms and conditions of the BSD License 10 # which accompanies this distribution. The full text of the license may be found at 11 # http://opensource.org/licenses/bsd-license.php 7 12 # 8 # Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 9 # This program and the accompanying materials 10 # are licensed and made available under the terms and conditions of the BSD License 11 # which accompanies this distribution. The full text of the license may be found at 12 # http://opensource.org/licenses/bsd-license.php 13 # 14 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 15 # 17 16 ## … … 20 19 INF_VERSION = 0x00010005 21 20 BASE_NAME = PcRtc 21 MODULE_UNI_FILE = PcRtc.uni 22 22 FILE_GUID = 378D7B65-8DA9-4773-B6E4-A47826A833E1 23 23 MODULE_TYPE = DXE_RUNTIME_DRIVER … … 39 39 MdePkg/MdePkg.dec 40 40 MdeModulePkg/MdeModulePkg.dec 41 PcAtChipsetPkg/PcAtChipsetPkg.dec 41 42 42 43 [LibraryClasses] … … 52 53 BaseLib 53 54 PcdLib 55 ReportStatusCodeLib 54 56 55 57 [Protocols] … … 60 62 61 63 [Pcd] 62 gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## CONSUMES 64 gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## CONSUMES 65 gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear ## CONSUMES 66 gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear ## CONSUMES 67 68 [UserExtensions.TianoCore."ExtraFiles"] 69 PcRtcExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.c
r48674 r58459 2 2 Provides the basic interfaces to abstract a PCI Host Bridge Resource Allocation 3 3 4 Copyright (c) 2008 - 201 0, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials are 6 6 licensed and made available under the terms and conditions of the BSD License … … 23 23 UINTN RootBridgeNumber[1] = { 1 }; 24 24 25 UINT64 RootBridgeAttribute[1][1] = { EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM};25 UINT64 RootBridgeAttribute[1][1] = { { EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM } }; 26 26 27 27 EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath[1][1] = { 28 28 { 29 ACPI_DEVICE_PATH, 30 ACPI_DP, 31 (UINT8) (sizeof(ACPI_HID_DEVICE_PATH)), 32 (UINT8) ((sizeof(ACPI_HID_DEVICE_PATH)) >> 8), 33 EISA_PNP_ID(0x0A03), 34 0, 35 END_DEVICE_PATH_TYPE, 36 END_ENTIRE_DEVICE_PATH_SUBTYPE, 37 END_DEVICE_PATH_LENGTH, 38 0 29 { 30 { 31 { 32 ACPI_DEVICE_PATH, 33 ACPI_DP, 34 { 35 (UINT8) (sizeof(ACPI_HID_DEVICE_PATH)), 36 (UINT8) ((sizeof(ACPI_HID_DEVICE_PATH)) >> 8) 37 } 38 }, 39 EISA_PNP_ID(0x0A03), 40 0 41 }, 42 43 { 44 END_DEVICE_PATH_TYPE, 45 END_ENTIRE_DEVICE_PATH_SUBTYPE, 46 { 47 END_DEVICE_PATH_LENGTH, 48 0 49 } 50 } 51 } 39 52 } 40 53 }; 41 54 42 55 PCI_ROOT_BRIDGE_RESOURCE_APPETURE mResAppeture[1][1] = { 43 { 0, 0xff, 0x80000000, 0xffffffff, 0, 0xffff}56 {{0, 0xff, 0x80000000, 0xffffffff, 0, 0xffff}} 44 57 }; 45 58 … … 269 282 break; 270 283 284 case EfiPciHostBridgeEndEnumeration: 285 break; 286 271 287 case EfiPciHostBridgeBeginBusAllocation: 272 288 // … … 274 290 // 275 291 HostBridgeInstance->CanRestarted = FALSE; 276 return EFI_SUCCESS;277 292 break; 278 293 … … 282 297 // 283 298 //HostBridgeInstance->CanRestarted = FALSE; 284 return EFI_SUCCESS;285 299 break; 286 300 … … 290 304 // 291 305 //HostBridgeInstance->CanRestarted = FALSE; 292 return EFI_SUCCESS;293 306 break; 294 307 … … 460 473 HostBridgeInstance->CanRestarted = TRUE; 461 474 return ReturnStatus; 462 break;463 475 464 476 case EfiPciHostBridgeEndResourceAllocation: … … 468 480 default: 469 481 return EFI_INVALID_PARAMETER; 470 } ; // end switch482 } 471 483 472 484 return EFI_SUCCESS; … … 1181 1193 } 1182 1194 1183 if ( Phase < EfiPciBeforeChildBusEnumeration ||Phase > EfiPciBeforeResourceCollection) {1195 if ((UINT32)Phase > EfiPciBeforeResourceCollection) { 1184 1196 return EFI_INVALID_PARAMETER; 1185 1197 } -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
r48674 r58459 1 1 ## @file 2 # The basic interfaces implementation to a single segment PCI Host Bridge driver. 2 3 # 3 # Component description file a sinngle segment PCI Host Bridge driver. 4 # 5 # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> 4 # Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR> 6 5 # This program and the accompanying materials 7 6 # are licensed and made available under the terms and conditions of the BSD License 8 7 # which accompanies this distribution. The full text of the license may be found at 9 8 # http://opensource.org/licenses/bsd-license.php 10 # 9 # 11 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 # 12 # 14 13 ## 15 14 … … 17 16 INF_VERSION = 0x00010005 18 17 BASE_NAME = PciHostBridge 18 MODULE_UNI_FILE = PciHostBridge.uni 19 19 FILE_GUID = 2383608E-C6D0-4e3e-858D-45DFAC3543D5 20 20 MODULE_TYPE = DXE_DRIVER … … 43 43 PciRootBridgeIo.c 44 44 PciHostBridge.h 45 IoFifo.h 46 47 [Sources.IA32] 48 Ia32/IoFifo.asm 49 Ia32/IoFifo.S 50 51 [Sources.X64] 52 X64/IoFifo.asm 53 X64/IoFifo.S 45 54 46 55 [Protocols] 47 gEfiPciHostBridgeResourceAllocationProtocolGuid 48 gEfiPciRootBridgeIoProtocolGuid 49 gEfiMetronomeArchProtocolGuid 50 gEfiDevicePathProtocolGuid 56 gEfiPciHostBridgeResourceAllocationProtocolGuid ## PRODUCES 57 gEfiPciRootBridgeIoProtocolGuid ## PRODUCES 58 gEfiMetronomeArchProtocolGuid ## CONSUMES 59 gEfiDevicePathProtocolGuid ## PRODUCES 51 60 52 61 [depex] 53 62 gEfiMetronomeArchProtocolGuid 54 63 64 [UserExtensions.TianoCore."ExtraFiles"] 65 PciHostBridgeExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c
r53252 r58459 2 2 PCI Root Bridge Io Protocol implementation 3 3 4 Copyright (c) 2008 - 201 0, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials are 6 6 licensed and made available under the terms and conditions of the BSD License … … 14 14 15 15 #include "PciHostBridge.h" 16 #include "IoFifo.h" 16 17 #ifdef VBOX 17 18 # define IN_RING3 … … 774 775 // Check to see if Width is in the valid range 775 776 // 776 if ( Width < EfiPciWidthUint8 ||Width >= EfiPciWidthMaximum) {777 if ((UINT32)Width >= EfiPciWidthMaximum) { 777 778 return EFI_INVALID_PARAMETER; 778 779 } … … 1023 1024 ASMInStrU32((RTIOPORT)Address, (uint32_t*)Buffer, (size_t)Count); 1024 1025 break; 1025 default:1026 ASSERT (FALSE);1026 default: 1027 ASSERT (FALSE); 1027 1028 } 1028 1029 } else { … … 1224 1225 } 1225 1226 1226 if ( Width < 0 ||Width > EfiPciWidthUint64) {1227 if ((UINT32)Width > EfiPciWidthUint64) { 1227 1228 return EFI_INVALID_PARAMETER; 1228 1229 } … … 1331 1332 } 1332 1333 1333 if ( Width < 0 ||Width > EfiPciWidthUint64) {1334 if ((UINT32)Width > EfiPciWidthUint64) { 1334 1335 return EFI_INVALID_PARAMETER; 1335 1336 } … … 1552 1553 UINT64 Result; 1553 1554 1554 if ( Width < 0 ||Width > EfiPciWidthUint64) {1555 if ((UINT32)Width > EfiPciWidthUint64) { 1555 1556 return EFI_INVALID_PARAMETER; 1556 1557 } … … 1726 1727 // Make sure that Operation is valid 1727 1728 // 1728 if ( Operation < 0 ||Operation >= EfiPciOperationMaximum) {1729 if ((UINT32)Operation >= EfiPciOperationMaximum) { 1729 1730 return EFI_INVALID_PARAMETER; 1730 1731 }
Note:
See TracChangeset
for help on using the changeset viewer.