<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Core/Dxe/DxeMain, 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>2025-10-23T00:57:59+00:00</updated>
<entry>
<title>MdeModulePkg: Always Initialize Separate Exception Stacks</title>
<updated>2025-10-23T00:57:59+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-10-20T03:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cec2c6bbccf7b529266884dbef25ad212bf167d5'/>
<id>urn:sha1:cec2c6bbccf7b529266884dbef25ad212bf167d5</id>
<content type='text'>
Following the APs now always initializing separate exception
stacks, this commit always initializes a separate exception
stack for the BSP as well. Previously, this was only enabled
when PcdCpuStackGuard was set.

However, even when a stack guard page is not present,
stack overflows can still occur and corrupt the stack; if an
exception is taken here, it is still valuable to have a separate
exception stack for sanity.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg DxeMain: Add late initialization for Debug Agent.</title>
<updated>2024-12-16T20:49:45+00:00</updated>
<author>
<name>Chris Fernald</name>
<email>chfernal@microsoft.com</email>
</author>
<published>2023-11-16T23:10:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=17e67d26d9f8da373a70fa90146a77a8211c892b'/>
<id>urn:sha1:17e67d26d9f8da373a70fa90146a77a8211c892b</id>
<content type='text'>
Add a late initialize in DxeMain for the debug agent. This is required
for the debug agent to be able to setup events to handle image loads,
exit boot services, and other important callbacks.

Define a reinitialize debug agent.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/DxeCore: Call BeforeExitBootServices event group only once</title>
<updated>2024-12-06T00:33:53+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2024-11-28T11:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e8668d2dee2f001a053d9e50f431e2f1f8165b8b'/>
<id>urn:sha1:e8668d2dee2f001a053d9e50f431e2f1f8165b8b</id>
<content type='text'>
According to UEFI spec 2.10 errata A section 7.4.6

  "All events from the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES and
  EFI_EVENT_GROUP_EXIT_BOOT_SERVICES event notification groups as well
  as events of type EVT_SIGNAL_EXIT_BOOT_SERVICES must be signaled
  before ExitBootServices() returns EFI_SUCCESS. The events are only
  signaled once even if ExitBootServices() is called multiple times."

So keep track of whether ExitBootServices() has been called, and signal
the event group EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES only the first
time around.

EFI_EVENT_GROUP_EXIT_BOOT_SERVICES will only be signalled if
ExitBootServices() is going to run to [successful] completion, after
which calling it a second time is not possible anyway. So for this case,
no special handling is needed.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&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/Core/Dxe: Initialize GCD before RT memory allocations</title>
<updated>2024-01-30T18:30:02+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-01-09T18:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c5e702e45ad4e71e1bfc710c9db0826c1c893b18'/>
<id>urn:sha1:c5e702e45ad4e71e1bfc710c9db0826c1c893b18</id>
<content type='text'>
Update the DxeMain initialization order to initialize GCD
services before any runtime allocations are performed.  This
is required to prevent runtime data fragmentation when the
UEFI System Table and UEFI Runtime Service Table are allocated
before both the memory and GCD services are initialized.

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Aaron Li &lt;aaron.li@intel.com&gt;
Cc: Liu Yun &lt;yun.y.liu@intel.com&gt;
Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Update code to be more C11 compliant by using __func__</title>
<updated>2023-04-10T14:19:57+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2023-04-06T19:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7b82da70edf7dda2c6f4e853f100df620bd5c0f3'/>
<id>urn:sha1:7b82da70edf7dda2c6f4e853f100df620bd5c0f3</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
MdeModulePkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices</title>
<updated>2023-01-12T16:03:30+00:00</updated>
<author>
<name>Dionna Glaze</name>
<email>dionnaglaze@google.com</email>
</author>
<published>2022-11-08T16:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d70d8f20d0feee1d232cbf86fc87147ce92c2cb'/>
<id>urn:sha1:9d70d8f20d0feee1d232cbf86fc87147ce92c2cb</id>
<content type='text'>
Location of notification is has been specified in UEFI v2.9.

Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: James Bottomley &lt;jejb@linux.ibm.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: "Min M. Xu" &lt;min.m.xu@intel.com&gt;
Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: "Michael D. Kinney" &lt;michael.d.kinney@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;

