Commit Graph

34738 Commits

Author SHA1 Message Date
ddeptford
5c7ef27b96 MdeModulePkg: UefiBootManagerLib Change default alignment for ramdisk boot.
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
The ramdisk is modelled as an NVDIMM which have a naturally higher
alignment than 4K. Operating systems may wish to map NVDIMMs using large
pages, so force the allocation alignment to 2MB.

This change was tested using HTTP ramdisk boot, targeting a flat windows
image.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-08-06 08:59:25 +08:00
HemaAnmisha
686f1e3ea8 CryptoPkg/BaseCryptLibMbedTls : Add strpbrk() support to MbedTls
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Mbedtls requires the use of strpbrk(), but it is currently
included in BaseCryptLib, which is not part of
BaseCryptLibMbedTls. To resolve this, add strpbrk() to
CrtWrapper.c, as BaseCryptLibMbedTls is not dependent
on OpensslLib.

Signed-off-by: HemaAnmisha <hema.anmisha.kalavakolanu@intel.com>
2025-08-05 13:57:26 +08:00
John Mathews
d2d8d38ee0 UefiCpuPkg/PiSmmCpuDxeSmm: Safe handling of IDT register on SMM entry
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Mitigates CVE-2025-3770

Do not assume that IDT.limit is loaded with a zero value upon SMM entry.
Delay enabling Machine Check Exceptions in SMM until after the SMM IDT
has been reloaded.

