Commit Graph

519 Commits

Author SHA1 Message Date
Michał Żygowski 9a96388208 MdeModulePkg: Control pre-installed boot options creation with PCD
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:02:57 +03:00
Michał Żygowski e91d880951 DasharoPayloadPkg,MdeModulePkg: improve detection of PS/2 keyboard
MdeModulePkg:
 * add defines
 * add PcdDetectPs2KbOnCmdAck

DasharoPayloadPkg:
 * detect PS/2 keyboard by sending it an "echo" command if
   Dasharo/Ps2Controller is enabled or doesn't exist
 * remove PS/2 from ConIn if the variable exists and the keyboard is not
   connected or is disabled
2026-05-03 01:02:55 +03:00
Sherry Fan 64ad6f20d8 MdeModulePkg: BdsDxe: Introduce infinite boot retries
This PR introduces a new feature to enable infinite boot retries based on a newly created PCD.
When true, the system will continuously loop over all boot options.

PCD default is FALSE to match existing functionality.

This change is tested on QEMU based virtual platforms and physical
platforms.

This change is useful for certain server cases. Infinite retries allows
a server to continuously attempt boot in case of network failure and
recovery, and for such attempts to be accurately recorded in the TCG
logs.

Co-authored-by: Kun Qin <kun.qin@microsoft.com>
Co-authored-by: Aaron Pop <aaron.pop@microsoft.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>

Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2026-02-02 02:24:18 +00:00
gapandya 56032225e3 MdeModulePkg: Define PCD for SATA ready for operation timeout.
Some large capacity SATA HDD requires more time from power on
to ready state.
Making timeout value configurable by defining PCD
PcdSataDeviceReadyTimeout will allow platform.dsc to serve these
devices.
Defining gEfiMdeModulePkgTokenSpaceGuid.PcdSataDeviceReadyTimeout
with default value 16 Seconds in MdeModulePkg.dec.

Signed-off-by: gapandya <gaurav.pandya@amd.com>
2025-11-22 17:01:23 +00:00
Pavithra Gurulingappa 597d061e09 MdeModulePkg/DxeCapsuleLibFmp:Added PCD for EmbeddedDriver Support
Currently, there is no mechanism for platforms to enable or disable
support for EmbeddedDrivers in capsule updates. This patch introduces
a new PCD, PcdEmbeddedDriverSupport, allowing platforms to explicitly
control whether capsules containing EmbeddedDrivers are supported.
This ensures capsules with embedded drivers are rejected on platforms
that do not support them.

This is a breaking change.By default, PcdEmbeddedDriverSupport
is set to FALSE which disables embedded driver support in capsule updates
across all platforms unless explicitly enabled.

Platforms must opt-in by setting the PcdEmbeddedDriverSupport to TRUE
in order to enable support for capsules containing embedded drivers.

Signed-off-by: Pavithra Gurulingappa <gpavithr@qti.qualcomm.com>
2025-10-14 17:45:19 +00:00
Oliver Smith-Denny ef79d58427 MdeModulePkg: Remove ARM32 Support
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 support from MdeModulePkg. This also
drops irrelevant VALID_ARCHITECTURE comments from infs that
are not arch specific.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-25 22:04:10 +00:00
Michael Kubacki 8a07311710 MdeModulePkg: Add PcdDelayedDispatchMaxEntries
The current fixed value of 8 for `DELAYED_DISPATCH_MAX_ENTRIES` is
not large enough to accommodate platform usage. This change replaces
the macro with a PCD that can be configured by platforms.

In the case the default PCD value is too small, an error message
explaining that the PCD should be updated will be printed followed
by an assert.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-09-23 09:02:04 +08:00
INDIA\sachinganesh 57230fff6b ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib header
RealTimeClockLib is an architectural implementation that is not
restricted to the embedded segment or any platform in particular.

So the header has been moved to MdeModulePkg.
And the package has been added to the relevant INF files.

Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-09-08 16:54:42 +08:00
Gowtham M a46697f735 MdeModulePkg: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUID
Adding to the previous commit deprecating
EFI_UNICODE_COLLATION_PROTOCOL_GUID in MdeModulePkg.

Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05 13:50:50 +00:00
Sergii Dmytruk d43451b520 MdeModulePkg: Add PcdCapsuleFmpSupport
When set to TRUE, bit EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED of
OsIndications is set.

At the moment EDK never sets this bit (there is only definition with no
uses), maybe nothing actually checks its value.  Whatever the reason is,
it seems like a good idea to make setting it possible.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25 11:54:17 +00:00
Ard Biesheuvel 44d88d5d0c MdeModulePkg: Remove obsolete PEI_USB_HOST_CONTROLLER_PPI
This PPI is no longer used - the EHCI and XHCI host controller PEIMs
expose PEI_USB2_HOST_CONTROLLER_PPI instead.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07 10:49:22 +00:00
Pranav V V 491530abaa MdeModulePkg: Change PCD type to support dynamic
Move PcdSerialRegisterBase from [PcdsFixedAtBuild, PcdsPatchableInModule]
section to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic,
PcdsDynamicEx] section to enable dynamic configuration.

Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-07-30 08:48:49 +08:00
Levi Yun bbd810221e MdeModulePkg: Make PcdFfaTxRxPageCount a PcdsFixedAtBuild PCD
The PcdFfaTxRxPageCount can never be changed dynamically
and is configured at build time to specify the size of
the Rx/Tx buffers.

