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.haeu...@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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to