* [PATCH 1/4] MdePkg: Declare the MmServicesTableLib library class.
@ 2018-07-21 22:31 Marvin Häuser
0 siblings, 0 replies; only message in thread
From: Marvin Häuser @ 2018-07-21 22:31 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Cc: michael.d.kinney@intel.com, liming.gao@intel.com,
star.zeng@intel.com, eric.dong@intel.com, ruiyu.ni@intel.com,
achin.gupta@arm.com, jiewen.yao@intel.com,
supreeth.venkatesh@arm.com
Declare the MmServicesTableLib library class to follow the new naming
scheme of "MM" deprecating "SMM".
The code was derieved from SmmServicesTableLib.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
---
MdePkg/Include/Library/MmServicesTableLib.h | 43 ++++++++++++++++++++
MdePkg/MdePkg.dec | 4 ++
2 files changed, 47 insertions(+)
diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h
new file mode 100644
index 000000000000..60ee4299d902
--- /dev/null
+++ b/MdePkg/Include/Library/MmServicesTableLib.h
@@ -0,0 +1,43 @@
+/** @file
+ Provides a service to retrieve a pointer to the MM Services Table.
+ Only available to MM module types.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+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.
+
+**/
+
+#ifndef __MM_SERVICES_TABLE_LIB_H__
+#define __MM_SERVICES_TABLE_LIB_H__
+
+#include <PiMm.h>
+
+///
+/// Cache pointer to the MM Services Table
+///
+extern EFI_MM_SYSTEM_TABLE *gMmst;
+
+/**
+ This function allows the caller to determine if the driver is executing in
+ Management Mode(MM).
+
+ This function returns TRUE if the driver is executing in MM and FALSE if the
+ driver is not executing in MM.
+
+ @retval TRUE The driver is executing in Management Mode (MM).
+ @retval FALSE The driver is not executing in Management Mode (MM).
+
+**/
+BOOLEAN
+EFIAPI
+InMm (
+ VOID
+ );
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 94ad814dc9d6..08912fb9d55d 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -251,6 +251,10 @@ [LibraryClasses.IA32, LibraryClasses.X64]
##
SmmLib|Include/Library/SmmLib.h
+ ## @libraryclass Provides a service to retrieve a pointer to the MM Services Table.
+ # Only available to MM/DXE Combined and MM module types.
+ MmServicesTableLib|Include/Library/MmServicesTableLib.h
+
## @libraryclass Provides a service to retrieve a pointer to the SMM Services Table.
# Only available to SMM/DXE Combined and SMM module types.
SmmServicesTableLib|Include/Library/SmmServicesTableLib.h
--
2.18.0.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-21 22:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-21 22:31 [PATCH 1/4] MdePkg: Declare the MmServicesTableLib library class Marvin Häuser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox