public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. ***
@ 2017-06-08 19:05 Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 01/10] BaseTools: Tools change to support PI v1.5 Specification Supreeth Venkatesh
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh

*** 
PI v1.5 Specification Volume 4 defines Management Mode Core Interface.
In order to support Management Mode Core Interface, Module Types MM_STANDALONE, MM_CORE_STANDALONE are needed. 
PI specification v1.5 defines the following new file types:
#define EFI_FV_FILETYPE_MM 0x0A
#define EFI_FV_FILETYPE_COMBINED_MM_DXE 0x0C
#define EFI_FV_FILETYPE_MM_STANDALONE 0x0E
The following changes are necessitated in order to support the above changes to the specification. 

Changes Since v1:
Corrected Version check HEX Value "0x00010032" (1 and 50), not 0x0001000A (1 and 10)
***

Supreeth Venkatesh (10):
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.
  BaseTools: Tools change to support PI v1.5 Specification.

 BaseTools/Source/C/GenFfs/GenFfs.c                 |   6 +-
 BaseTools/Source/C/GenFw/GenFw.c                   |   5 +-
 BaseTools/Source/C/Include/Common/PiFirmwareFile.h |   1 +
 BaseTools/Source/Python/AutoGen/GenC.py            | 148 ++++++++++++++++++++-
 BaseTools/Source/Python/AutoGen/GenDepex.py        |  17 ++-
 BaseTools/Source/Python/Common/DataType.py         |   4 +-
 BaseTools/Source/Python/Common/FdfParserLite.py    |   4 +-
 .../Source/Python/CommonDataClass/CommonClass.py   |   6 +-
 .../Source/Python/CommonDataClass/PackageClass.py  |   2 +-
 BaseTools/Source/Python/Eot/FvImage.py             |   1 +
 BaseTools/Source/Python/GenFds/FdfParser.py        |   4 +-
 BaseTools/Source/Python/GenFds/Ffs.py              |   7 +-
 BaseTools/Source/Python/GenFds/FfsInfStatement.py  |   3 +
 .../Source/Python/Workspace/WorkspaceDatabase.py   |   5 +
 BaseTools/Source/Python/build/BuildReport.py       |   4 +-
 BaseTools/Source/Python/build/build.py             |   2 +-
 16 files changed, 200 insertions(+), 19 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 01/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 02/10] " Supreeth Venkatesh
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

PI specification v1.5 defines new firmware volume file types.

This patch adds the new file type EFI_FV_FILETYPE_SMM_STANDALONE in
GenFfs tool. *_SMM_* regex instead of *_MM_* is used to preserve
backwards compatibility.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/C/GenFfs/GenFfs.c                 | 6 ++++--
 BaseTools/Source/C/Include/Common/PiFirmwareFile.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
index c5d657b..2eae2b0 100644
--- a/BaseTools/Source/C/GenFfs/GenFfs.c
+++ b/BaseTools/Source/C/GenFfs/GenFfs.c
@@ -43,8 +43,9 @@ STATIC CHAR8 *mFfsFileType[] = {
   "EFI_FV_FILETYPE_SMM",                  // 0x0A
   "EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE",// 0x0B
   "EFI_FV_FILETYPE_COMBINED_SMM_DXE",     // 0x0C
-  "EFI_FV_FILETYPE_SMM_CORE"              // 0x0D
- };
+  "EFI_FV_FILETYPE_SMM_CORE",             // 0x0D
+  "EFI_FV_FILETYPE_SMM_STANDALONE",       // 0x0E
+};
 
 STATIC CHAR8 *mAlignName[] = {
   "1", "2", "4", "8", "16", "32", "64", "128", "256", "512",
@@ -130,6 +131,7 @@ Returns:
                         EFI_FV_FILETYPE_DRIVER, EFI_FV_FILETYPE_APPLICATION,\n\
                         EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,\n\
                         EFI_FV_FILETYPE_SMM, EFI_FV_FILETYPE_SMM_CORE,\n\
+                        EFI_FV_FILETYPE_SMM_STANDALONE,\n\
                         EFI_FV_FILETYPE_COMBINED_SMM_DXE, \n\
                         EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE.\n");
   fprintf (stdout, "  -g FileGuid, --fileguid FileGuid\n\
diff --git a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
index 2984860..aea03a8 100644
--- a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
+++ b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
@@ -52,6 +52,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 #define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B
 #define EFI_FV_FILETYPE_COMBINED_SMM_DXE      0x0C
 #define EFI_FV_FILETYPE_SMM_CORE              0x0D
+#define EFI_FV_FILETYPE_SMM_STANDALONE        0x0E
 #define EFI_FV_FILETYPE_OEM_MIN               0xc0
 #define EFI_FV_FILETYPE_OEM_MAX               0xdf
 #define EFI_FV_FILETYPE_DEBUG_MIN             0xe0
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 02/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 01/10] BaseTools: Tools change to support PI v1.5 Specification Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 03/10] " Supreeth Venkatesh
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

