The current BaseTools GenC implementation for UEFI module entry
points declares Standalone MM Entry Points with the
EFI_SMM_SYSTEM_TABLE2 MmSystemTable pointer and includes SMM headers.
Update the code to reflect the imported StandaloneMmPkg by changing
MmSystemTable to the MM type and include both PiMm.h and the
StandaloneMmPkg Entry Point header over the original SMM variants.

This change should not break any existent code due to the absense
of any MM Standalone modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <[email protected]>
---
 BaseTools/Source/Python/AutoGen/GenC.py | 28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py 
b/BaseTools/Source/Python/AutoGen/GenC.py
index 3b396491d023..bc7709f4b5e4 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -265,8 +265,8 @@ ${BEGIN}
 EFI_STATUS
 EFIAPI
 ${Function} (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2 *MmSystemTable
+  IN EFI_HANDLE          ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE *MmSystemTable
   );
 ${END}
 """)
@@ -278,8 +278,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gMmRevision = 
${PiSpecVersion};
 EFI_STATUS
 EFIAPI
 ProcessModuleEntryPointList (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2 *MmSystemTable
+  IN EFI_HANDLE          ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE *MmSystemTable
   )
 
 {
@@ -292,8 +292,8 @@ ${BEGIN}
 EFI_STATUS
 EFIAPI
 ProcessModuleEntryPointList (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2 *MmSystemTable
+  IN EFI_HANDLE          ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE *MmSystemTable
   )
 
 {
@@ -307,8 +307,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gMmRevision = 
${PiSpecVersion};
 EFI_STATUS
 EFIAPI
 ProcessModuleEntryPointList (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2 *MmSystemTable
+  IN EFI_HANDLE          ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE *MmSystemTable
   )
 
 {
@@ -675,8 +675,8 @@ ${Function} (
 EFI_STATUS
 EFIAPI
 ${Function} (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2  *MmSystemTable
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE  *MmSystemTable
   );${END}
 """),
 }
@@ -755,8 +755,8 @@ ${BEGIN}${FunctionPrototype}${END}
 VOID
 EFIAPI
 ProcessLibrary${Type}List (
-  IN EFI_HANDLE            ImageHandle,
-  IN EFI_SMM_SYSTEM_TABLE2  *MmSystemTable
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_MM_SYSTEM_TABLE  *MmSystemTable
   )
 {
 ${BEGIN}  EFI_STATUS  Status;
@@ -780,8 +780,8 @@ gModuleTypeHeaderFile = {
     SUP_MODULE_UEFI_DRIVER       :   ["Uefi.h",  "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", 
"Library/UefiDriverEntryPoint.h"],
     SUP_MODULE_UEFI_APPLICATION  :   ["Uefi.h",  "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", 
"Library/UefiApplicationEntryPoint.h"],
     SUP_MODULE_SMM_CORE          :   ["PiDxe.h", "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/UefiDriverEntryPoint.h"],
-    SUP_MODULE_MM_STANDALONE     :   ["PiSmm.h", "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/SmmDriverStandaloneEntryPoint.h"],
-    SUP_MODULE_MM_CORE_STANDALONE :  ["PiSmm.h", "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/SmmCoreStandaloneEntryPoint.h"],
+    SUP_MODULE_MM_STANDALONE     :   ["PiMm.h",  "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/StandaloneMmDriverEntryPoint.h"],
+    SUP_MODULE_MM_CORE_STANDALONE :  ["PiMm.h",  "Library/BaseLib.h", 
"Library/DebugLib.h", "Library/StandaloneMmCoreEntryPoint.h"],
     SUP_MODULE_USER_DEFINED      :   [gBasicHeaderFile]
 }
 
-- 
2.18.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to