0a0e1d55bca12f742acb1bbaae6d5641590c5dfb
[reactos.git] / boot / environ / lib / misc / rtlcompat.c
1 /*
2 * COPYRIGHT: See COPYING.ARM in the top level directory
3 * PROJECT: ReactOS UEFI Boot Manager
4 * FILE: boot/environ/lib/misc/rtlcompat.c
5 * PURPOSE: RTL Library Compatibility Routines
6 * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include "bl.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 MmHighestUserAddress = (PVOID)0xFFFFFFFF;
27
28 PVOID
29 NTAPI
30 RtlpAllocateMemory (
31 _In_ ULONG Bytes,
32 _In_ ULONG Tag
33 )
34 {
35 UNREFERENCED_PARAMETER(Tag);
36 return BlMmAllocateHeap(Bytes);
37 }
38
39 VOID
40 NTAPI
41 RtlpFreeMemory (
42 _In_ PVOID Mem,
43 _In_ ULONG Tag
44 )
45 {
46 UNREFERENCED_PARAMETER(Tag);
47 BlMmFreeHeap(Mem);
48 }
49
50 NTSTATUS
51 NTAPI
52 RtlpSafeCopyMemory (
53 _Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination,
54 _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source,
55 _In_ SIZE_T Length
56 )
57 {
58 RtlCopyMemory(Destination, Source, Length);
59 return STATUS_SUCCESS;
60 }
61
62 VOID
63 NTAPI
64 RtlAssert (
65 IN PVOID FailedAssertion,
66 IN PVOID FileName,
67 IN ULONG LineNumber,
68 IN PCHAR Message OPTIONAL
69 )
70 {
71 EfiPrintf(L"*** ASSERTION %s FAILED AT %d in %s (%s) ***\r\n",
72 FailedAssertion,
73 LineNumber,
74 FileName,
75 Message);
76 }
77
78 ULONG
79 DbgPrint (
80 const char *Format,
81 ...
82 )
83 {
84 EfiPrintf(L"%s\r\n", Format);
85 return 0;
86 }
87
88 VOID
89 NTAPI
90 KeBugCheckEx(
91 _In_ ULONG BugCheckCode,
92 _In_ ULONG_PTR BugCheckParameter1,
93 _In_ ULONG_PTR BugCheckParameter2,
94 _In_ ULONG_PTR BugCheckParameter3,
95 _In_ ULONG_PTR BugCheckParameter4)
96 {
97 __assume(0);
98 }