PI v1.5 Specification Volume 4 defines Management Mode Core Interface.
In order to support Management Mode Core Interface, Module Types
MM_STANDALONE, MM_CORE_STANDALONE are needed.
This patch ensures that SMM_STANDALONE, SMM_CORE_STANDALONE Modules are
treated as EFI Boot Service Driver in GenFw tool.
*_SMM_* regex instead of *_MM_* is used to preserve backwards
compatibility.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/C/GenFw/GenFw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 22e4e72..74d323d 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -181,6 +181,7 @@ Returns:
                         PEI_CORE, PEIM, DXE_CORE, DXE_DRIVER, UEFI_APPLICATION,\n\
                         SEC, DXE_SAL_DRIVER, UEFI_DRIVER, DXE_RUNTIME_DRIVER,\n\
                         DXE_SMM_DRIVER, SECURITY_CORE, COMBINED_PEIM_DRIVER,\n\
+                        SMM_STANDALONE, SMM_CORE_STANDALONE,\n\
                         PIC_PEIM, RELOCATABLE_PEIM, BS_DRIVER, RT_DRIVER,\n\
                         APPLICATION, SAL_RT_DRIVER to support all module types\n\
                         It can only be used together with --keepexceptiontable,\n\
@@ -2009,7 +2010,9 @@ Returns:
         stricmp (ModuleType, "DXE_DRIVER") == 0 ||
         stricmp (ModuleType, "DXE_SMM_DRIVER") == 0  ||
         stricmp (ModuleType, "UEFI_DRIVER") == 0 ||
-        stricmp (ModuleType, "SMM_CORE") == 0) {
+        stricmp (ModuleType, "SMM_CORE") == 0 ||
+        stricmp (ModuleType, "SMM_STANDALONE") == 0 ||
+        stricmp (ModuleType, "SMM_CORE_STANDALONE") == 0) {
           Type = EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER;
           VerboseMsg ("Efi Image subsystem type is efi boot service driver.");
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 03/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 01/10] BaseTools: Tools change to support PI v1.5 Specification Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 02/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 04/10] " Supreeth Venkatesh
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch adds changes to auto generate SMM_CORE_STANDALONE and
SMM_STANDALONE Entry Point templates.
Also, it adds changes to help auto generate dependency expressions for
SMM_STANDALONE modules.

PI Specification v1.5 specifies Management Mode System Table (MMST)
which is  a collection of common services for managing
MMRAM allocation and providing basic I/O services. MMST is similar to
the UEFI System Table.