Acked-by: Jiewen Yao &lt;Jiewen.yao@intel.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Dionna Glaze &lt;dionnaglaze@google.com&gt;
Message-Id: &lt;20221108164616.3251967-4-dionnaglaze@google.com&gt;
</content>
</entry>
<entry>
<title>UefiCpuPkg: Simplify InitializeSeparateExceptionStacks</title>
<updated>2022-08-09T04:12:28+00:00</updated>
<author>
<name>Liu, Zhiguang</name>
<email>Zhiguang.Liu@intel.com</email>
</author>
<published>2022-08-09T01:25:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0f7bccf584d93b2642c0a413a47fc821d1f5dbfd'/>
<id>urn:sha1:0f7bccf584d93b2642c0a413a47fc821d1f5dbfd</id>
<content type='text'>
Hide the Exception implementation details in CpuExcetionHandlerLib and
caller only need to provide buffer

Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Rahul Kumar &lt;rahul1.kumar@intel.com&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
<entry>
<title>DxeMain: Fix the bug that StackGuard is not enabled</title>
<updated>2022-06-14T02:59:22+00:00</updated>
<author>
<name>Ray Ni</name>
<email>ray.ni@intel.com</email>
</author>
<published>2022-06-10T08:43:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6676162f64ad39949ed44f17ce40e5c49ab33e31'/>
<id>urn:sha1:6676162f64ad39949ed44f17ce40e5c49ab33e31</id>
<content type='text'>
Commit e7abb94d1 removed InitializeCpuExceptionHandlersEx
and updated DxeMain to call InitializeCpuExceptionHandlers
for exception setup. But the old behavior that calls *Ex() sets
up the stack guard as well. To match the old behavior,
the patch calls InitializeSeparateExceptionStacks.

Signed-off-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>CpuException: Add InitializeSeparateExceptionStacks</title>
<updated>2022-06-10T07:54:48+00:00</updated>
<author>
<name>Ray Ni</name>
<email>ray.ni@intel.com</email>
</author>
<published>2022-05-20T11:12:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e7abb94d1fb8a0e7725b983bbf5ab1334afe7ed1'/>
<id>urn:sha1:e7abb94d1fb8a0e7725b983bbf5ab1334afe7ed1</id>
<content type='text'>
Today InitializeCpuExceptionHandlersEx is called from three modules:
1. DxeCore (links to DxeCpuExceptionHandlerLib)
    DxeCore expects it initializes the IDT entries as well as
    assigning separate stacks for #DF and #PF.
2. CpuMpPei (links to PeiCpuExceptionHandlerLib)
   and CpuDxe (links to DxeCpuExceptionHandlerLib)
    It's called for each thread for only assigning separate stacks for
    #DF and #PF. The IDT entries initialization is skipped because
    caller sets InitData-&gt;X64.InitDefaultHandlers to FALSE.

Additionally, SecPeiCpuExceptionHandlerLib, SmmCpuExceptionHandlerLib
also implement such API and the behavior of the API is simply to initialize
IDT entries only.

Because it mixes the IDT entries initialization and separate stacks
assignment for certain exception handlers together, in order to know
whether the function call only initializes IDT entries, or assigns stacks,
we need to check:
1. value of InitData-&gt;X64.InitDefaultHandlers
2. library instance

This patch cleans up the code to separate the stack assignment to a new API:
InitializeSeparateExceptionStacks().

Only when caller calls the new API, the separate stacks are assigned.
With this change, the SecPei and Smm instance can return unsupported which
gives caller a very clear status.

The old API InitializeCpuExceptionHandlersEx() is removed in this patch.
Because no platform module is consuming the old API, the impact is none.

Signed-off-by: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
</feed>
