ReactOS 0.4.15-dev-7788-g1ad9096
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
17CHECK_PAGED_CODE_RTL (
18 char *file,
19 int line
20 )
21{
22 // boot-code is always ok
23}
24#endif
25
26#ifdef _WIN64
27PVOID MmHighestUserAddress = (PVOID)0xFFFFFFFFULL; // CHECKME
28#else
30#endif
31
37 )
38{
40 return BlMmAllocateHeap(Bytes);
41}
42
43VOID
46 _In_ PVOID Mem,
48 )
49{
51 BlMmFreeHeap(Mem);
52}
53
60 )
61{
63 return STATUS_SUCCESS;
64}
65
66VOID
69 IN PVOID FailedAssertion,
73 )
74{
75 if (Message != NULL)
76 {
77 EfiPrintf(L"*** ASSERTION \'%S\' FAILED AT line %lu in %S (%S) ***\r\n",
78 (PCHAR)FailedAssertion,
81 Message);
82 }
83 else
84 {
85 EfiPrintf(L"*** ASSERTION \'%S\' FAILED AT line %lu in %S ***\r\n",
86 (PCHAR)FailedAssertion,
89 }
90
91 /* Issue a breakpoint */
93}
94
97 const char *Format,
98 ...
99 )
100{
101 EfiPrintf(L"%S\r\n", Format);
102 return 0;
103}
104
105// FIXME: DECLSPEC_NORETURN
106VOID
107NTAPI
109 _In_ ULONG BugCheckCode,
110 _In_ ULONG_PTR BugCheckParameter1,
111 _In_ ULONG_PTR BugCheckParameter2,
112 _In_ ULONG_PTR BugCheckParameter3,
113 _In_ ULONG_PTR BugCheckParameter4)
114{
115 __assume(0);
116}
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:1220
LONG NTSTATUS
Definition: precomp.h:26
VOID EfiPrintf(_In_ PWCHAR Format,...)
Definition: firmware.c:126
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
Definition: heapalloc.c:569
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
Definition: heapalloc.c:663
#define UNALIGNED
Definition: crtdefs.h:144
#define NULL
Definition: types.h:112
static const WCHAR Message[]
Definition: register.c:74
#define DbgPrint
Definition: hal.h:12
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define __assume(x)
Definition: intrin.h:108
_In_ UINT Bytes
Definition: mmcopy.h:9
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Out_writes_bytes_all_(size)
Definition: ms_sal.h:362
#define _In_
Definition: ms_sal.h:308
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3004
#define FASTCALL
Definition: nt_native.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
#define CONST
Definition: pedump.c:81
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 NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
PVOID NTAPI RtlpAllocateMemory(_In_ ULONG Bytes, _In_ ULONG Tag)
Definition: rtlcompat.c:34
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
Definition: rtlcompat.c:68
VOID NTAPI RtlpFreeMemory(_In_ PVOID Mem, _In_ ULONG Tag)
Definition: rtlcompat.c:45
PVOID MmHighestUserAddress
Definition: rtlcompat.c:29
#define STATUS_SUCCESS
Definition: shellext.h:65
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: fci.c:127
Definition: parser.c:49
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065