Age | Commit message (Collapse) | Author | Files | Lines |
|
Change type of buffer address type in ArmFfaRxTxBufferInfo
so that reduce the type casting.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
Some of code for handling Rx/Tx buffer is duplicate.
This patch commonize some of duplication routine used in
Rx/Tx buffer related functions.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
To use Arm-FFA intereface in PeilessSec, implments
ArmFfaSecLib used by PeilessSec.
For example, communicate with TPM service using CRB over ARM-FFA
(via Tpm2DeviceLibFfa), PeilessSec need to use Arm-FFA interface.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
The commit e15fe066036da
("MdeModulePkg/Library: make ArmFfaPeiLib available early PEIM stage")
uses ArmFfaPeiLib in the early PEIM stage.
However, the Rx/Tx buffer allocated in the early PEIM stage uses
temporary memory. This results in a memory leak when the temporary
memory's heap is relocated to permanent memory.
For example, if the Rx/Tx buffer memory is allocated at 0x20006000
in temporary memory, and if offset between temporary memory and
permanent is 0x40000000, then:
- Once permanent memory installed the temporary memory at 0x20006000
is migrated to 0x60006000.
- However, ArmFfaPeiLib allocates new Rx/Tx buffer without freeing
the migrated Rx/Tx buffers, i.e. the buffers at 0x60006000.
This results in a memory leak as the migrated Rx/Tx buffer area is
lost.
To address this memory leak, use the MemoryAllocationHob's name, so
that the migrated memory area will be reused as Rx/Tx buffer.
This patch also includes rename ArmFfaRxTxStmm.c to
ArmFfaStandaloneMmRxTxMap.c to keep the file name convention in
ArmFfaLib with ArmFfa{Phase}{...}.c
Fixes: e15fe066036da ("MdeModulePkg/Library: ...")
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Continuous-integration-options: PatchCheck.ignore-multi-package
|
|
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>
|
|
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.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>
|
|
This change adds the support for mapping Rx/Tx buffer through the library
constructor. The first mapper will produce an MM protocol instance with
Rx/Tx information, which allows subsequent consumers to query the
information.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
Do not attempt to sort the load options when there
are none.
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
|
|
The code used a `MmServicesTableLib` dependency for both the
Standalone MM and Traditional MM instances and shared code between
those. There is not a readily available `MmServicesTable` lib
instance for Traditional SMM (that can link to `PiSmmCore`). To ease
integration and prevent creating an instance just for this case, this
change uses `SmmServicesTableLib` in the Traditional SMM instance and
`MmServicesTableLib` in the Standalone MM instance and moves code as
necessary to accommodate this.
For general reference, there are two available instances of
`MmServicesTableLib`:
- MdePkg/MmServicesTableLib - only supports DXE_SMM drivers.
- MdePkg/StandaloneMmServicesTableLib - supports both MM drivers and
MM cores.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
functin -> function
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
EFI_SUCESS -> EFI_SUCCESS
EFI_SUCESSS -> EFI_SUCCESS
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
`defintion`->`definition`
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
|
|
This change moves the existing ConvertEfiGuidToUuid function to public
interface to support newly defined functions prototypes.
This change also adds the `ArmConvertUuidToEfiGuid` function
implementation, which is an inverse of the original conversion.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
This is needed in a MM_CORE_STANDALONE module. Since this null
instance is so simple, remove individual module types to allow
it be integrated more easily.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
commit 26fb5edff397
("MdeModulePkg/ArmFfaLib: Add depex on gEfiPeiMemoryDiscoveredPpiGuid")
restricts ArmFfaPeiLib usage only after PEI phase can be used
permanent memory. However, This would be problem for PEIM
which runs before gEfiPeiMemoryDiscoveredPpiGuid Ppi installed.
(i.e) Tcg2Pei PEIM.
To resolve this, remove dependency on gEfiPeiMemoryDiscoveredPpiGuid
and let ArmFfaPeiLib remap the Rx/Tx buffer after
gEfiPeiMemoryDiscoveredPpiGuid is installed so that ArmFfaPeiLib can be
used with temporary memory.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Fixes: 26fb5edff397 ("MdeModulePkg/ArmFfaLib: ...")
|
|
`diemenstion/diemension`->`dimension`
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
Patch 8d03c42d38d1 ("ArmPkg: ArmFfaLib: Update FF-A direct message
to support 18 registers") calls SMCCC_VERSION by default during
FF-A initialization even if the SMC conduit is not enabled. This
leads to sending malformed FF-A versions if the SVC conduit is
used instead.
This is observed for example when using an SPMC@EL-1 (e.g. rust-spmc)
which receives the FF-A message via an SVC call and interprets
SMCCC_VERSION as an FF-A Function ID and subsequently fails to
handle it.
Since 18-register support is only support with FF-A >= 1.2, replace
SMCCC_VERSION check with FF-A version check
Signed-off-by: Mohamed Gamal Morsy <mohamed.morsy@arm.com>
|
|
Sometimes the controller name is not present, add BmGetDriverName
to retrieve the driver name.(Like DriverHealthManagerDxe)
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
|
|
Issue link:https://github.com/tianocore/edk2/issues/10925
If new HII resource is installed, show it in DeviceManager form. If HII
resource is uninstalled, remove it from DeviceManager form. So once we
enter DeviceManager form, form data should be refreshed to display
dynamically.
Cc: Li Chao <lichao@loongson.cn>
Cc: Qian Dongyan <qiandongyan@loongson.cn>
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
If ArmFfaLibRxTxMap is called before permanent memory is installed the
memory allocated for the FF-A buffers will be migrated to the permanent
memory after it is installed without updating gArmFfaRxTxBufferInfoGuid
or unmapping the old buffers and mapping the updated buffers.
An ASSERT in MemoryServices at ExitBootServices is triggered when
ArmFfaDxeLib tries to call FreeAlignedPages on the original buffer
reference.
Add depex on gEfiPeiMemoryDiscoveredPpiGuid for ArmFfaPeiLib so any
Peims that use FF-A are only dispatched after permanent memory is
available.
Signed-off-by: Anubhav Raina <anubhav.raina@arm.com>
|
|
This commit is to add two new APIs in MdeModulePkg
BaseHobLibNull:
1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.
2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.
Signed-off-by: Dun Tan <dun.tan@intel.com>
|
|
After d433b4c8e4a6 ("OvmfPkg/PlatformBootManagerLib: Register UiApp as
an optional boot option") UiApp can be found among the boot options
without the LOAD_OPTION_HIDDEN flag set. This means that it can appear
in the list of available entries. This can be confusing.
Starting from the UiApp guid, add a check on the Device Path on all the
available entries, if it matches, skip the entry.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
|
|
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>
|
|
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>
|
|
If the column width of screen cannot be divisible by three, one or two
rows will be superfluous in the 3rd column. so, Optimize calculation method
of 3rd cloumn to fill entire row.
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
Adds `gEfiEventExitBootServicesGuid` to the `[Guids]` section and
removes `gEdkiiSmmExitBootServicesProtocolGuid` from the
`[Protocols]` section for the current implementation.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
The values of BootRecordDataPayloadSize and CommSize are incorrect.
BootRecordDataPayloadSize should equal to
SmmBootRecordDataSize - SmmBootRecordDataRetrieved
CommSize should equal to
OFFSET_OF (EFI_MM_COMMUNICATE_HEADER,Data) \
+ (UINTN)MmCommBufferHeader->MessageLength
SmmCommData->BootRecordSize should be set to BootRecordDataPayloadSize,
instead of the total size of entire Smm boot record data.
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
|
|
Adds a new library instance to support logging performance data in
Standalone MM.
- Add StandaloneMmPerformanceLib instance
- Move common MM logic to a new file `SmmPerformanceLibInternal.c`
- Since the library largely defers most logic to the performance
measurement protocol a large degree of code can be shared between
Standalone MM and Traditional MM.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Adds a new library instance to support MM core functionality for
performance in Standalone MM.
- Add StandaloneMmCorePerformanceLib instance
- Move common MM logic to a new file `MmCorePerformanceLib.c`
- Define interfaces with implementation specific to MM environment
type in `SmmCorePerformanceLibInternal.h` and implement those
functions in the Standalone MM and Traditional MM specific C files
Note: StandaloneMmCorePerformanceLib supports both
`MM_CORE_STANDALONE` and `MM_STANDALONE` as some Standalone MM
environments have privilege separation and need to link this
functionality in a ring 3 Standalone MM driver that is outside
the ring 0 Standalone MM core driver.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Refactor the file to use the new type name EFI_MM_COMMUNICATE_HEADER.
This is the same type but follows the new name and is more clear
with upcoming Standalone MM support being added.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Building VarCheckHiiLib fails on my clang 19.1.6 setup with the error
variable 'Status' is used uninitialized whenever 'if' condition is false
due to the DispatchHandle != NULL test.
Calling this function with a NULL handle makes no sense, so move the test
to the function entry and return failure if appropriate.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
The doxygen comment for VarCheckHiiLibReceiveHiiBinHandler says that
EFI_INVALID_PARAMETER should be returned if either of CommBuffer or
CommBufferSize is NULL, but the test results in an early return of
EFI_SUCCESS.
Update the code to match the documentation.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
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>
|
|
Update library to handle HTTP Boot device paths with Proxy URI
Implementation based on UEFI Specification v2.11 Section 24.7.3.1
Signed-off-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
|
|
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
|
|
Applies variable policy to the "HDDP" UEFI variable in the
mBmHardDriveBootVariableGuid vendor namespace to ensure a minimum
allowed size and expected attributes are present.
A protocol notify is used to handle different platform scenarios
where this instance of UefiBootManagerLib may be linked.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4877
Brotli decompression library is supported in EDK2 core. Currently it is
not buildable when linking it to DxeIpl driver. The result is also checked
on edk2 master branch. It could be related to updating Brotli submodule
(v1.0.9) on the previous commit (1193aa2). The update makes the library
buildable. It was verified for the functional status.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
|
|
gEfiHobMemoryAllocModuleGuid is referenced in the HobPrintLib,
but it is not defined in the INF file, causing an unresolved
external error when the module is consumed by code.
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
|
|
This generates boot descriptions for SD/MMC devices in the form of:
- "UEFI SanDisk SC128 2A2B1E4F SD Device"
- "UEFI Samsung BJTD4R 7AB3A8DE eMMC User Data"
The manufacturer ID tables are a best-effort, collected from various
places and personal testing. They're not complete and may be inaccurate
for rebranded cards.
Signed-off-by: Mario Bălănică <mariobalanica02@gmail.com>
|
|
Without this change we get:
error: equality comparison with extraneous parentheses
when building on XCODE5.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
|
|
- In c36414b131dfd0a1ca51f10f87a18955bc110ff2 change, it was introduced
the ReadyToBoot event check to prevent the boot service got called
in runtime to cause the issue.
- In this patch introduced the ExitBootService event to replace it.
It would be better to base on the BootService status to decide
the source of ESRT table.
- Based on the BootService availability to decide,
- Exit : Use cache ESRT table in IF-condition
- Not Exit: Use boot service to locate protocol in ELSE-condition
Co-authored-by: Dakota Chiang <dakota.chiang@intel.com>
Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4831
In this patch introduced the below changes,
[1] Add the event of system resource table installed callback.
- Register the event in DxeRuntimeCapsuleLibConstructor ()
- Unregister the event in DxeRuntimeCapsuleLibDestructor ()
[2] Migrate the event to update the module variable to cache ESRT table
from ReadyToBoot to system resource table installed.
[3] Add the condition to free the pool of buffer when the "mEsrtTable"
is not NULL.
Co-authored-by: Dakota Chiang <dakota.chiang@intel.com>
Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
|
|
In BmFindBootOptionInVariable() we prevent passing a NULL pointer to
EfiBootManagerFindLoadOption(). However, it can accept a NULL pointer as
the second argument as long as count is zero. This change updates the
assert condtion to only assert if the pointer is NULL and the count is
non-zero.
Signed-off-by: Kenneth Lautner <kenlautner3@gmail.com>
|
|
This library is designed for handling variable HII checks within the
Standalone MMm environment. It includes the functions
dedicated to registering handlers that process information received
from VarCheckHiiLibMmDependency.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|
|
No functional changes.
Move DUMP_VAR_CHECK_HII in common file
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|
|
Move VarCheckHiiInternalDumpHex and VarCheckHiiQuestion to the common
file.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|
|
Rename SetVariableCheckHandlerHii and wrap it as a common API to
facilitate the usage in the following patches.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|
|
No functional changes.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|
|
Change the Size parameter of BuildVarCheckHiiBin from OUT to an
input-output parameter.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
|