edk2 is dropping support for the ARM32 architecture. This commit
removes ARM32 code from StandaloneMmPkg. It also removes irrelevant
VALID_ARCHITECTURES comments from infs that are not arch
specific.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
edk2 is dropping support for the ARM32 architecture. This commit
removes ARM32 support from UefiPayloadPkg. It removes irrelevant
VALID_ARCHITECTURES comments from infs that are not arch
specific.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
edk2 is dropping support for the ARM32 architecture. This commit
removes ARM32 code from UefiCpuPkg. It drops irrelevant
VALID_ARCHITECTURES fields from infs that are not arch
specific.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
edk2 is dropping support for the ARM32 architecture. As such,
this commit drops ARM32 from running in CI and removes the
references to it in the readme and Maintainers.txt.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
When removing ARM32 code from edk2, a CodeQL
error in AcpiView (pointer used without null
check) was flagged in GH.
This updates the code to eliminate the duplicate code in that
function and instead call EfiGetSystemConfigurationTable.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Update the CLANGPDB toolchain to define the __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__, and __MINGW32__ macros with values that match the
pre-defined values seen when using the x86_64-unknown-windows-gnu target
triple. This minimizes the differences in pre-processor macros between the
CLANGPDB and CLANGDWARF targets.
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
As a BASE type library, currently the TCG PEI driver, Tcg2Pei.inf links
the library. On edk2-stable202508 version, it is found that the driver
includes and updates the global variable of mLastCommandSent in debug
build. Also found that the previous commit (460f270) for the library adds
and uses the global variable. Updating the global variable in PEI drivers
could affect the following issues. To address these issues, remove the
global variable usage.
PEI ROM Boot : Global variable is not updated
PEI RAM Boot : PEI FV integration/security check is failed
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
TDVF boot in QEMU fails when the VMM is configured with
odd memory sizes (in MB) below 2816M (e.g., 2815M, 2813M).
This is due to the RAM split defined in pc_q35.c:
when RAM exceeds 2816M, low memory is truncated to 2048M
and the remainder is placed above the 4G boundary.
This split causes failures only with odd sizes below 2816M.
TDVF uses a default page size of 2M (hugepage),
which leads to a corner case where the last 1M may not be accepted.
To resolve this, on BSP, always accept any remaining memory using a 4K page size.
Signed-off-by: Stanislaw Grams <stanislaw.grams@intel.com>
The current implementation for XDR certificate handling assumes the
PublicKeyDataXdr buffer is 4-byte aligned. This is not always the case.
For example, if PublicKeyDataXdr=0x02, and the length is 0x05, the
correct offset should be 0x2 + align_up(0x5, 4) -> 0x2 + 0x8 = 0xA. The
current logic produces align_up(0x2 + 0x5, 4) -> align_up(0x7, 4) = 0x8.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
After bootloader calls FSP API mode, I found the RDI register is
changed in some cases.
Below is the first line of function FspApiCallingCheck in assembly dump
mov qword ptr [rsp+0x8],rbx
We can see compiler will use rsp+0x8 for some purpose, while rsp+0x8
is used to save RDI by FSP in code before.
According to the x86-64 calling convention, caller is responsible for
allocating 32 bytes of "shadow space" on the stack right before calling
the function (regardless of the actual number of parameters used).
However FSP code doesn't reserve 32 bytes before calling
FspApiCallingCheck C function in 64bit.
The patch fixes it by reserving the 32 bytes before calling C routine.
Also, make sure the stack is 16-byte alignment, sub 0x28 to RSP.
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Adjust AnsiTestString to be compatible with wide/narrow string in
TerminalDxe driver. If WIDE_CHAR or NARROW_CHAR is hit, the string
is still valid since OutputString function will correctly handle it.
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
Add four newly added terminal types in TerminalConOutTestString, although
this function is rarely used. This patch is a supplement to previous patch
8a53ea9d9f.
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
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>
All DynamicTablesPkg libraries and drivers execute in the DXE phase,
where both AMD and Intel platforms operate in X64 (64-bit) mode.
Therefore, IA32 (32-bit) support is no longer required for DynamicTablesPkg.
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Update build rules to split C file rules from C++ file
rules and introduce CXX_FLAGS to provide compiler options
that are only used to compile C++ files.
This is required because the compiler options to specify
the C++ standard generate errors when used to compile
C files.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Remove -nostdlib and -nostdlibinc from CC_FLAGS for CLANG
builds to support using CLANGPDB and CLANGDWARF for modules
of type HOST_APPLICATION that require use of standard C libs.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
All ASM files are processed using PP_FLAGS that includes
AutoGen.h. Remove redundant -imacros AutoGen.h option from
GCC_ASM_FLAGS. This also removes warnings generated in
CLANG builds when an ASM file is processed and an
AutoGen.h file is not present.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update ASLCC_FLAGS in tools_def.template too provide all
the options required to compile ACPI Table source files
without any dependencies on CC_FLAGS. This allows CC_FLAGS
to only be used to compile C source files and for
ASLCC_FLAGS to only be used to compile ACPI Tables source
files.
No changes are required for the MSFT or XCODE tool chain
families. Only the GCC tool chain family requires updates
to the ASLCC_FLAGS in tools_def.template along with updates
to build_rule.template to not use CC_FLAGS for ACPI Table
rules.
This change is required to avoid use of ASAN and code
coverage flags when building ACPI Table source files that
break CLANGDWARF builds of ACPI Table source files.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
* Add CLANGDWARF support to USER_DEFINED module type rules.
* Add CLANGDWARF support to HOST_APPLICATION module type rules.
* Add missing -c option to CLANGPDB HOST_APPLICATION module
type rules
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Use GCC family and remove references to specific tool chain tags.
This allows all GCC families to be supported including CLANGDWARF.
Add -z noexecstack to reduce warnings.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
For GCC family X64 builds, add -DNO_MSABI_VA_FUNCS to force
use of the compiler default vararg macros. This define is
required in libraries that use a standard C source submodule
and there are one or more vararg functions. The calling
convention of the vararg function must match the calling
convention of the vararg macros used within the vararg
function.
In the JsonLib case, jsonp_error_set() is a vararg function
and generates the following error for CLANGDWARF X64 builds.
RedfishPkg/Library/JsonLib/jansson/src/error.c:37:5:
error: '__builtin_ms_va_start' used in System V ABI function
37 | va_start(ap, msg);
| ^
This change matches CryptoPkg openssl and mbedtls library
INF files that also define NO_MSABI_VA_FUNCS.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update INF for BaseCryptLib used with host based unit
tests to use a MODULE_TYPE of HOST_APPLICATION to make
sure the correct compiler/linker flags are used.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
tolower() is always provided by the standard C library.
Remove the implementation of tolower() from
UnitTestHostCrtWrapper.c that is only used when building
host based unit tests.
PR https://github.com/tianocore/edk2/pull/11217 attempted to
resolve this issue by renaming tolower() to avoid duplicate
symbols. This change removes this workaround as well.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update [BuildOptions] so CLANGPDB matches MSFT to support
Windows/clang builds of MtrrLib host-based unit tests.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Remove workaround for GCC compilers that is no longer
required. Keeping this implementation of __chkstk() generates
duplicate symbol build failures with Windows/CLANGPDB builds
host-based unit test builds.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
CLANGDWARF generates errors for missing braces in
initialization of complex structures. Expand the
initialization of EFI_SMM_CPU_IO2_PROTOCOL in
LocalSmst to set each function pointer to NULL.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Fix mimatched macro name of include guard in
MockSecurityManagementLib.h. This was found with unit test
build using CLANGDWARF.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
CLANGDWARF generates a build error for calling convention
mismatch in UdpRead(), UdpWrite(), and Configure() mock
functions. Add EFIAPI so mock function matches function
prototype of function being mocked.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
CLANGDWARF generates build error for missing braces when
initializing a complex structure. Change initialization of
EFI_DHCP6_IA local variable to a call to ZeroMem() instead.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Remove default from checkbox statement that is not part
of the checkbox statement syntax to remove VFR compiler
warning.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
TDVF cannot be mapped as a pflash device.
The script referenced in README.md must use the -bios option instead.
TDX support in QEMU and KVM has been upstreamed,
so the URLs should be updated to point to upstream repositories.
Signed-off-by: Stanislaw Grams <stanislaw.grams@intel.com>
Introduces support for CRB Interface Version 2 as defined in the TCG PC
Client Platform TPM Profile (PTP) Specification v1.06.
This enables firmware to identify TPMs that support the CRB buffer
interface.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Modern ARM server platforms support SNP for PXE boot.
I tested PXE boot with ArmVirtQemu and needed to enable SNP.
Signed-off-by: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
Uncrustify release
https://github.com/tianocore/uncrustify/releases/tag/73.0.11
The only functional change in this release from 73.0.10 is to
reduce file parsing messages during execution:
```
uncrustify prints each file it is parsing at system error level,
which is by default printed. For MdeModulePkg along, this creates
1,000 lines of logs, just saying which file is being parsed.
This is noise in the log, so this commit downgrades the print to
user information, which is not printed by default.
```
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The register keyword was deprecated in C++11 and removed in C++17,
which causes multiple compiler warnings when building VfrCompile:
"ISO C++17 does not allow ‘register’ storage class specifier".
Resolve the warnings by removing instances of register keyword.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
The `GET_MPIDR_AFFINITY_BITS` macro masks MT_BIT in ArmReadMpidr (), but
`CoreInfo[Index].Mpidr` wasn't masked by the same macro which causes a
mismatch even if it is the same MPIDR value.
This change uses the same `GET_MPIDR_AFFINITY_BITS` macro for
`CoreInfo[Index].Mpidr` to fix the core index searching logic.
Signed-off-by: Kun Qin <kuqin@microsoft.com>
When an AP is waken up to perform some operation with a time out period
specified, the expired timer will put the core into `CpuStateFinished`
state. This will make the subsequent enable/disable AP core fail to
proceed, which is unexpected and inconsistent with the rest of the
handling in this module (`CpuStateIdle` and `CpuStateFinished` are
generally treated the same).
This change extends the accepted state of CPU to `CpuStateFinished` for
AP enable/disable interface to fix calls on timer expired APs.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Build failed with the below error:
error: variable 'Status' is used uninitialized when
PcdUnicodeCollation2Support is FALSE.
Fixing this issue by initializing Status unconditionally.
This is a regression issue caused by below Edk2 commit
a46697f735
Signed-off-by: HemaAnmisha <hema.anmisha.kalavakolanu@intel.com>