[BOOTMGFW]: Implement the rtlcompat functions, so that Rtl string functions will...
[reactos.git] / reactos / boot / environ / app / bootmgr / rtlcompat.c
1 /*
2 * COPYRIGHT: See COPYING.ARM in the top level directory
3 * PROJECT: ReactOS UEFI Boot Manager
4 * FILE: boot/environ/app/bootmgr/rtlcompat.c
5 * PURPOSE: RTL Library Compatibility Routines
6 * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include "bootmgr.h"
12
13 /* FUNCTIONS *****************************************************************/
14
15 #if DBG
16 VOID FASTCALL
17 CHECK_PAGED_CODE_RTL (
18 char *file,
19 int line
20 )
21 {
22 // boot-code is always ok
23 }
24 #endif
25
26 PVOID
27 NTAPI
28 RtlpAllocateMemory (
29 _In_ ULONG Bytes,
30 _In_ ULONG Tag
31 )
32 {
33 UNREFERENCED_PARAMETER(Tag);
34 return BlMmAllocateHeap(Bytes);
35 }
36
37 VOID
38 NTAPI
39 RtlpFreeMemory (
40 _In_ PVOID Mem,
41 _In_ ULONG Tag
42 )
43 {
44 UNREFERENCED_PARAMETER(Tag);
45 BlMmFreeHeap(Mem);
46 }
47
48 NTSTATUS
49 NTAPI
50 RtlpSafeCopyMemory (
51 _Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination,
52 _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source,
53 _In_ SIZE_T Length
54 )
55 {
56 RtlCopyMemory(Destination, Source, Length);
57 return STATUS_SUCCESS;
58 }
59
60 VOID
61 NTAPI
62 RtlAssert (
63 IN PVOID FailedAssertion,
64 IN PVOID FileName,
65 IN ULONG LineNumber,
66 IN PCHAR Message OPTIONAL
67 )
68 {
69 EfiPrintf(L"*** ASSERTION %s FAILED AT %d in %s (%s) ***\r \n",
70 FailedAssertion,
71 LineNumber,
72 FileName,
73 Message);
74 }
75
76 ULONG
77 DbgPrint (
78 const char *Format,
79 ...
80 )
81 {
82 EfiPrintf(L"%s\r\n", Format);
83 return 0;
84 }
85
86 VOID
87 NTAPI
88 KeBugCheckEx(
89 _In_ ULONG BugCheckCode,
90 _In_ ULONG_PTR BugCheckParameter1,
91 _In_ ULONG_PTR BugCheckParameter2,
92 _In_ ULONG_PTR BugCheckParameter3,
93 _In_ ULONG_PTR BugCheckParameter4)
94 {
95 __assume(0);
96 }