ReactOS  0.4.10-dev-244-gb941574
rtlcompat.c
Go to the documentation of this file.
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
17 CHECK_PAGED_CODE_RTL (
18  char *file,
19  int line
20  )
21 {
22  // boot-code is always ok
23 }
24 #endif
25 
26 #ifdef _WIN64
27 PVOID MmHighestUserAddress = (PVOID)0xFFFFFFFFULL; // CHECKME
28 #else
30 #endif
31 
32 PVOID
33 NTAPI
36  _In_ ULONG Tag
37  )
38 {
40  return BlMmAllocateHeap(Bytes);
41 }
42 
43 VOID
44 NTAPI
46  _In_ PVOID Mem,
47  _In_ ULONG Tag
48  )
49 {
51  BlMmFreeHeap(Mem);
52 }
53 
55 NTAPI
60  )
61 {
62  RtlCopyMemory(Destination, Source, Length);
63  return STATUS_SUCCESS;
64 }
65 
66 VOID
67 NTAPI
69  IN PVOID FailedAssertion,
73  )
74 {
75  EfiPrintf(L"*** ASSERTION %s FAILED AT %d in %s (%s) ***\r\n",
76  FailedAssertion,
77  LineNumber,
78  FileName,
79  Message);
80 }
81 
82 ULONG
84  const char *Format,
85  ...
86  )
87 {
88  EfiPrintf(L"%s\r\n", Format);
89  return 0;
90 }
91 
92 VOID
93 NTAPI
95  _In_ ULONG BugCheckCode,
96  _In_ ULONG_PTR BugCheckParameter1,
97  _In_ ULONG_PTR BugCheckParameter2,
98  _In_ ULONG_PTR BugCheckParameter3,
99  _In_ ULONG_PTR BugCheckParameter4)
100 {
101  __assume(0);
102 }
DWORD *typedef PVOID
Definition: winlogon.h:52
signed char * PCHAR
Definition: retypes.h:7
#define IN
Definition: typedefs.h:38
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ ULONG _Out_writes_bytes_all_(Length) PUCHAR Buffer
Definition: ntddpcm.h:100
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
return STATUS_SUCCESS
Definition: btrfs.c:2690
_In_ UINT Bytes
Definition: mmcopy.h:9
VOID NTAPI RtlpFreeMemory(_In_ PVOID Mem, _In_ ULONG Tag)
Definition: rtlcompat.c:45
#define FASTCALL
Definition: nt_native.h:50
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
Definition: heapalloc.c:663
uint32_t ULONG_PTR
Definition: typedefs.h:63
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
Definition: rtlcompat.c:68
PVOID NTAPI RtlpAllocateMemory(_In_ ULONG Bytes, _In_ ULONG Tag)
Definition: rtlcompat.c:34
ULONG DbgPrint(const char *Format,...)
Definition: rtlcompat.c:83
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
Definition: heapalloc.c:569
Definition: parser.c:48
#define CONST
Definition: compiler.h:170
#define UNALIGNED
Definition: crtdefs.h:132
LONG NTSTATUS
Definition: precomp.h:26
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2875
CHAR Message[80]
Definition: alive.c:5
static const WCHAR L[]
Definition: oid.c:1087
VOID UINTN Length
Definition: acefiex.h:744
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:78
NTSTATUS NTAPI RtlpSafeCopyMemory(_Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination, _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source, _In_ SIZE_T Length)
Definition: rtlcompat.c:56
VOID EfiPrintf(_In_ PWCHAR Format,...)
Definition: firmware.c:126
PVOID MmHighestUserAddress
Definition: rtlcompat.c:29
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1196
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
unsigned int ULONG
Definition: retypes.h:1
IN HDEVINFO IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
Definition: devinst.c:44
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:94
Definition: fci.c:126