| Age | Commit message (Collapse) | Author | Files | Lines |
|
Add AsciiStrToUintn() and AsciiStrToUint64() to BaseLib. These are
thin wrappers that dispatch to the existing AsciiStrHexToUintnS()/
AsciiStrDecimalToUintnS() (and UINT64 equivalents) based on Base,
which must be 0 (auto-detect via a "0x"/"0X" prefix), 10, or 16.
No new radix-parsing logic is introduced; the existing conversion
routines already cover the bases actually used in practice.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Add AsciiIsSpace() to BaseLib, which checks whether an ASCII
character is a space character as defined by the ISO C isspace()
function. This will be used to implement AsciiStrToUintn() and
AsciiStrToUint64().
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Add AsciiStrRChr() to BaseLib, which returns the last occurrence of
a character in a Null-terminated ASCII string. This mirrors the
existing AsciiStrStr() API style and provides a reusable
implementation for consumers that currently hand-roll this logic.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
This change fixes some ECC check failures around the usage of doxygen
keywords.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
The direct message arguments stripped off the header, making the
underlying FF-A function interface to lose information when it comes to
certain return code, i.e. FFA_YIELD and FFA_INTERRUPT.
This change adds back the header field for this purpose so that the
callers can decide how to act on the corresponding return codes.
It then populates the header field for this purpose in FFA direct
message functions so that the callers can decide how to act on the
corresponding return codes.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
Cases when MPXY extension is not present or it fails, the system boot fails.
This is easily reproducible with Qemu master branch.
Remove the constructor and let RAS agent client initialize the MPXY library
and fail graceully in case of errors but the boot process continue.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
Add UEFI-native wrappers for libfdt string list count and search APIs.
Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
|
|
Signed-off-by: Star Zeng <star.zeng@intel.com>
|
|
GCC 17 (upcoming release) is updating the type of
__stack_chk_guard from a void * to a uintptr_t.
This is only a type change, not a size change. However,
it does cause the GCC 17 build to fail because of the
type mismatch.
uintptr_t is defined as unsigned long, which is not
a type edk2 defines. It has the same size as UINTN
on a given system, but on 64 bit systems we have the
same type issue because UINTN is defined as unsigned long long,
not unsigned long.
To work around this and avoid defining a new type in edk2,
use the compiler built in __UINTPTR_TYPE__ which is the
underlying definition in GCC.
This is a backwards compatible change with previous versions
of GCC and CLANGDWARF but also fixes the upcoming definition
change for GCC 17.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
Add the RAS agent client library which is used to communicate to
a remote RAS agent. The RAS agent can be queried about the details
of various hardware error sources in the system.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
Add SBI Mpxy client library to communicate using RPMI or other
protocols using SBI MPXY extension.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
Add SBI MPXY extension and its function macros.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
Extensions should be detected before they can be used. Add a function
to detect the support for an SBI extension using probe extension SBI
function.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
Add new error codes defined in SBI relating to shared memory, etc.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
|
|
This fixes all non-breaking spelling errors in
MdePkg.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
Commit 8c654bb3ec sets FUA bit forcefully in SCSI sync I/O to
avoid possible data loss. However, it may cause issues for the
storage without the support FUA and WCE.
For example, Windows Server 2025 guest fails to boot from
vhost-scsi block device in such scenario. The booting Error
code is 0xc0000185, the SCSI command fails with the following,
Mode Sense Key: EFI_SCSI_SK_ILLEGAL_REQUEST
Additional Sense Code: EFI_SCSI_ASC_INVALID_FIELD
This patch gets the FUA and WCE support of the storage and sets
FUA conditionally.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Annie Li <annie.li@oracle.com>
|
|
Current ArmFfaLibGetVersion()'s arguments receive two arguments
-- major version and minor version.
However, This gives some impression treating major and minor version
of the ABI as two unrelated 16-bit variables as opposed to
the upper and lower 16-bits of a 32-bit version variable.
Therefore, change the arguments with whole version and
let user to get major/minor version via ARM_FFA_MAJOR/MINOR_VERSION_GET
macros.
Also, add some useful helper to check version compatibility and
mimimum require ABI version.
Continuous-integration-options: PatchCheck.ignore-multi-package
Suggested-by: Leif Lindholm <quic_llindhol@quicinc.com>
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
Add helper function to check if the Realm Management
Extension (RME) is implemented by the hardware.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
|
|
FdtStrerror
Update the FdtOverlayApply() function to mark the Fdt pointer
as an IN OUT variable. The internal fdt_overlay_apply() function
returns the merged blob in the Fdt variable.
Update FdtStrerror to have it's return type on a single line, aligning
the style with the rest of the file.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Update FdtGetName() and FdtGetPath() to correctly mark the VOID *Fdt
as a CONST variable. This aligns with the internal libfdt
implementation.
Update MockFdtLib.h to align with the updated inputs for FdtGetName()
and FdtGetPath().
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Add support for the define FdtForEachPropertyOffset and
FdtFindMaxPhandle() wrappers.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Add new log bit for all paging-related log messages, i.e. page table
updates because of memory encryption or memory attribute changes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This provides access to the Auxilary ID register, AIDR_EL1.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ka-in Ng <kainng@os.amperecomputing.com>
|
|
Signed-off-by: Ray Ni <ray.ni@intel.com>
|
|
ArmLib contains obsolete AArch32-only declarations that are
not relevant to AArch64:
- ARM_PROCESSOR_MODE enum and processor mode constants
- AArch32-specific MMU/vector helpers:
ArmSetDomainAccessControl(), ArmSetLowVectors(),
ArmSetHighVectors(), and ArmSetTTBCR()
Remove these declarations as they are unused across the tree.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Remove deprecated branch prediction control APIs from ArmLib and their
callers. These interfaces are not required on AArch64 and do not have
any valid in-tree consumers.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Add the FF-A YIELD command to the FF-A library.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
|
|
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.
`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.
Compared to macro-based include guards, `#pragma once`:
- Eliminates the risk of macro name collisions or copy/paste errors
where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
(e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
file entirely, rather than re-reading it to find the matching
`#endif` ("multiple-include optimization").
- Note that some compilers may already optimize traditional include
guards, by recognzining the idiomatic pattern.
This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.
However, this is considered acceptable given:
1. edk2 already defines a subset of supported compilers in
BaseTools/Conf/tools_def.template, all of which have supported
`#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
include guard naming and potential macro collisions.
Approximate compiler support dates:
- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
(http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Replacing the non-ASCII characters with ASCII characters fixes build failures onWindows systems using non-English locales. These characters trigger MSVC warningC4819 (“file contains a character that cannot be represented in the current codepage”), which becomes an error when /WX is enabled.
Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: dhiineshm <dhiineshm@ami.com>
|
|
The word property is misspelled as propery, so fix it.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
Add FDT_HEADER field accessors and FdtOverlayApply() wrapper.
Signed-off-by: Mario Bălănică <mariobalanica02@gmail.com>
|
|
Introduce ArmFfaGetPartitionInfo(), which retrieves the first partition
associated with the service GUID. This allows us to remove duplicated
code previously used to obtain the partition ID.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Continuous-integration-options: PatchCheck.ignore-multi-package
|
|
Starting from FF-A v1.2 [0], the FFA_PARTITION_INFO_GET_REGS
interface was added to retrieve partition information
through registers.
This ABI is useful in environments where the Rx/Tx buffer
does not need to be mapped, or where buffer mapping
is not supported for retrieving partition information.
To support this, two new APIs are introduced:
ArmFfaLibPartitionInfoGetRegs() and ArmFfaLibPartitionCountGetRegs().
Link: https://developer.arm.com/documentation/den0077/latest [0]
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
The C standard qualifies misaligned pointers as undefined behavior. This
means it is fundamentally impossible to define a conformant C API for
unaligned access that is expressed in terms of types with a minimum
alignment greater than 1 byte.
Undefined behavior means that the compiler is free to generate code that
assumes that only the defined behavior occurs. This means that a C
implementation of ReadUnaligned64() might be emitted using a 64-bit load
operation that does not tolerate misalignment, depending on the CPU
architecture.
So the only correct way to define such an API is in terms of types such
as VOID* that have no implied alignment.
Then, given that compilers today are perfectly capable of generating the
right code, given accurate annotations, let's rely on those in the
generic implementation. This will ensure that the correct access
sequences are used, depending on the CPU architecture, and on the
compiler flags (e.g., AArch64 uses -mstrict-align in XIP code as it may
execute with the MMU disabled).
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
|
|
Similar to Intel's Tdx, we need a mechanism to detect running as
an AMD SEV guest that will work in all phases everywhere. This
will be immediately used to prevent usage of MTRRs with SEV guests.
Signed-off-by: Richard Relph <richard.relph@amd.com>
|
|
Copy FvLib from StandaloneMmPkg to MdePkg because it is a common library.
Future steps will include:
1. Modify platform code including Edk2Platforms repo to use FvLib from MdePkg.
2. Remove FvLib from StandaloneMmPkg
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
|
|
Add wrapper for fdt_get_phandle().
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
Add FdtDelNode() and FdtGetPath() mock functions.
Signed-off-by: Bob Morgan <bobm@nvidia.com>
|
|
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
edk2 is dropping support for the ARM32 architecture. This
commit removes the remaining ARM32 code from MdePkg. This
also removes irrelevant VALID_ARCHITECTURES comments from
infs that are not arch specific.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
When ArmFfaLibDirectMsgReq(2) is preempted, caller of these functions
should resume it works via ArmFfaLibRun() and the secure partition
will be return with FFA_DIRECT_MSG_RESP(2) with return arguments.
However, since ArmFfaLibRun() gets its return in its stack variable,
So caller of ArmFfaLibRun() doesn't get the return arguments from
secure partition.
To resolve this, add output parameter to ArmFfaLibRun() to
receive return arguments.
Continuous-integration-options: PatchCheck.ignore-multi-package
Fixes: 5d1b38dd07c4 ("ArmPkg: Add ArmFfaLib used in Dxe driver")
Reported-by: Mariam Elshakfy <Mariam.Elshakfy@arm.com>
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
Eliminate the APIs using the scratch register as PI 1.9 specifies
it for the PEI service table pointer.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
|
|
Enable RISC-V support for the InitializeFloatingPointUnits function.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
|
|
The AA64PFR2 system register is required to detect GICv5 support.
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
Tcg2Dxe and its libraries are currently the noisiest modules in
edk2. For a sample platform printing at INFO level, Tcg2Dxe
printed 4,000 lines out of 5,700 total lines printed.
This commit defines a DEBUG_SECURITY bit to control the debug output
of Tcg2Dxe and other security related components. Most of the output is
not useful except for deep debugging of TPM transactions, so it is
appropriate to only print when the DEBUG_SECURITY bit is present.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
This change introduced a library interface that implements the FF-A
memory protocol v1.3 ALP1:
https://developer.arm.com/documentation/den0140/f
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
FFA is a framework that supports various protocols built on top. i.e.
memory protocol, which is nothing that can be done through existing
interfaces.
Instead of requiring protocol authors to check conduit PCD in every
implementation, exposing the ArmCallFfa is a unified way to allow other
protocols to leverage FFA interfaces.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
With interactions between Standalone MM partitions and normal UEFI
environment, there is constant need to convert UUID to GUID and back.
This change added 2 new interfaces to BaseLib that support such usage.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
Commit e25331fc4591
("MdePkg,UefiPayloadPkg: clean up BaseFdtLib API confusion"),
missed out aligning the wrapper for fdt_node_offset_by_property_value
between heade and implementation.
Fix this by updating the header to declare FdtNodeOffsetByPropValue
instead of FdtNodeOffsetByPropertyValue.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|