Some of auto generated SMM_CORE_STANDALONE and SMM_STANDALONE template
APIs use MMST as parameter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/AutoGen/GenC.py     | 148 +++++++++++++++++++++++++++-
 BaseTools/Source/Python/AutoGen/GenDepex.py |  17 +++-
 2 files changed, 162 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 67aaef7..d42dd45 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -237,6 +237,100 @@ ProcessModuleEntryPointList (
 ${END}
 """)
 
+## SMM_CORE_STANDALONE Entry Point Templates
+gSmmCoreStandaloneEntryPointPrototype = TemplateString("""
+${BEGIN}
+EFI_STATUS
+EFIAPI
+${Function} (
+  IN VOID *HobStart
+  );
+${END}
+""")
+
+gSmmCoreStandaloneEntryPointString = TemplateString("""
+${BEGIN}
+const UINT32 _gSmmRevision = ${PiSpecVersion};
+
+VOID
+EFIAPI
+ProcessModuleEntryPointList (
+  IN VOID *HobStart
+  )
+{
+  ${Function} (HobStart);
+}
+${END}
+""")
+
+## SMM_STANDALONE Entry Point Templates
+gSmmStandaloneEntryPointPrototype = TemplateString("""
+${BEGIN}
+EFI_STATUS
+EFIAPI
+${Function} (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  );
+${END}
+""")
+
+gSmmStandaloneEntryPointString = [
+TemplateString("""
+GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gSmmRevision = ${PiSpecVersion};
+
+EFI_STATUS
+EFIAPI
+ProcessModuleEntryPointList (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  )
+
+{
+  return EFI_SUCCESS;
+}
+"""),
+TemplateString("""
+GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gSmmRevision = ${PiSpecVersion};
+${BEGIN}
+EFI_STATUS
+EFIAPI
+ProcessModuleEntryPointList (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  )
+
+{
+  return ${Function} (ImageHandle, SmmSystemTable);
+}
+${END}
+"""),
+TemplateString("""
+GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gSmmRevision = ${PiSpecVersion};
+
+EFI_STATUS
+EFIAPI
+ProcessModuleEntryPointList (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  )
+
+{
+  EFI_STATUS  Status;
+  EFI_STATUS  CombinedStatus;
+
+  CombinedStatus = EFI_LOAD_ERROR;
+${BEGIN}
+  Status = ${Function} (ImageHandle, SmmSystemTable);
+  if (!EFI_ERROR (Status) || EFI_ERROR (CombinedStatus)) {
+    CombinedStatus = Status;
+  }
+${END}
+  return CombinedStatus;
+}
+""")
+]
+
 ## DXE SMM Entry Point Templates
 gDxeSmmEntryPointPrototype = TemplateString("""
 ${BEGIN}
@@ -580,6 +674,15 @@ ${Function} (
   IN EFI_SYSTEM_TABLE  *SystemTable
   );${END}
 """),
+
+'SMM'   : TemplateString("""${BEGIN}
+EFI_STATUS
+EFIAPI
+${Function} (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  );${END}
+"""),
 }
 
 gLibraryStructorCall = {
@@ -597,6 +700,11 @@ gLibraryStructorCall = {
   Status = ${Function} (ImageHandle, SystemTable);
   ASSERT_EFI_ERROR (Status);${END}
 """),
+
+'SMM'   : TemplateString("""${BEGIN}
+  Status = ${Function} (ImageHandle, SmmSystemTable);
+  ASSERT_EFI_ERROR (Status);${END}
+"""),
 }
 
 ## Library Constructor and Destructor Templates
