TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmSmc.c
Go to the documentation of this file.
1
10#include <Library/ArmSmcLib.h>
12
24 IN UINTN Function,
25 IN OUT UINTN *Arg1 OPTIONAL,
26 IN OUT UINTN *Arg2 OPTIONAL,
27 IN OUT UINTN *Arg3 OPTIONAL
28 )
29{
30 ARM_SMC_ARGS Args;
31 UINTN ErrorCode;
32
33 ZeroMem (&Args, sizeof (ARM_SMC_ARGS));
34
35 Args.Arg0 = Function;
36
37 if (Arg1 != NULL) {
38 Args.Arg1 = *Arg1;
39 }
40
41 if (Arg2 != NULL) {
42 Args.Arg2 = *Arg2;
43 }
44
45 if (Arg3 != NULL) {
46 Args.Arg3 = *Arg3;
47 }
48
49 ArmCallSmc (&Args);
50
51 ErrorCode = Args.Arg0;
52
53 if (Arg1 != NULL) {
54 *Arg1 = Args.Arg1;
55 }
56
57 if (Arg2 != NULL) {
58 *Arg2 = Args.Arg2;
59 }
60
61 if (Arg3 != NULL) {
62 *Arg3 = Args.Arg3;
63 }
64
65 return ErrorCode;
66}
67
80 IN UINTN Function,
81 IN OUT UINTN *Arg1 OPTIONAL,
82 IN OUT UINTN *Arg2 OPTIONAL,
83 OUT UINTN *Arg3 OPTIONAL
84 )
85{
86 return ArmCallSmc3 (Function, Arg1, Arg2, Arg3);
87}
88
101 IN UINTN Function,
102 IN OUT UINTN *Arg1 OPTIONAL,
103 OUT UINTN *Arg2 OPTIONAL,
104 OUT UINTN *Arg3 OPTIONAL
105 )
106{
107 return ArmCallSmc3 (Function, Arg1, Arg2, Arg3);
108}
109
120UINTN
122 IN UINTN Function,
123 OUT UINTN *Arg1 OPTIONAL,
124 OUT UINTN *Arg2 OPTIONAL,
125 OUT UINTN *Arg3 OPTIONAL
126 )
127{
128 return ArmCallSmc3 (Function, Arg1, Arg2, Arg3);
129}
UINT64 UINTN
UINTN ArmCallSmc3(IN UINTN Function, IN OUT UINTN *Arg1 OPTIONAL, IN OUT UINTN *Arg2 OPTIONAL, IN OUT UINTN *Arg3 OPTIONAL)
Definition: ArmSmc.c:23
UINTN ArmCallSmc2(IN UINTN Function, IN OUT UINTN *Arg1 OPTIONAL, IN OUT UINTN *Arg2 OPTIONAL, OUT UINTN *Arg3 OPTIONAL)
Definition: ArmSmc.c:79
UINTN ArmCallSmc1(IN UINTN Function, IN OUT UINTN *Arg1 OPTIONAL, OUT UINTN *Arg2 OPTIONAL, OUT UINTN *Arg3 OPTIONAL)
Definition: ArmSmc.c:100
UINTN ArmCallSmc0(IN UINTN Function, OUT UINTN *Arg1 OPTIONAL, OUT UINTN *Arg2 OPTIONAL, OUT UINTN *Arg3 OPTIONAL)
Definition: ArmSmc.c:121
VOID ArmCallSmc(IN OUT ARM_SMC_ARGS *Args)
Definition: ArmSmcLibNull.c:14
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284