xref: /DragonStub/inc/lib.h (revision 3e6106c4d60a23aae3c0740979c5e6fb728b63c3)
1b1c7a1c5SPete Batard /*++
2b1c7a1c5SPete Batard 
3b1c7a1c5SPete Batard Copyright (c) 1998  Intel Corporation
4b1c7a1c5SPete Batard 
5b1c7a1c5SPete Batard Module Name:
6b1c7a1c5SPete Batard 
7b1c7a1c5SPete Batard     lib.h
8b1c7a1c5SPete Batard 
9b1c7a1c5SPete Batard Abstract:
10b1c7a1c5SPete Batard 
11b1c7a1c5SPete Batard     EFI library header files
12b1c7a1c5SPete Batard 
13b1c7a1c5SPete Batard 
14b1c7a1c5SPete Batard 
15b1c7a1c5SPete Batard Revision History
16b1c7a1c5SPete Batard 
17b1c7a1c5SPete Batard --*/
18b1c7a1c5SPete Batard 
19b1c7a1c5SPete Batard #ifdef __GNUC__
20b1c7a1c5SPete Batard #pragma GCC visibility push(hidden)
21b1c7a1c5SPete Batard #endif
22b1c7a1c5SPete Batard 
23b1c7a1c5SPete Batard #include "efi.h"
24b1c7a1c5SPete Batard #include "efilib.h"
25b1c7a1c5SPete Batard #include "efirtlib.h"
26b1c7a1c5SPete Batard 
27b1c7a1c5SPete Batard //
28b1c7a1c5SPete Batard // Include non architectural protocols
29b1c7a1c5SPete Batard //
30b1c7a1c5SPete Batard #include "protocol/efivar.h"
31b1c7a1c5SPete Batard #include "protocol/legacyboot.h"
32b1c7a1c5SPete Batard #include "protocol/intload.h"
33b1c7a1c5SPete Batard #include "protocol/vgaclass.h"
34b1c7a1c5SPete Batard #include "protocol/eficonsplit.h"
35b1c7a1c5SPete Batard #include "protocol/adapterdebug.h"
36b1c7a1c5SPete Batard #include "protocol/intload.h"
37b1c7a1c5SPete Batard 
38b1c7a1c5SPete Batard #include "efigpt.h"
39b1c7a1c5SPete Batard #include "libsmbios.h"
40b1c7a1c5SPete Batard 
41b1c7a1c5SPete Batard //
42b1c7a1c5SPete Batard // Prototypes
43b1c7a1c5SPete Batard //
44b1c7a1c5SPete Batard 
45b1c7a1c5SPete Batard VOID
46b1c7a1c5SPete Batard InitializeGuid (
47b1c7a1c5SPete Batard     VOID
48b1c7a1c5SPete Batard     );
49b1c7a1c5SPete Batard 
50b1c7a1c5SPete Batard INTN EFIAPI
51b1c7a1c5SPete Batard LibStubStriCmp (
52b1c7a1c5SPete Batard     IN EFI_UNICODE_COLLATION_INTERFACE  *This,
53b1c7a1c5SPete Batard     IN CHAR16                           *S1,
54b1c7a1c5SPete Batard     IN CHAR16                           *S2
55b1c7a1c5SPete Batard     );
56b1c7a1c5SPete Batard 
57b1c7a1c5SPete Batard BOOLEAN EFIAPI
58b1c7a1c5SPete Batard LibStubMetaiMatch (
59b1c7a1c5SPete Batard     IN EFI_UNICODE_COLLATION_INTERFACE  *This,
60b1c7a1c5SPete Batard     IN CHAR16                           *String,
61b1c7a1c5SPete Batard     IN CHAR16                           *Pattern
62b1c7a1c5SPete Batard     );
63b1c7a1c5SPete Batard 
64b1c7a1c5SPete Batard VOID EFIAPI
65b1c7a1c5SPete Batard LibStubStrLwrUpr (
66b1c7a1c5SPete Batard     IN EFI_UNICODE_COLLATION_INTERFACE  *This,
67b1c7a1c5SPete Batard     IN CHAR16                           *Str
68b1c7a1c5SPete Batard     );
69b1c7a1c5SPete Batard 
70b1c7a1c5SPete Batard BOOLEAN
71b1c7a1c5SPete Batard LibMatchDevicePaths (
72b1c7a1c5SPete Batard     IN  EFI_DEVICE_PATH *Multi,
73b1c7a1c5SPete Batard     IN  EFI_DEVICE_PATH *Single
74b1c7a1c5SPete Batard     );
75b1c7a1c5SPete Batard 
76b1c7a1c5SPete Batard EFI_DEVICE_PATH *
77b1c7a1c5SPete Batard LibDuplicateDevicePathInstance (
78b1c7a1c5SPete Batard     IN EFI_DEVICE_PATH  *DevPath
79b1c7a1c5SPete Batard     );
80b1c7a1c5SPete Batard 
81b1c7a1c5SPete Batard 
82b1c7a1c5SPete Batard //
83b1c7a1c5SPete Batard // Globals
84b1c7a1c5SPete Batard //
85b1c7a1c5SPete Batard extern BOOLEAN                          LibInitialized;
86b1c7a1c5SPete Batard extern BOOLEAN                          LibFwInstance;
87b1c7a1c5SPete Batard extern EFI_HANDLE			LibImageHandle;
88b1c7a1c5SPete Batard extern SIMPLE_TEXT_OUTPUT_INTERFACE     *LibRuntimeDebugOut;
89b1c7a1c5SPete Batard extern EFI_UNICODE_COLLATION_INTERFACE  *UnicodeInterface;
90b1c7a1c5SPete Batard extern EFI_UNICODE_COLLATION_INTERFACE  LibStubUnicodeInterface;
91b1c7a1c5SPete Batard extern EFI_RAISE_TPL                    LibRuntimeRaiseTPL;
92b1c7a1c5SPete Batard extern EFI_RESTORE_TPL                  LibRuntimeRestoreTPL;
93f412fd2aSLoGin 
94f412fd2aSLoGin void *memset(void *s, int c, __SIZE_TYPE__ n);
95f412fd2aSLoGin 
96f412fd2aSLoGin void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
97f412fd2aSLoGin void *memmove(void *dst, const void *src, uint64_t size);
98*3e6106c4SLoGin int memcmp(const void *vl, const void *vr, size_t n);
99*3e6106c4SLoGin void *memchr(const void *src, int c, size_t n);
100*3e6106c4SLoGin void *memrchr(const void *m, int c, size_t n);
10178b790faSLoGin size_t strnlen(const char *s, size_t maxlen);
102*3e6106c4SLoGin char *strrchr(const char *s, int c);