summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib
diff options
context:
space:
mode:
authorjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-05 04:05:28 +0000
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-05 04:05:28 +0000
commit008eeb504b1b12deff9135d0d9716ab7931909b7 (patch)
tree61ef3bfc855f0389ccda8c8a546181f2bed02856 /MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib
parent21e66ee89f630bf48d08e98bda3e631788419f13 (diff)
downloadedk2-008eeb504b1b12deff9135d0d9716ab7931909b7.tar.gz
edk2-008eeb504b1b12deff9135d0d9716ab7931909b7.tar.bz2
edk2-008eeb504b1b12deff9135d0d9716ab7931909b7.zip
Move SmmCoreSmmServicesTableLib from MdePkg to MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10204 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib')
-rw-r--r--MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c40
-rw-r--r--MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf37
2 files changed, 77 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c
new file mode 100644
index 0000000000..2ce151e264
--- /dev/null
+++ b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c
@@ -0,0 +1,40 @@
+/** @file
+ SMM Core SMM Services Table Library.
+
+ Copyright (c) 2010, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <PiSmm.h>
+#include <Library/SmmServicesTableLib.h>
+#include <Library/DebugLib.h>
+
+EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL;
+extern EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst;
+
+/**
+ The constructor function caches the pointer of SMM Services Table.
+
+ @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 EFI_SUCCESS.
+
+**/
+EFI_STATUS
+EFIAPI
+SmmCoreSmmServicesTableLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ gSmst = &gSmmCoreSmst;
+ return EFI_SUCCESS;
+}
diff --git a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
new file mode 100644
index 0000000000..df807d3a4c
--- /dev/null
+++ b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
@@ -0,0 +1,37 @@
+## @file
+# SMM Core SMM Services Table Library.
+#
+# Copyright (c) 2010, Intel Corporation.
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PiSmmCoreSmmServicesTableLib
+ FILE_GUID = C427146A-2EF2-4af9-A85A-E09EA65EE47D
+ MODULE_TYPE = SMM_CORE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = SmmServicesTableLib|SMM_CORE
+ PI_SPECIFICATION_VERSION = 0x0001000A
+ CONSTRUCTOR = SmmCoreSmmServicesTableLibConstructor
+
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources]
+ PiSmmCoreSmmServicesTableLib.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+
+[LibraryClasses]
+ DebugLib