diff mbox series

[edk2,1/6] MdePkg/Include: add MmServicesTableLib header file

Message ID 20190103182825.32231-3-ard.biesheuvel@linaro.org
State Accepted
Commit b94aecb4ec943d28f6cc9c800cfc30b4348b09fb
Headers show
Series implement standalone MM versions of the variable runtime drivers | expand

Commit Message

Ard Biesheuvel Jan. 3, 2019, 6:28 p.m. UTC
From: Jagadeesh Ujja <jagadeesh.ujja@arm.com>


SMM has been rebranded as MM, and can be implemented in traditional
mode or standalone mode, using the same prototype for the services
table. Expose this table via MmServicesTableLib, permitting the
respective implementations to expose a traditional or standalone
version.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 MdePkg/Include/Library/MmServicesTableLib.h | 25 ++++++++++++++++++++
 MdePkg/MdePkg.dec                           |  4 ++++
 2 files changed, 29 insertions(+)

-- 
2.17.1

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

Comments

Zeng, Star Jan. 10, 2019, 6:06 a.m. UTC | #1
Hi Ard,

Some feedback added inline.

On 2019/1/4 2:28, Ard Biesheuvel wrote:
> From: Jagadeesh Ujja <jagadeesh.ujja@arm.com>

> 

> SMM has been rebranded as MM, and can be implemented in traditional

> mode or standalone mode, using the same prototype for the services

> table. Expose this table via MmServicesTableLib, permitting the

> respective implementations to expose a traditional or standalone

> version.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>   MdePkg/Include/Library/MmServicesTableLib.h | 25 ++++++++++++++++++++

>   MdePkg/MdePkg.dec                           |  4 ++++

>   2 files changed, 29 insertions(+)

> 

> diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h

> new file mode 100644

> index 000000000000..12bd01e98641

> --- /dev/null

> +++ b/MdePkg/Include/Library/MmServicesTableLib.h

> @@ -0,0 +1,25 @@

> +/** @file

> +  Provides a service to retrieve a pointer to the Standalone MM Services Table.

> +  Only available to Standalone MM module types.


This line should be "Only available to MM_STANDALONE, SMM/DXE Combined 
and SMM module types." to match the comments added in MdePkg.dec for 
this library class, right?

With it handled, Reviewed-by: Star Zeng <star.zeng@intel.com>

Thanks,
Star
> +

> +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>

> +Copyright (c) 2016 - 2018, ARM Limited. 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>

> +

> +extern EFI_MM_SYSTEM_TABLE         *gMmst;

> +

> +#endif

> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec

> index 712bd46dd3d3..a7383b6daafb 100644

> --- a/MdePkg/MdePkg.dec

> +++ b/MdePkg/MdePkg.dec

> @@ -243,6 +243,10 @@ [LibraryClasses]

>     ##

>     SafeIntLib|Include/Library/SafeIntLib.h

>   

> +  ## @libraryclass Provides a service to retrieve a pointer to the Standalone MM Services Table.

> +  #                Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types.

> +  MmServicesTableLib|Include/Library/MmServicesTableLib.h

> +

>   [LibraryClasses.IA32, LibraryClasses.X64]

>     ##  @libraryclass  Abstracts both S/W SMI generation and detection.

>     ##

> 


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

Patch

diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h
new file mode 100644
index 000000000000..12bd01e98641
--- /dev/null
+++ b/MdePkg/Include/Library/MmServicesTableLib.h
@@ -0,0 +1,25 @@ 
+/** @file
+  Provides a service to retrieve a pointer to the Standalone MM Services Table.
+  Only available to Standalone MM module types.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 2018, ARM Limited. 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>
+
+extern EFI_MM_SYSTEM_TABLE         *gMmst;
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 712bd46dd3d3..a7383b6daafb 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -243,6 +243,10 @@  [LibraryClasses]
   ##
   SafeIntLib|Include/Library/SafeIntLib.h
 
+  ## @libraryclass Provides a service to retrieve a pointer to the Standalone MM Services Table.
+  #                Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types.
+  MmServicesTableLib|Include/Library/MmServicesTableLib.h
+
 [LibraryClasses.IA32, LibraryClasses.X64]
   ##  @libraryclass  Abstracts both S/W SMI generation and detection.
   ##