ReactOS  r73918
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 
27 
28 PVOID
29 NTAPI
32  _In_ ULONG Tag
33  )
34 {
36  return BlMmAllocateHeap(Bytes);
37 }
38 
39 VOID
40 NTAPI
42  _In_ PVOID Mem,
43  _In_ ULONG Tag
44  )
45 {
47  BlMmFreeHeap(Mem);
48 }
49 
51 NTAPI
56  )
57 {
58  RtlCopyMemory(Destination, Source, Length);
59  return STATUS_SUCCESS;
60 }
61 
62 VOID
63 NTAPI
65  IN PVOID FailedAssertion,
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
80  const char *Format,
81  ...
82  )
83 {
84  EfiPrintf(L"%s\r\n", Format);
85  return 0;
86 }
87 
88 VOID
89 NTAPI
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 }
DWORD *typedef PVOID
Definition: winlogon.h:52
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
#define IN
Definition: typedefs.h:39
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
Definition: bidi.c:75
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
_In_ UINT Bytes
Definition: mmcopy.h:9
VOID NTAPI RtlpFreeMemory(_In_ PVOID Mem, _In_ ULONG Tag)
Definition: rtlcompat.c:41
#define FASTCALL
Definition: nt_native.h:50
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
Definition: heapalloc.c:661
uint32_t ULONG_PTR
Definition: typedefs.h:64
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:64
PVOID NTAPI RtlpAllocateMemory(_In_ ULONG Bytes, _In_ ULONG Tag)
Definition: rtlcompat.c:30
ULONG DbgPrint(const char *Format,...)
Definition: rtlcompat.c:79
Definition: parser.c:48
#define CONST
Definition: compiler.h:170
#define UNALIGNED
Definition: crtdefs.h:132
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2781
CHAR Message[80]
Definition: alive.c:5
VOID UINTN Length
Definition: acefiex.h:718
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:79
LONG NTSTATUS
Definition: DriverTester.h:11
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:52
VOID EfiPrintf(_In_ PWCHAR Format,...)
Definition: firmware.c:126
PVOID MmHighestUserAddress
Definition: rtlcompat.c:26
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:1195
IN ULONG IN ULONG Tag
Definition: evtlib.h:153
signed char * PCHAR
Definition: retypes.h:7
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:90
PVOID BlMmAllocateHeap(_In_ ULONG Size)
Definition: heapalloc.c:567
Definition: fci.c:114