Therefore, make PcdFfaTxRxPageCount a PcdsFixedAtBuild PCD.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-14 11:59:38 +00:00
Aaron Pop 5f2e0c8c43 MdeModulePkg: MdeModulePkg.dec update PcdDxeNxMemoryProtectionPolicy.
Update the comments for PcdDxeNxMemoryProtectionPolicy
which contained old information.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Co-authored-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-09 07:39:31 +00:00
GuoMinJ 0fe2520aad MdeModulePkg: Remove UGA support
The Universal Graphics Adapter (UGA) is a graphic abstraction.
The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was
introduced. Cf. the UEFI spec v2.9:
"Appendix L - EFI 1.10 Protocol Changes and Deprecation List"
section L.2 "Deprecated Protocols"

Remove the UGA support.

Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-08 15:42:03 +00:00
Kun Qin 18988ea3e6 MdeModulePkg: ArmFfaLib: Move Rx/Tx hob definition to Include/Guid folder
Currently, ArmFfaLib uses an internally defined Guided HOB to pass
information about the Rx/Tx buffer set up by the first executing agent.

However, the GUID definition is solely specified in the DEC file, which
is inconsistent with other GUID definitions in MdeModulePkg. This change
relocates the GUID definition to the Include/Guid folder to ensure
consistency across the package.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-10 17:52:48 +00:00
Kun Qin be03ceb117 ArmPkg: ArmFfaLib: Move ArmFfaLib implementation to MdeModulePkg
ArmFfaLib is an implementation of an industry specification-defined
interface with UEFI specific method of handling Rx/Tx buffer sharing
across multiple boot phases, which is more appropriately placed in
MdeModulePkg.

This update relocates the implementation of ArmFfaLib to MdeModulePkg,
thereby supporting the FFA call primitives for all other packages that
depend on this interface.

Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-10 17:52:48 +00:00
Ceping Sun f919709c86 MdeModulePkg: Move TdxMeasurementLib from UefiCpuPkg
There are 2 reasons to move TdxMeasurementLib LibraryClass from
UefiCpuPkg to MdeModulePkg:
1. TpmMeasurementLib.h is located at MdeModulePkg/Include/Library.
   It is similiar as TdxMeasurementLib.h.
2. TdxMeasurementLib is designed for TDX Measurement, it can be called
   from SecurityPkg. And it is not much related to UefiCpuPkg.

Based upon above consideration, it's better to move TdxMeasurementLib
LibraryClass from UefiCpuPkg to MdeModulePkg.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2025-03-18 17:57:40 +00:00
INDIA\kanagavels 87e2ee60d4 MdeModulePkg: Added PPI support in UFS PEI driver.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4490

Added PPI support in UFS PEI driver to link the platform specific code
as same as UFS DXE driver.

Signed-off-by: Kanagavel S <kanagavels@ami.com>
2024-10-28 05:39:52 +00:00
Kun Qin d64d1e195c MdeModulePkg: PeiMain: Introduce implementation of delayed dispatch
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496

This change adds the implementation that fits the needs and description
of PI spec defined Delayed Dispatch PPI in Pei Core.

The PPI would allow minimal delay for registered callbacks. As well as
allowing other functions to wait for GUIDed delayed dispatch callbacks.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Catharine West <catharine.west@intel.com>

Co-authored-by: Mike Turner <mikeyt@pobox.com>
Co-authored-by: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
2024-10-17 08:51:15 +00:00
Ray Robles b6c4708c4d MdeModulePkg/Bus/Pci/NvmExpressDxe: Nvm Express Media Sanitize Protocol.
Implementation of MEDIA_SANITIZE_PROTOCOL for NIST
purge/clear actions with mapping to NVM Express native
commands.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-08-29 18:51:07 +00:00
Hongbin1 Zhang 45098bf1b8 MdeModulePkg/MdeModulePkg.dec: Add PcdMmCommBufferPages PCD
PcdMmCommBufferPages is to specify the page count allocated for
the MM communication buffer.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Co-authored-by: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-08-28 15:25:27 +00:00
Hongbin1 Zhang ff04469d33 MdeModulePkg: Add MM Communication Buffer definition
The MM communicate buffer facilitates data sharing between non-MM
and MM code.
The MM IPL code allocates a "fixed" runtime type memory as the MM
communication buffer, and communicates its address and size to MM
Core via MmCommBuffer GUIDed HOB.
Here, "fixed" implies that the buffer's location remains constant
throughout the boot process.
Data is exchanged between the MM Communication PPI/Protocol and a
software MMI handler using this fixed MM communication buffer.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Co-authored-by: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-08-28 15:25:27 +00:00
Jason1 Lin bc1c890e8e MdeModulePkg: Add the PcdUfsInitialCompletionTimeout in DEC File
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4820

- Add the PCD to indicate the UFS device initialize completion time
- Default value of this PCD value is 600ms

Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
2024-07-30 20:55:09 +00:00
Sean Brogan d7e36ccbbd MdeModulePkg: Add NVMe Long Delay Time Events
Fire an event if a long delay occurs when starting an NVMe device.
This can be used by platforms to draw pictures on the screen or
take other actions to notify a user or move boot forward.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-07-27 01:32:21 +00:00