Signed-off-by: John Mathews <john.mathews@intel.com>
2025-08-04 08:15:19 -07:00
Abdul Lateef Attar
7fe3609022 DynamicTablesPkg: Add alias for EArchCommonObjPciConfigSpaceInfo
Some checks failed
CodeQL / Analyze (IA32, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (IA32, MdeModulePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FatPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, MdePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Has been cancelled
CodeQL / Analyze (X64, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (X64, MdeModulePkg) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
Introduce EArchCommonObjMcfgPciConfigSpaceInfo as an alias for
EArchCommonObjPciConfigSpaceInfo.

The CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO object is utilized by both
the MCFG and ACPI SSDT PCIE generators. Assigning a unique configuration
object ID ensures the platform configuration driver supplies the correct data.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-08-01 15:45:06 +02:00
Yuwei Chen
a60334ad59 BaseTools: Fix FMMT FvHandler Padding operation issue
Some checks failed
CodeQL / Analyze (IA32, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (IA32, MdeModulePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FatPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, MdePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Has been cancelled
CodeQL / Analyze (X64, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (X64, MdeModulePkg) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
When using the FMMT FvHandler function, new padding size
should be calculated correctly comparing with origin ffs
and new ffs, else it will cause the binary size changes.
This patch is used to fix the bug.

Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
2025-07-30 02:44:25 +00:00
Pranav V V
491530abaa MdeModulePkg: Change PCD type to support dynamic
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
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
Guo Dong
3b48f8ccab UefiPayloadPkg: Fix calling convention
When register a root SMI handler, it is expected to use windows calling
convention for the SMI handler. This patch adds missing EFIAPI for the
SMI handler SmmSwDispatcher to avoid potential issue from Linux build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-07-29 17:50:45 +00:00
Levi Yun
0d82e48221 DynamicTablesPkg: add Tpm2DeviceTableLib to generate Tpm2 device table
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Introduce Tpm2DeviceTableLib to generate SSDT table which describes
Tpm2 devices.

This dynamic table generation is controlled by PcdGenTpm2DeviceTable
which default value is FALSE.
When it is TRUE, the TPM2 device ssdt table is generated when TPM2 ACPI
table is generated.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-29 08:07:39 +00:00
Levi Yun
faeedaa54b DynamicTablesPkg: add ArchCommonObjTpm2DeviceInfo
To generate SSDT for TPM2 device using DynamicTablePkg,
add TPM2 Device information

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-29 08:07:39 +00:00
Nanjinmoorthyj
47e818016a ShellPkg/Library: Remove unecessary error check
Some checks failed
CodeQL / Analyze (IA32, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (IA32, MdeModulePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FatPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, MdePkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Has been cancelled
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Has been cancelled
CodeQL / Analyze (X64, CryptoPkg) (push) Has been cancelled
CodeQL / Analyze (X64, MdeModulePkg) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Has been cancelled
Remove the error handling from the connect.c file as it is redundant.

Signed-off-by: Nanjinmoorthy <nanjinmoorthyj@ami.com>
2025-07-25 09:57:50 +00:00
Thomas Prescher
97b0f1ea3b OvmfPkg/CloudHv: bump PcdCpuMaxLogicalProcessorNumber to 254
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de>
On-behalf-of: SAP thomas.prescher@sap.com
2025-07-24 21:49:41 +00:00
Revathy V
be6342d64f ShellPkg: Fixed Deadcode and Null field Coverity warnings.
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Updated fixes for all Deadcode and Null field Coverity fixes in ShellPkg

Signed-off-by: Revathy <revathyv@ami.com>
2025-07-24 07:57:29 +00:00
Prachotan Reddy Bathi
01295fd25b ShellPkg: DtbTableAddress via config in dmem
DTB address can be modified through the config table. Use
this address in dmem output.
EmbeddedPkg dependency added to
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
and ShellPkg/ShellPkg.ci.yaml

Adds to: 42b0443599
("ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c")

Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
f41cc8ac79 ArmVirtPkg: Introduce ArmTransferListLib to ArmVirtPkg
Add ArmTransferListLib as a library to platforms using
ArmVirtCloudHv.dsc and ArmVirtQemu.dsc.

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
adf345e27b ArmPlatformPkg: Introduce TransferList Guid Hob for SEC
ArmTransferListHobGuid holds TransferList base address
If there's no valid TransferList found, or if a Guid HOB
is already present Guid HOB is not built, boot progresses
as usual.

https://firmwarehandoff.github.io/firmware_handoff

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
c1e3e71643 ArmPlatformPkg: Introduce gArmTransferListPpiGuid
Populate the gArmTransferListPpiGuid with the TransferList
base address.
Place the Ppi at the end of the PpiList
For platforms with no TransferList support,
boot continues without any errors.
https://firmwarehandoff.github.io/firmware_handoff

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
0bad279bd4 ArmPkg: Add gArmTransferListPpiGuid
ArmTransferListHobGuid will hold the TransferList base address
https://firmwarehandoff.github.io/firmware_handoff
SEC platforms can utilise this PPI to build the TransferList HOB

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
6a329eb853 ArmPlatformPkg: Capture TransferList Information for SEC
Capture TransferList address from register x3
Refer to section 3 of the FW Handoff Specification
https://firmwarehandoff.github.io/firmware_handoff
The TransferList header is present at the base address
captured by this variable.
For platforms with no TransferList support,
boot continues without any errors.

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
078414f045 ArmPlatformPkg: Introduce TransferList Guid Hob for PeilessSec
ArmTransferListHobGuid holds TransferList base address
If there's no valid TransferList found, Guid HOB is not built,
boot progresses as usual.

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Reddy Bathi
78d17ce5d2 ArmPkg: Add ArmTransferListHob Guid
ArmTransferListHobGuid will hold the TransferList base address
https://firmwarehandoff.github.io/firmware_handoff

Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Bathi
b1096651d8 ArmPlatformPkg: Capture TransferList information for PeilessSec
Capture TransferList address from register x3
Refer to section 3 of the FW Handoff Specification
https://firmwarehandoff.github.io/firmware_handoff
The TransferList header is present at the base address
captured by this variable.
For platforms with no TransferList support,
boot continues without any errors.

Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-24 05:59:45 +00:00
Prachotan Reddy Bathi
e841099600 ArmPkg/ArmTransferListLib: Add utility functions
Added functionality TransferList Library

TransferListVerifyChecksum - Verify TransferList CheckSum
TransferListCheckHeader - Check if TransferList header is valid,
 return suitable opcodes validating the header
TransferListFindEntry - Find a specific entry on the TransferList
 using the TagId
TransferListDump - Dump the contents of the TransferList header
 and the entry headers

Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-24 05:59:45 +00:00
Levi Yun
5fc1ba3f25 SecurityPkg/Tcg2Config: add Tcg2ConfigFfaPei
To support TPM2 devices that operate over the FF-A specification using CRB
in the Tcg2Pei PEIM, add the Tcg2ConfigFfaPei PEIM to
detect the presence of such TPM2 devices.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-24 04:48:50 +00:00
Levi Yun
f47216f159 SecurityPkg/Library: Tpm2DeviceSecLibFfa for PeilessSec
To support measurement and extend PCR in PeilessSec with
TPM device using FF-A over CRB, add Tpm2DeviceSecLibFfa for PeilessSec.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-24 03:54:43 +00:00
Levi Yun
ee9950d3fb SecurityPkg/Library: separate logics geting TPM2 information with FF-A
This is preparation patch to add Tpm2DeviceSecLibFfa for SEC
used in PeilessSec.
In SEC phase, DynamicPcd used for cacahing TPM2 information
couldn't be used.
To resolve this, writes wrapper functions to get TPM2 information
so that in the wrapper functions used in SEC wouldn't use the
related DyanmicPcd.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-24 03:54:43 +00:00
Michael Kubacki
ba6a8eb045 SecurityPkg: CodeQL Fixes.
Makes changes to comply with alerts raised by CodeQL.

Most of the issues here fall into the following two categories:

1. Potential use of uninitialized pointer.
2. Inconsistent integer width in comparison.

Co-authored-by: Taylor Beebe <31827475+TaylorBeebe@users.noreply.github.com>
Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com>
Co-authored-by: Bret Barkelew <bret@corthon.com>

Signed-off-by: Doug Flick <dougflick@microsoft.com>
2025-07-24 01:58:06 +00:00
Oliver Smith-Denny
690929c458 SecurityPkg: Tpm2DumpLib: Make All Prints at DEBUG_SECURITY
When DEBUG_SECURITY was added, not all prints in
Tpm2DeviceLibDTpmDump.c were updated. This commit updates
the remaining prints.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-24 00:46:55 +00:00
Oliver Smith-Denny
05c966e8f1 StandaloneMmPkg: Unify EfiFileName Parsing
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
The various cores all attempt to print the EfiFileName when
loading/dispatching drivers, but they are not unified on
approach. This commit ensures they are using the same buffer
size and the loop parsing variables are unsigned, as we should
not have a negative index.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-23 12:57:55 +00:00
Oliver Smith-Denny
c3479204cc MdeModulePkg: Unify EfiFileName Parsing
The various cores all attempt to print the EfiFileName when
loading/dispatching drivers, but they are not unified on
approach. This commit ensures they are using the same buffer
size and the loop parsing variables are unsigned, as we should
not have a negative index.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-23 12:57:55 +00:00
Oliver Smith-Denny
bcd8509640 StandaloneMmPkg: Always Print Driver Load Messages
Today, StandaloneMM Core's image loader only prints driver load messages
if debug code is enabled. However, these are some of the most
important prints in the codebase: on a given system even if you
have nothing else to debug with, you can see the last driver
executed.

Debug code blocks are used to skip logic that only exists for
debug purposes and wastes time on a release build. However, the
logic to print a line and determine the filename from the PDB
is not extensive and provides critical information, so it is
inappropriate to wrap in a debug code section.

Platforms can still choose to disable logging at DEBUG_INFO/DEBUG_LOAD
and will not see the error messages.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-23 12:57:55 +00:00
Oliver Smith-Denny
1ec1f5d711 MdeModulePkg: Always Print Driver Load Messages
Today, DXE/PEI/SMM Core's image loaders only print driver load messages
if debug code is enabled. However, these are some of the most
important prints in the codebase: on a given system even if you
have nothing else to debug with, you can see the last driver
executed.

Debug code blocks are used to skip logic that only exists for
debug purposes and wastes time on a release build. However, the
logic to print a line and determine the filename from the PDB
is not extensive and provides critical information, so it is
inappropriate to wrap in a debug code section.

Platforms can still choose to disable logging at DEBUG_INFO/DEBUG_LOAD
and will not see the error messages.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-23 12:57:55 +00:00
Laszlo Ersek
43d696a366 OvmfPkg/CpuHotplugSmm: hook up MSR_IA32_FEATURE_CONTROL with platform info
Map the feature control MSR config from the OVMF platform info HOB to
FIRST_SMI_HANDLER_CONTEXT.

(Note that CpuHotplugSmm already consumes -- indirectly -- the
"MdePkg/Library/DxeHobLib/DxeHobLib.inf" library instance, according to
the build report; therefore adding an explicit HobLib class dependency
shouldn't *generally* increase this SMM driver's exposure. The consumed
lib instances are the same before and after this patch, at least in
"OvmfPkgIa32X64.dsc".)

Fixes: https://github.com/tianocore/edk2/issues/11188
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-07-23 12:10:11 +02:00
Laszlo Ersek
0e814e829e OvmfPkg/CpuHotplugSmm: set MSR_IA32_FEATURE_CONTROL in first SMI handler
Introduce new fields to FIRST_SMI_HANDLER_CONTEXT:

- a UINT8 (effectively: boolean) value that controls whether the first SMI
  handler of the hot-added CPU is supposed to set
  MSR_IA32_FEATURE_CONTROL,

- and for when that is the case, two UINT32 values, for passing the
  desired EDX:EAX (64-bit) MSR value.

MSR_IA32_FEATURE_CONTROL might as well be settable in the post-SMM pen
("PostSmmPen.nasm"); however, I find the first SMI handler better for this
purpose:

- we already have a nice context structure we can extend,

- in SMM, we have tighter control than after SMM (see the comments near
  the top of "PostSmmPen.nasm").

MSR_IA32_FEATURE_CONTROL is orthogonal to the SMRAM State Save Map, and
WRMSR is permitted in the real mode-like initial environment of SMM, so
functionally speaking, this should be fine.

For now, the feature is disabled.

Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-07-23 12:10:11 +02:00
Laszlo Ersek
f92ba13a66 OvmfPkg/CpuHotplugSmm: add whitespace
In a subsequent patch, we'll introduce fields with long names to
"FIRST_SMI_HANDLER_CONTEXT". Make room for those field names in
"FirstSmiHandler.nasm".

"git show -b" produces no patch output for this commit.

Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-07-23 12:10:11 +02:00
Laszlo Ersek
c37e2d38d6 OvmfPkg/PlatformPei: record "etc/msr_feature_control" presence explicitly
A zero "FeatureControlValue" currently means "no feature control, or
feature control with zero value". Distinguish both cases by explicitly
recording the presence of the "etc/msr_feature_control" fw_cfg file. This
will be helpful later in this series, when we won't want to touch fw_cfg
again, but still know if "etc/msr_feature_control" was read OK.

Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-07-23 12:10:11 +02:00
Aaron Pop
c27552f343 ShellPkg: Shell Validate parameter before use.
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
When FvSimpleFileSystem is included in a firmware image,
the FV is accessible as a simple file system.

Shell contained a bad assumption that the FileDevicepath,
the path where the efi shell was loaded from, was always
a Media device path/media vendor device path. It would
make a blind cast of the device path node.

Add a check to verify device path type/subtype before
casting the node to a FILEPATH_DEVICE_PATH.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-07-23 06:07:09 +00:00
Tuan Phan
04fe3f50d6 OvmfPkg/RiscVVirt: Adopt New CpuExceptionHandlerLib
Utilize the updated CpuExceptionHandlerLib, which now includes
RISC-V support.

Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-23 04:51:54 +00:00
Tuan Phan
4052e8f155 UefiCpuPkg: CpuExceptionHandlerLib: RISC-V: Support backtrace
Add support for backtrace in DEBUG builds for RISC-V.

Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-23 04:51:54 +00:00
Tuan Phan
aee4d29d56 BaseTools/tools_def: Enable frame pointer for RISC-V
Add -fno-omit-frame-pointer to RISC-V targets to ensure frame pointers
are preserved, supporting stack backtraces for debugging.

Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-23 04:51:54 +00:00
Tuan Phan
3a06b5dac9 OvmfPkg/RiscVVirt/PlatformSecLib: Clear s0 (fp) at entry point
Scrub s0 (fp) to prevent stack tracing from extending beyond the Sec code.

Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
2025-07-23 04:51:54 +00:00
Tuan Phan
db299fa788 UefiCpuPkg: CpuExceptionHandlerLib: Support RISC-V
Relocate exception handler code from BaseRiscV64CpuExceptionHandlerLib to
CpuExceptionHandlerLib.

Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-23 04:51:54 +00:00
Chris Fernald
c840e5f95b EmbeddedPkg: Fix incorrect define for hardware interrupt2 protocol
In HardwareInterrupt2.h the define for the protocol does not match the definition
of the protocol in the dec file. The definition in the dec file is 32898322-2da1-474a-baaa-f3f7cf569470
where in the definition the define is 32898322-2d1a-474a-baaa-f3f7cf569470 and the string
is even less correct with various bit swaps.

This commit changes all the strings and definitions to be consistent with the dec definition.

Signed-off-by: Chris Fernald <chfernal@microsoft.com>
2025-07-23 00:43:52 +00:00
James Le Cuirot
188f8c686e BaseTools/tools_def: Always link with -Wl,-z,notext for BFD/LLD
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Commit a257988f59 added -Wl,-z,notext, but
only when linking for IA32/X64 with LLD.

BFD can also be configured to either warn or error when text relocations
are detected. It does not check at all by default, but Gentoo Linux
tells it to warn in its regular configuration and tells it to error in
its hardened configuration.

Commit 14cb48b0a0 made linker warnings
fatal in all BFD cases. At least the AARCH64 and IA32/X64 code does
include text relocations, so this now fails to build on Gentoo Linux.
We should therefore always use -Wl,-z,notext.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-22 16:19:51 +00:00
James Le Cuirot
d7ccf477f5 BaseTools/tools_def: Make linker warnings fatal for RISCV + LOONGARCH64
For consistency, and as before, for GCC5 only.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-22 16:19:51 +00:00
James Le Cuirot
35a93babfb BaseTools/tools_def: Drop unused GCC IA32/X64 flag variables
These haven't been used since before 2d07607d8b,
when UNIXGCC support was dropped.

The recent change in 14cb48b0a0 to make
linker warnings fatal was therefore ineffective for these architectures.

As requested, also make linker warnings fatal for GCC5 only. The last
release made them fatal for AARCH64 on GCC48/GCC49, but it seems likely
no one has actually tested that yet.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-22 16:19:51 +00:00
Pranav V V
1caa6a92ea ArmPlatformPkg/PL011UartLib: Prevent data loss in conversion.
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Add an explicit (UINT32) cast to the assignment.

Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-07-22 06:34:29 +00:00
Pranav V V
6cb4523704 ArmPlatformPkg/PL011SerialPortLib: Support dynamic PCD type.
Convert UART configuration PCDs from FixedPcd to dynamic Pcd to enable
runtime modification of serial port parameters.

Changes made:
- Replace FixedPcdGet64/FixedPcdGet8 calls with PcdGet64/PcdGet8 for:
  * PcdUartDefaultBaudRate
  * PcdUartDefaultParity
  * PcdUartDefaultDataBits
  * PcdUartDefaultStopBits
- Update INF file to declare these PCDs under [Pcd].

Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-07-22 06:34:29 +00:00
Abdul Lateef Attar
095bfacc9e DynamicTablesPkg: Implement X64-specific SsdtSerialPortFixupLib
Some checks are pending
CodeQL / Analyze (IA32, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (IA32, MdeModulePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, DynamicTablesPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FatPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, FmpDevicePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2Pkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, IntelFsp2WrapperPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, MdePkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PcAtChipsetPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, PrmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SecurityPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, ShellPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, SourceLevelDebugPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, StandaloneMmPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UefiCpuPkg) (push) Waiting to run
CodeQL / Analyze (IA32,X64, UnitTestFrameworkPkg) (push) Waiting to run
CodeQL / Analyze (X64, CryptoPkg) (push) Waiting to run
CodeQL / Analyze (X64, MdeModulePkg) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=FALSE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL VS2022 (FIT_BUILD=TRUE, windows-latest, 3.12, DEBUG, VS2022) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=FALSE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
UPL Build / Build UPL GCC (FIT_BUILD=TRUE, ubuntu-latest, 3.12, DEBUG, GCC) (push) Waiting to run
Introduce an X64-specific implementation of the
SsdtSerialPortFixupLib library class.
Utilizes the AML library to generate COM or serial device dynamically.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-21 13:50:05 +00:00
Abdul Lateef Attar
7d8760875a DynamicTablesPkg: Adds AML code generation for serial UART RD
Adds AML code generation for Serial UART resource descriptor.
This commit introduces helper functions to generate
AML resource data for serial UART resource descriptor.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-21 13:50:05 +00:00
Abdul Lateef Attar
d1f8485822 DynamicTablesPkg: Adds AML code generation for IRQ
Adds AML code generation for IRQ resource descriptor.
This commit introduces helper functions to generate
AML resource data for IRQ resource descriptors.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-21 13:50:05 +00:00