Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly

2023-04-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Sunday, April 16, 2023 9:23 PM
> To: devel@edk2.groups.io
> Cc: Duggapu, Chinni B ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Kuo, Ted
> 
> Subject: [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file
> directly
> 
> From: "Duggapu, Chinni B" 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4412
> 
> After shrinking the FSP (FV) component using FMMT, Image size in FSP info
> header is not in sync with the FV length in FV header.
> This enhancement helps to patch the FSP image size offset with correct length 
> &
> can be used to patch any offset directly on the FSP Component Fd.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 14 -
>  .../Tools/UserManuals/PatchFvUserManual.md| 20 +++
>  2 files changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index eb130049b5..73ab877c71 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -165,6 +165,17 @@ class Symbols:
>  if not os.path.isdir(fvDir): raise Exception ("'%s' is 
> not a valid
> directory!" % fvDir) +#+# if user provided fd name as a 
> input, skip rest of
> the flow to+# patch fd directly+#+fdFile =
> os.path.join(fvDir,fvNames + ".fd")+if os.path.exists(fdFile):+
> print("Tool identified Fd file as a input to patch '%s'" %fdFile)+
> self.fdFile =
> fdFile+self.fdSize = os.path.getsize(fdFile)+return 
> 0+ # # If
> the Guid.xref is not existing in fvDir, then raise an exception #@@ 
> -848,8
> +859,9 @@ class Symbols:
>  #  Print out the usage # def Usage():-print ("PatchFv Version 0.50")+
> print
> ("PatchFv Version 0.60") print ("Usage: \n\tPatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")+print
> ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")  def main(): #diff 
> --git
> a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> index 5f1031e729..f28eedf625 100644
> --- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> +++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> @@ -1,6 +1,7 @@
>  #Name **_PatchFv.py_** - The python script that patches the firmware
> volumes (**FV**) with in the flash device (**FD**) file post FSP build.+From
> version 0.60, script is capable of patching flash device (**FD**) directly.
> #Synopsis @@ -10,6 +11,12 @@ PatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+
>| ["Offset, Value, $Command"]+   | ["Offset, Value, $Command,
> @Comment"]+ ```+```+PatchFv FdFileDir FdFileName ["Offset, Value"]++  |
> ["Offset, Value, @Comment"]++  | ["Offset, Value, $Command"]++  | ["Offset,
> Value, $Command, @Comment"]++```  #Description The **_PatchFv.py_** tool
> allows the developer to fix up FD images to follow the@@ -102,6 +109,19 @@
> ModuleGuid:Offset
>< > Convert absolute address  into an image offset (expr & FSP_SIZE)
> ```+From version 0.60 tool allows to pass flash device file path as Argument 1
> and+flash device name as Argument 2 and rules for passing offset & value are
> same+as explained in the previous sections.++Example usage:+Argument
> 1+```+ YouPlatformFspBinPkg\+```+Argument 2+```+ Fsp_Rebased_T+```
> ###Special Commands: Special commands must use the **$** symbol as a
> prefix to the command itself.--
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103074): https://edk2.groups.io/g/devel/message/103074
Mute This Topic: https://groups.io/mt/98312628/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 3/3] .pytool: Support FDT library.

2023-04-16 Thread Benny Lin
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)

Add RequiredSubmodule object for CI setting.

Cc: Sean Brogan 
Cc: Michael Kubacki 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Benny Lin 
---
 .pytool/CISettings.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index e3f44add58..2fb99f2a17 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -195,6 +195,8 @@ class Settings(CiBuildSettingsManager, 
UpdateSettingsManager, SetupSettingsManag
 "RedfishPkg/Library/JsonLib/jansson", False))
 rs.append(RequiredSubmodule(
 "UnitTestFrameworkPkg/Library/SubhookLib/subhook", False))
+rs.append(RequiredSubmodule(
+"MdePkg/Library/BaseFdtLib/libfdt", False))
 return rs
 
 def GetName(self):
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103073): https://edk2.groups.io/g/devel/message/103073
Mute This Topic: https://groups.io/mt/98313205/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-04-16 Thread Benny Lin
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
and refer to LibcLib implementation by Pedro.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Acked-by: Pedro Falcato 
Signed-off-by: Benny Lin 
---
 MdePkg/Include/Library/FdtLib.h   | 314 
 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 +
 MdePkg/Library/BaseFdtLib/FdtLib.c| 301 +++
 MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 ++
 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 +++
 MdePkg/Library/BaseFdtLib/limits.h|  10 +
 MdePkg/Library/BaseFdtLib/stdbool.h   |  10 +
 MdePkg/Library/BaseFdtLib/stddef.h|  10 +
 MdePkg/Library/BaseFdtLib/stdint.h|  10 +
 MdePkg/Library/BaseFdtLib/stdlib.h|  10 +
 MdePkg/Library/BaseFdtLib/string.h|  10 +
 MdePkg/MdePkg.ci.yaml |  17 +-
 MdePkg/MdePkg.dec |   4 +
 MdePkg/MdePkg.dsc |   1 +
 15 files changed, 1043 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Library/FdtLib.h b/MdePkg/Include/Library/FdtLib.h
new file mode 100644
index 00..d59b749c25
--- /dev/null
+++ b/MdePkg/Include/Library/FdtLib.h
@@ -0,0 +1,314 @@
+/** @file
+  Flattened Device Tree Library.
+
+  Copyright (c) 2023, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef FDT_LIB_H_
+#define FDT_LIB_H_
+
+///
+/// Flattened Device Tree definition
+///
+typedef struct {
+  UINT32Magic;   /* magic word FDT_MAGIC */
+  UINT32TotalSize;   /* total size of DT block */
+  UINT32OffsetDtStruct;  /* offset to structure */
+  UINT32OffsetDtStrings; /* offset to strings */
+  UINT32OffsetMemRsvmap; /* offset to memory reserve map */
+  UINT32Version; /* format version */
+  UINT32LastCompVersion; /* last compatible version */
+
+  /* version 2 fields below */
+  UINT32BootCpuidPhys;   /* Which physical CPU id we're
+booting on */
+  /* version 3 fields below */
+  UINT32SizeDtStrings;   /* size of the strings block */
+
+  /* version 17 fields below */
+  UINT32SizeDtStruct;/* size of the structure block */
+} FDT_HEADER;
+
+typedef struct {
+  UINT64Address;
+  UINT64Size;
+} FDT_RESERVE_ENTRY;
+
+typedef struct {
+  UINT32Tag;
+  CHAR8 Name[];
+} FDT_NODE_HEADER;
+
+typedef struct {
+  UINT32Tag;
+  UINT32Length;
+  UINT32NameOffset;
+  CHAR8 Data[];
+} FDT_PROPERTY;
+
+#define FDT_GET_HEADER(Fdt, Field)  SwapBytes32(((CONST FDT_HEADER 
*)(Fdt))->Field)
+
+#define FDT_MAGIC(Fdt)  (FDT_GET_HEADER(Fdt, Magic))
+#define FDT_TOTAL_SIZE(Fdt) (FDT_GET_HEADER(Fdt, TotalSize))
+#define FDT_OFFSET_DT_STRUCT(Fdt)   (FDT_GET_HEADER(Fdt, OffsetDtStruct))
+#define FDT_OFFSET_DT_STRINGS(Fdt)  (FDT_GET_HEADER(Fdt, OffsetDtStrings))
+#define FDT_OFFSET_MEM_RSVMAP(Fdt)  (FDT_GET_HEADER(Fdt, OffsetMemRsvmap))
+#define FDT_VERSION(Fdt)(FDT_GET_HEADER(Fdt, Version))
+#define FDT_LAST_COMP_VERSION(Fdt)  (FDT_GET_HEADER(Fdt, LastCompVersion))
+#define FDT_BOOT_CPUID_PHYS(Fdt)(FDT_GET_HEADER(Fdt, BootCpuidPhys))
+#define FDT_SIZE_DT_STRINGS(Fdt)(FDT_GET_HEADER(Fdt, SizeDtStrings))
+#define FDT_SIZE_DT_STRUCT(Fdt) (FDT_GET_HEADER(Fdt, SizeDtStruct))
+
+/**
+  Verify the header of the Flattened Device Tree
+
+  @param[in] FdtThe pointer to FDT blob.
+
+  @return Zero for successfully, otherwise failed.
+
+**/
+INT32
+EFIAPI
+FdtCheckHeader (
+  IN CONST VOID  *Fdt
+  );
+
+/**
+  Create a empty Flattened Device Tree.
+
+  @param[in] Buffer The pointer to allocate a pool for FDT blob.
+  @param[in] BufferSize The BufferSize to the pool size.
+
+  @return Zero for successfully, otherwise failed.
+
+**/
+RETURN_STATUS
+EFIAPI
+FdtCreateEmptyTree (
+  IN VOID   *Buffer,
+  IN UINTN  BufferSize
+  );
+
+/**
+  Returns a offset of next node from the given node.
+
+  @param[in] FdtThe pointer to FDT blob.
+  @param[in] Offset The offset to previous node.
+  @param[in] Depth  The depth to the level of tree hierarchy.
+
+  @return The offset to next node offset.
+
+**/
+INT32
+EFIAPI
+FdtNextNode (
+  IN CONST VOID  *Fdt,
+  IN INT32   Offset,
+  IN INT32   *Depth
+  );
+
+/**
+  Returns a offset of first node under the given node.
+
+  @param[in] FdtThe pointer to FDT blob.
+  @param[in] Offset The offset to previous node.
+
+  @return The offset to next node offset.
+
+**/
+INT32
+EFIAPI
+FdtFirstSubnode (
+  IN CONST VOID  *Fdt,
+  IN INT32   Offset
+  );
+
+/**
+  Returns a offset of next node from the given node.
+
+  @param[in] Fdt

[edk2-devel] [PATCH v3 1/3] Tianocore: Support FDT library.

2023-04-16 Thread Benny Lin
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)

Add submodule libfdt and update ReadMe for the licence.

Cc: Andrew Fish 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Signed-off-by: Benny Lin 
---
 .gitmodules  | 3 +++
 MdePkg/Library/BaseFdtLib/libfdt | 1 +
 ReadMe.rst   | 1 +
 3 files changed, 5 insertions(+)

diff --git a/.gitmodules b/.gitmodules
index fe8a43be93..b1888c3488 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -26,3 +26,6 @@
 [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"]
path = UnitTestFrameworkPkg/Library/SubhookLib/subhook
url = https://github.com/Zeex/subhook.git
+[submodule "MdePkg/Library/BaseFdtLib/libfdt"]
+   path = MdePkg/Library/BaseFdtLib/libfdt
+   url = https://github.com/devicetree-org/pylibfdt.git
diff --git a/MdePkg/Library/BaseFdtLib/libfdt b/MdePkg/Library/BaseFdtLib/libfdt
new file mode 16
index 00..cfff805481
--- /dev/null
+++ b/MdePkg/Library/BaseFdtLib/libfdt
@@ -0,0 +1 @@
+Subproject commit cfff805481bdea27f900c32698171286542b8d3c
diff --git a/ReadMe.rst b/ReadMe.rst
index 91b9cf3c5e..d46c534229 100644
--- a/ReadMe.rst
+++ b/ReadMe.rst
@@ -96,6 +96,7 @@ that are covered by additional licenses.
 -  `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest 
`__
 -  `UnitTestFrameworkPkg/Library/SubhookLib/subhook 
`__
 -  `RedfishPkg/Library/JsonLib/jansson 
`__
+-  `MdePkg/Library/BaseFdtLib/libfdt 
`__
 
 The EDK II Project is composed of packages. The maintainers for each package
 are listed in `Maintainers.txt `__.
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103071): https://edk2.groups.io/g/devel/message/103071
Mute This Topic: https://groups.io/mt/98313202/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 0/3] Support FDT library.

2023-04-16 Thread Benny Lin
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
and refer to LibcLib implementation by Pedro.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Sean Brogan 
Cc: Michael Kubacki 
Acked-by: Pedro Falcato 
Signed-off-by: Benny Lin 

Benny Lin (3):
  Tianocore: Support FDT library.
  MdePkg: Support FDT library.
  .pytool: Support FDT library.

 .gitmodules   |   3 +
 .pytool/CISettings.py |   2 +
 MdePkg/Include/Library/FdtLib.h   | 314 
 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 +
 MdePkg/Library/BaseFdtLib/FdtLib.c| 301 +++
 MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 ++
 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 +++
 MdePkg/Library/BaseFdtLib/libfdt  |   1 +
 MdePkg/Library/BaseFdtLib/limits.h|  10 +
 MdePkg/Library/BaseFdtLib/stdbool.h   |  10 +
 MdePkg/Library/BaseFdtLib/stddef.h|  10 +
 MdePkg/Library/BaseFdtLib/stdint.h|  10 +
 MdePkg/Library/BaseFdtLib/stdlib.h|  10 +
 MdePkg/Library/BaseFdtLib/string.h|  10 +
 MdePkg/MdePkg.ci.yaml |  17 +-
 MdePkg/MdePkg.dec |   4 +
 MdePkg/MdePkg.dsc |   1 +
 ReadMe.rst|   1 +
 19 files changed, 1050 insertions(+), 2 deletions(-)
 create mode 100644 MdePkg/Include/Library/FdtLib.h
 create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf
 create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni
 create mode 100644 MdePkg/Library/BaseFdtLib/FdtLib.c
 create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtSupport.h
 create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c
 create mode 16 MdePkg/Library/BaseFdtLib/libfdt
 create mode 100644 MdePkg/Library/BaseFdtLib/limits.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdbool.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stddef.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdint.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdlib.h
 create mode 100644 MdePkg/Library/BaseFdtLib/string.h

-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103070): https://edk2.groups.io/g/devel/message/103070
Mute This Topic: https://groups.io/mt/98313201/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH 2/3] ManageabilityPkg: Use SMBUS I2C instead of I2C

2023-04-16 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Sure. I was wondering to use I2C or I2c. I will update it.
Thanks
Abner

> -Original Message-
> From: Attar, AbdulLateef (Abdul Lateef) 
> Sent: Monday, April 17, 2023 12:50 PM
> To: Chang, Abner ; devel@edk2.groups.io
> Cc: Isaac Oram ; Nickle Wang
> ; Tinh Nguyen
> 
> Subject: RE: [edk2-platforms][PATCH 2/3] ManageabilityPkg: Use SMBUS I2C
> instead of I2C
> 
> [AMD Official Use Only - General]
> 
> Hi Abner,
>   I think EDK2 uses the below naming convention for variables which
> are acronyms.
> First letter is capitalized, and rest all are smaller.
> Its better to rename below variables from I2C to
> I2c.
> 
> -Original Message-
> From: Chang, Abner 
> Sent: Saturday, April 15, 2023 5:27 PM
> To: devel@edk2.groups.io
> Cc: Isaac Oram ; Attar, AbdulLateef (Abdul Lateef)
> ; Nickle Wang ; Tinh
> Nguyen 
> Subject: [edk2-platforms][PATCH 2/3] ManageabilityPkg: Use SMBUS I2C
> instead of I2C
> 
> From: Abner Chang 
> 
> Signed-off-by: Abner Chang 
> Cc: Isaac Oram 
> Cc: Abdul Lateef Attar 
> Cc: Nickle Wang 
> Cc: Tinh Nguyen 
> ---
>  Features/ManageabilityPkg/ManageabilityPkg.dec | 10 +-
>  .../BaseManageabilityTransportHelper.inf   |  2 +-
>  .../BaseManageabilityTransportHelper.c | 14 +++---
>  3 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec
> b/Features/ManageabilityPkg/ManageabilityPkg.dec
> index 9a930d3e4b..3656190a70 100644
> --- a/Features/ManageabilityPkg/ManageabilityPkg.dec
> +++ b/Features/ManageabilityPkg/ManageabilityPkg.dec
> @@ -32,13 +32,13 @@
># Manageability Transport Interface type
>#
># Manageability Transport KCS
> -  gManageabilityTransportKcsGuid= { 0x5A6E64E9, 0xFD47, 0x4086, { 0xAA,
> 0xB0, 0x7A, 0x5F, 0xD7, 0x6B, 0x02, 0x2E } }
> -  # Manageability Transport I2C
> -  gManageabilityTransportI2CGuid= { 0x5B174658, 0x8263, 0x4CB8, { 0xA0,
> 0x0F, 0xD6, 0x82, 0xE6, 0xBC, 0x74, 0x93 } }
> Change to I2c
> +  gManageabilityTransportKcsGuid  = { 0x5A6E64E9, 0xFD47, 0x4086,
> { 0xAA, 0xB0, 0x7A, 0x5F, 0xD7, 0x6B, 0x02, 0x2E } }
> +  # Manageability Transport SMBUS I2C
> +  gManageabilityTransportSmbusI2CGuid = { 0x5B174658, 0x8263, 0x4CB8,
> { 0xA0, 0x0F, 0xD6, 0x82, 0xE6, 0xBC, 0x74, 0x93 } }
> Change to I2c
># Manageability Transport PCI VDM
> -  gManageabilityTransportPciVdmGuid = { 0x388021A7, 0xFB59, 0x4811,
> { 0x9D, 0xA7, 0xD5, 0x63, 0x7D, 0x04, 0xA7, 0x2F } }
> +  gManageabilityTransportPciVdmGuid   = { 0x388021A7, 0xFB59, 0x4811,
> { 0x9D, 0xA7, 0xD5, 0x63, 0x7D, 0x04, 0xA7, 0x2F } }
># Manageability Transport MCTP
> -  gManageabilityTransportMctpGuid   = { 0x6798448D, 0x1200, 0x4577, { 0x82,
> 0x50, 0xA9, 0x83, 0xBA, 0x2B, 0x45, 0xD9 } }
> +  gManageabilityTransportMctpGuid = { 0x6798448D, 0x1200, 0x4577,
> { 0x82, 0x50, 0xA9, 0x83, 0xBA, 0x2B, 0x45, 0xD9 } }
> 
># Manageability Protocol Specification
>#
> diff --git
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.inf
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.inf
> index 95c3362ddb..8876e36480 100644
> ---
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.inf
> +++
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.inf
> @@ -32,7 +32,7 @@
> 
>  [Guids]
>gManageabilityTransportKcsGuid
> -  gManageabilityTransportI2CGuid
> +  gManageabilityTransportSmbusI2CGuid
> Change to I2c
>gManageabilityTransportPciVdmGuid
>gManageabilityTransportMctpGuid
>gManageabilityProtocolIpmiGuid
> diff --git
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.c
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.c
> index 81da209764..6454f32670 100644
> ---
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.c
> +++
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib
> /BaseManageabilityTransportHelper.c
> @@ -15,13 +15,13 @@
>  // Make sure the global variables added here should be unchangable.
>  //
>  MANAGEABILITY_SPECIFICATION_NAME  ManageabilitySpecNameTable[] =
> {
> -  { ,L"KCS" },
> -  { ,L"I2C" },
> -  { , L"PCI VDM" },
> -  { ,   L"MCTP"},
> -  { ,L"IPMI"},
> -  { ,L"MCTP"},
> -  { ,L"PLDM"}
> +  { , L"KCS"  },
> +  { ,L"SMBUS I2C"},
> Change to I2c
> +  { ,  L"PCI VDM"  },
> +  { ,L"MCTP" },
> +  { , L"IPMI" },
> +  { , L"MCTP" },
> +  { , L"PLDM" }
>  };
> 
>  UINT16  mManageabilitySpecNum = sizeof (ManageabilitySpecNameTable)/
> sizeof 

[edk2-devel] [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly

2023-04-16 Thread cbduggap
From: "Duggapu, Chinni B" 

https://bugzilla.tianocore.org/show_bug.cgi?id=4412

After shrinking the FSP (FV) component using FMMT, Image size
in FSP info header is not in sync with the FV length in FV header.
This enhancement helps to patch the FSP image size offset with
correct length & can be used to patch any offset directly on
the FSP Component Fd.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Star Zeng 
Cc: Ted Kuo 
Signed-off-by: Duggapu Chinni B 
---
 IntelFsp2Pkg/Tools/PatchFv.py | 14 -
 .../Tools/UserManuals/PatchFvUserManual.md| 20 +++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
index eb130049b5..73ab877c71 100644
--- a/IntelFsp2Pkg/Tools/PatchFv.py
+++ b/IntelFsp2Pkg/Tools/PatchFv.py
@@ -165,6 +165,17 @@ class Symbols:
 if not os.path.isdir(fvDir):
 raise Exception ("'%s' is not a valid directory!" % fvDir)
 
+#
+# if user provided fd name as a input, skip rest of the flow to
+# patch fd directly
+#
+fdFile =  os.path.join(fvDir,fvNames + ".fd")
+if os.path.exists(fdFile):
+print("Tool identified Fd file as a input to patch '%s'" %fdFile)
+self.fdFile = fdFile
+self.fdSize = os.path.getsize(fdFile)
+return 0
+
 #
 # If the Guid.xref is not existing in fvDir, then raise an exception
 #
@@ -848,8 +859,9 @@ class Symbols:
 #  Print out the usage
 #
 def Usage():
-print ("PatchFv Version 0.50")
+print ("PatchFv Version 0.60")
 print ("Usage: \n\tPatchFv FvBuildDir 
[FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")
+print ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")
 
 def main():
 #
diff --git a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md 
b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
index 5f1031e729..f28eedf625 100644
--- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
+++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
@@ -1,6 +1,7 @@
 #Name
 **_PatchFv.py_** - The python script that patches the firmware volumes (**FV**)
 with in the flash device (**FD**) file post FSP build.
+From version 0.60, script is capable of patching flash device (**FD**) 
directly.
 
 #Synopsis
 
@@ -10,6 +11,12 @@ PatchFv FvBuildDir [FvFileBaseNames:]FdFileBaseNameToPatch 
["Offset, Value"]+
   | ["Offset, Value, $Command"]+
   | ["Offset, Value, $Command, @Comment"]+
 ```
+```
+PatchFv FdFileDir FdFileName ["Offset, Value"]+
+  | ["Offset, Value, @Comment"]+
+  | ["Offset, Value, $Command"]+
+  | ["Offset, Value, $Command, @Comment"]+
+```
 
 #Description
 The **_PatchFv.py_** tool allows the developer to fix up FD images to follow 
the
@@ -102,6 +109,19 @@ ModuleGuid:Offset
   < > Convert absolute address  into an image offset (expr & FSP_SIZE)
 
 ```
+From version 0.60 tool allows to pass flash device file path as Argument 1 and
+flash device name as Argument 2 and rules for passing offset & value are same
+as explained in the previous sections.
+
+Example usage:
+Argument 1
+```
+ YouPlatformFspBinPkg\
+```
+Argument 2
+```
+ Fsp_Rebased_T
+```
 
 ###Special Commands:
 Special commands must use the **$** symbol as a prefix to the command itself.
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103068): https://edk2.groups.io/g/devel/message/103068
Mute This Topic: https://groups.io/mt/98312628/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2023-04-16 Thread Tinh Nguyen via groups.io

Hi Abner,

On 17/04/2023 10:01, Chang, Abner wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please 
be mindful of safe email handling and proprietary information protection 
practices.]


[AMD Official Use Only - General]




-Original Message-
From: Tinh Nguyen 
Sent: Monday, April 17, 2023 10:25 AM
To: Chang, Abner ; Nickle Wang
; devel@edk2.groups.io
Cc: Isaac Oram ; Attar, AbdulLateef (Abdul Lateef)

Subject: Re: [edk2-platforms][PATCH] ManageabilityPkg: add support for the
phosphor ipmi blob transfer protocol

Caution: This message originated from an External Source. Use proper
caution when opening attachments, clicking links, or responding.


On 4/16/2023 5:50 PM, Chang, Abner wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender.

Please be mindful of safe email handling and proprietary information
protection practices.]


[AMD Official Use Only - General]

Tink and Nickle,
Two feedbacks in below,


-Original Message-
From: Tinh Nguyen
Sent: Sunday, April 16, 2023 6:29 PM
To: Nickle Wang;devel@edk2.groups.io
Cc: Chang, Abner; Isaac Oram
; Attar, AbdulLateef (Abdul Lateef)

Subject: Re: [edk2-platforms][PATCH] ManageabilityPkg: add support for

the

phosphor ipmi blob transfer protocol

Caution: This message originated from an External Source. Use proper
caution when opening attachments, clicking links, or responding.


Hi Nickle,

Please find my inline comments below

On 4/12/2023 10:17 AM, Nickle Wang wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender.

Please be mindful of safe email handling and proprietary information
protection practices.]

This change implements the blob transfer protocol used in OpenBmc
documented here:https://github.com/openbmc/phosphor-ipmi-blobs

Signed-off-by: Nick Ramirez
Cc: Abner Chang
Cc: Isaac Oram
Cc: Abdul Lateef Attar
Cc: Nickle Wang
Cc: Tinh Nguyen
---
.../ManageabilityPkg/ManageabilityPkg.dec |6 +
.../Include/Dsc/Manageability.dsc |4 +-
.../IpmiBlobTransferDxe.inf   |   39 +
.../IpmiBlobTransferTestUnitTestsHost.inf |   40 +
.../Include/Protocol/IpmiBlobTransfer.h   |  136 ++
.../InternalIpmiBlobTransfer.h|  363 ++
.../IpmiBlobTransferDxe/IpmiBlobTransferDxe.c |  799 
.../UnitTest/IpmiBlobTransferTestUnitTests.c  | 1113

+

.../Universal/IpmiBlobTransferDxe/Readme.md   |   24 +
9 files changed, 2523 insertions(+), 1 deletion(-)
create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransf

erDxe.inf

create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBl

obTransferTestUnitTestsHost.inf

create mode 100644

Features/ManageabilityPkg/Include/Protocol/IpmiBlobTransfer.h

create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/InternalIpmiBlo

bTransfer.h

create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransf

erDxe.c

create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBl

obTransferTestUnitTests.c

create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/Readme.md

diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec

b/Features/ManageabilityPkg/ManageabilityPkg.dec

index 9a930d3e4b..e2d650 100644
--- a/Features/ManageabilityPkg/ManageabilityPkg.dec
+++ b/Features/ManageabilityPkg/ManageabilityPkg.dec
@@ -4,6 +4,7 @@
# those are related to the platform management.
#
# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights

reserved.

+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights

reserved.

# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
@@ -48,3 +49,8 @@
  gManageabilityProtocolMctpGuid= { 0x76FED8F1, 0x0BE5, 0x4269,

{ 0xA3, 0x1A, 0x38, 0x0F, 0x54, 0xF1, 0xA1, 0x8A } }

  # Manageability Protocol PLDM
  gManageabilityProtocolPldmGuid= { 0x3958090D, 0x69DD, 0x4868,

{ 0x9C, 0x41, 0xC9, 0xAC, 0x31, 0xB5, 0x25, 0xC5 } }

+
+[Protocols]
+
+  ## Include/Protocol/IpmiBlobTransfer.h
+  gEdkiiIpmiBlobTransferProtocolGuid = { 0x05837c75, 0x1d65, 0x468b,

{ 0xb1, 0xc2, 0x81, 0xaf, 0x9a, 0x31, 0x5b, 0x2c } }

diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc

b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc

index 0d868fdf4a..111d6b91dc 100644
--- a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
+++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
@@ -2,11 +2,13 @@
# Common libraries for Manageabilty Package
#
# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights

reserved.

+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights

reserved.

# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[LibraryClasses]



Re: [edk2-devel] [edk2-platforms][PATCH] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2023-04-16 Thread Tinh Nguyen via groups.io



On 4/16/2023 5:50 PM, Chang, Abner wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please 
be mindful of safe email handling and proprietary information protection 
practices.]


[AMD Official Use Only - General]

Tink and Nickle,
Two feedbacks in below,


-Original Message-
From: Tinh Nguyen
Sent: Sunday, April 16, 2023 6:29 PM
To: Nickle Wang;devel@edk2.groups.io
Cc: Chang, Abner; Isaac Oram
; Attar, AbdulLateef (Abdul Lateef)

Subject: Re: [edk2-platforms][PATCH] ManageabilityPkg: add support for the
phosphor ipmi blob transfer protocol

Caution: This message originated from an External Source. Use proper
caution when opening attachments, clicking links, or responding.


Hi Nickle,

Please find my inline comments below

On 4/12/2023 10:17 AM, Nickle Wang wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender.

Please be mindful of safe email handling and proprietary information
protection practices.]

This change implements the blob transfer protocol used in OpenBmc
documented here:https://github.com/openbmc/phosphor-ipmi-blobs

Signed-off-by: Nick Ramirez
Cc: Abner Chang
Cc: Isaac Oram
Cc: Abdul Lateef Attar
Cc: Nickle Wang
Cc: Tinh Nguyen
---
   .../ManageabilityPkg/ManageabilityPkg.dec |6 +
   .../Include/Dsc/Manageability.dsc |4 +-
   .../IpmiBlobTransferDxe.inf   |   39 +
   .../IpmiBlobTransferTestUnitTestsHost.inf |   40 +
   .../Include/Protocol/IpmiBlobTransfer.h   |  136 ++
   .../InternalIpmiBlobTransfer.h|  363 ++
   .../IpmiBlobTransferDxe/IpmiBlobTransferDxe.c |  799 
   .../UnitTest/IpmiBlobTransferTestUnitTests.c  | 1113

+

   .../Universal/IpmiBlobTransferDxe/Readme.md   |   24 +
   9 files changed, 2523 insertions(+), 1 deletion(-)
   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransf
erDxe.inf

   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBl
obTransferTestUnitTestsHost.inf

   create mode 100644

Features/ManageabilityPkg/Include/Protocol/IpmiBlobTransfer.h

   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/InternalIpmiBlo
bTransfer.h

   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransf
erDxe.c

   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBl
obTransferTestUnitTests.c

   create mode 100644

Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/Readme.md

diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec

b/Features/ManageabilityPkg/ManageabilityPkg.dec

index 9a930d3e4b..e2d650 100644
--- a/Features/ManageabilityPkg/ManageabilityPkg.dec
+++ b/Features/ManageabilityPkg/ManageabilityPkg.dec
@@ -4,6 +4,7 @@
   # those are related to the platform management.
   #
   # Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights

reserved.

   # SPDX-License-Identifier: BSD-2-Clause-Patent
   #
   ##
@@ -48,3 +49,8 @@
 gManageabilityProtocolMctpGuid= { 0x76FED8F1, 0x0BE5, 0x4269,

{ 0xA3, 0x1A, 0x38, 0x0F, 0x54, 0xF1, 0xA1, 0x8A } }

 # Manageability Protocol PLDM
 gManageabilityProtocolPldmGuid= { 0x3958090D, 0x69DD, 0x4868,

{ 0x9C, 0x41, 0xC9, 0xAC, 0x31, 0xB5, 0x25, 0xC5 } }

+
+[Protocols]
+
+  ## Include/Protocol/IpmiBlobTransfer.h
+  gEdkiiIpmiBlobTransferProtocolGuid = { 0x05837c75, 0x1d65, 0x468b,

{ 0xb1, 0xc2, 0x81, 0xaf, 0x9a, 0x31, 0x5b, 0x2c } }

diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc

b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc

index 0d868fdf4a..111d6b91dc 100644
--- a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
+++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
@@ -2,11 +2,13 @@
   # Common libraries for Manageabilty Package
   #
   # Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights

reserved.

   # SPDX-License-Identifier: BSD-2-Clause-Patent
   #
   ##
   [LibraryClasses]


ManageabilityTransportHelperLib|ManageabilityPkg/Library/BaseManageabi
lityTransportHelperLib/BaseManageabilityTransportHelper.inf

+

IpmiLib|MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiPr
otocol.inf

   [LibraryClasses.ARM, LibraryClasses.AARCH64]
 #
@@ -22,4 +24,4 @@
   [Components.X64]
 ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf
 ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocolSmm.inf
-
+

ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf

diff --git

a/Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTran
sferDxe.inf
b/Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTran
sferDxe.inf

new file mode 100644
index 00..28e9d293c1
--- /dev/null
+++


[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, April 17, 2023 #cal-reminder

2023-04-16 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, April 17, 2023
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://github.com/tianocore/edk2/discussions/2614

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1868164 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103064): https://edk2.groups.io/g/devel/message/103064
Mute This Topic: https://groups.io/mt/98308919/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 1/1] edk2: Add .git-blame-ignore-revs file

2023-04-16 Thread Rebecca Cran
Pushed as 
https://github.com/tianocore/edk2/commit/6ded9f50c3aa123fe581c42ff6c03789b9b593c1 
.



--
Rebecca Cran


On 12/16/22 15:35, Michael D Kinney wrote:

Hi Pedro,

This is great feature.  We may have some other big changes
in our git history that we may want to have an option to ignore
when using git blame.

There is a git configuration script in BaseTools/Scripts.
We can also consider adding this git config command there.

Reviewed-by: Michael D Kinney 

Thanks,

Mike


-Original Message-
From: devel@edk2.groups.io  On Behalf Of Pedro Falcato
Sent: Friday, December 16, 2022 12:31 PM
To: devel@edk2.groups.io
Cc: Pedro Falcato ; Andrew Fish ; Leif 
Lindholm ;
Kinney, Michael D 
Subject: [edk2-devel] [PATCH 1/1] edk2: Add .git-blame-ignore-revs file

Add a .git-blame-ignore-revs file containing the hashes of every
uncrustify format commit as retrieved in:
git log --oneline --no-abbrev-commit  | grep "uncrustify"

This file can be used by tools (such as GitHub[1]) to ignore
certain revisions when git blame-ing a file.

It can also be trivially usable locally by doing something akin
to:
git config blame.ignoreRevsFile .git-blame-ignore-revs

It may also be desirable in the future to add more commits to it.

Signed-off-by: Pedro Falcato 
Cc: Andrew Fish 
Cc: Leif Lindholm 
Cc: Michael D Kinney 

[1]: 
https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/
---
  .git-blame-ignore-revs | 52 ++
  1 file changed, 52 insertions(+)
  create mode 100644 .git-blame-ignore-revs

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index ..842f198baef9
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,52 @@
+# PrmPkg: Apply uncrustify changes
+a298a84478053872ed9da660a75f182ce81b8ddc
+# UnitTestFrameworkPkg: Apply uncrustify changes
+7c0ad2c33810ead45b7919f8f8d0e282dae52e71
+# UefiPayloadPkg: Apply uncrustify changes
+e5efcf8be8a1bf59aa98875787475e3144ee4cef
+# UefiCpuPkg: Apply uncrustify changes
+053e878bfb5c9d5eca779789b62891add30b14ba
+# StandaloneMmPkg: Apply uncrustify changes
+91415a36ae7aaeabb2bbab3762f39544f9aed683
+# SourceLevelDebugPkg: Apply uncrustify changes
+c1e126b1196de75e0a4cda21e4551ea9bb05e059
+# SignedCapsulePkg: Apply uncrustify changes
+b87864896714cf3062a7bc6d577d8fbd62d105e5
+# ShellPkg: Apply uncrustify changes
+47d20b54f9a65b08aa602a1866c1b59a69088dfc
+# SecurityPkg: Apply uncrustify changes
+c411b485b63a671a1e276700cff025c73997233c
+# RedfishPkg: Apply uncrustify changes
+39de741e2dcb8f11e9b4438e37224797643d8451
+# PcAtChipsetPkg: Apply uncrustify changes
+5220bd211df890f2672c23c050082862cd1e82d6
+# OvmfPkg: Apply uncrustify changes
+ac0a286f4d747a4c6c603a7b225917293cbe1e9f
+# NetworkPkg: Apply uncrustify changes
+d1050b9dff1cace252aff86630bfdb59dff5f507
+# MdePkg: Apply uncrustify changes
+2f88bd3a1296c522317f1c21377876de63de5be7
+# MdeModulePkg: Apply uncrustify changes
+1436aea4d5707e672672a11bda72be2c63c936c3
+# IntelFsp2WrapperPkg: Apply uncrustify changes
+7c7184e201a90a1d2376e615e55e3f4074731468
+# IntelFsp2Pkg: Apply uncrustify changes
+111f2228ddf487b0ac3491e416bb3dcdcfa4f979
+# FmpDevicePkg: Apply uncrustify changes
+45ce0a67bb4ee80f27da93777c623f51f344f23b
+# FatPkg: Apply uncrustify changes
+bcdcc4160d7460c46c08c9395aae81be44ef23a9
+# EmulatorPkg: Apply uncrustify changes
+a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97
+# EmbeddedPkg: Apply uncrustify changes
+e7108d0e9655b1795c94ac372b0449f28dd907df
+# DynamicTablesPkg: Apply uncrustify changes
+731c67e1d77b7741a91762d17659fc9fbcb9e305
+# CryptoPkg: Apply uncrustify changes
+7c342378317039e632d9a1a5d4cf7c21aec8cb7a
+# ArmVirtPkg: Apply uncrustify changes
+2b16a4fb91b9b31c0d152588f5ac51080c6c0763
+# ArmPlatformPkg: Apply uncrustify changes
+40b0b23ed34f48c26d711d3e4613a4bb35eeadff
+# ArmPkg: Apply uncrustify changes
+429309e0c6b74792d679681a8edd0d5ae0ff850c
--
2.39.0














-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103063): https://edk2.groups.io/g/devel/message/103063
Mute This Topic: https://groups.io/mt/95718130/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 13/13] BaseTools/Conf/tools_def.template: Bump VERSION to 3.00

2023-04-16 Thread Rebecca Cran
Bump VERSION to 3.00 and explain the changes made to the toolchains.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Conf/tools_def.template | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 413087676b73..5f859b379610 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -15,8 +15,13 @@
 #
 # 2.00 - Initial version with changes for CI
 #  - Change RC path to use plugin
+# 3.00 - Update toolchains
+#  - Add support for ARM and AARCH64 to CLANGDWARF
+#  - Remove VS2008, VS2010, VS2012, VS2013, CLANG35, CLANG38, EBC
+#  - Add GCC and GCCNOLTO
+#  - Deprecate GCC48, GCC49 and GCC5.
 #
-#!VERSION=2.00
+#!VERSION=3.00
 
 IDENTIFIER = Default TOOL_CHAIN_CONF
 
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103062): https://edk2.groups.io/g/devel/message/103062
Mute This Topic: https://groups.io/mt/98302352/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 12/13] BaseTools/Conf/tools_def.template: Add section for deprecated toolchains

2023-04-16 Thread Rebecca Cran
In order to make it clear for anyone reading tools_def.template, add
a section for deprecated tool chains and move GCC48, GCC49 and GCC5
into it.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Conf/tools_def.template | 31 +++-
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 615d02f8ad9c..413087676b73 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -156,19 +156,13 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 #Note:
 # Building of XIP firmware images for ARM/ARM64 is 
not currently supported (only applications).
 # /FILEALIGN:4096 and other changes are needed for 
ARM firmware builds.
-#   GCC48   -Linux,Windows-  Requires:
-# GCC 4.8 targeting x86_64-linux-gnu, 
aarch64-linux-gnu, or arm-linux-gnueabi
-#Optional:
-# Required to build platforms or ACPI tables:
-#   Intel(r) ACPI Compiler from
-#   https://acpica.org/downloads
-#   GCC49   -Linux,Windows-  Requires:
+#   GCCNOLTO-Linux,Windows-  Requires:
 # GCC 4.9 targeting x86_64-linux-gnu, 
aarch64-linux-gnu, or arm-linux-gnueabi
 #Optional:
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler from
 #   https://acpica.org/downloads
-#   GCC5-Linux,Windows-  Requires:
+#   GCC -Linux,Windows-  Requires:
 # GCC 5 with LTO support, targeting 
x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabi, riscv64-linux-gnu or 
loongarch64-linux-gnu
 #Optional:
 # Required to build platforms or ACPI tables:
@@ -196,6 +190,27 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 #   Intel(r) ACPI Compiler (iasl.exe) from
 #   https://acpica.org/downloads
 #
+# Deprecated Tool Chains
+# ==
+#   GCC48   -Linux,Windows-  Requires:
+# GCC 4.8 targeting x86_64-linux-gnu, 
aarch64-linux-gnu, or arm-linux-gnueabi
+#Optional:
+# Required to build platforms or ACPI tables:
+#   Intel(r) ACPI Compiler from
+#   https://acpica.org/downloads
+#   GCC49   -Linux,Windows-  Requires:
+# GCC 4.9 targeting x86_64-linux-gnu, 
aarch64-linux-gnu, or arm-linux-gnueabi
+#Optional:
+# Required to build platforms or ACPI tables:
+#   Intel(r) ACPI Compiler from
+#   https://acpica.org/downloads
+#   GCC5-Linux,Windows-  Requires:
+# GCC 5 with LTO support, targeting 
x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabi, riscv64-linux-gnu or 
loongarch64-linux-gnu
+#Optional:
+# Required to build platforms or ACPI tables:
+#   Intel(r) ACPI Compiler from
+#   https://acpica.org/downloads
+#
 

 

 #
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103061): https://edk2.groups.io/g/devel/message/103061
Mute This Topic: https://groups.io/mt/98302351/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 11/13] BaseTools: Add a deprecation warning for GCC48,GCC49,GCC5 to build.py

2023-04-16 Thread Rebecca Cran
The GCC48, GCC49 and GCC5 toolchains will be deleted in the coming
months. Inform users that they're deprecated and tell them what replaces
them.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Source/Python/build/build.py | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 8681b98776a9..61f66e7b04d7 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -64,6 +64,8 @@ from AutoGen.IncludesAutoGen import IncludesAutoGen
 from GenFds.GenFds import resetFdsGlobalVariable
 from AutoGen.AutoGen import CalculatePriorityValue
 
+gDeprecatedToolChains = ['GCC48', 'GCC49', 'GCC5']
+
 ## standard targets of build command
 gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 
'clean', 'cleanall', 'cleanlib', 'run']
 
@@ -898,6 +900,12 @@ class Build():
 for BuildTarget in self.BuildTargetList:
 GlobalData.gGlobalDefines['TARGET'] = BuildTarget
 for BuildToolChain in self.ToolChainList:
+if BuildToolChain in gDeprecatedToolChains:
+EdkLogger.warn("build", "Toolchain " + BuildToolChain + \
+" is deprecated and will be removed before the 
edk2-stable202402 release. " \
+"You should use 'GCCNOLTO' instead of 'GCC49', and 
'GCC' instead of 'GCC5'")
+time.sleep(2)
+
 GlobalData.gGlobalDefines['TOOLCHAIN']  = BuildToolChain
 GlobalData.gGlobalDefines['TOOL_CHAIN_TAG'] = BuildToolChain
 for BuildArch in self.ArchList:
@@ -2768,6 +2776,12 @@ def Main():
 if not BuildError:
 MyBuild.BuildReport.GenerateReport(BuildDurationStr, 
LogBuildTime(MyBuild.AutoGenTime), LogBuildTime(MyBuild.MakeTime), 
LogBuildTime(MyBuild.GenFdsTime))
 
+if any(tc in Option.ToolChain for tc in gDeprecatedToolChains):
+EdkLogger.warn("build", "Toolchains " + str(gDeprecatedToolChains) + " 
are " \
+"deprecated and will be removed before the edk2-stable202402 
release. " \
+"You should use 'GCCNOLTO' instead of 'GCC49', and 'GCC' instead 
of 'GCC5'.")
+time.sleep(2)
+
 EdkLogger.SetLevel(EdkLogger.QUIET)
 EdkLogger.quiet("\n- %s -" % Conclusion)
 EdkLogger.quiet(time.strftime("Build end time: %H:%M:%S, %b.%d %Y", 
time.localtime()))
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103060): https://edk2.groups.io/g/devel/message/103060
Mute This Topic: https://groups.io/mt/98302350/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 10/13] BaseTools: Only call LoadConfiguration once in build.py

2023-04-16 Thread Rebecca Cran
Avoid calling LoadConfiguration twice, in both InitPreBuild and
InitBuild. Since InitPreBuild is called first, delete the second call
from InitBuild.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Source/Python/build/build.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 51fb1f433eb7..8681b98776a9 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1002,9 +1002,6 @@ class Build():
 #   command line and target.txt, then get the final build configurations.
 #
 def InitBuild(self):
-# parse target.txt, tools_def.txt, and platform file
-self.LoadConfiguration()
-
 # Allow case-insensitive for those from command line or configuration 
file
 ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False)
 if ErrorCode != 0:
@@ -1012,6 +1009,7 @@ class Build():
 
 
 def InitPreBuild(self):
+# parse target.txt, tools_def.txt, and platform file
 self.LoadConfiguration()
 ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False)
 if ErrorCode != 0:
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103059): https://edk2.groups.io/g/devel/message/103059
Mute This Topic: https://groups.io/mt/98302349/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 09/13] BaseTools/Conf/tools_def.template: Add GCC and GCCNOLTO toolchains

2023-04-16 Thread Rebecca Cran
Add a 'GCC' toolchain that's a copy of the existing GCC5 definition.
Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC48
toolchain.

Signed-off-by: Rebecca Cran 
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc |   2 +
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc   |   9 +-
 EmulatorPkg/Unix/Host/Host.inf|   2 +
 BaseTools/Conf/tools_def.template | 366 

 4 files changed, 378 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index 7866c36e6693..b24ecdbf8661 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -31,6 +31,8 @@ [BuildOptions]
 !endif
   GCC:*_GCC5_*_CC_FLAGS = --coverage
   GCC:*_GCC5_*_DLINK_FLAGS = --coverage
+  GCC:*_GCC_*_CC_FLAGS = --coverage
+  GCC:*_GCC_*_DLINK_FLAGS = --coverage
 [BuildOptions.common.EDKII.HOST_APPLICATION]
   #
   # MSFT
diff --git a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc 
b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
index 31558121185d..2db3854274c8 100644
--- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
+++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
@@ -461,10 +461,17 @@ [Components.IA32]
 
###
 [BuildOptions]
 # Append build options for EDK and EDKII drivers (= is Append, == is Replace)
-  # Enable link-time optimization when building with GCC49
+  # Enable link-time optimization when building with GCC49 or GCCNOLTO
   *_GCC49_IA32_CC_FLAGS = -flto
   *_GCC49_IA32_DLINK_FLAGS = -flto
+  *_GCCNOLTO_IA32_CC_FLAGS = -flto
+  *_GCCNOLTO_IA32_DLINK_FLAGS = -flto
   *_GCC5_IA32_CC_FLAGS = -fno-pic
   *_GCC5_IA32_DLINK_FLAGS = -no-pie
   *_GCC5_IA32_ASLCC_FLAGS = -fno-pic
   *_GCC5_IA32_ASLDLINK_FLAGS = -no-pie
+  *_GCC_IA32_CC_FLAGS = -fno-pic
+  *_GCC_IA32_DLINK_FLAGS = -no-pie
+  *_GCC_IA32_ASLCC_FLAGS = -fno-pic
+  *_GCC_IA32_ASLDLINK_FLAGS = -no-pie
+
diff --git a/EmulatorPkg/Unix/Host/Host.inf b/EmulatorPkg/Unix/Host/Host.inf
index f5ebbed68344..90e8c36b6186 100644
--- a/EmulatorPkg/Unix/Host/Host.inf
+++ b/EmulatorPkg/Unix/Host/Host.inf
@@ -123,7 +123,9 @@ [BuildOptions]
GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall 
-malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h 
-DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
+   GCC:*_GCCNOLTO_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto 
-DUSING_LTO -Os
+   GCC:*_GCC_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto 
-DUSING_LTO -Os
GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include 
$(DEST_DIR_DEBUG)/AutoGen.h
GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros 
$(DEST_DIR_DEBUG)/AutoGen.h
 
diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 56297637d1c2..615d02f8ad9c 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -77,8 +77,13 @@ DEFINE GCC48_X64_PREFIX= ENV(GCC48_BIN)
 DEFINE GCC49_IA32_PREFIX   = ENV(GCC49_BIN)
 DEFINE GCC49_X64_PREFIX= ENV(GCC49_BIN)
 
+DEFINE GCCNOLTO_IA32_PREFIX= ENV(GCCNOLTO_BIN)
+DEFINE GCCNOLTO_X64_PREFIX = ENV(GCCNOLTO_BIN)
+
 DEFINE GCC5_IA32_PREFIX= ENV(GCC5_BIN)
 DEFINE GCC5_X64_PREFIX = ENV(GCC5_BIN)
+DEFINE GCC_IA32_PREFIX = ENV(GCC_BIN)
+DEFINE GCC_X64_PREFIX  = ENV(GCC_BIN)
 DEFINE GCC_HOST_PREFIX = ENV(GCC_HOST_BIN)
 
 DEFINE UNIX_IASL_BIN   = ENV(IASL_PREFIX)iasl
@@ -1128,6 +1133,150 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z 
common-page-size=0x20
   NOOPT_GCC49_AARCH64_DLINK_FLAGS  = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0
   NOOPT_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
 
+
+#
+# GCC NOLTO - This configuration is used to compile under Linux to produce
+# PE/COFF binaries using GCC without Link Time Optimization
+#
+
+*_GCCNOLTO_*_*_FAMILY   = GCC
+
+*_GCCNOLTO_*_MAKE_PATH= DEF(GCC_HOST_PREFIX)make
+*_GCCNOLTO_*_*_DLL= ENV(GCCNOLTO_DLL)
+*_GCCNOLTO_*_ASL_PATH = DEF(UNIX_IASL_BIN)
+
+*_GCCNOLTO_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
+*_GCCNOLTO_*_ASLPP_FLAGS  = DEF(GCC_ASLPP_FLAGS)
+*_GCCNOLTO_*_ASLCC_FLAGS  = DEF(GCC_ASLCC_FLAGS)
+*_GCCNOLTO_*_VFRPP_FLAGS  = DEF(GCC_VFRPP_FLAGS)
+*_GCCNOLTO_*_APP_FLAGS=
+*_GCCNOLTO_*_ASL_FLAGS= 

[edk2-devel] [PATCH v3 07/13] BaseTools: Remove EBC (EFI Byte Code) compiler definitions

2023-04-16 Thread Rebecca Cran
The edk2-stable202302 release was the last to support building
EFI Byte Code drivers. Since the Intel EFI Byte Code Compiler is no
longer available, a decision has been made to remove support for EBC
from edk2.

Remove the definitions for Intel's EBC compiler from
Conf/tools_def.template.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 BaseTools/Conf/tools_def.template | 98 
 1 file changed, 98 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 39f17067e153..5fad1b292a60 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -67,10 +67,6 @@ DEFINE WINSDK10_BIN = 
ENV(WINSDK10_PREFIX)DEF(VS_HOST)
 DEFINE WINDDK_BIN16 = ENV(WINDDK3790_PREFIX)bin16
 DEFINE WINDDK_BINX64= ENV(WINDDK3790_PREFIX)win64\x86\amd64
 
-DEFINE EBC_BIN  = C:\Program Files\Intel\EBC\Bin
-DEFINE EBC_BINx86   = C:\Program Files (x86)\Intel\EBC\Bin
-
-
 DEFINE CYGWIN_BIN  = c:/cygwin/bin
 DEFINE CYGWIN_BINIA32  = 
c:/cygwin/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/
 DEFINE CYGWIN_BINX64   = 
c:/cygwin/opt/tiano/x86_64-pc-mingw64/x86_64-pc-mingw64/bin/
@@ -135,16 +131,12 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 # Microsoft Visual Studio 2015 Professional Edition
 # Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
 #Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler (iasl.exe) from
 #   https://acpica.org/downloads
 #   VS2017  -win32-  Requires:
 # Microsoft Visual Studio 2017 version 15.2 (15.4 
for ARM64) or later
 #Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler (iasl.exe) from
 #   https://acpica.org/downloads
@@ -154,8 +146,6 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 #   VS2019  -win32-  Requires:
 # Microsoft Visual Studio 2019 version 16.2 or 
later
 #Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler (iasl.exe) from
 #   https://acpica.org/downloads
@@ -224,22 +214,6 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 

 

 #
-# Intel EFI Byte Code Compiler (Template)
-#
-
-# *_*_EBC_*_FAMILY   = INTEL
-#
-# *_*_EBC_PP_PATH= C:\Program Files\Intel\EBC\Bin\iec.exe
-# *_*_EBC_CC_PATH= C:\Program Files\Intel\EBC\Bin\iec.exe
-# *_*_EBC_SLINK_PATH = C:\Program Files\Intel\EBC\Bin\link.exe
-#
-# *_*_EBC_SLINK_FLAGS= /lib /NOLOGO /MACHINE:EBC
-# *_*_EBC_PP_FLAGS   = /nologo /E /TC /FIAutoGen.h
-# *_*_EBC_CC_FLAGS   = /nologo /FAcs /c /W3 /WX /FIAutoGen.h
-# *_*_EBC_DLINK_FLAGS= "C:\Program 
Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /MACHINE:EBC /OPT:REF /NODEFAULTLIB 
/ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /ALIGN:32 /DRIVER
-#
-
-#
 # Intel ACPI Source Language Compiler (Template)
 #
 

@@ -354,25 +328,6 @@ NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
 RELEASE_VS2015_X64_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /IGNORE:4001 
/IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D 
/SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) 
/SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER 
/MERGE:.rdata=.data
 NOOPT_VS2015_X64_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF 
/OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 
/LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER 
/SAFESEH:NO /BASE:0 /DRIVER /DEBUG
 

[edk2-devel] [PATCH v3 08/13] BaseTools: Update VS toolchain descriptions in tools_def.txt.template

2023-04-16 Thread Rebecca Cran
Update the Visual Studio toolchain descriptions in
tools_def.txt.template:

- The WinDDK is no longer needed.
- Update 3 is required for VS 2015.
- VS 2005 has been removed.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Conf/tools_def.template | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 5fad1b292a60..56297637d1c2 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -128,8 +128,7 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 # Supported Tool Chains
 # =
 #   VS2015  -win32-  Requires:
-# Microsoft Visual Studio 2015 Professional Edition
-# Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
+# Microsoft Visual Studio 2015 Professional 
Edition, Update 3
 #Optional:
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler (iasl.exe) from
@@ -186,13 +185,11 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 #   nasm compiler from
 #   NASM -- http://www.nasm.us/
 #   VS2015x86   -win64-  Requires:
-# Microsoft Visual Studio 2015 (x86) Update 2 or 
above
-# Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
+# Microsoft Visual Studio 2015 (x86) Update 3 or 
above
 #Optional:
 # Required to build platforms or ACPI tables:
 #   Intel(r) ACPI Compiler (iasl.exe) from
 #   https://acpica.org/downloads
-# * Commented out - All versions of VS2005 use the same standard install 
directory
 #
 

 

-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103057): https://edk2.groups.io/g/devel/message/103057
Mute This Topic: https://groups.io/mt/98302345/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 06/13] BaseTools: Remove unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS defs

2023-04-16 Thread Rebecca Cran
Remove the unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS definitions
from Conf/tools_def.template.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 BaseTools/Conf/tools_def.template | 4 
 1 file changed, 4 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 782ebb3fe658..39f17067e153 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -102,10 +102,6 @@ DEFINE MSFT_ASLPP_FLAGS= /nologo /E /C /FIAutoGen.h
 DEFINE MSFT_ASLCC_FLAGS= /nologo /c /FIAutoGen.h /TC 
/Dmain=ReferenceAcpiTable
 DEFINE MSFT_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable 
/SUBSYSTEM:CONSOLE
 
-DEFINE IPHONE_TOOLS= 
/Developer/Platforms/iPhoneOS.platform/Developer
-
-DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery 
G++ Lite/bin
-
 DEFINE DTCPP_BIN   = ENV(DTCPP_PREFIX)cpp
 DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103055): https://edk2.groups.io/g/devel/message/103055
Mute This Topic: https://groups.io/mt/98302342/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 05/13] edksetup.bat: Remove VS2008-VS2013 remnants

2023-04-16 Thread Rebecca Cran
Since Visual Studio versions older than VS2015 are no longer supported,
remove mention of them from edksetup.bat.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 edksetup.bat | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/edksetup.bat b/edksetup.bat
index 7ad137bb3e9b..2fdf130e00e2 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -148,19 +148,15 @@ if /I "%1"=="ForceRebuild" shift
 if /I "%1"=="VS2019" shift
 if /I "%1"=="VS2017" shift
 if /I "%1"=="VS2015" shift
-if /I "%1"=="VS2013" shift
-if /I "%1"=="VS2012" shift
 if "%1"=="" goto end
 
 :Usage
   @echo.
-  @echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] 
[Rebuild] [ForceRebuild] [VS2019] [VS2017] [VS2015] [VS2013] [VS2012]"
+  @echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] 
[Rebuild] [ForceRebuild] [VS2019] [VS2017] [VS2015]"
   @echo.
   @echo Reconfig   Reinstall target.txt, tools_def.txt and 
build_rule.txt.
   @echo RebuildPerform incremental rebuild of BaseTools 
binaries.
   @echo ForceRebuild   Force a full rebuild of BaseTools binaries.
-  @echo VS2012 Set the env for VS2012 build.
-  @echo VS2013 Set the env for VS2013 build.
   @echo VS2015 Set the env for VS2015 build.
   @echo VS2017 Set the env for VS2017 build.
   @echo VS2019 Set the env for VS2019 build.
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103054): https://edk2.groups.io/g/devel/message/103054
Mute This Topic: https://groups.io/mt/98302338/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 04/13] MdePkg: Remove VS2008-VS2013 remnants

2023-04-16 Thread Rebecca Cran
Since Visual Studio versions older than VS2015 are no longer supported,
remove mention of them from MdePkg.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 MdePkg/Include/Ia32/ProcessorBind.h | 8 ++--
 MdePkg/Include/X64/ProcessorBind.h  | 8 ++--
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/MdePkg/Include/Ia32/ProcessorBind.h 
b/MdePkg/Include/Ia32/ProcessorBind.h
index ee39d1cfe10b..62ca7f8607d3 100644
--- a/MdePkg/Include/Ia32/ProcessorBind.h
+++ b/MdePkg/Include/Ia32/ProcessorBind.h
@@ -88,19 +88,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
   #if defined (_MSC_VER) && _MSC_VER >= 1800
 
-//
-// Disable these warnings for VS2013.
-//
-
 //
 // This warning is for potentially uninitialized local variable, and it may 
cause false
-// positive issues in VS2013 and VS2015 build
+// positive issues in VS2015 build
 //
 #pragma warning ( disable : 4701 )
 
 //
 // This warning is for potentially uninitialized local pointer variable, and 
it may cause
-// false positive issues in VS2013 and VS2015 build
+// false positive issues in VS2015 build
 //
 #pragma warning ( disable : 4703 )
 
diff --git a/MdePkg/Include/X64/ProcessorBind.h 
b/MdePkg/Include/X64/ProcessorBind.h
index f0a4d00142b9..cdbb4fd6d3d1 100644
--- a/MdePkg/Include/X64/ProcessorBind.h
+++ b/MdePkg/Include/X64/ProcessorBind.h
@@ -102,19 +102,15 @@
 
   #if defined (_MSC_VER) && _MSC_VER >= 1800
 
-//
-// Disable these warnings for VS2013.
-//
-
 //
 // This warning is for potentially uninitialized local variable, and it may 
cause false
-// positive issues in VS2013 and VS2015 build
+// positive issues in VS2015 build
 //
 #pragma warning ( disable : 4701 )
 
 //
 // This warning is for potentially uninitialized local pointer variable, and 
it may cause
-// false positive issues in VS2013 and VS2015 build
+// false positive issues in VS2015 build
 //
 #pragma warning ( disable : 4703 )
 
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103053): https://edk2.groups.io/g/devel/message/103053
Mute This Topic: https://groups.io/mt/98302337/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 03/13] BaseTools: Remove VS2008-VS2013 remnants

2023-04-16 Thread Rebecca Cran
Remove remnants of Visual Studio 2008-2013 support from
Conf/tools_def.txt and various batch scripts.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 BaseTools/Conf/tools_def.template | 12 
 BaseTools/Scripts/SetVisualStudio.bat | 22 +--
 BaseTools/Scripts/ShowEnvironment.bat | 44 --
 BaseTools/get_vsvars.bat  | 13 
 BaseTools/set_vsprefix_envs.bat   | 64 
 BaseTools/toolsetup.bat   | 24 +---
 6 files changed, 2 insertions(+), 177 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 006d03745809..782ebb3fe658 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -53,18 +53,6 @@ DEFINE RC_PATH= ENV(WINSDK_PATH_FOR_RC_EXE)\rc.exe
 DEFINE WINSDK_BIN   = ENV(WINSDK_PREFIX)
 DEFINE WINSDKx86_BIN= ENV(WINSDKx86_PREFIX)
 
-# Microsoft Visual Studio 2010
-DEFINE WINSDK7_BIN  = ENV(WINSDK7_PREFIX)
-DEFINE WINSDK7x86_BIN   = ENV(WINSDK7x86_PREFIX)
-
-# Microsoft Visual Studio 2012 Update 1 (required for rc.exe that was not 
included in the initial release)
-DEFINE WINSDK71_BIN = ENV(WINSDK71_PREFIX)
-DEFINE WINSDK71x86_BIN  = ENV(WINSDK71x86_PREFIX)
-
-# Microsoft Visual Studio 2013 Professional Edition
-DEFINE WINSDK8_BIN  = ENV(WINSDK8_PREFIX)x86\
-DEFINE WINSDK8x86_BIN   = ENV(WINSDK8x86_PREFIX)x64
-
 # Microsoft Visual Studio 2015 Professional Edition
 DEFINE WINSDK81_BIN = ENV(WINSDK81_PREFIX)x86\
 DEFINE WINSDK81x86_BIN  = ENV(WINSDK81x86_PREFIX)x64
diff --git a/BaseTools/Scripts/SetVisualStudio.bat 
b/BaseTools/Scripts/SetVisualStudio.bat
index 60d493a4110d..fba9f846effb 100755
--- a/BaseTools/Scripts/SetVisualStudio.bat
+++ b/BaseTools/Scripts/SetVisualStudio.bat
@@ -2,7 +2,7 @@
 @REM Windows batch file to set up the Microsoft Visual Studio environment
 @REM
 @REM This script is used to set up one of the Microsoft Visual Studio
-@REM environments, VS2008x86, VS2010x86, VS2012x86 or VS2013x86 for
+@REM environments, VS2015 for
 @REM building the Nt32Pkg/Nt32Pkg.dsc emulation environment to run on
 @REM an X64 version of Windows.
 @REM The system environment variables in this script are set by the
@@ -23,26 +23,6 @@ echo.
@set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\bin\x86_amd64"
@goto SetVs
 )
-
-@if defined VS120COMNTOOLS (
-   @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\bin\x86_amd64"
-   @goto SetVs
-)
-
-@if defined VS110COMNTOOLS (
-   @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\bin\x86_amd64"
-   @goto SetVs
-)
-
-@if defined VS100COMNTOOLS (
-   @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\bin\x86_amd64"
-   @goto SetVs
-)
-
-@if defined VS90COMNTOOLS (
-   @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\bin\x86_amd64"
-   @goto SetVs
-)
 @echo.
 @echo No version of Microsoft Visual Studio was found on this system
 @echo.
diff --git a/BaseTools/Scripts/ShowEnvironment.bat 
b/BaseTools/Scripts/ShowEnvironment.bat
index b91886b6a955..1301d5fcb11b 100755
--- a/BaseTools/Scripts/ShowEnvironment.bat
+++ b/BaseTools/Scripts/ShowEnvironment.bat
@@ -80,50 +80,6 @@ if defined SRC_CONF @goto SetEnv
 @goto End
 
 :CheckVsVer
-@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2008x86
-@goto :EOF
-)
-@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 9.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2008
-@goto :EOF
-)
-
-@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2010x86
-@goto :EOF
-)
-@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 10.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2010
-@goto :EOF
-)
-
-@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2012x86
-@goto :EOF
-)
-@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 11.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2012
-@goto :EOF
-)
-
-@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2013x86
-@goto :EOF
-)
-@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 12.0\"
-@if "%VSINSTALLDIR%"=="%TEST_VS%" (
-@echo TOOL_CHAIN_TAG   = VS2013
-@goto :EOF
-)
-
 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\"
 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
 @echo TOOL_CHAIN_TAG   = VS2015x86
diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat
index 

[edk2-devel] [PATCH v3 02/13] BaseTools: Remove VS2008, 2010, 2012 and 2013 toolchain definitions

2023-04-16 Thread Rebecca Cran
With recent changes, Visual Studio versions older than VS2015 are
unable to build EDK2 code.

To avoid confusion, remove VS2008, 2010, 2012 and 2013 toolchain
definitions from Conf/tools_def.template, leaving only versions that can
be used to successfully build firmware.

Signed-off-by: Rebecca Cran 
Reviewed-by: Oliver Smith-Denny 
---
 BaseTools/Conf/tools_def.template | 1005 
 1 file changed, 1005 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index b9788662b4cd..006d03745809 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -21,42 +21,6 @@
 IDENTIFIER = Default TOOL_CHAIN_CONF
 
 # common path macros
-DEFINE VS2008_BIN  = ENV(VS2008_PREFIX)Vc\bin
-DEFINE VS2008_DLL  = ENV(VS2008_PREFIX)Common7\IDE;DEF(VS2008_BIN)
-DEFINE VS2008_BINX64   = DEF(VS2008_BIN)\x86_amd64
-DEFINE VS2008_BIN64= DEF(VS2008_BIN)\x86_ia64
-
-DEFINE VS2008x86_BIN= ENV(VS2008_PREFIX)Vc\bin
-DEFINE VS2008x86_DLL= ENV(VS2008_PREFIX)Common7\IDE;DEF(VS2008x86_BIN)
-DEFINE VS2008x86_BINX64 = DEF(VS2008x86_BIN)\x86_amd64
-DEFINE VS2008x86_BIN64  = DEF(VS2008x86_BIN)\x86_ia64
-
-DEFINE VS2010_BIN  = ENV(VS2010_PREFIX)Vc\bin
-DEFINE VS2010_DLL  = ENV(VS2010_PREFIX)Common7\IDE;DEF(VS2010_BIN)
-DEFINE VS2010_BINX64   = DEF(VS2010_BIN)\x86_amd64
-DEFINE VS2010_BIN64= DEF(VS2010_BIN)\x86_ia64
-
-DEFINE VS2010x86_BIN= ENV(VS2010_PREFIX)Vc\bin
-DEFINE VS2010x86_DLL= ENV(VS2010_PREFIX)Common7\IDE;DEF(VS2010x86_BIN)
-DEFINE VS2010x86_BINX64 = DEF(VS2010x86_BIN)\x86_amd64
-DEFINE VS2010x86_BIN64  = DEF(VS2010x86_BIN)\x86_ia64
-
-DEFINE VS2012_BIN  = ENV(VS2012_PREFIX)Vc\bin
-DEFINE VS2012_DLL  = ENV(VS2012_PREFIX)Common7\IDE;DEF(VS2012_BIN)
-DEFINE VS2012_BINX64   = DEF(VS2012_BIN)\x86_amd64
-
-DEFINE VS2012x86_BIN= ENV(VS2012_PREFIX)Vc\bin
-DEFINE VS2012x86_DLL= ENV(VS2012_PREFIX)Common7\IDE;DEF(VS2012x86_BIN)
-DEFINE VS2012x86_BINX64 = DEF(VS2012x86_BIN)\x86_amd64
-
-DEFINE VS2013_BIN  = ENV(VS2013_PREFIX)Vc\bin
-DEFINE VS2013_DLL  = ENV(VS2013_PREFIX)Common7\IDE;DEF(VS2013_BIN)
-DEFINE VS2013_BINX64   = DEF(VS2013_BIN)\x86_amd64
-
-DEFINE VS2013x86_BIN= ENV(VS2013_PREFIX)Vc\bin
-DEFINE VS2013x86_DLL= ENV(VS2013_PREFIX)Common7\IDE;DEF(VS2013x86_BIN)
-DEFINE VS2013x86_BINX64 = DEF(VS2013x86_BIN)\x86_amd64
-
 DEFINE VS2015_BIN  = ENV(VS2015_PREFIX)Vc\bin
 DEFINE VS2015_DLL  = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015_BIN)
 DEFINE VS2015_BINX64   = DEF(VS2015_BIN)\x86_amd64
@@ -112,11 +76,6 @@ DEFINE WINSDK10_BIN = 
ENV(WINSDK10_PREFIX)DEF(VS_HOST)
 # are used by other toolchains.  An example is that ICC on Windows normally
 # uses Microsoft's nmake.exe.
 
-# Some MS_VS_BIN options: DEF(VS2008_BIN), DEF(VS2008x86_BIN)
-DEFINE MS_VS_BIN   = DEF(VS2008_BIN)
-# Some MS_VS_DLL options: DEF(VS2008_DLL), DEF(VS2008x86_DLL)
-DEFINE MS_VS_DLL   = DEF(VS2008_DLL)
-
 DEFINE WINDDK_BIN16 = ENV(WINDDK3790_PREFIX)bin16
 DEFINE WINDDK_BINX64= ENV(WINDDK3790_PREFIX)win64\x86\amd64
 
@@ -188,42 +147,6 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
 #
 # Supported Tool Chains
 # =
-#   VS2008  -win32-  Requires:
-# Microsoft Visual Studio 2008 Team Suite Edition
-# Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
-#Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
-# Required to build platforms or ACPI tables:
-#   Intel(r) ACPI Compiler (iasl.exe) from
-#   https://acpica.org/downloads
-#   VS2010  -win32-  Requires:
-# Microsoft Visual Studio 2010 Premium Edition
-# Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
-#Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
-# Required to build platforms or ACPI tables:
-#   Intel(r) ACPI Compiler (iasl.exe) from
-#   https://acpica.org/downloads
-#   VS2012  -win32-  Requires:
-# Microsoft Visual Studio 2012 Professional Edition
-# Microsoft Windows Server 2003 Driver Development 
Kit (Microsoft WINDDK) version 3790.1830
-#Optional:
-# Required to build EBC drivers:
-#   Intel(r) Compiler for Efi Byte Code (Intel(r) 
EBC Compiler)
-# Required to build platforms or ACPI tables:
-#  

[edk2-devel] [PATCH v3 01/13] BaseTools,CryptoPkg: Update CLANGDWARF, remove CLANG 35/38 toolchains

2023-04-16 Thread Rebecca Cran
Update the CLANGDWARF toolchain definition in tools_def.template with the
settings from CLANG38, and delete the CLANG35 and CLANG38 toolchains.

The CLANG35 and CLANG38 toolchains were added for compatibility with
ARM's proprietary clang-based toolchain. Things have since moved on, and
with the latest clang version being 16.0.0, versions 3.5 and 3.9 are
obsolete and can be removed.

Update CryptoPkg: Add CLANGDWARF and remove CLANG35 and CLANG38 compiler flags

With the removal of CLANG35 and CLANG38 and the update of the CLANGDWARF
toolchain definition in Conf/tools_def.txt update the compiler flags in
BaseCryptLib and OpensslLib.

Signed-off-by: Rebecca Cran 
---
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf |   3 +-
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf  |   3 +-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf  |   3 +-
 CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf  |   3 +-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf  |   3 +-
 CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf|   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf   |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibFull.inf |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf|   3 +-
 BaseTools/Conf/tools_def.template   | 471 

 12 files changed, 200 insertions(+), 304 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
index 5be1724f0852..d99337a9ea39 100644
--- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -110,8 +110,7 @@ [BuildOptions]
   #
   # suppress the following warnings so we do not break the build with 
warnings-as-errors:
   #
-  GCC:*_CLANG35_*_CC_FLAGS = -std=c99
-  GCC:*_CLANG38_*_CC_FLAGS = -std=c99
+  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types
 
   XCODE:*_*_*_CC_FLAGS = -std=c99
diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index 66261138a00b..5203941c75c1 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -97,8 +97,7 @@ [BuildOptions]
   #
   # suppress the following warnings so we do not break the build with 
warnings-as-errors:
   #
-  GCC:*_CLANG35_*_CC_FLAGS = -std=c99
-  GCC:*_CLANG38_*_CC_FLAGS = -std=c99
+  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types
 
   XCODE:*_*_*_CC_FLAGS = -std=c99
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
index 07dbc0e7a8bd..ea64d2aa72a9 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -106,8 +106,7 @@ [BuildOptions]
   #
   # suppress the following warnings so we do not break the build with 
warnings-as-errors:
   #
-  GCC:*_CLANG35_*_CC_FLAGS = -std=c99
-  GCC:*_CLANG38_*_CC_FLAGS = -std=c99
+  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types
 
   XCODE:*_*_*_CC_FLAGS = -std=c99
diff --git a/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
index 4ad59b7bbc59..426cab2c5c8f 100644
--- a/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
@@ -81,8 +81,7 @@ [BuildOptions]
   #
   # suppress the following warnings so we do not break the build with 
warnings-as-errors:
   #
-  GCC:*_CLANG35_*_CC_FLAGS = -std=c99
-  GCC:*_CLANG38_*_CC_FLAGS = -std=c99
+  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types
 
   XCODE:*_*_*_CC_FLAGS = -std=c99
diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
index ab1993087167..df345a8996e0 100644
--- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -105,6 +105,5 @@ [BuildOptions]
 
   XCODE:*_*_*_CC_FLAGS = -mmmx -msse -std=c99
 
-  GCC:*_CLANG35_*_CC_FLAGS = -std=c99
-  GCC:*_CLANG38_*_CC_FLAGS = -std=c99
+  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types
diff --git a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
index 80261794470f..1f0f11c22cc5 100644
--- a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
@@ -78,8 +78,7 @@ [BuildOptions]
 

[edk2-devel] [PATCH v3 00/13] BaseTools,CryptoPkg,EmulatorPkg,MdePkg,others: Delete CLANG35,CLANG38,VS2008-2013,EBC, deprecate GCC48,GCC49,GCC5, add GCC and GCCNOLTO, update CLANGDWARF

2023-04-16 Thread Rebecca Cran
Update the toolchain definitions:

- Delete the CLANG35 and CLANG38 toolchains, and replace CLANG38 with
  CLANGDWARF, updating it to support ARM and AARCH64 in addition to X64
and IA32.

- Mark GCC48, GCC49 and GCC5 as deprecated.

- Add GCC and GCCNOLTO toolchain definitions.

- Remove VS2008, VS2010, VS2012 and VS2013.

- Remove EBC compiler definitions. Full removal of EBC support from the
  various packages etc. will be done in a follow-up patch series.

- Remove unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS definitions.

- Remove unused CYGWIN_ definitions.

Personal GitHub PR: https://github.com/tianocore/edk2/pull/4240
GitHub branch: https://github.com/bcran/edk2/tree/clangdwarf

Note: CI is now passing.

Changes from v1 to v2
=

- Added a commit to delete GCC48 and GCC49, rename GCC5 to GCC and
  update the flags for other toolchains to work with the new GCC
  definitions.

- Bumped VERSION from 2.00 to 3.00 to inform users that they should
  update their Conf/tools_def.txt.

Changes from v2 to v3
=

- Keep GCC48, GCC49 and GCC5 but mark them deprecated, including with
  warnings at the start and end of running a build.

- Dropped the commit fixing the IA32 build of UefiPayloadPkg, because it
  causes CI to fail due to building both IA32 and X64 at the same time:

  "Module built under multiple ARCHs [IA32, X64]. Not able to determine which 
output to put into flash for Module..."

- Added more information to the VERSION section in tools_def.template.

- Various fixes to the CLANGDWARF flags.

Rebecca Cran (13):
  BaseTools,CryptoPkg: Update CLANGDWARF, remove CLANG 35/38 toolchains
  BaseTools: Remove VS2008, 2010, 2012 and 2013 toolchain definitions
  BaseTools: Remove VS2008-VS2013 remnants
  MdePkg: Remove VS2008-VS2013 remnants
  edksetup.bat: Remove VS2008-VS2013 remnants
  BaseTools: Remove unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS defs
  BaseTools: Remove EBC (EFI Byte Code) compiler definitions
  BaseTools: Update VS toolchain descriptions in tools_def.txt.template
  BaseTools/Conf/tools_def.template: Add GCC and GCCNOLTO toolchains
  BaseTools: Only call LoadConfiguration once in build.py
  BaseTools: Add a deprecation warning for GCC48,GCC49,GCC5 to build.py
  BaseTools/Conf/tools_def.template: Add section for deprecated
toolchains
  BaseTools/Conf/tools_def.template: Bump VERSION to 3.00

 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc   |2 +
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc |9 +-
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf |3 +-
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf  |3 +-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf  |3 +-
 CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf  |3 +-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf  |3 +-
 CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf |3 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf |3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf|3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf   |3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibFull.inf |3 +-
 CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf|3 +-
 EmulatorPkg/Unix/Host/Host.inf  |2 +
 MdePkg/Include/Ia32/ProcessorBind.h |8 +-
 MdePkg/Include/X64/ProcessorBind.h  |8 +-
 BaseTools/Conf/tools_def.template   | 1993 
++--
 BaseTools/Scripts/SetVisualStudio.bat   |   22 +-
 BaseTools/Scripts/ShowEnvironment.bat   |   44 -
 BaseTools/Source/Python/build/build.py  |   18 +-
 BaseTools/get_vsvars.bat|   13 -
 BaseTools/set_vsprefix_envs.bat |   64 -
 BaseTools/toolsetup.bat |   24 +-
 edksetup.bat|6 +-
 24 files changed, 627 insertions(+), 1619 deletions(-)

-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103049): https://edk2.groups.io/g/devel/message/103049
Mute This Topic: https://groups.io/mt/98302330/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2023-04-16 Thread Tinh Nguyen via groups.io

Hi Nickle,

Please find my inline comments below

On 4/12/2023 10:17 AM, Nickle Wang wrote:

[EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please 
be mindful of safe email handling and proprietary information protection 
practices.]


This change implements the blob transfer protocol used in OpenBmc
documented here: https://github.com/openbmc/phosphor-ipmi-blobs

Signed-off-by: Nick Ramirez 
Cc: Abner Chang 
Cc: Isaac Oram 
Cc: Abdul Lateef Attar 
Cc: Nickle Wang 
Cc: Tinh Nguyen 
---
  .../ManageabilityPkg/ManageabilityPkg.dec |6 +
  .../Include/Dsc/Manageability.dsc |4 +-
  .../IpmiBlobTransferDxe.inf   |   39 +
  .../IpmiBlobTransferTestUnitTestsHost.inf |   40 +
  .../Include/Protocol/IpmiBlobTransfer.h   |  136 ++
  .../InternalIpmiBlobTransfer.h|  363 ++
  .../IpmiBlobTransferDxe/IpmiBlobTransferDxe.c |  799 
  .../UnitTest/IpmiBlobTransferTestUnitTests.c  | 1113 +
  .../Universal/IpmiBlobTransferDxe/Readme.md   |   24 +
  9 files changed, 2523 insertions(+), 1 deletion(-)
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBlobTransferTestUnitTestsHost.inf
  create mode 100644 
Features/ManageabilityPkg/Include/Protocol/IpmiBlobTransfer.h
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/InternalIpmiBlobTransfer.h
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.c
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/UnitTest/IpmiBlobTransferTestUnitTests.c
  create mode 100644 
Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/Readme.md

diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec 
b/Features/ManageabilityPkg/ManageabilityPkg.dec
index 9a930d3e4b..e2d650 100644
--- a/Features/ManageabilityPkg/ManageabilityPkg.dec
+++ b/Features/ManageabilityPkg/ManageabilityPkg.dec
@@ -4,6 +4,7 @@
  # those are related to the platform management.
  #
  # Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
  # SPDX-License-Identifier: BSD-2-Clause-Patent
  #
  ##
@@ -48,3 +49,8 @@
gManageabilityProtocolMctpGuid= { 0x76FED8F1, 0x0BE5, 0x4269, { 0xA3, 
0x1A, 0x38, 0x0F, 0x54, 0xF1, 0xA1, 0x8A } }
# Manageability Protocol PLDM
gManageabilityProtocolPldmGuid= { 0x3958090D, 0x69DD, 0x4868, { 0x9C, 
0x41, 0xC9, 0xAC, 0x31, 0xB5, 0x25, 0xC5 } }
+
+[Protocols]
+
+  ## Include/Protocol/IpmiBlobTransfer.h
+  gEdkiiIpmiBlobTransferProtocolGuid = { 0x05837c75, 0x1d65, 0x468b, { 0xb1, 
0xc2, 0x81, 0xaf, 0x9a, 0x31, 0x5b, 0x2c } }
diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc 
b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
index 0d868fdf4a..111d6b91dc 100644
--- a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
+++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc
@@ -2,11 +2,13 @@
  # Common libraries for Manageabilty Package
  #
  # Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
  # SPDX-License-Identifier: BSD-2-Clause-Patent
  #
  ##
  [LibraryClasses]

ManageabilityTransportHelperLib|ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.inf
+  
IpmiLib|MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf

  [LibraryClasses.ARM, LibraryClasses.AARCH64]
#
@@ -22,4 +24,4 @@
  [Components.X64]
ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf
ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocolSmm.inf
-
+  ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf
diff --git 
a/Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf
 
b/Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf
new file mode 100644
index 00..28e9d293c1
--- /dev/null
+++ 
b/Features/ManageabilityPkg/Universal/IpmiBlobTransferDxe/IpmiBlobTransferDxe.inf
@@ -0,0 +1,39 @@
+## @file
+# IPMI Blob Transfer Protocol DXE Driver.
+#
+#  Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights 
reserved.
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = IpmiBlobTransferDxe
+  FILE_GUID  = 6357c804-78bb-4b0c-abdf-c75df942f319
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+  ENTRY_POINT= IpmiBlobTransferDxeDriverEntryPoint
+
+[Sources.common]
+  IpmiBlobTransferDxe.c
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  IpmiLib
+  MemoryAllocationLib
+  PcdLib
+