<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Core/Dxe/Hand/Handle.c, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-03-09T09:19:06+00:00</updated>
<entry>
<title>MdeModulePkg/Core: Increment handle key outside if block</title>
<updated>2026-03-09T09:19:06+00:00</updated>
<author>
<name>Khalid Ali</name>
<email>khaliidcaliy@gmail.com</email>
</author>
<published>2026-01-27T16:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8f28978843f14deaa1b1060fbfd4983f82207506'/>
<id>urn:sha1:8f28978843f14deaa1b1060fbfd4983f82207506</id>
<content type='text'>
Fixes: #11113

Currently, the global handle key and key inside handle structure is
incremented only when a new handle is allocated for protocol interface
to be installed.

However, when caller already supplies a handle gHandleDatabaseKey never
get incremented.

Move handle key incremental outside if block, just below the else
statement which allows gHandleDatabaseKey to always incremented whether
handle is supplied or not.

Signed-off-by: Khalid Ali &lt;khaliidcaliy@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix missing NULL tests.</title>
<updated>2025-11-22T18:58:47+00:00</updated>
<author>
<name>Aaron Pop</name>
<email>aaronpop@microsoft.com</email>
</author>
<published>2025-10-22T18:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5214f931c9a9bed62e1d5324864c60f25b77590d'/>
<id>urn:sha1:5214f931c9a9bed62e1d5324864c60f25b77590d</id>
<content type='text'>
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp

For items which allocate memory, or get a pointer from another
structure, it is important to validate that the pointers
are not null before they are dereferenced.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: fix warning about uninitialized variable</title>
<updated>2025-01-29T16:20:57+00:00</updated>
<author>
<name>Mike Maslenkin</name>
<email>mike.maslenkin@gmail.com</email>
</author>
<published>2025-01-09T18:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0f12a5f722cee18b55de291d3e4bc9b4248ba9b8'/>
<id>urn:sha1:0f12a5f722cee18b55de291d3e4bc9b4248ba9b8</id>
<content type='text'>
Handle.c:1302:24: error: 'Prot' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]

       *Interface = Prot-&gt;Interface;
                    ~~~~^~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mike Maslenkin &lt;mike.maslenkin@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: CoreValidateHandle Optimization</title>
<updated>2024-08-30T11:42:41+00:00</updated>
<author>
<name>Xiaoqiang Zhang</name>
<email>xiaoqiang.zhang@intel.com</email>
</author>
<published>2024-08-07T08:42:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0596e5fa05a7badb30fb3d4092d41a787788655c'/>
<id>urn:sha1:0596e5fa05a7badb30fb3d4092d41a787788655c</id>
<content type='text'>
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4817

Before entering BIOS setup, CoreValidateHandle function executed
over 600,000 times during BDS phase on latest 8S server platform.
In CoreValidateHandle function, current implementation will go
through the doubly-linked list handle database in each call, and
this will have big impact on boot performance.
The optimization is using Red-black tree to store the EFI handle
address when insert each EFI handle into the handle database, and
remove the handle from Red-black tree if the handle is removed
from the handle database. CoreValidateHandle function changed to
go through the Red-black tree.
After verification on latest 8S server platform, BDS boot time can
save 20s+ after this change.

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Signed-off-by: Andrew Fish &lt;afish@apple.com&gt;
Tested-by: Xiaoqiang Zhang &lt;xiaoqiang.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Remove handle validation check in CoreGetProtocolInterface</title>
<updated>2024-02-06T17:54:53+00:00</updated>
<author>
<name>Zhi Jin</name>
<email>zhi.jin@intel.com</email>
</author>
<published>2024-01-15T07:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9eddbab65042259beb1a75ccdf724996eab9660d'/>
<id>urn:sha1:9eddbab65042259beb1a75ccdf724996eab9660d</id>
<content type='text'>
CoreGetProtocolInterface() is called by CoreOpenProtocol(),
CoreCloseProtocol() and CoreOpenProtocolInformation().
Before CoreOpenProtocol() calls CoreGetProtocolInterface(), the input
parameter UserHandle has been already checked for validation. So does
CoreCloseProtocol().
Removing the handle validation check in CoreGetProtocolInterface()
could improve the performance, as CoreOpenProtocol() is called very
frequently.
To ensure the assumption that the caller of CoreGetProtocolInterface()
must pass in a valid UserHandle that is checked with CoreValidateHandle(),
add the parameter check in CoreOpenProtocolInformation(), and declare
CoreGetProtocolInterface() as static.

Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Zhi Jin &lt;zhi.jin@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Optimize CoreInstallMultipleProtocolInterfaces</title>
<updated>2023-12-01T00:53:56+00:00</updated>
<author>
<name>Zhi Jin</name>
<email>zhi.jin@intel.com</email>
</author>
<published>2023-11-08T02:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=534021965f6f7c417610add53984f39d6945bbcf'/>
<id>urn:sha1:534021965f6f7c417610add53984f39d6945bbcf</id>
<content type='text'>
CoreLocateDevicePath is used in CoreInstallMultipleProtocolInterfaces to
check if a Device Path Protocol instance with the same device path is
alreay installed.
CoreLocateDevicePath is a generic API, and would introduce some
unnecessary overhead for such usage.

The optimization is:
1. Implement IsDevicePathInstalled to loop all the Device Path
   Protocols installed and check if any of them matchs the given device
   path.
2. Replace CoreLocateDevicePath with IsDevicePathInstalled in
   CoreInstallMultipleProtocolInterfaces.

This optimization could save several seconds in PCI enumeration on a
system with many PCI devices.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Zhi Jin &lt;zhi.jin@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Core/Dxe: Acquire a lock when iterating gHandleList</title>
<updated>2021-10-14T03:27:20+00:00</updated>
<author>
<name>Hua Ma</name>
<email>hua.ma@intel.com</email>
</author>
<published>2021-10-11T03:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a7fcab7aa3de338c02e61fd891610b1ec926e6c8'/>
<id>urn:sha1:a7fcab7aa3de338c02e61fd891610b1ec926e6c8</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3680

This patch fixes the following issue:

The global variable gHandleList is a linked list.
This list is locked when a entry is added or removed from the list,
but there is no lock when iterating this list in function
CoreValidateHandle().
It can lead to "Handle.c (76): CR has Bad Signature" assertion if the
iterated entry in the list is just removed by other task during iterating.

Currently some caller functions of CoreValidateHandle() have
CoreAcquireProtocolLock(), but some caller functions of
CoreValidateHandle() do not CoreAcquireProtocolLock().
Add CoreAcquireProtocolLock() always when CoreValidateHandle() is called,
Also, A lock check is added in the CoreValidateHandle().

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Hua Ma &lt;hua.ma@intel.com&gt;
Reviewed-by: Dandan Bi &lt;dandan.bi@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Make retval in UninstallMultipleProtocol follow Spec</title>
<updated>2020-02-19T14:43:25+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-09-12T06:34:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0997352ddb4761c49dfedf6fef46b4cd15f6c9bf'/>
<id>urn:sha1:0997352ddb4761c49dfedf6fef46b4cd15f6c9bf</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1869

The UEFI spec requires that if any error occurs in
UninstallMultipleProtocolInterfaces(), EFI_INVALID_PARAMETER is returned
and not the return code of UninstallProtocolInterface().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Dandan Bi &lt;dandan.bi@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d510e61fceee7b92955ef9a3c20343752d8ce3f'/>
<id>urn:sha1:9d510e61fceee7b92955ef9a3c20343752d8ce3f</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
</feed>
