Add Unmap callback for when PEI and SEC need to invalidate the
Rx/Tx buffer HOB on a call to Unmap.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Cleaned various comments and debug messages as well as
headers to either fix typos or for readability.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Replaced all instances of PcdGet64 (PcdFfaTxRxPageCount) *
EFI_PAGE_SIZE, with EFI_PAGES_TO_SIZE macro.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed the global variables in ArmFfaSecRxTxMap. Rx/Tx
buffer HOB is now created within the Map function rather
than in the constructor of ArmFfaSecLib. This allows for
the use of the HOB to find the Rx/Tx buffer information.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed global variables in ArmFfaCommon. Moved the globals to
locals in each phase's ArmFfaLib implementation. SEC and PEI
will query when necessary to avoid setting globals when memory
is unavailable.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Added ArmFfaLibIsFfaSupported to ArmFfaCommon to allow for
queries of FF-A support outside of ArmFfaCommonInit.
Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
REF: [e092122]
(PR #12085)
The current logic in ArmPlatformPkg/PL011UartLib performs
control-bit checks intended to align with the UEFI specification.
However, it incorrectly validates control bits that
cannot be set through SetControl(), resulting in failures
in the SetControl() SCT test.
According to the UEFI specification,
the valid control bits that can be set are:
EFI_SERIAL_REQUEST_TO_SEND
EFI_SERIAL_DATA_TERMINAL_READY
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE
EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE
EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE
This patch updates mAllowedControlBits so that only these
valid control bits are accepted during validation.
Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kavipriyan K P <kavipriyankp@ami.com>
This reverts commit 3fe1d56cc9.
PR https://github.com/tianocore/edk2/pull/11757 introduced a
"Breaking Change" feature for out of tree builds of tools.
This breaking change is blocking testing of edk2-stable202602
due to side effects on building FitGen tool in edk2-platforms.
Revert this feature for the edk2-stable202602 release and
work on this feature after the release.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This reverts commit f0542ae07d.
PR https://github.com/tianocore/edk2/pull/11757 introduced a
"Breaking Change" feature for out of tree builds of tools.
This breaking change is blocking testing of edk2-stable202602
due to side effects on building FitGen tool in edk2-platforms.
Revert this feature for the edk2-stable202602 release and
work on this feature after the release.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
When allocating Runtime memory the MemoryAllocation HOB's length needs
to meet the alignment requirements of Runtime memory. On AARCH64
architectures this alignment is not the default of 4KB.
Instead it is set by the RUNTIME_PAGE_ALLOCATION_GRANULARITY
definition, which is 64KB.
This change enforces the RUNTIME alignment as part of generating the
MemoryAllocationHob for runtime memory types.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
Adds a section to Maintainers.txt to indicate packages that either
need maintainers or would benefit from additional maintainers.
The community is welcome to update this list over time. Ideally,
as maintainers are added, the packages would be removed from this
list.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit removes an wrong goto statement which may cause DXE_ASSERT!
`ConfigRequest` example: `&NameValueVar0&NameValueVar1&NameValueVar2`.
When `*Progress` is `&NameValueVar2`, code will run to `goto Done;`,
then return NULL.
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
Use $(SEP) with addprefix of $(OBJDIR) to support Windows MINGW
CLANG builds that use Windows path separators with GNU makefiles.
This fixes Windows MINGW CLANG builds of the PcdValueInit
application that is required for structured PCDs.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
REF: pftf/RPi4#87
The PL011UartLib SetControl() is failing the SCT test for
SerialIoBBTestConformance (00605CBC-3965-4B61-A254-2B2B723172EA),
which is trying to set bits that are not supported per UEFI spec.
Add proper argument check for valid bits, and confirm that test passes.
Cc: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
An exception and interrupt vector table was added to the ASM file, a
fast path was created for the IPI SMP_BOOT_CPU vector, and the C version
of the SMP_BOOT_CPU handler was removed.
Signed-off-by: Chao Li <lichao@loongson.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Arun Subramanian Baskaran <arun.subramanian.baskaran@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eduardo Cuevas Farfan <eduardo.cuevas.farfan@intel.com>
The Firmware Handoff specification has withdrawn
the use of the “XOR” checksum and updated
the checksum calculation to use “SUM” [0].
Accordingly, libtl has also been updated to reflect this change [1].
The “XOR” checksum calculation existed in version 1;
however, as mentioned above, it has been withdrawn, and
TF-A always provides the checksum using the “SUM” calculation.
Therefore, the xferlist version is updated to version 2.
Link: https://github.com/FirmwareHandoff/firmware_handoff/pull/81 [0]
Link: https://review.trustedfirmware.org/c/shared/transfer-list-library/+/46033 [1]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
As the Microsoft representative for Trust Execution Environment (TEE), I
intend to help review Standalone MM related changes and help drive
industry alignment of TEE implementations in UEFI firmware.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
When using MM communicate v3 to fetch variable, the header calculation
was incorrect, causing the variable driver on the secure environment to
have random behavior.
This change refactored the original routine by following the current
DXE instance (mostly).
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
The current check for MM communicate v3 header has a logic error when
using `CompareGuid`. This change fixed the issue.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Currently, StandaloneMmCore prints for every MM entry and exit
as well as producing protocols for MM entry and exit that get
logged. So there are four logs for every MM entry/exit pair.
In a sample OVMF run with StMM enabled, this produced 6800 logs
to log MM entry/exit out of 16,400 logs. In other words, > 1/3
of logs were for these prints.
Protocol install notifications are useful, but not for these ones
that are just entry and exit notifies.
This commit only logs at verbose level if the protocol installed
is the entry or exit protocol.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Currently, StandaloneMmCore prints for every MM entry and exit
as well as producing protocols for MM entry and exit that get
logged. So there are four logs for every MM entry/exit pair.
In a sample OVMF run with StMM enabled, this produced 6,800 logs
to log MM entry/exit out of 16,400 logs. In other words, > 1/3
of logs were for these prints.
In general, entry and exit logs are not that useful outside of
very specific debugging scenarios
This commit drops the entry/exit prints.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
As the Microsoft representative for Secure Boot and Crypto for
Post-Quantum Cryptography (PQC), I intend to help review PQC-related
changes and help drive industry adoption of PQC algorithms in UEFI
firmware.
Signed-off-by: Doug Flick <dougflick@microsoft.com>
Main EDK2 build supports out-of-tree builds but BaseTools make process
still creates tools and object files in-tree. In order to make
out-of-tree build support complete move the generated tools and
interim obj files to $WORKSPACE location as well.
This patch also changes the location of BaseTools for in-tree builds
(default behavior when WORKSPACE is not provided before calling
edksetup) to $WORKSPACE/BaseTools/Build/... It may potentially break
external workflows that invoke tools from the default location outside
of the build tool.
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
- Move common wrapper logic for multiple tools to GenericShellWrapper
file
- Drop search for BaseToolsCBinaries from the list of checked
directories. This case has been broken for quite a while since the
exec clause never passed command arguments to the supposed binary.
- Remove a suggestion to run make in $EDK_TOOLS_PATH/Source/C and let
the wrapper fail if the directory exists but no binary is present.
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
VfrLexer.h is built as a part of VfrCompile build and
shouldn't be present at the BaseTools/Source/C level.
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
As a preparation for out-of-tree build support make sure all interim
files for tests are created in tmp directory.
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
SEP variable is only set if PYTHON_COMMAND is undefined but referred
regardless. It breaks the clean target for the following scenario:
. edksetup.sh # Sets PYTHON_COMMAND
make -C BaseTools
make -C BaseTools clean
This change fixes the use case mentioned above by settings SEP
for all build configurations.
[ardb: Drop redundant assignment for Windows]
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
`if (CurrentForm != NULL)` and
`if (InScopeDisable && (CurrentForm == NULL))`conflict.
`if (CurrentForm != NULL)` should be `if (CurrentExpression != NULL)`.
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
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>
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>
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>
This PR introduces a new feature to enable infinite boot retries based on a newly created PCD.
When true, the system will continuously loop over all boot options.
PCD default is FALSE to match existing functionality.
This change is tested on QEMU based virtual platforms and physical
platforms.
This change is useful for certain server cases. Infinite retries allows
a server to continuously attempt boot in case of network failure and
recovery, and for such attempts to be accurately recorded in the TCG
logs.
Co-authored-by: Kun Qin <kun.qin@microsoft.com>
Co-authored-by: Aaron Pop <aaron.pop@microsoft.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c:176:11: error: variable ‘Index’ set but not used [-Werror=unused-but-set-variable=]
176 | UINTN Index;
| ^~~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c: In function ‘ParseFv’:
MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c:263:34: error: variable ‘FfsIndex’ set but not used [-Werror=unused-but-set-variable=]
263 | UINTN FfsIndex;
| ^~~~~~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c: In function ‘CreateSharedPopUp’:
MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c:590:11: error: variable ‘Count’ set but not used [-Werror=unused-but-set-variable=]
590 | UINTN Count;
| ^~~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c: In function ‘GetSmbiosStringById’:
MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c:221:10: error: variable ‘Size’ set but not used [-Werror=unused-but-set-variable=]
221 | UINTN Size;
| ^~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c: In function ‘CreateDialog’:
MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c:435:18: error: variable ‘Count’ set but not used [-Werror=unused-but-set-variable=]
435 | UINTN Count;
| ^~~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
New warning after updating gcc:
EfiRom.c: In function ‘main’:
EfiRom.c:78:17: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
The assigned value is not used, so fix the warning by just removing it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
StringFuncs.c: In function ‘SplitStringByWhitespace’:
StringFuncs.c:113:15: error: variable ‘Item’ set but not used [-Werror=unused-but-set-variable=]
113 | UINTN Item;
| ^~~~
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>