<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/Python/AutoGen, branch trunk</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-06-04T03:43:08+00:00</updated>
<entry>
<title>Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305b</title>
<updated>2024-06-04T03:43:08+00:00</updated>
<author>
<name>kx</name>
<email>kx@radix.pro</email>
</author>
<published>2024-06-04T03:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7e2ccccace24636f29ddc210b94606abd4c7e42b'/>
<id>urn:sha1:7e2ccccace24636f29ddc210b94606abd4c7e42b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>BaseTools/AutoGen: declare ProcessLibraryConstructorList() for SEC modules</title>
<updated>2024-02-29T09:56:38+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2024-02-24T21:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=bac9c74080cf36590af0f572c07257c3541f8c02'/>
<id>urn:sha1:bac9c74080cf36590af0f572c07257c3541f8c02</id>
<content type='text'>
Most module types have standardized entry point function prototypes. They
are declared in headers like

- MdePkg/Include/Library/PeiCoreEntryPoint.h
- MdePkg/Include/Library/PeimEntryPoint.h
- MdePkg/Include/Library/DxeCoreEntryPoint.h
- MdePkg/Include/Library/UefiDriverEntryPoint.h
- MdePkg/Include/Library/UefiApplicationEntryPoint.h

These header files also declare matching ProcessLibraryConstructorList()
prototypes.

The SEC module type does not have a standardized entry point prototype
(aka parameter list), therefore no header file like the above ones exists
for SEC. Consequently, no header file *declares*
ProcessLibraryConstructorList() for SEC modules, even though AutoGen
always *defines* ProcessLibraryConstructorList() with the same, empty,
parameter list (i.e., just (VOID)).

The lack of a central declaration is a problem because in SEC code,
ProcessLibraryConstructorList() needs to be called manually, and those
calls need a prototype. Most SEC modules in edk2 get around this by
declaring ProcessLibraryConstructorList() manually, while some others use
an incorrect (PEIM) prototype.

Liming suggested in
&lt;https://bugzilla.tianocore.org/show_bug.cgi?id=991#c2&gt; that AutoGen
provide the declaration as well; implement that in this patch.

Mike suggested that the feature be gated with INF_VERSION, for
compatibility reasons. (INF_VERSION &gt;= 1.30) reflects that the latest
(draft) version of the INF specification, as of this writing, is commit
a31e3c842bee / version 1.29.

For example, if we modify "OvmfPkg/Sec/SecMain.inf" as follows:

&gt; diff --git a/OvmfPkg/Sec/SecMain.inf b/OvmfPkg/Sec/SecMain.inf
&gt; index 3c47a664a95d..dca932a474ee 100644
&gt; --- a/OvmfPkg/Sec/SecMain.inf
&gt; +++ b/OvmfPkg/Sec/SecMain.inf
&gt; @@ -8,7 +8,7 @@
&gt;  ##
&gt;
&gt;  [Defines]
&gt; -  INF_VERSION                    = 0x00010005
&gt; +  INF_VERSION                    = 1.30
&gt;    BASE_NAME                      = SecMain
&gt;    FILE_GUID                      = df1ccef6-f301-4a63-9661-fc6030dcc880
&gt;    MODULE_TYPE                    = SEC

then the patch produces the following difference in
"Build/OvmfX64/NOOPT_GCC5/X64/OvmfPkg/Sec/SecMain/DEBUG/AutoGen.h":

&gt; --- AutoGen.h.orig      2024-02-06 23:10:23.469535345 +0100
&gt; +++ AutoGen.h   2024-02-07 00:00:57.361294055 +0100
&gt; @@ -220,6 +220,13 @@
&gt;
&gt;  // Definition of PCDs used in libraries is in AutoGen.c
&gt;
&gt; +// ProcessLibraryConstructorList() declared here because SEC has no standard entry point.
&gt; +VOID
&gt; +EFIAPI
&gt; +ProcessLibraryConstructorList (
&gt; +  VOID
&gt; +  );
&gt; +
&gt;
&gt;  #ifdef __cplusplus
&gt;  }

which presently (as of edk2 commit edc6681206c1) triggers the following
build error:

&gt; In file included from OvmfPkg/Sec/SecMain.c:14:
&gt; MdePkg/Include/Library/PeimEntryPoint.h:74:1: error: conflicting types for
&gt; ‘ProcessLibraryConstructorList’; have ‘void(void *, const
&gt; EFI_PEI_SERVICES **)’ {aka ‘void(void *, const struct _EFI_PEI_SERVICES
&gt; **)’}
&gt;    74 | ProcessLibraryConstructorList (
&gt;       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt; In file included from &lt;command-line&gt;:
&gt; Build/OvmfX64/NOOPT_GCC5/X64/OvmfPkg/Sec/SecMain/DEBUG/AutoGen.h:226:1: note:
&gt; previous declaration of ‘ProcessLibraryConstructorList’ with type
&gt; ‘void(void)’
&gt;   226 | ProcessLibraryConstructorList (
&gt;       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That's a genuine bug in OvmfPkg that needs to be fixed, but we keep
compatibility with existent SEC modules until/unless they upgrade
INF_VERSION to 1.30+.

Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=991
Suggested-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Suggested-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20240224210504.41873-1-lersek@redhat.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset</title>
<updated>2024-02-08T19:27:18+00:00</updated>
<author>
<name>Ashraf Ali S</name>
<email>ashraf.ali.s@intel.com</email>
</author>
<published>2023-12-25T15:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e32b58ab5a12d37c82327f28376e7d12cccc8b3a'/>
<id>urn:sha1:e32b58ab5a12d37c82327f28376e7d12cccc8b3a</id>
<content type='text'>
Currently when the platform has many SKUs then allskuset will be having
so many duplicate. and while parsing the allskuset will take longer
time while assigning Pcd.SkuInfoList.
This patch is to eliminate those duplicate entries to reduce the
build time

Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Amy Chan &lt;amy.chan@intel.com&gt;
Cc: Sai Chaganty &lt;rangasai.v.chaganty@intel.com&gt;
Signed-off-by: Ashraf Ali S &lt;ashraf.ali.s@intel.com&gt;
Reviewed-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Amy Chan &lt;amy.chan@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Optimize GenerateByteArrayValue and CollectPlatformGuids APIs</title>
<updated>2024-02-08T04:08:38+00:00</updated>
<author>
<name>devel@edk2.groups.io</name>
<email>devel@edk2.groups.io</email>
</author>
<published>2024-02-07T17:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8f316e99ec8de9dea294f6751dd7457f9f1a828c'/>
<id>urn:sha1:8f316e99ec8de9dea294f6751dd7457f9f1a828c</id>
<content type='text'>
During the Incremental build GenerateByteArrayValue used to generate the
ByteArrayValue even when there is no change in the PCD/VPDs. which is
time consuming API based on the number of PCD/VPDs and SKU IDs.

The optimization is that GenerateByteArrayValue is used to store the
StructuredPcdsData in a JSON file for each of the arch. and during the
Incremental build this API will check, if there is any change in the
Structured PCD/VPDs then rest of the flow remains the same.
if there is no change then it will return the provious build data.

Flow:
during the 1st build StructuredPcdsData.json is not exists,
StructuredPcdsData will be dumped to json file. and it will copy the
output.txt as well.
Note: as the output.txt are different for different Arch, so it will be
stored in the Arch folder.
During the Incremental build check if there is any change in Structured
PCD/VPD. if there is a change in Structured VPD/PCD then recreate the
StructuredPcdsData.json, and rest of the flow remains same.
if there is no change in VPD/PCD read the output.txt and return the data

Unit Test:
Test1: Modified the Structured Pcds default from DEC file. current flow
is executing.
Test2: Override the default value of the PCD from DEC file. current flow
is executing.
Test3: Modified/Override the PCD from DSC file. current flow executing
Test4: Modified/Override the FDF from DSC file. current flow executing
Test5: update the default value from Command Line.current flow executing
Test6: Build without change in PCD in DSC, FDF, DEC and Command Line the
proposed changes will be executing, and the return data remains the same
with and without the changes.
Test7: Build with and without modified the include headers of Structured
PCDs. if there is any change in those Structured PCD header then
current flow will be executed.

With these changes it's helping to save around ~2.5min to ~3.5min of
Incremental build time in my build environment.

Sample PR: https://github.com/tianocore/edk2-basetools/pull/113

Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Amy Chan &lt;amy.chan@intel.com&gt;
Cc: Sai Chaganty &lt;rangasai.v.chaganty@intel.com&gt;
Cc: Digant H Solanki &lt;digant.h.solanki@intel.com&gt;
Signed-off-by: Ashraf Ali S &lt;ashraf.ali.s@intel.com&gt;
Reviewed-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
</content>
</entry>
<entry>
<title>Basetools: Include PCD declarations from Library Instance</title>
<updated>2024-01-31T10:58:05+00:00</updated>
<author>
<name>levi.yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2023-10-12T17:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=40a45b5a2be3bf886ff481d4b538d20624d02589'/>
<id>urn:sha1:40a45b5a2be3bf886ff481d4b538d20624d02589</id>
<content type='text'>
The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
architecture independent" (https://edk2.groups.io/g/devel/message/109178)
removed ArmPkg/ArmPkg.dec from the Packages section in the
INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf

This change was done as part of making the StandaloneMmCpu driver
architecture independent.

Although this change is correct, it results in a side effect
here some platforms that utilise PCDs declared in ArmPkg.dec are
no longer declared.

An example of this issue can be seen when building
edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc

$ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
build.py...
/mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
  error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
  FDF is not declared in DEC files.

As seen above, removing ArmPkg.dec from the Packages section in the
StandAloneMmCpu Driver Inf file triggers build failure.
Although, ArmPkg.dec is included in other Library Instances,
the build system does not include the declarations from
.dec files defined in Library instances.

The build system only includes the PCD declarations from DEC files
that are specified in INF files for Modules (components).

Therefore, extend the build system to include the Packages from
Library Instances so that the PCD declarations from the respective package
DEC files are included.

This patch can be seen on
    https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library

Signed-off-by: levi.yun &lt;yeoreum.yun@arm.com&gt;
Tested-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Fix raw strings containing valid escape characters</title>
<updated>2024-01-10T13:54:01+00:00</updated>
<author>
<name>Joey Vagedes</name>
<email>joey.vagedes@gmail.com</email>
</author>
<published>2023-12-28T16:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6c488a2f390d6aacb605b6c370fbe6cc275af4fd'/>
<id>urn:sha1:6c488a2f390d6aacb605b6c370fbe6cc275af4fd</id>
<content type='text'>
Fixes raw regex strings that contain valid (and purposeful) escape
characters as they are being treated as individual characters rather
than the single escaped character they represent (i.e. '\t' is being
treated as a '\' and a 't' rather than a single tab character).

Signed-off-by: Joey Vagedes &lt;joey.vagedes@gmail.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Resolve regex syntax warnings</title>
<updated>2023-12-21T00:33:31+00:00</updated>
<author>
<name>Joey Vagedes via groups.io</name>
<email>joeyvagedes=microsoft.com@groups.io</email>
</author>
<published>2023-12-06T20:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9f0061a03b61d282fbc0ba5be22155d06a5e64a1'/>
<id>urn:sha1:9f0061a03b61d282fbc0ba5be22155d06a5e64a1</id>
<content type='text'>
Switches regex patterns to raw text to resolve python 3.12 syntax
warnings in regards to invalid escape sequences, as is suggested by the
re (regex) module in python.

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Signed-off-by: Joey Vagedes &lt;joey.vagedes@gmail.com&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: add '-p' for Linux 'cp' command.</title>
<updated>2022-07-17T02:20:51+00:00</updated>
<author>
<name>Chen, Christine</name>
<email>Yuwei.Chen@intel.com</email>
</author>
<published>2022-07-08T13:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=176016387f0a6ad16efcfdcef19fd90bdc3a77e4'/>
<id>urn:sha1:176016387f0a6ad16efcfdcef19fd90bdc3a77e4</id>
<content type='text'>
Currently BaseTools use 'cp' command for PcdValueInit and GenMake
process, as the command can not keep the time info of the source
file, which will cause incremental build issue in Linux system,
thus the '-p' need be added to keep the source file's attributes
in copy process.

This patch fixes this issue.

Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Signed-off-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Fix the GenMake bug for .cpp source file</title>
<updated>2022-06-28T09:14:55+00:00</updated>
<author>
<name>Feng, Bob C</name>
<email>bob.c.feng@intel.com</email>
</author>
<published>2022-06-25T05:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=59141288716f8917968d4bb96367b7d08fe5ab8a'/>
<id>urn:sha1:59141288716f8917968d4bb96367b7d08fe5ab8a</id>
<content type='text'>
Build-rules.txt lists .cc and .cpp as supported file extensions.
BaseTools commit 05217d210e introduce a regression issue that
ignore the .cc and .cpp file type.

This patch is to fix this bug.

Signed-off-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Yuwei Chen&lt;yuwei.chen@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Remove RVCT support</title>
<updated>2022-05-13T14:58:54+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>quic_rcran@quicinc.com</email>
</author>
<published>2022-05-03T18:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=708620d29db89d03e822b8d17dc75fbac865c6dc'/>
<id>urn:sha1:708620d29db89d03e822b8d17dc75fbac865c6dc</id>
<content type='text'>
RVCT is obsolete and no longer used.
Remove support for it.

Signed-off-by: Rebecca Cran &lt;quic_rcran@quicinc.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
</feed>
