X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=PcAtChipsetPkg%2FLibrary%2FAcpiTimerLib%2FAcpiTimerLib.c;fp=PcAtChipsetPkg%2FLibrary%2FAcpiTimerLib%2FAcpiTimerLib.c;h=9817bea21fa66bdab2a706dfe22d8a134675f3c5;hp=2f3cb4bca4b5913430ac4e1f6dfbfed99ced21a4;hb=5a702acd3df099307d9bae0725f97b52b4895382;hpb=f75a7f568e6d0944327970b3f3f2dafd9bba76b1 diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c b/PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c index 2f3cb4bca4..9817bea21f 100644 --- a/PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c @@ -58,13 +58,13 @@ AcpiTimerLibConstructor ( UINT8 EnableMask; // - // ASSERT for the invalid PCD values. They must be configured to the real value. + // ASSERT for the invalid PCD values. They must be configured to the real value. // ASSERT (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0xFFFF); ASSERT (PcdGet16 (PcdAcpiIoPortBaseAddress) != 0xFFFF); // - // If the register offset to the BAR for the ACPI I/O Port Base Address is 0x0000, then + // If the register offset to the BAR for the ACPI I/O Port Base Address is 0x0000, then // no PCI register programming is required to enable access to the the ACPI registers // specified by PcdAcpiIoPortBaseAddress // @@ -73,7 +73,7 @@ AcpiTimerLibConstructor ( } // - // ASSERT for the invalid PCD values. They must be configured to the real value. + // ASSERT for the invalid PCD values. They must be configured to the real value. // ASSERT (PcdGet8 (PcdAcpiIoPciDeviceNumber) != 0xFF); ASSERT (PcdGet8 (PcdAcpiIoPciFunctionNumber) != 0xFF); @@ -101,7 +101,7 @@ AcpiTimerLibConstructor ( EnableMask ); } - + return RETURN_SUCCESS; } @@ -119,23 +119,23 @@ InternalAcpiGetAcpiTimerIoPort ( ) { UINT16 Port; - + Port = PcdGet16 (PcdAcpiIoPortBaseAddress); - + // - // If the register offset to the BAR for the ACPI I/O Port Base Address is not 0x0000, then - // read the PCI register for the ACPI BAR value in case the BAR has been programmed to a + // If the register offset to the BAR for the ACPI I/O Port Base Address is not 0x0000, then + // read the PCI register for the ACPI BAR value in case the BAR has been programmed to a // value other than PcdAcpiIoPortBaseAddress // if (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0x0000) { Port = PciRead16 (PCI_LIB_ADDRESS ( - PcdGet8 (PcdAcpiIoPciBusNumber), - PcdGet8 (PcdAcpiIoPciDeviceNumber), - PcdGet8 (PcdAcpiIoPciFunctionNumber), + PcdGet8 (PcdAcpiIoPciBusNumber), + PcdGet8 (PcdAcpiIoPciDeviceNumber), + PcdGet8 (PcdAcpiIoPciFunctionNumber), PcdGet16 (PcdAcpiIoPciBarRegisterOffset) )); } - + return (Port & PcdGet16 (PcdAcpiIoPortBaseAddressMask)) + PcdGet16 (PcdAcpiPm1TmrOffset); }