As the standalone MM core begins supporting MM Communicate v3, this
update extends its functionality to incorporate MM Communicate v3
headers, enabling compatibility with the new protocol.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
As MM cores start to support MM communciate v3. This change moves the
MM communicate driver to produce MM communicate v3 PPI.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
As MM cores start to support MM communciate v3. This change moves the
MM communicate driver to produce MM communicate v3 protocol.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
According to the UEFI Specification version 2.11, the valid range for the
Year field in the EFI_TIME structure is from 1900 to 9999.
Currently IsTimeValid() checks a restricted range 2000 - 2099.
Update range in TimeBaseLib.c to match UEFI specification.
Signed-off-by: Pankaj Singh <pansing@qti.qualcomm.com>
- Updated Maintainers.txt to include Sami Mujawar as a maintainer for the
ARM-FFA sections in MdePkg and MdeModulePkg.
- Updated Maintainers.txt to include Yeo Reum Yun as a reviewer for the
ARM-FFA sections in MdePkg and MdeModulePkg.
- Updated Maintainers.txt to include Kun Qin as a reviewer for the ARM-
FFA sections in MdePkg and MdeModulePkg.
- Added their contact information: email and GitHub username.
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>
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>
Disable write strings warning for host-based unit test
builds when building modules of type HOST_APPLICATION.
Modules of type HOST_APPLICATION may compile and link code
under test into the host-based unit test. When building
GoogleTest based unit tests, the G++ compiler is used. The
G++ compiler is stricter than GCC for passing a const string
into a function parameter that is not const. This is not a
warning for GCC build of firmware code. But GoogleTest builds
that use g++ detect as a warning and that breaks the build.
The firmware code under test can not be changed, so the warning
-Wno-write-strings is added to CC_FLAGS to ignore this warning.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Now that the use of 18 registers for FF-A is supported. Registers
from x0-x17 can be used by FF-A to return call results. StMM also uses
registers x19-x23 to store SPMC boot information.
Use the x24 register to store the stack address instead of x12
to avoid it being clobbered by FF-A calls.
Signed-off-by: Mohamed Gamal Morsy <mohamed.morsy@arm.com>
Verify that the subject line matches the basic
{Package}[,Package]:
format _or_ the
Revert "<subject of commit to revert>"
format.
Non-package top-level directories are treated as packages.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
In order to enable subject line format compliance checking in following
patches, pass through a list of modified packages to CommitMessageCheck.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
The get_parent_packages function in CheckGitCommits returns the path of
non-package directories, but in fact returns the path of the .dec file
for actual packages.
Align the handling to be more consistent and return only directory names,
regarding of how it was found.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Commit 7c204d7 changed the behavior of the WiFi
Connection Manager. It no longer scans for available
networks when the driver loads, because scanning
during that time disrupts connections for other
features. To avoid blocking other processes, the
driver should initiate a scan only when appropriate.
This update introduces a one-time scan that occurs
when the user opens the network settings page in
the UI, enables WiFi, and then opens the network
list page to view available networks.
Signed-off-by: Zachary Clark-Williams <zachary.clark-williams@intel.com>
UfsHc->FreeBuffer accepts page numbers rather than bytes as its
size argument. Fix two positions where wrong size were passed.
Signed-off-by: Ryan Wong <colorfulshark@gmail.com>
$(DEBUG_DIR)/<M>.efi is generated by the recipe of
$(OUTPUT_DIR)/<M>.efi: the .efi file is generated and then copied into
$(DEBUG_DIR). At the moment the generate GNUmakefile does not declare
the dependency between these two files, which can be a problem because
$(FFS_OUTPUT_DIR)/<M>.offset depends on $(DEBUG_DIR)/<M>.efi.
Normally $(DEBUG_DIR)/<M>.efi is generated first and there is no
problem, but when an external tool builds edk2 from a Makefile, like
OP-TEE build does for instance, the parallel '-j' flag passed to Make is
inherited by the edk2 GNUmakefile from the environment. As a result Make
might try to build the $(FFS_OUTPUT_DIR)/<M>.offset target in parallel
and fail to find the .efi file:
make[1]: *** No rule to make target 'Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/NetworkPkg/VlanConfigDxe/VlanConfigDxe/DEBUG/VlanConfigDxe.efi', needed by 'Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/FV/Ffs/E4F61863-FE2C-4b56-A8F4-08519BC439DFVlanConfigDxe/VlanConfigDxe.offset'. Stop.
If we declare the $(DEBUG_DIR) file as output of this rule, then the
generated GNUmakefile will contain the right dependency declaration:
$(DEBUG_DIR)/VlanConfigDxe.efi: $(OUTPUT_DIR)/VlanConfigDxe.efi
and the parallel build will succeed.
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Since VirtNorFlashDxe now depends on the new VirtNorFlashDeviceLib,
all related targets should be linked against this library.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
This patch refactors low level NOR flash functions into a dedicated library
to enable reuse, particularly for supporting the firmware upgrade feature.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
To facilitate moving the NOR flash functions into a separate library,
TPL handling is now delegated to the caller.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
Replace timer eventclose with scan timerset in WifiConnectionManagerDxe.
This change ensures that the driver sets and manages scan timers
correctly without requiring a reload when the user enables WiFi and
initiates a scan for available networks.
By using scan timerset directly, the driver maintains consistent
behavior across WiFi sessions and avoids redundant event handling.
Signed-off-by: Zachary Clark-Williams <zachary.clark-williams@intel.com>
Add missing EAP-TLS option to HII configuration
Implemented support for EAP-TLS authentication in
the WifiConnectionManagerDxe HII interface. This
change ensures that the EAP-TLS option is available
for selection in the UI, addressing cases where it
was previously missing.
Signed-off-by: Zachary Clark-Williams <Zachary.Clark-Williams@intel.com>
Update unit tests to use GoogleTestLib.h instead
of gtest.h so the edk2 extensions for google tests
are always available.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update unit tests to use GoogleTestLib.h instead
of gtest.h so the edk2 extensions for google tests
are always available.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update unit tests to use GoogleTestLib.h instead
of gtest.h so the edk2 extensions for google tests
are always available.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Building .aslc files in a module for host-based unit
testing in Linux/GCC X64 environments may introduce
relocations for a symbol in a shared library from
lcov or asan.
Update logic to not generate an error message and exit
if the symbol is unknown but the relocation type is
R_X86_64_NONE.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Ignore mismatch errors for lcov 2.x in all locations that lcov
is run. When building more complex unit tests, these mismatch
errors are showing up in different phases of the code coverage
collection.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
For Linux/GCC host-based unit tests, -fno-pei is added
to CC_FLAGS and this causes builds of .aslc/.act files for
ACPI tables used in host-based unit tests to fail. Add
-fpie to ASLCC_FLAGS in UnitTestFrameworkPkgHost.dsc.inc
to override this CC_FLAGS setting and resolve the build issue.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
gtest.h uses standard includes that define NULL to __null. This
is different that the C++ standard that uses nullptr. Redefine
NULL in GoogleTestLib.h to use C++ form of nullptr. This allows
NULL to be used in checks and mocks without explicit typecasts.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This patch introduces a synchronization point between the BSP and APs to
ensure all APs have entered their SMM wait-loop (while (TRUE) in APHandler
()) before the BSP calls into the SMI handler logic via gSmmCpuPrivate
->SmmCoreEntry().
Previously, the BSP would invoke ReleaseAllAPs() and immediately proceed
to SmmCoreEntry() without confirming whether APs had reached the stable
waiting state. If SmmStartupThisAp() was called inside the SMI handler
shortly after ReleaseAllAPs(), it might lead to a race condition:
APs are issued two consecutive wait signals (SmmCpuSyncWaitForBsp()).
BSP sends two consecutive releases (ReleaseAllAPs() + SmmStartupThisAp())
If an AP has not yet responded to the first release, the second release may
overwrite the semaphore state, and the AP might miss the notification,
causing it to hang or behave unpredictably.
To address this:
A SmmCpuSyncWaitForAPs() is added in BSP after
mmCpuPlatformHookBeforeMmiHandler() and before entering SmmCoreEntry().
A matching SmmCpuSyncReleaseBsp() is added in AP immediately after its own
SmmCpuPlatformHookBeforeMmiHandler()
This ensures that BSP does not enter SMI handler logic or dispatch any
AP-related requests before all APs are confirmed to be idle and ready.
Debug sync point markers (e.g., /// #6, #7) are updated accordingly.
This change eliminates a subtle but critical race condition in
multi-processor/multi-socket systems during SMM entry and improves overall
synchronization safety.
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Since OVMF already supports 5-level paging, the ResetVector
needs to handle the case.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Base on ACPI 6.6 Multiprocessor Wakeup Structure, TDVF needs to provide
a physical address of the ResetVector to OS. And it should allow the
Multiprocessor Wakeup Mailbox to be reset in order to be used once again
with a given AP.
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Reviewed-by: Min Xu <min.m.xu@intel.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Base on ACPI 6.6 MultiProcessor Wakeup Mailbox Structure,
the new "Test" command is added.
Also the "Sleep" command is not used in TDX Mailbox, it should be removed.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Add the GDT table to swicth paging mode when the OS jumps
to the ResetVector in Mailbox.
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Reviewed-by: Min Xu <min.m.xu@intel.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Create Acpi66.h, which is copied from Acpi65.h, and make the following
changes:
1. Replace all occurences of "6.5/6_5" with "6.6/6_6".
2. Add "ResetVector" in Multiprocessor Wakeup Structure.
3. Add "Test" command for Multiprocessor Wakeup Mailbox.
4. Make Acpi66.h the latest ACPI definitions that Acpi.h contains.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Introduce optional configuration objects to specify interrupt and terminal types.
When the platform supplies this information,
the SPCR table is updated to reflect the provided values.
If the interrupt type is 8259,
the corresponding IRQ number is set in the SPCR table.
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This update introduces a new section in the README file, detailing the
design considerations of the recently onboarded Standalone MM platform in
OVMF.
The section is intended for future reference and should be revised
accordingly if updates to the Standalone MM framework render these
limitations obsolete.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change expands the CI pipeline build to a new platform type with
Standalone MM support to ensure the incoming change works with Standalone
MM environment on x64 platforms.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a build flag in the platform DSC file to support
standalone MM build on OVMF platform.
The new standalone MM platform will not support S3 boot and thus no SMM
lock box related components are included.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a platform specific HOB producor library to meet
the expectation of Standalone MM core.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a Null instance of MemEncryptSevLib to enable
platforms that do not have confidential compute support.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This update introduces the implementation of QemuFlashFvbServices to
support operation with Standalone MM backed platforms.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This update refactors QemuFlashFvbServicesRuntimeDxe to abstract out
direct calls to SMM and DXE specific functions.
Specifically, dynamic PCD usage and gBS references have been moved to SMM
specific files.
The constructor functionality has been relocated to a common
implementation and is invoked from their respective entry points.
These changes lay the groundwork for supporting a Standalone MM-based
solution in the future.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a build time PCD to prevent the SmmControl2Dxe driver
from re-initialization the MM related registers.
This register is to be used when MmControlPei is already executed in PEI
phase and completed setting up the MM control registers.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a PEIM that produces gEfiPeiMmControlPpiGuid to be used
in PEI phase, i.e. boot strap MM foundation.
This flow is largely in assemblence of MM control DXE driver and used the
`SmiFeatures.*` files from the DXE drivers as the common resources.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>