| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds dynamic stack cookies in the form of copies of the entry
point libraries that use shared logic to update stack cookies
at runtime.
This relies on RDRAND on IA32/X64 and RNDR on AARCH64 to get a
random number to apply to the stack cookie on module entry point.
This simplifies the logic a platform must do to include stack
check functionality.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit oves StackCheckLib from a NULL lib to an instance of
StackCheckLib. This requires every entry point to add a library
dependency on StackCheckLib. It also requires every SEC module
to have a dependency on StackCheckLib because there is no
standard SEC entry point.
It allows for greater flexibility for a platform to apply stack
cookies and simplifies DSC logic.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moves StandaloneMmCoreEntryPoint for X64 to MdePkg to live with
the other entry point libs. It does not move the ARM64 version,
as this was just moved to ArmPkg due to its heavy coupling with
ArmPkg code. This will need to be revisited when dynamic stack
cookie support is added to ARM64 StMM.
This commit just adds the library in MdePkg, a separate commit
will remove it from StandaloneMmPkg to make it easier to consume.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
| |
StackCheckLib defines the interface between a compiler
and the stack checking code. It is being converted from
a NULL library class to an actual library class to make
it easier to use for a platform and be easier to define
the expected interface with a compiler, so if there is
a compiler change it can be tracked and caught.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
|
|
|
|
|
|
|
|
| |
RNDR is a standard register defined in the ARM ARM for
AARCH64. Move the definition from BaseRngLib to AArch64.h.
Furthermore, move the inclusion of this register definition
to the ARM specific header file.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REF:https://github.com/tianocore/edk2/issues/10529
Adds a new PEI library instance for RngLib that uses the RNG services
provided by the RNG PPI.
This library instance will add a DEPEX on gEfiRngPpiGuid on modules
it links against. It can be used to allow PEIMs to get RNG support
over a dynamic interface.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
|
|
|
|
|
|
|
|
| |
REF:https://github.com/tianocore/edk2/issues/10529
Adds a new PPI that serves the same purpose as EFI_RNG_PROTOCOL in
DXE. This PPI can be produced by a PEIM to provide a dynamic interface
to RNG services in PEI.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the structure definition to a common location that can be shared
with the RNG PPI. Move the algorithms to a common header that can be
referenced independent of the protocol.
Include the algorithm header in the interface header since the
algorithms are directly used in the interface and for compatibility
with existing code.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
|
|
|
|
|
| |
This adds #defines and struct typedefs for the various structure
types in the CXL Early Discovery Table (CEDT).
Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
|
|
|
|
|
|
| |
PI 1.9 Specification defines new memory resource attribute for hot plug.
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
| |
Add macro for UEFI 2.11 Specification support
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
| |
UEFI 2.11 Specification adds RISC-V AP-TEE Confidential Computing
Extension
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
| |
UEFI 2.11 Specification defines new memory attribute for hot plug.
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
|
| |
gcc 15 switched to use the new ISO C23 standard by default.
'bool', 'true' and 'false' are keywords in C23, so do not
try to define them.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
UEFI 2.11 has been published on https://uefi.org/specifications
It defines SM3 crypto algorithm GUID and structure.
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PeCoffLoaderRelocateImageForRuntime() executes after boot services, and
so it should not use DEBUG() prints at all, given that these may rely on
MMIO mappings or other boot time facilities that are no longer
available.
So revert the changes in aedcaa3df8a2 ("MdePkg: Fix overflow issue in
PeCoffLoaderRelocateImageForRuntime") that replaced code comments with
DBEUG() statements.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
|
|
|
| |
Fixed Clang build error introduced by unintialized variables in
https://github.com/tianocore/edk2/commit/6278bbb89822c598fcd0637ae74174e367895c84
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
| |
Used SafeIntLib to handle the overflow check in
PeCoffLoaderRelocateImage
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
|
|
|
| |
RelocDir->Size is a UINT32 value, and RelocDir->VirtualAddress is
also a UINT32 value. The current code in
PeCoffLoaderRelocateImageForRuntime does not check for overflow when
adding RelocDir->Size to RelocDir->VirtualAddress. This patch uses
SafeIntLib to ensure that the addition does not overflow.
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
STATIC_ASSERT is #define'd to a compiler specific value, based on
built-in macros exposed by those compilers. If none of those are found,
an #error is raised.
This breaks the DTCPP build rule, which relies on the C preprocessor
for header file inclusion and value substitution, but doesn't define any
of the compiler macros we look for.
So drop the error case. If STATIC_ASSERT is used without a definition,
an error will be raised anyway.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4483
This change introduces EFI_COMPUTING_UNIT_MANAGEABILITY status code.
EFI_COMPUTING_UNIT_MANAGEABILITY is created as one of the subclasses in
computing unit class. EFI_COMPUTING_UNIT_MANAGEABILITY will be used in
edk2 RedfishPkg and edk2-redfish-client RedfishClientPkg to report
Redfish operation errors. It will also be used to report errors in
edk2-platforms ManageabilityPkg.
PI 1.9 specification, 6.4.1.4.9. Manageability Subclass:
* https://uefi.org/specs/PI/1.9/V3_Status_Codes.html#manageability-subclass
RFC:
* https://edk2.groups.io/g/devel/message/105525
* https://edk2.groups.io/g/devel/message/105595
* https://edk2.groups.io/g/rfc/message/802
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The clang compiler generates the following error
error: use of 'static_assert' without inclusion of <assert.h>
This is due to the use of the MSC Extension static_assert.
Use _Static_assert instead for clang and GNUC compilers.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
|
|
| |
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
|
|
|
|
|
|
| |
UEFI 2.10A Specification has added a new error case to
EFI_ATA_PASS_THRU_PROTOCOL.GetNextDevice API which handles
port multiplier not being connected to the Port.
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
| |
Add macros for UEFI 2.9 and UEFI 2.10 Specifications
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
| |
Clarifed the return status of EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage().
As intended in UEFI 2.10 Specification.
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
|
|
| |
Default IP TTL (Time to Live) has been updated in UEFI 2.10 A
Specification. To comply with IANA recommendations.
REF: https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-2
Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
|
|
|
|
|
|
|
|
| |
Coverity is a static analysis tool. It detects the macro as an error
(case to incompatible type, cert_exp39_c_violation). The update resolves
the error and supports compliance with the static analysis tool.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
|
|
|
|
|
|
| |
Ref: UEFI Specification Version 2.1 (Errata D) (released October 2008)
Signed-off-by: Huang Yuqi <huangyq13@lenovo.com>
|
|
|
|
|
|
|
|
|
| |
Some platforms require connecting storage media while booting to
network, or require enumerating storage protocols that were not initially
enumerated during BDS. This change adds a GUID to allow implementation
of boot manager's ConnectDeviceClass to connect storage media.
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
|
|
|
|
| |
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
|
|
|
|
|
|
|
|
| |
These files are direct ports from the (identical) files:
MdeModulePkg\Bus\Ufs\UfsBlockIoPei\UfsHci.h
MdeModulePkg\Bus\Ufs\UfsPassThruDxe\UfsPassThruHci.h
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If USB device reports class specific descriptors, it is currently the job of
device driver to parse the configuration to find the class specific data.
The new library functions parse the configuration descriptor and return class
specific interface and class specific endpoint descriptors.
Also, these new functions allow to retrieve the data from non-default alternate
settings without performing a switch to this setting. Switching to the
alternate setting currently implies the execution of UsbSetInterface function
that performs USB control trnasfer.
In some cases this switch is not desirable so the new functions
UsbGetInterfaceDescriptorSetting and UsbGetEndpointDescriptorSetting come
in handy.
Signed-off-by: Oleg Ilyasov <olegi@ami.com>
|
|
|
|
|
|
|
|
|
| |
Synchronize the changes about LoongArch64 in section 18.2.5 of UEFI2.11.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
|
|
|
|
|
|
|
|
|
|
|
| |
Enable foreign images loading on LoongArch64 if the
EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-Authored-by: Dongyan Qian <qiandongyan@loongson.cn>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ArmCacheWritebackGranule should not return value higher than MAX_UINT32.
This change will allow the usage without architecture depenedent return
size.
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
|
|
| |
Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
|
|
|
|
|
|
|
| |
Refine comments for EFI_STATUS_CODE_SPECIFIC_DATA_GUID .
Add the structs defined in this file for EFI_STATUS_CODE_SPECIFIC_DATA_GUID to comment.
Signed-off-by: Raymond Yang <yangrongwei@hotmail.com>
|
|
|
|
|
|
|
|
|
| |
This change adds new PCDs for IPMI Serial.
Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html
Signed-off-by: John Chung <john.chung@arm.com>
|
|
|
|
|
|
|
|
|
| |
Add IPMI Serial definitions
Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html
Signed-off-by: John Chung <john.chung@arm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GetRandomNumber functions in DxeRngLib can return success without
actually generating a random number. This occurs because there are code
paths through `GenerateRandomNumberViaNist800Algorithm` that do not
initialize the `Status` variable.
- Assume mFirstAlgo == MAX_UINTN (no secure algorithms available)
- Assume none of the secure algorithms have `Available` set.
- Assume PcdEnforceSecureRngAlgorithms is TRUE.
In this condition, the `Status` variable is never initialized, `Buffer`
data is never touched. It is fairly likely that Status is 0, so we can
return EFI_SUCCESS without writing anything to Buffer.
Fix is to set `Status = error_code` in this code path.
`EFI_SECURITY_VIOLATION` seems appropriate.
Signed-off-by: Doug Cook <idigdoug@gmail.com>
|
|
|
|
|
|
|
|
| |
DebugLib PCDs are very important, but they're confusing and not
well-explained anywhere. Improve the documentation comments for them to
explain how they work and how they relate to each other.
Signed-off-by: Doug Cook <idigdoug@gmail.com>
|
|
|
|
|
|
|
|
| |
With mSecureHashAlgorithms being static this should not be
needed any more.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
operator and xor in C structures to support use of these
include files when building with a C++ compiler.
This patch removes the temporary use of anonymous unions and
warning 4201 disable for VS20xx tool chains to complete the
following field name changes:
* operator -> operator_
* xor -> xor_
NOTE: This is a non-backwards compatible change to Tpm12.h
and Tmp20.h. And consumers of these include files that access
the "operator" or "xor" fields must be updated.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
operator and xor in C structures to support use of these
include files when building with a C++ compiler.
This patch temporarily introduces an anonymous union to add
operator_ and xor_ fields to support migration from the current
field names to the new field names.
Warning 4201 is disabled for VS20xx tool chains is a temporary
change to allow the use of anonymous unions.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
|
|
|
|
|
| |
Add definitions for the non-global page tables descriptor attribute, as
well as the E2H TCR bit, so that we can use them in the MMU code.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a BASE type library, some PEI drivers could link and use it.
Tcg2Pei.inf is an example. On edk2-stable202408 version, PEI drivers
that link the library include the global variable of mRdRandSupported.
The previous commit (c3a8ca7) that refers to the global variable actually
is found to influence the link status. Updating the global variable
in PEI drivers could affect the following issues.
PEI ROM Boot : Global variable is not updated
PEI RAM Boot : PEI FV integration/security check is failed
To address these issues, remove the global variable usage.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The PCD token, PcdPciExpressBaseAddress is referred in the constructor.
If the token is defined as PcdsDynamic type, the PCD function that gets
the token value uses the gBS service to locate PCD protocol internally.
In this case, it is possible for the function to be called before
initializing gBS variable, then cause a system hang due to gBS variable.
Need to ensure the availability of gBS variable.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
These constants give the set of RES1 bits in CPTR_EL2, as 1s, and the
default value to use for CPTR_EL2 in order to enable all known (or
harmless) features but no unknown ones that require EL2 knowledge. This
will be used by ArmPlatformPkg in the following commit, separated due to
being different packages, even though the combined change is tiny.
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
|