xref: /DragonStub/inc/efirtlib.h (revision 6b28563584edd08ab9c94a746a8061434c165837)
1530d68baSNigel Croxon #ifndef _EFI_RT_LIB_INCLUDE_
2530d68baSNigel Croxon #define _EFI_RT_LIB_INCLUDE_
3530d68baSNigel Croxon /*++
4530d68baSNigel Croxon 
5530d68baSNigel Croxon Copyright (c) 1998  Intel Corporation
6530d68baSNigel Croxon 
7530d68baSNigel Croxon Module Name:
8530d68baSNigel Croxon 
9530d68baSNigel Croxon     efilib.h
10530d68baSNigel Croxon 
11530d68baSNigel Croxon Abstract:
12530d68baSNigel Croxon 
13530d68baSNigel Croxon     EFI Runtime library functions
14530d68baSNigel Croxon 
15530d68baSNigel Croxon 
16530d68baSNigel Croxon 
17530d68baSNigel Croxon Revision History
18530d68baSNigel Croxon 
19530d68baSNigel Croxon --*/
20530d68baSNigel Croxon 
21530d68baSNigel Croxon #include "efidebug.h"
22530d68baSNigel Croxon #include "efipart.h"
23b1c7a1c5SPete Batard #if defined(_M_X64) || defined(__x86_64__) || defined(__amd64__)
24b1c7a1c5SPete Batard #include "x86_64/efilibplat.h"
25b1c7a1c5SPete Batard #elif defined(_M_IX86) || defined(__i386__)
26b1c7a1c5SPete Batard #include "ia32/efilibplat.h"
27b1c7a1c5SPete Batard #elif defined(_M_IA64) || defined(__ia64__)
28b1c7a1c5SPete Batard #include "ia64/efilibplat.h"
29b1c7a1c5SPete Batard #elif defined (_M_ARM64) || defined(__aarch64__)
30b1c7a1c5SPete Batard #include "aarch64/efilibplat.h"
31b1c7a1c5SPete Batard #elif defined (_M_ARM) || defined(__arm__)
32b1c7a1c5SPete Batard #include "arm/efilibplat.h"
33*6b285635SFabrice Fontaine #elif defined (_M_MIPS64) || defined(__mips64__) || defined(__mips64)
34b1c7a1c5SPete Batard #include "mips64el/efilibplat.h"
35b95f138fSHeinrich Schuchardt #elif defined (__riscv) && __riscv_xlen == 64
36b95f138fSHeinrich Schuchardt #include "riscv64/efilibplat.h"
37b1c7a1c5SPete Batard #endif
38530d68baSNigel Croxon 
39530d68baSNigel Croxon 
40530d68baSNigel Croxon VOID
41530d68baSNigel Croxon RUNTIMEFUNCTION
42530d68baSNigel Croxon RtZeroMem (
43530d68baSNigel Croxon     IN VOID     *Buffer,
44530d68baSNigel Croxon     IN UINTN     Size
45530d68baSNigel Croxon     );
46530d68baSNigel Croxon 
47530d68baSNigel Croxon VOID
48530d68baSNigel Croxon RUNTIMEFUNCTION
49530d68baSNigel Croxon RtSetMem (
50530d68baSNigel Croxon     IN VOID     *Buffer,
51530d68baSNigel Croxon     IN UINTN    Size,
52530d68baSNigel Croxon     IN UINT8    Value
53530d68baSNigel Croxon     );
54530d68baSNigel Croxon 
55530d68baSNigel Croxon VOID
56530d68baSNigel Croxon RUNTIMEFUNCTION
57530d68baSNigel Croxon RtCopyMem (
58530d68baSNigel Croxon     IN VOID     *Dest,
59530d68baSNigel Croxon     IN CONST VOID     *Src,
60530d68baSNigel Croxon     IN UINTN    len
61530d68baSNigel Croxon     );
62530d68baSNigel Croxon 
63530d68baSNigel Croxon INTN
64530d68baSNigel Croxon RUNTIMEFUNCTION
65530d68baSNigel Croxon RtCompareMem (
66530d68baSNigel Croxon     IN CONST VOID     *Dest,
67530d68baSNigel Croxon     IN CONST VOID     *Src,
68530d68baSNigel Croxon     IN UINTN    len
69530d68baSNigel Croxon     );
70530d68baSNigel Croxon 
71530d68baSNigel Croxon INTN
72530d68baSNigel Croxon RUNTIMEFUNCTION
73530d68baSNigel Croxon RtStrCmp (
74530d68baSNigel Croxon     IN CONST CHAR16   *s1,
75530d68baSNigel Croxon     IN CONST CHAR16   *s2
76530d68baSNigel Croxon     );
77530d68baSNigel Croxon 
78530d68baSNigel Croxon 
79530d68baSNigel Croxon VOID
80530d68baSNigel Croxon RUNTIMEFUNCTION
81530d68baSNigel Croxon RtStrCpy (
82530d68baSNigel Croxon     IN CHAR16   *Dest,
83530d68baSNigel Croxon     IN CONST CHAR16    *Src
84530d68baSNigel Croxon     );
85530d68baSNigel Croxon 
86530d68baSNigel Croxon VOID
87530d68baSNigel Croxon RUNTIMEFUNCTION
889485c65fSPeter Jones RtStrnCpy (
899485c65fSPeter Jones     IN CHAR16   *Dest,
909485c65fSPeter Jones     IN CONST CHAR16    *Src,
919485c65fSPeter Jones     IN UINTN     Len
929485c65fSPeter Jones     );
939485c65fSPeter Jones 
949485c65fSPeter Jones CHAR16 *
959485c65fSPeter Jones RUNTIMEFUNCTION
969485c65fSPeter Jones RtStpCpy (
979485c65fSPeter Jones     IN CHAR16   *Dest,
989485c65fSPeter Jones     IN CONST CHAR16    *Src
999485c65fSPeter Jones     );
1009485c65fSPeter Jones 
1019485c65fSPeter Jones CHAR16 *
1029485c65fSPeter Jones RUNTIMEFUNCTION
1039485c65fSPeter Jones RtStpnCpy (
1049485c65fSPeter Jones     IN CHAR16   *Dest,
1059485c65fSPeter Jones     IN CONST CHAR16    *Src,
1069485c65fSPeter Jones     IN UINTN     Len
1079485c65fSPeter Jones     );
1089485c65fSPeter Jones 
1099485c65fSPeter Jones VOID
1109485c65fSPeter Jones RUNTIMEFUNCTION
111530d68baSNigel Croxon RtStrCat (
112530d68baSNigel Croxon     IN CHAR16   *Dest,
113530d68baSNigel Croxon     IN CONST CHAR16   *Src
114530d68baSNigel Croxon     );
115530d68baSNigel Croxon 
1169485c65fSPeter Jones VOID
1179485c65fSPeter Jones RUNTIMEFUNCTION
1189485c65fSPeter Jones RtStrnCat (
1199485c65fSPeter Jones     IN CHAR16   *Dest,
1209485c65fSPeter Jones     IN CONST CHAR16   *Src,
1219485c65fSPeter Jones     IN UINTN     Len
1229485c65fSPeter Jones     );
1239485c65fSPeter Jones 
124530d68baSNigel Croxon UINTN
125530d68baSNigel Croxon RUNTIMEFUNCTION
126530d68baSNigel Croxon RtStrLen (
127530d68baSNigel Croxon     IN CONST CHAR16   *s1
128530d68baSNigel Croxon     );
129530d68baSNigel Croxon 
130530d68baSNigel Croxon UINTN
131530d68baSNigel Croxon RUNTIMEFUNCTION
1329485c65fSPeter Jones RtStrnLen (
1339485c65fSPeter Jones     IN CONST CHAR16   *s1,
1349485c65fSPeter Jones     IN UINTN           Len
1359485c65fSPeter Jones     );
1369485c65fSPeter Jones 
1379485c65fSPeter Jones UINTN
1389485c65fSPeter Jones RUNTIMEFUNCTION
139530d68baSNigel Croxon RtStrSize (
140530d68baSNigel Croxon     IN CONST CHAR16   *s1
141530d68baSNigel Croxon     );
142530d68baSNigel Croxon 
143530d68baSNigel Croxon INTN
144530d68baSNigel Croxon RUNTIMEFUNCTION
145530d68baSNigel Croxon RtCompareGuid (
146530d68baSNigel Croxon     IN EFI_GUID     *Guid1,
147530d68baSNigel Croxon     IN EFI_GUID     *Guid2
148530d68baSNigel Croxon     );
149530d68baSNigel Croxon 
150530d68baSNigel Croxon UINT8
151530d68baSNigel Croxon RUNTIMEFUNCTION
152530d68baSNigel Croxon RtDecimaltoBCD(
153530d68baSNigel Croxon     IN  UINT8 BcdValue
154530d68baSNigel Croxon     );
155530d68baSNigel Croxon 
156530d68baSNigel Croxon UINT8
157530d68baSNigel Croxon RUNTIMEFUNCTION
158530d68baSNigel Croxon RtBCDtoDecimal(
159530d68baSNigel Croxon     IN  UINT8 BcdValue
160530d68baSNigel Croxon     );
161530d68baSNigel Croxon 
162530d68baSNigel Croxon //
163530d68baSNigel Croxon // Virtual mapping transition support.  (Only used during
164530d68baSNigel Croxon // the virtual address change transisition)
165530d68baSNigel Croxon //
166530d68baSNigel Croxon 
167530d68baSNigel Croxon VOID
168530d68baSNigel Croxon RUNTIMEFUNCTION
169530d68baSNigel Croxon RtLibEnableVirtualMappings (
170530d68baSNigel Croxon     VOID
171530d68baSNigel Croxon     );
172530d68baSNigel Croxon 
173530d68baSNigel Croxon VOID
174530d68baSNigel Croxon RUNTIMEFUNCTION
175530d68baSNigel Croxon RtConvertList (
176530d68baSNigel Croxon     IN UINTN            DebugDisposition,
177530d68baSNigel Croxon     IN OUT LIST_ENTRY   *ListHead
178530d68baSNigel Croxon     );
179530d68baSNigel Croxon 
180530d68baSNigel Croxon VOID
181530d68baSNigel Croxon RUNTIMEFUNCTION
182530d68baSNigel Croxon RtAcquireLock (
183530d68baSNigel Croxon     IN FLOCK    *Lock
184530d68baSNigel Croxon     );
185530d68baSNigel Croxon 
186530d68baSNigel Croxon VOID
187530d68baSNigel Croxon RUNTIMEFUNCTION
188530d68baSNigel Croxon RtReleaseLock (
189530d68baSNigel Croxon     IN FLOCK    *Lock
190530d68baSNigel Croxon     );
191530d68baSNigel Croxon 
192530d68baSNigel Croxon 
193530d68baSNigel Croxon #endif
194