summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c
diff options
context:
space:
mode:
authorKun Qin <kun.q@outlook.com>2020-12-17 14:47:07 -0800
committerKun Qin <kun.q@outlook.com>2021-02-01 10:03:35 -0800
commit79a951d19903ccfe5f5abe49ee69f797a9d80020 (patch)
tree0bd152549c33bdafaaf23985a41cec66bfc46a2a /PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c
parent14a746bb6a92d59669c67a970479558734cf2383 (diff)
downloadedk2-79a951d19903ccfe5f5abe49ee69f797a9d80020.tar.gz
edk2-79a951d19903ccfe5f5abe49ee69f797a9d80020.tar.bz2
edk2-79a951d19903ccfe5f5abe49ee69f797a9d80020.zip
PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib
This change added a new instance of AcpiTimerLib for StandaloneMm core and drivers. It centralizes the common routines into shared files and abstract the library constructor into corresponding files to accommodate each constructor function prototypes. Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Kun Qin <kun.q@outlook.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c')
-rw-r--r--PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c
new file mode 100644
index 0000000000..97aca56069
--- /dev/null
+++ b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmAcpiTimerLib.c
@@ -0,0 +1,31 @@
+/** @file
+ ACPI Timer implements one instance of Timer Library.
+
+ Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <PiMm.h>
+
+#include "DxeStandaloneMmAcpiTimerLib.h"
+
+/**
+ The constructor function enables ACPI IO space, and caches PerformanceCounterFrequency.
+
+ @param ImageHandle The firmware allocated handle for the EFI image.
+ @param SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS.
+
+**/
+EFI_STATUS
+EFIAPI
+StandaloneMmAcpiTimerLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_MM_SYSTEM_TABLE *SystemTable
+ )
+{
+ return CommonAcpiTimerLibConstructor ();
+}