summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmMonitorLib
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-05-13 17:48:42 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-05-24 15:48:52 +0000
commit32460bb5b17b5caec29037a4e9462ca149a190e6 (patch)
tree60661445e5d3c694b8bd2e388e9e55060f294afb /ArmPkg/Library/ArmMonitorLib
parent207b6d68a0ea4748d666e0a73e486feba89bd4c3 (diff)
downloadedk2-32460bb5b17b5caec29037a4e9462ca149a190e6.zip
edk2-32460bb5b17b5caec29037a4e9462ca149a190e6.tar.gz
edk2-32460bb5b17b5caec29037a4e9462ca149a190e6.tar.bz2
ArmPkg: Allow SMC/HVC monitor conduit to be specified at runtime
ArmVirtQemu may execute at EL2, in which case monitor calls are generally made using SMC instructions instead of HVC instructions. Whether or not this is the case can only be decided at runtime, and so the associated PCD needs to be settable at runtime, if the platform definition chooses so. This implies a boolean PCD, given that a feature PCD is build-time configurable only. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Committed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmPkg/Library/ArmMonitorLib')
-rw-r--r--ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c b/ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c
index 741f5c6..ec5b0b6 100644
--- a/ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c
+++ b/ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c
@@ -26,7 +26,7 @@ ArmMonitorCall (
IN OUT ARM_MONITOR_ARGS *Args
)
{
- if (FeaturePcdGet (PcdMonitorConduitHvc)) {
+ if (PcdGetBool (PcdMonitorConduitHvc)) {
ArmCallHvc ((ARM_HVC_ARGS *)Args);
} else {
ArmCallSmc ((ARM_SMC_ARGS *)Args);