xref: /DragonStub/inc/efirtlib.h (revision f412fd2a1a248b546b7085648dece8d908077fab)
1 #ifndef _EFI_RT_LIB_INCLUDE_
2 #define _EFI_RT_LIB_INCLUDE_
3 /*++
4 
5 Copyright (c) 1998  Intel Corporation
6 
7 Module Name:
8 
9     efilib.h
10 
11 Abstract:
12 
13     EFI Runtime library functions
14 
15 
16 
17 Revision History
18 
19 --*/
20 
21 #include "efidebug.h"
22 #include "efipart.h"
23 #if defined(_M_X64) || defined(__x86_64__) || defined(__amd64__)
24 #include "x86_64/efilibplat.h"
25 #elif defined(_M_IX86) || defined(__i386__)
26 #include "ia32/efilibplat.h"
27 #elif defined(_M_IA64) || defined(__ia64__)
28 #include "ia64/efilibplat.h"
29 #elif defined (_M_ARM64) || defined(__aarch64__)
30 #include "aarch64/efilibplat.h"
31 #elif defined (_M_ARM) || defined(__arm__)
32 #include "arm/efilibplat.h"
33 #elif defined (_M_MIPS64) || defined(__mips64__) || defined(__mips64)
34 #include "mips64el/efilibplat.h"
35 #elif defined (__riscv) && __riscv_xlen == 64
36 #include "riscv64/efilibplat.h"
37 #endif
38 
39 
40 VOID
41 RUNTIMEFUNCTION
42 RtZeroMem (
43     IN VOID     *Buffer,
44     IN UINTN     Size
45     );
46 
47 VOID
48 RUNTIMEFUNCTION
49 RtSetMem (
50     IN VOID     *Buffer,
51     IN UINTN    Size,
52     IN UINT8    Value
53     );
54 
55 VOID
56 RUNTIMEFUNCTION
57 RtCopyMem (
58     IN VOID     *Dest,
59     IN CONST VOID     *Src,
60     IN UINTN    len
61     );
62 
63 INTN
64 RUNTIMEFUNCTION
65 RtCompareMem (
66     IN CONST VOID     *Dest,
67     IN CONST VOID     *Src,
68     IN UINTN    len
69     );
70 
71 INTN
72 RUNTIMEFUNCTION
73 RtStrCmp (
74     IN CONST CHAR16   *s1,
75     IN CONST CHAR16   *s2
76     );
77 
78 
79 VOID
80 RUNTIMEFUNCTION
81 RtStrCpy (
82     IN CHAR16   *Dest,
83     IN CONST CHAR16    *Src
84     );
85 
86 VOID
87 RUNTIMEFUNCTION
88 RtStrnCpy (
89     IN CHAR16   *Dest,
90     IN CONST CHAR16    *Src,
91     IN UINTN     Len
92     );
93 
94 CHAR16 *
95 RUNTIMEFUNCTION
96 RtStpCpy (
97     IN CHAR16   *Dest,
98     IN CONST CHAR16    *Src
99     );
100 
101 CHAR16 *
102 RUNTIMEFUNCTION
103 RtStpnCpy (
104     IN CHAR16   *Dest,
105     IN CONST CHAR16    *Src,
106     IN UINTN     Len
107     );
108 
109 VOID
110 RUNTIMEFUNCTION
111 RtStrCat (
112     IN CHAR16   *Dest,
113     IN CONST CHAR16   *Src
114     );
115 
116 VOID
117 RUNTIMEFUNCTION
118 RtStrnCat (
119     IN CHAR16   *Dest,
120     IN CONST CHAR16   *Src,
121     IN UINTN     Len
122     );
123 
124 UINTN
125 RUNTIMEFUNCTION
126 RtStrLen (
127     IN CONST CHAR16   *s1
128     );
129 
130 UINTN
131 RUNTIMEFUNCTION
132 RtStrnLen (
133     IN CONST CHAR16   *s1,
134     IN UINTN           Len
135     );
136 
137 UINTN
138 RUNTIMEFUNCTION
139 RtStrSize (
140     IN CONST CHAR16   *s1
141     );
142 
143 INTN
144 RUNTIMEFUNCTION
145 RtCompareGuid (
146     IN EFI_GUID     *Guid1,
147     IN EFI_GUID     *Guid2
148     );
149 
150 UINT8
151 RUNTIMEFUNCTION
152 RtDecimaltoBCD(
153     IN  UINT8 BcdValue
154     );
155 
156 UINT8
157 RUNTIMEFUNCTION
158 RtBCDtoDecimal(
159     IN  UINT8 BcdValue
160     );
161 
162 //
163 // Virtual mapping transition support.  (Only used during
164 // the virtual address change transisition)
165 //
166 
167 VOID
168 RUNTIMEFUNCTION
169 RtLibEnableVirtualMappings (
170     VOID
171     );
172 
173 VOID
174 RUNTIMEFUNCTION
175 RtConvertList (
176     IN UINTN            DebugDisposition,
177     IN OUT LIST_ENTRY   *ListHead
178     );
179 
180 VOID
181 RUNTIMEFUNCTION
182 RtAcquireLock (
183     IN FLOCK    *Lock
184     );
185 
186 VOID
187 RUNTIMEFUNCTION
188 RtReleaseLock (
189     IN FLOCK    *Lock
190     );
191 
192 
193 #endif
194