summaryrefslogtreecommitdiff
path: root/ArmPkg/Include/Library
AgeCommit message (Collapse)AuthorFilesLines
2026-07-30ArmPkg: StandaloneMmCoreEntryPoint: Use ARM_FFA_ARGS for misc bufferKun Qin1-3/+3
The MISC_MM_COMMUNICATE_BUFFER stored the FF-A direct message registers in a DIRECT_MSG_ARGS structure. Populating and reading it required manually re-indexing every register (EventSvcArgs->Arg4..Arg17 into DirectMsgArgs.Arg0..Arg13). This shifted the register positions and left the buffer layout inconsistent with the raw FF-A argument register file, making it error prone to correlate a slot with its architectural register. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-07-25ArmPkg: Add Arm SMCCC SoC ID libraryVarshitPandya1-0/+39
Add ArmSmcccSocIdLib to provide a shared interface for checking support for the SMCCC Architecture SoC ID service and retrieving the JEP106 identification code and SoC revision. Move the existing SMCCC SoC ID handling out of ProcessorSubClassDxe and update the driver to use the new library. Continue to use the MIDR value for the SMBIOS Processor ID when the SMCCC SoC ID service is unavailable. This allows other SMBIOS implementations to reuse the SMCCC handling without duplicating it or depending on the legacy ProcessorSubClassDxe driver. Signed-off-by: Varshit Pandya <Varshit.Pandya@arm.com>
2026-07-21ArmPkg: Add SMBIOS Type 4 SocketType handlingRebecca Cran1-0/+1
The SMBIOS Type 4 field SocketType was added in commit 7f505d377b44aeee59f34b3d898f6caf0a0df538 in 2024. This caused the table size to be invalid when platforms specify versions of SMBIOS before 3.8. Update ProcessorSubClassDxe to handle fetching the string for the socket type including calling into OemMiscLib to retrieve it. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2026-05-29ArmPkg, StandaloneMmPkg: optimise memory permission changeYeoreum Yun2-6/+28
In StandaloneMm, the allowed memory permission combinations are ROX, RO, and RW. At the initial stage, all regions are mapped as ROX. When drivers are loaded for relocation, the image is first mapped as RW. However, the current mechanism introduces significant overhead when changing memory permissions. For example, when changing permissions from ROX to RW, the process is performed in two steps: 1. Clear the execute (X) permission (ROX → RO) 2. Add the write (W) permission (RO → RW) To execute step (1), the system first retrieves the permissions of the target region. This may trigger multiple SMC calls, depending on the permissions of the pages within that region. This permission retrieval operation is redundant, as there is no need to maintain an intermediate state. Nevertheless, it can cause additional SMC calls and coherence operations from the SPMC (e.g., TLB flushes). Therefore, this redundant operation should be removed, and in most cases, the memory permission should be updated with a single “set memory permission” operation. Note: The ArmxxxMemoryRegionxxx() interfaces e.g. ArmSetMemoryRegionNoExec(), etc. return success when the Length parameter is 0 as the SectionHeader.Misc.VirtualSize could be 0 Length like .reloc section: UpdateMmFoundationPeCoffPermissions: Section 2 of image at 0x7004000 has 0x42000040 permissions UpdateMmFoundationPeCoffPermissions: Section 2 of image at 0x7004000 has .reloc name api_ffa_mem_perm_set page_count 0 ERROR: FFA_MEM_PERM_SET: page_count was zero Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-05-29ArmPkg/ArmMmuStandaloneMmLib: add missing documentationYeoreum Yun1-0/+72
Some functions in ArmMmuStandaloneMmLib lack documentation. Add appropriate documentation for each function. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-05-28Global: Merge DefaultExceptionHandlerLib into CpuExceptionHandlerLibVishal Oliyil Kunnil1-22/+0
Merge DefaultExceptionHandlerLib into CpuExceptionHandlerLib. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2026-02-24ArmPkg: Replace include guards with #pragma onceMichael Kubacki13-52/+13
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>
2026-01-16ArmPkg/StandaloneMmCpu: pass ARM_MM_HANDLER_CONTEXT to MmHandlerLevi Yun1-0/+2
Pass ARM_MM_HANDLER_CONTEXT to MmHandler so it can determine: - whether the request came via FF-A or SPM_MM mode - the service type - whether it is a secure request or the source partition ID Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-01-16ArmPkg/Library: add ArmMmHandlerContext for MM handler context managementLevi Yun2-80/+120
Introduce ArmMmHandlerContext.h, which defines the ARM_MM_HANDLER_CONTEXT structure passed to each MmHandler’s Context argument. This structure provides: - The current communication protocol type - The service type - Protocol-specific details This enables MM drivers to differentiate requests from MM communication versus DIRECT_MSG_REQ2, support both SPM_MM and FF-A v1.2, and determine whether a request originated from the secure world. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-09-26ArmPkg: Remove ARM32 Support from ArmMonitorLibOliver Smith-Denny1-2/+0
edk2 is dropping support for the ARM32 architecture. This commit removes ARM32 files from ArmMonitorLib. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-08-29ArmPkg/ArmTransferList: add TPM_EVENT_LOG informationLevi Yun1-0/+22
Add TRANSFER_EVENT_LOG information according to firmware hand-off spec[0]. and related helper. Links: https://github.com/FirmwareHandoff/firmware_handoff/blob/main/source/transfer_list.rst#tpm-event-log-table-entry-layout-xferlist_evlog Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-08-29ArmPkg/Library/ArmTransferList: add helper to get TransferListLevi Yun1-0/+15
Add helper to get TrnasferList from HOB list. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-24ArmPkg/ArmTransferListLib: Add utility functionsPrachotan Reddy Bathi1-2/+56
Added functionality TransferList Library TransferListVerifyChecksum - Verify TransferList CheckSum TransferListCheckHeader - Check if TransferList header is valid, return suitable opcodes validating the header TransferListFindEntry - Find a specific entry on the TransferList using the TagId TransferListDump - Dump the contents of the TransferList header and the entry headers Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-15ArmPkg: ArmGicDxe: Add support for GICv5Ard Biesheuvel1-0/+13
Add initial driver support for GICv5. This initial driver supports Private Peripheral Interrupts (PPIs) and Shared Peripheral Interrupts (SPIs). Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com> [ardb: Merge v5 support into GicV3Dxe] Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-07-05ArmPkg,ArmPlatformPkg,ArmVirtPkg,UefiCpuPkg: Move ArmMmuLib.h to UefiCpuPkgAjan Zhong1-74/+0
Move the ArmMmuLib interface definition to UefiCpuPkg, with this change, MMU libraries for ARM, AARCH64, RiscV, LongArch64 architectures all reside in UefiCpuPkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2025-06-06ArmPkg/Include: fix usage of wrong macro in ArmGicv3Dxelevi.yun1-1/+1
To get a SPI_MAX_INTID, interrupt controller type Register should be masked with ARM_GIC_ICDICTR_GET_SPI_RANGE. However, since ARM_GIC_ICDICTR_SPI_RANGE_TO_MAX_INTID macro uses ARM_GIC_ICDICTR_GET_EXT_SPI_RANGE mask, it returns wrong SPI_MAX_INITID. This makes a failure of loading GenericWatchDog in FVP RevC model. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Fixes: d6d2f68e3801 ("ArmPkg/Drivers/ArmGicDxe: ...")
2025-06-04ArmPkg/Drivers/ArmGicDxe: Add Extended SPI support for GICv3Nick Graves1-9/+59
This commit enables extended SPI support for GicV3. GicV3 must decide, based on the source intid, whether to access the SPI-range registers, PPI-range registers in the redistributor, or the extended SPI-range registers. The protocol interfaces must also support registering an interrupt handler with an extended SPI intid. To save ~24KB of memory, handler allocation and access is delegated to GicV2 and GicV3. GicV2 retains the existing handler mapping scheme using intids literally. GicV3 remaps extended SPI intids to be immediately after the highest SPI intids. Tested on qemu with the BSA test suite. Signed-off-by: Nick Graves <nicholasgraves@google.com>
2025-05-26ArmPkg: Fix typosMichael Kubacki1-1/+1
Corrects some typos. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-10ArmPkg: ArmFfaLib.h: Move to MdePkgKun Qin1-320/+0
As a set of definitions from an industry specification-defined interface, ArmFfaLib.h is more appropriately placed in MdePkg. This update relocates both the header definition of ArmFfaLib to MdePkg, thereby supporting the monitor 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>
2025-04-10ArmPkg: ArmSvcLib: Move ArmSvcLib to MdePkgKun Qin1-56/+0
As an implementation of an industry specification-defined interface, ArmSvcLib is more appropriately placed in MdePkg. This update relocates both the header definition and the implementation of ArmSvcLib to MdePkg, thereby supporting the supervisor 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>
2025-04-10ArmPkg: ArmSmcLib: Move ArmSmcLib to MdePkgKun Qin1-123/+0
As an implementation of an industry specification-defined interface, ArmSmcLib is more appropriately placed in MdePkg. This update relocates both the header definition and the implementation of ArmSmcLib to MdePkg, thereby supporting the monitor 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>
2025-04-02ArmPkg: ArmFfaLib: Update FF-A direct message to support 18 registersKun Qin1-1/+28
This change expands the support of FF-A direct message 2 call to use the full 18 registers. It also adds a check in the contructors to ensure the SMCCC meets the minimal requirement of v1.2 to support FF-A v1.2 usage. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-02ArmPkg: ArmSvcLib: Support all 18 registersKun Qin1-0/+10
This extends ARM_SVC_ARGS to support all x0-x17 registers use case for FF-A. The ArmCallSvc function is also updated to support 18-register usage. Co-authored-by: Olivier Deprez <Olivier.Deprez@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-02ArmPkg: ArmSmcLib: Support all 18 registersKun Qin1-0/+10
This extends ARM_SMC_ARGS to support all x0-x17 registers use case for FF-A. The ArmCallSmc function is also updated to support 18-register usage. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-03-06ArmPkg/ArmTransferListLib: improve coding style complianceLeif Lindholm1-30/+27
The existing code was full of abbreviated function/variable names. Let's nip that in the bud before we add more code to this library. Update the current only upstream user: ArmStandaloneMmCoreEntryPoint. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-01-31ArmPkg: Retire ArmDisassemblerLibArd Biesheuvel1-37/+0
No longer used anywhere so can be retired. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGicDxe: Use EOImode 0x0 on GICv3Ard Biesheuvel1-1/+2
When re-entering EDK2 from a high level OS such as Linux, the GICv3 may be configured to use split priority drop and deactivate (EOImode == 1), whereas EDK2's GICv3 driver assumes the default setting of EOImode == 0. So clear the EOImode bit explicitly when taking control of the GIC. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Incorporate v3 code from ArmGicLibArd Biesheuvel1-46/+0
Move the remaining code in ArmGicLib into ArmGicDxe, its only user, and drop the dependency on ArmGicLib. Note that ArmGicDxe has an undeclared dependency on ArmLib, so declare that instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Retire ArmGicArchLibArd Biesheuvel1-40/+0
ArmGicArchLib is no longer use so remove all remaining references and implementations. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Move some GIC defines into ArmGicLib.hArd Biesheuvel1-0/+8
Before getting rid of ArmGicArchLib entirely, preserve some GIC architecture related preprocessor defines by moving them into ArmGicLib.h instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Move GICv3 sysreg check into ArmGicDxeArd Biesheuvel1-2/+0
ArmGicArchLib implements a check on the accessibility of the GIC system register interface, which is a prerequisite for using the GIC in v3 mode. It might be possible to use GICv2 compatibility mode on poorly configured platforms where the GIC is v3 capable but not accessible, but in most cases, the GIC is driven in its native mode. This check is now only carried out in a single place, and there is not really any reason to keep this in a separate library. Even though ArmVirtPkg implements its own version, the basic check (and enablement of the sysreg interface) is still needed. So move this check into the DXE driver itself, and drop the dependency on ArmGicArchLib. This allows it to be retired in a subsequent patch. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Move GICv2 specific EOI/ACK routines into v2 driverArd Biesheuvel1-32/+0
ArmGicDxe is the only remaining user of ArmGicLib, and so there is no need for the abstraction, which is drawn at an arbitrary boundary anyway. So remove the remaining V2 specific code into the DXE driver. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Move remaining shared code into ArmGicDxeArd Biesheuvel1-18/+0
Move the remaining ArmGicLib code that is shared between the v2 and v3 GIC DXE drivers into ArmGicCommonDxe.c Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Drop declarations for non-existent functionsArd Biesheuvel1-32/+0
Drop some ArmGicLib declarations that don't actually exist in the code. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Disentangle ArmGicEnableDistributor () versionsArd Biesheuvel1-6/+0
Split ArmGicEnableDistributor () into GICv2 and v3 specific versions, and move them into their single respective callers, so that the original can be dropped from ArmGicLib altogether. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Disentangle v2 and v3 versions of IRQ en/disable APIsArd Biesheuvel1-33/+0
ArmGicLib is agnostic about the difference between v2 and v3, but its APIs are only called from code that is either v2-specific or v3-specific. That makes the generic interface kind of pointless, and we can just merge this code into the callers. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Remove ArmGicEndOfInterrupt () APIArd Biesheuvel1-7/+0
ArmGicEndOfInterrupt () is never used: the v2 and v3 versions of the driver call respective specific versions directly, and so this API can be removed. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: Remove ArmGicSendSgiTo () APIArd Biesheuvel1-9/+0
ArmGicSendSgiTo () is never used, and is fundamentally tied to multi-CPU operation which is no longer supported. So drop the implementation. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17ArmPkg/ArmGic: drop ArmGicEnableInterruptInterface from ArmGicLibArd Biesheuvel1-12/+0
The ArmGicLib API exposes ArmGicEnableInterruptInterface () and ArmGicDisableInterruptInterface (), but only the former is actually used, and only from the GICv2 driver. So drop the API entirely, and invoke the v2 version of the underlying interface directly. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17StandaloneMmPkg: move core entry point lib and cpu driver to ArmPkgLevi Yun1-0/+294
StandaloneMmCpu driver is only used for Arm architecture and StandaloneMmCoreEntryPointLib for Arm has specific implementation with StandaloneMmCpu driver. Move StandaloneMmCpu Driver and StandaloneMmCoreEntryPointLib for Arm to ArmPkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
2025-01-17ArmPkg: Add ArmFfaLib.hLevi Yun1-0/+293
Add ArmFfaLib.h which defines interfaces correspond to FF-A ABIs. Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
2025-01-17ArmPkg/Library: Introduce ArmTransferListLiblevi.yun1-0/+109
ArmTransferList is used to pass boot information according to firmware handoff protocol specification [0]. When initializing StandaloneMm, it gets boot information from the PHIT HOB in the TransferList. [0] https://github.com/FirmwareHandoff/firmware_handoff Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
2025-01-12ArmPkg: remove ArmGicAcknowledgeInterrupt function.Mike Maslenkin1-21/+0
A compiler warning was detected that 'IntId' could be used uninitialized in the `else` branch. Since there are no consumers of this function, it was decided to remove this function completely. Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2024-10-16ArmPkg: CodeQL Fixes.kuqin121-4/+4
Makes changes to comply with alerts raised by CodeQL. The issues here fall into the following category: 1. unsigned-comparison-zero Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2024-07-25ArmPkg/ArmMonitorLib: Implement SMCCC protocol correctly and directlyArd Biesheuvel1-0/+12
The SMCCC protocol stipulates the following: - on AARCH64, 18 arguments can be passed, and 18 values can be returned, via registers X0-x17; - on ARM, 8 arguments can be passed, and 8 values can be returned. This makes ArmSmcLib and ArmHvcLib as implemented currently unsuitable for use with SMCCC services in general, although for PSCI in particular, they work fine. The dependency on both ArmSmcLib and ArmHvcLib is also impractical because it requires every platform that consumes ArmMonitorLib to provide resolutions for each, even though most platforms will only ever need one of these (and the choice is made at compile time) So let's drop these dependencies, and re-implement the asm helpers from scratch. Note that the only difference is the actual instruction used -HVC vs SMC- and so all other code can be shared. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-06-15ArmPkg,MdePkg: move ArmLib.h to MdePkgLeif Lindholm1-829/+0
Related to https://bugzilla.tianocore.org/show_bug.cgi?id=4121, but not resolving it. (Nearly?) all of ArmPkg describes industry standard behaviour, and hence according to general rules, ought to live in MdePkg. Addressing this will however be a substantial task. Take a first step by moving the ArmLib interface definition to MdePkg, as discussed in https://edk2.groups.io/g/devel/topic/patch_v5_2_6/102725178 Continuous-integration-options: PatchCheck.ignore-multi-package Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-03-04ArmPkg/ArmGicArchLib: Add macros for SPI and extended SPI rangesHimanshu Sharma1-0/+14
Taking reference from Table 2-1 of the Arm Generic Interrupt Controller Architecture Specification, Issue H, January 2022, add macros for the SPI and extended SPI ranges with the purpose of reusability on including the ArmPkg. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Himanshu Sharma <Himanshu.Sharma@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-30ArmPkg/ArmLib: Add ArmHasEte () helper functionSami Mujawar1-0/+12
Create a helper function to query whether ID_AA64MFR1_EL1 indicates presence of the Embedded Trace Extension (ETE). This feature is only visible in AARCH64 state. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
2023-10-30ArmPkg/ArmLib: Add ArmHasTrbe () helper functionSami Mujawar1-0/+13
Create a helper function to query whether ID_AA64MFR1_EL1 indicates presence of the Trace Buffer Extension (TRBE). This feature is only visible in AARCH64 state. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
2023-09-20ArmPkg/ArmLib: Add ArmHasVhe () helper functionLeif Lindholm1-0/+18
Create a helper function to query whether ID_AA64MFR1_EL1 indicates presence of the Virtualization Host Extensions. This feature is only visible in AARCH64 state. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>