]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c
PcAtChipsetPkg: Update BaseAcpiTimerLib
[mirror_edk2.git] / PcAtChipsetPkg / Library / AcpiTimerLib / AcpiTimerLib.c
index 19fdd76df6d34fec7cd5d73f9527c34becbcd35a..ad855fe4f517f6e0c4a814239d63152f3ae4781e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   ACPI Timer implements one instance of Timer Library.\r
 \r
-  Copyright (c) 2013 -2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -118,11 +118,11 @@ InternalAcpiGetAcpiTimerIoPort (
 {\r
   UINT16  Port;\r
   \r
-  Port = PcdGet16 (PcdAcpiIoPciBarRegisterOffset);\r
+  Port = PcdGet16 (PcdAcpiIoPortBaseAddress);\r
   \r
   //\r
   // If the register offset to the BAR for the ACPI I/O Port Base Address is not 0x0000, then \r
-  // read the PCI register for the APCI BAR value in case the BAR has been programmed to a \r
+  // read the PCI register for the ACPI BAR value in case the BAR has been programmed to a \r
   // value other than PcdAcpiIoPortBaseAddress\r
   //\r
   if (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0x0000) {\r
@@ -134,7 +134,7 @@ InternalAcpiGetAcpiTimerIoPort (
                         ));\r
   }\r
   \r
-  return (Port & ~BIT0) + PcdGet16 (PcdAcpiPm1TmrOffset);\r
+  return (Port & PcdGet16 (PcdAcpiIoPortBaseAddressMask)) + PcdGet16 (PcdAcpiPm1TmrOffset);\r
 }\r
 \r
 /**\r