#\r
ArmSvcLib|Include/Library/ArmSvcLib.h\r
\r
+ ## @libraryclass Provides a Monitor Call interface that will use the\r
+ # default conduit (HVC or SMC).\r
+ #\r
+ ArmMonitorLib|Include/Library/ArmMonitorLib.h\r
+\r
## @libraryclass Provides a default exception handler.\r
#\r
DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h\r
--- /dev/null
+/** @file\r
+\r
+ Copyright (c) 2022, Arm Limited. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef ARM_MONITOR_LIB_H_\r
+#define ARM_MONITOR_LIB_H_\r
+\r
+/** The size of the SMC arguments is different between AArch64 and AArch32.\r
+\r
+ The native size is used for the arguments.\r
+ It will be casted to either HVC or SMC args.\r
+*/\r
+typedef struct {\r
+ UINTN Arg0;\r
+ UINTN Arg1;\r
+ UINTN Arg2;\r
+ UINTN Arg3;\r
+ UINTN Arg4;\r
+ UINTN Arg5;\r
+ UINTN Arg6;\r
+ UINTN Arg7;\r
+} ARM_MONITOR_ARGS;\r
+\r
+/** Monitor call.\r
+\r
+ An HyperVisor Call (HVC) or System Monitor Call (SMC) will be issued\r
+ depending on the default conduit. PcdMonitorConduitHvc determines the type\r
+ of the call: if true, do an HVC.\r
+\r
+ @param [in,out] Args Arguments for the HVC/SMC.\r
+**/\r
+VOID\r
+EFIAPI\r
+ArmMonitorCall (\r
+ IN OUT ARM_MONITOR_ARGS *Args\r
+ );\r
+\r
+#endif // ARM_MONITOR_LIB_H_\r