@@ -644,6 +752,21 @@ ${BEGIN}  EFI_STATUS  Status;
 ${FunctionCall}${END}
 }
 """),
+
+'SMM'   :   TemplateString("""
+${BEGIN}${FunctionPrototype}${END}
+
+VOID
+EFIAPI
+ProcessLibrary${Type}List (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SMM_SYSTEM_TABLE2 *SmmSystemTable
+  )
+{
+${BEGIN}  EFI_STATUS  Status;
+${FunctionCall}${END}
+}
+"""),
 }
 
 gBasicHeaderFile = "Base.h"
@@ -661,6 +784,8 @@ gModuleTypeHeaderFile = {
     "UEFI_DRIVER"       :   ["Uefi.h",  "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", "Library/UefiDriverEntryPoint.h"],
     "UEFI_APPLICATION"  :   ["Uefi.h",  "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", "Library/UefiApplicationEntryPoint.h"],
     "SMM_CORE"          :   ["PiDxe.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiDriverEntryPoint.h"],
+    "SMM_STANDALONE"    :   ["PiSmm.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/SmmDriverStandaloneEntryPoint.h"],
+    "SMM_CORE_STANDALONE" : ["PiSmm.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/SmmCoreStandaloneEntryPoint.h"],
     "USER_DEFINED"      :   [gBasicHeaderFile]
 }
 
@@ -1266,6 +1391,9 @@ def CreateLibraryConstructorCode(Info, AutoGenC, AutoGenH):
                                 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
             ConstructorPrototypeString.Append(gLibraryStructorPrototype['DXE'].Replace(Dict))
             ConstructorCallingString.Append(gLibraryStructorCall['DXE'].Replace(Dict))
+        elif Lib.ModuleType in ['SMM_STANDALONE','SMM_CORE_STANDALONE']:
+            ConstructorPrototypeString.Append(gLibraryStructorPrototype['SMM'].Replace(Dict))
+            ConstructorCallingString.Append(gLibraryStructorCall['SMM'].Replace(Dict))
 
     if str(ConstructorPrototypeString) == '':
         ConstructorPrototypeList = []
@@ -1291,6 +1419,8 @@ def CreateLibraryConstructorCode(Info, AutoGenC, AutoGenH):
         elif Info.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
                                  'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
             AutoGenC.Append(gLibraryString['DXE'].Replace(Dict))
+        elif Info.ModuleType in ['SMM_STANDALONE','SMM_CORE_STANDALONE']:
+            AutoGenC.Append(gLibraryString['SMM'].Replace(Dict))
 
 ## Create code for library destructor
 #
@@ -1323,6 +1453,9 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH):
                                 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_CORE']:
             DestructorPrototypeString.Append(gLibraryStructorPrototype['DXE'].Replace(Dict))
             DestructorCallingString.Append(gLibraryStructorCall['DXE'].Replace(Dict))
+        elif Lib.ModuleType in ['SMM_STANDALONE','SMM_CORE_STANDALONE']:
+            DestructorPrototypeString.Append(gLibraryStructorPrototype['SMM'].Replace(Dict))
+            DestructorCallingString.Append(gLibraryStructorCall['SMM'].Replace(Dict))
 
     if str(DestructorPrototypeString) == '':
         DestructorPrototypeList = []
@@ -1348,6 +1481,8 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH):
         elif Info.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
                                  'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
             AutoGenC.Append(gLibraryString['DXE'].Replace(Dict))
+        elif Info.ModuleType in ['SMM_STANDALONE','SMM_CORE_STANDALONE']:
+            AutoGenC.Append(gLibraryString['SMM'].Replace(Dict))
 
 
 ## Create code for ModuleEntryPoint
@@ -1377,7 +1512,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
         'UefiSpecVersion':   UefiSpecVersion + 'U'
     }
 
-    if Info.ModuleType in ['PEI_CORE', 'DXE_CORE', 'SMM_CORE']:
+    if Info.ModuleType in ['PEI_CORE', 'DXE_CORE', 'SMM_CORE', 'SMM_CORE_STANDALONE']:
         if Info.SourceFileList <> None and Info.SourceFileList <> []:
           if NumEntryPoints != 1:
               EdkLogger.error(
@@ -1396,6 +1531,9 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
     elif Info.ModuleType == 'SMM_CORE':
         AutoGenC.Append(gSmmCoreEntryPointString.Replace(Dict))
         AutoGenH.Append(gSmmCoreEntryPointPrototype.Replace(Dict))
+    elif Info.ModuleType == 'SMM_CORE_STANDALONE':
+        AutoGenC.Append(gSmmCoreStandaloneEntryPointString.Replace(Dict))
+        AutoGenH.Append(gSmmCoreStandaloneEntryPointPrototype.Replace(Dict))
     elif Info.ModuleType == 'PEIM':
         if NumEntryPoints < 2:
             AutoGenC.Append(gPeimEntryPointString[NumEntryPoints].Replace(Dict))
@@ -1413,7 +1551,13 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
             AutoGenC.Append(gDxeSmmEntryPointString[0].Replace(Dict))
         else:
             AutoGenC.Append(gDxeSmmEntryPointString[1].Replace(Dict))
-        AutoGenH.Append(gDxeSmmEntryPointPrototype.Replace(Dict))    
+        AutoGenH.Append(gDxeSmmEntryPointPrototype.Replace(Dict))
+    elif Info.ModuleType == 'SMM_STANDALONE':
+        if NumEntryPoints < 2:
+            AutoGenC.Append(gSmmStandaloneEntryPointString[NumEntryPoints].Replace(Dict))
+        else:
+            AutoGenC.Append(gSmmStandaloneEntryPointString[2].Replace(Dict))
+        AutoGenH.Append(gSmmStandaloneEntryPointPrototype.Replace(Dict))
     elif Info.ModuleType == 'UEFI_APPLICATION':
         if NumEntryPoints < 2:
             AutoGenC.Append(gUefiApplicationEntryPointString[NumEntryPoints].Replace(Dict))
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index 5923a75..9d3002f 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -42,6 +42,8 @@ gType2Phase = {
     "UEFI_DRIVER"       :   "DXE",
     "UEFI_APPLICATION"  :   "DXE",
     "SMM_CORE"          :   "DXE",
+    "SMM_STANDALONE"    :   "SMM",
+    "SMM_CORE_STANDALONE" : "SMM",
 }
 
 ## Convert dependency expression string into EFI internal representation
@@ -98,6 +100,19 @@ class DependencyExpression:
             "FALSE" :   0x07,
             "END"   :   0x08,
             "SOR"   :   0x09
+        },
+
+        "SMM"   : {
+            "BEFORE":   0x00,
+            "AFTER" :   0x01,
+            "PUSH"  :   0x02,
+            "AND"   :   0x03,
+            "OR"    :   0x04,
+            "NOT"   :   0x05,
+            "TRUE"  :   0x06,
+            "FALSE" :   0x07,
+            "END"   :   0x08,
+            "SOR"   :   0x09
         }
     }
 
@@ -289,7 +304,7 @@ class DependencyExpression:
             return
 
         # don't generate depex if all operands are architecture protocols
-        if self.ModuleType in ['UEFI_DRIVER', 'DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'DXE_SMM_DRIVER'] and \
+        if self.ModuleType in ['UEFI_DRIVER', 'DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'DXE_SMM_DRIVER', 'SMM_STANDALONE'] and \
            Op == 'AND' and \
            self.ArchProtocols == set([GuidStructureStringToGuidString(Guid) for Guid in AllOperand]):
             self.PostfixNotation = []
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 04/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (2 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 03/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 05/10] " Supreeth Venkatesh
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch adds SUP_MODULE_SMM_STANDALONE and
SUP_MODULE_SMM_CORE_STANDALONE data types and includes it in
SUP_MODULE_LIST.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/Common/DataType.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index 6edc0c0..ab64553 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -70,10 +70,12 @@ SUP_MODULE_UEFI_DRIVER = 'UEFI_DRIVER'
 SUP_MODULE_UEFI_APPLICATION = 'UEFI_APPLICATION'
 SUP_MODULE_USER_DEFINED = 'USER_DEFINED'
 SUP_MODULE_SMM_CORE = 'SMM_CORE'
+SUP_MODULE_SMM_STANDALONE = 'SMM_STANDALONE'
+SUP_MODULE_SMM_CORE_STANDALONE = 'SMM_CORE_STANDALONE'
 
 SUP_MODULE_LIST = [SUP_MODULE_BASE, SUP_MODULE_SEC, SUP_MODULE_PEI_CORE, SUP_MODULE_PEIM, SUP_MODULE_DXE_CORE, SUP_MODULE_DXE_DRIVER, \
                    SUP_MODULE_DXE_RUNTIME_DRIVER, SUP_MODULE_DXE_SAL_DRIVER, SUP_MODULE_DXE_SMM_DRIVER, SUP_MODULE_UEFI_DRIVER, \
-                   SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_SMM_CORE]
+                   SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_SMM_CORE, SUP_MODULE_SMM_STANDALONE, SUP_MODULE_SMM_CORE_STANDALONE]
 SUP_MODULE_LIST_STRING = TAB_VALUE_SPLIT.join(l for l in SUP_MODULE_LIST)
 
 EDK_COMPONENT_TYPE_LIBRARY = 'LIBRARY'
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 05/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (3 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 04/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 06/10] " Supreeth Venkatesh
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch adds support for FdfParser tool to parse SMM_STANDALONE and
SMM_CORE_STANDALONE modules.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/Common/FdfParserLite.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py
index a8cce26..4f3b159 100644
--- a/BaseTools/Source/Python/Common/FdfParserLite.py
+++ b/BaseTools/Source/Python/Common/FdfParserLite.py
@@ -2823,7 +2823,7 @@ class FdfParser(object):
                              "DXE_SMM_DRIVER", "DXE_RUNTIME_DRIVER", \
                              "UEFI_DRIVER", "UEFI_APPLICATION", "USER_DEFINED", "DEFAULT", "BASE", \
                              "SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC_PEIM", "RELOCATABLE_PEIM", \
-                             "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"):
+                             "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE", "SMM_STANDALONE", "SMM_CORE_STANDALONE"):
             raise Warning("Unknown Module type At line ", self.FileName, self.CurrentLineNumber)
         return self.__Token
     
@@ -2867,7 +2867,7 @@ class FdfParser(object):
         
         Type = self.__Token.strip().upper()
         if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\
-                             "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE"):
+                             "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE", "SMM_STANDALONE"):
             raise Warning("Unknown FV type At line ", self.FileName, self.CurrentLineNumber)
 
         if not self.__IsToken("="):
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 06/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (4 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 05/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 07/10] " Supreeth Venkatesh
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch registers SMM_STANDALONE and SMM_CORE_STANDALONE module types
with CommonClass and PackageIncludePkgHeaderClass in CommonDataClass.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/CommonDataClass/CommonClass.py  | 6 +++---
 BaseTools/Source/Python/CommonDataClass/PackageClass.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/CommonDataClass/CommonClass.py b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
index 5e908a6..c520799 100644
--- a/BaseTools/Source/Python/CommonDataClass/CommonClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
@@ -174,7 +174,7 @@ class IncludeStatementClass(object):
 # @var GuidTypeList:   To store value for GuidTypeList, selection scope is in below list
 #                      DATA_HUB_RECORD | EFI_EVENT | EFI_SYSTEM_CONFIGURATION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOKEN_SPACE_GUID
 # @var SupModuleList:  To store value for SupModuleList, selection scope is in below list
-#                      BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
+#                      BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | SMM_STANDALONE | SMM_CORE_STANDALONE
 #
 class GuidProtocolPpiCommonClass(CommonClass):
     def __init__(self):
@@ -202,7 +202,7 @@ class GuidProtocolPpiCommonClass(CommonClass):
 # @var RecommendedInstance:         To store value for RecommendedInstance, selection scope is in below list
 #                                   DATA_HUB_RECORD | EFI_EVENT | EFI_SYSTEM_CONFIGURATION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOKEN_SPACE_GUID
 # @var SupModuleList:               To store value for SupModuleList, selection scope is in below list
-#                                   BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
+#                                   BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | SMM_STANDALONE | SMM_CORE_STANDALONE
 #
 class LibraryClassClass(CommonClass, DefineClass):
     def __init__(self):
@@ -354,7 +354,7 @@ class PcdErrorClass(object):
 # @var SkuInfoList:            To store value for SkuInfoList
 #                              It is a set structure as { [SkuIdName] : SkuInfoClass } 
 # @var SupModuleList:          To store value for SupModuleList, selection scope is in below list
-#                              BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
+#                              BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | SMM_STANDALONE | SMM_CORE_STANDALONE
 #
 class PcdClass(CommonClass):
     def __init__(self, CName = '', Token = '', TokenSpaceGuidCName = '', DatumType = '', MaxDatumSize = '', DefaultValue = '', ItemType = '', ValidUsage = None, SkuInfoList = None, SupModuleList = None):
diff --git a/BaseTools/Source/Python/CommonDataClass/PackageClass.py b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
index 82e7394..b63e05d 100644
--- a/BaseTools/Source/Python/CommonDataClass/PackageClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
@@ -62,7 +62,7 @@ class PackageIndustryStdHeaderClass(CommonClass):
 #
 # @var IncludeHeader:  To store value for IncludeHeader
 # @var ModuleType:     To store value for ModuleType, it is a set structure as
-#                      BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | TOOL | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
+#                      BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | TOOL | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | SMM_STANDALONE | SMM_CORE_STANDALONE
 #
 class PackageIncludePkgHeaderClass(object):
     def __init__(self):
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 07/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (5 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 06/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 08/10] " Supreeth Venkatesh
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch verifies SMM_CORE_STANDALONE module compatibility with PI
specification version.
Also, it registers SMM_STANDALONE/SMM_CORE_STANDALONE modules with
FdfParser class and provides mapping between SMM_STANDALONE and
SMM_CORE_STANDALONE module type in FDF with
EFI_FV_FILETYPE_SMM_STANDALONE and EFI_FV_FILETYPE_SMM_CORE file types
in GenFfs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/GenFds/FdfParser.py       | 4 ++--
 BaseTools/Source/Python/GenFds/Ffs.py             | 7 +++++--
 BaseTools/Source/Python/GenFds/FfsInfStatement.py | 3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index a1825ba..a291c03 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -3672,7 +3672,7 @@ class FdfParser:
                              "DXE_SMM_DRIVER", "DXE_RUNTIME_DRIVER", \
                              "UEFI_DRIVER", "UEFI_APPLICATION", "USER_DEFINED", "DEFAULT", "BASE", \
                              "SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC_PEIM", "RELOCATABLE_PEIM", \
-                             "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"):
+                                        "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE", "SMM_STANDALONE", "SMM_CORE_STANDALONE"):
             raise Warning("Unknown Module type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
         return self.__Token
 
@@ -3716,7 +3716,7 @@ class FdfParser:
 
         Type = self.__Token.strip().upper()
         if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\
-                             "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE"):
+                             "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE", "SMM_STANDALONE"):
             raise Warning("Unknown FV type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
 
         if not self.__IsToken("="):
diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py
index c8c5a6e..3a44f1c 100644
--- a/BaseTools/Source/Python/GenFds/Ffs.py
+++ b/BaseTools/Source/Python/GenFds/Ffs.py
@@ -34,7 +34,9 @@ class Ffs(FDClassObject):
         'DXE_RUNTIME_DRIVER': 'EFI_FV_FILETYPE_DRIVER',
         'UEFI_DRIVER'       : 'EFI_FV_FILETYPE_DRIVER',
         'UEFI_APPLICATION'  : 'EFI_FV_FILETYPE_APPLICATION',
-        'SMM_CORE'          : 'EFI_FV_FILETYPE_SMM_CORE'
+        'SMM_CORE'          : 'EFI_FV_FILETYPE_SMM_CORE',
+        'SMM_STANDALONE'    : 'EFI_FV_FILETYPE_SMM_STANDALONE',
+        'SMM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_SMM_CORE',
     }
     
     # mapping between FILE type in FDF and file type for GenFfs
@@ -50,7 +52,8 @@ class Ffs(FDClassObject):
         'RAW'               : 'EFI_FV_FILETYPE_RAW',
         'PEI_DXE_COMBO'     : 'EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER',
         'SMM'               : 'EFI_FV_FILETYPE_SMM',
-        'SMM_CORE'          : 'EFI_FV_FILETYPE_SMM_CORE'
+        'SMM_CORE'          : 'EFI_FV_FILETYPE_SMM_CORE',
+        'SMM_STANDALONE'    : 'EFI_FV_FILETYPE_SMM_STANDALONE',
     }
     
     # mapping between section type in FDF and file suffix
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index e9517a4..1f0250f 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -224,6 +224,9 @@ class FfsInfStatement(FfsInfStatementClassObject):
         if self.ModuleType == 'SMM_CORE' and int(self.PiSpecVersion, 16) < 0x0001000A:
             EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)      
 
+        if self.ModuleType == 'SMM_CORE_STANDALONE' and int(self.PiSpecVersion, 16) < 0x00010032:
+            EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.InfFileName)
+
         if Inf._Defs != None and len(Inf._Defs) > 0:
             self.OptRomDefs.update(Inf._Defs)
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 08/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (6 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 07/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 09/10] " Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 10/10] " Supreeth Venkatesh
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch registers SMM_STANDALONE and SMM_CORE_STANDALONE module type
with python build tools.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/build/BuildReport.py | 4 +++-
 BaseTools/Source/Python/build/build.py       | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 91d1e93..2795da4 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -123,6 +123,8 @@ gDriverTypeMap = {
   'UEFI_APPLICATION'  : '0x9 (APPLICATION)',
   'SMM_CORE'          : '0xD (SMM_CORE)',
   'SMM_DRIVER'        : '0xA (SMM)', # Extension of module type to support PI 1.1 SMM drivers
+  'SMM_STANDALONE'    : '0xE (SMM_STANDALONE)',
+  'SMM_CORE_STANDALONE' : '0xD (SMM_CORE)',
   }
 
 ## The look up table of the supported opcode in the dependency expression binaries
@@ -374,7 +376,7 @@ class DepexReport(object):
         if not ModuleType:
             ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
 
-        if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE", "SMM_CORE", "UEFI_APPLICATION"]:
+        if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE", "SMM_CORE", "SMM_CORE_STANDALONE", "UEFI_APPLICATION"]:
             return
       
         for Source in M.SourceFileList:
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index fd94ae6..c67ccb7 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1499,7 +1499,7 @@ class Build():
                         if IsIpfPlatform and ImageInfo.Image.Size % 0x2000 != 0:
                             ImageInfo.Image.Size = (ImageInfo.Image.Size / 0x2000 + 1) * 0x2000
                         RtSize += ImageInfo.Image.Size
-                    elif Module.ModuleType in ['SMM_CORE', 'DXE_SMM_DRIVER']:
+                    elif Module.ModuleType in ['SMM_CORE', 'DXE_SMM_DRIVER', 'SMM_STANDALONE', 'SMM_CORE_STANDALONE']:
                         SmmModuleList[Module.MetaFile] = ImageInfo
                         SmmSize += ImageInfo.Image.Size
                         if Module.ModuleType == 'DXE_SMM_DRIVER':
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 09/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (7 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 08/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  2017-06-08 19:05 ` [PATCH v2 10/10] " Supreeth Venkatesh
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch checks SUP_MODULE_SMM_CORE_STANDALONE and
SUP_MODULE_SMM_STANDALONE module compatibility with PI specification
version.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index c1af5c7..599c6df 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1977,6 +1977,11 @@ class InfBuildData(ModuleBuildClassObject):
             if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (int(self._Specification['PI_SPECIFICATION_VERSION'], 16) < 0x0001000A):
                 if self._ModuleType == SUP_MODULE_SMM_CORE:
                     EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.MetaFile)
+            if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (int(self._Specification['PI_SPECIFICATION_VERSION'], 16) < 0x00010032):
+                if self._ModuleType == SUP_MODULE_SMM_CORE_STANDALONE:
+                    EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.MetaFile)
+                if self._ModuleType == SUP_MODULE_SMM_STANDALONE:
+                    EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.MetaFile)
             if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \
                and 'PCI_CLASS_CODE' in self._Defs and 'PCI_REVISION' in self._Defs:
                 self._BuildType = 'UEFI_OPTIONROM'
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 10/10] BaseTools: Tools change to support PI v1.5 Specification.
  2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
                   ` (8 preceding siblings ...)
  2017-06-08 19:05 ` [PATCH v2 09/10] " Supreeth Venkatesh
@ 2017-06-08 19:05 ` Supreeth Venkatesh
  9 siblings, 0 replies; 11+ messages in thread
From: Supreeth Venkatesh @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel
  Cc: leif.lindholm, ard.biesheuvel, achin.gupta, supreeth.venkatesh,
	Jiewen Yao

This patch registers SMM_STANDALONE with Ffs class.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
 BaseTools/Source/Python/Eot/FvImage.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/Eot/FvImage.py b/BaseTools/Source/Python/Eot/FvImage.py
index f2a9bc6..1ba1dd6 100644
--- a/BaseTools/Source/Python/Eot/FvImage.py
+++ b/BaseTools/Source/Python/Eot/FvImage.py
@@ -999,6 +999,7 @@ class Ffs(Image):
         0x0B    :   "FIRMWARE_VOLUME_IMAGE",
         0x0C    :   "COMBINED_SMM_DXE",
         0x0D    :   "SMM_CORE",
+        0x0E    :   "SMM_STANDALONE",
         0xc0    :   "OEM_MIN",
         0xdf    :   "OEM_MAX",
         0xe0    :   "DEBUG_MIN",
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-06-08 19:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08 19:05 [PATCH v2 00/10] *** BaseTools: Tools change to support PI v1.5 Specification. *** Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 01/10] BaseTools: Tools change to support PI v1.5 Specification Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 02/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 03/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 04/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 05/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 06/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 07/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 08/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 09/10] " Supreeth Venkatesh
2017-06-08 19:05 ` [PATCH v2 10/10] " Supreeth Venkatesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox