15#define NEXT_MEMORY_DESCRIPTOR(Descriptor, DescriptorSize) \
16 (EFI_MEMORY_DESCRIPTOR*)((char*)(Descriptor) + (DescriptorSize))
17#define EXIT_STACK_SIZE 0x1000
18#define UNUSED_MAX_DESCRIPTOR_COUNT 10000
63 LocDescriptorVersion);
81 LocDescriptorVersion);
97 PageCount = SizeInPages;
111 switch (EfiMemoryType)
165 (
VOID**)&LoadedImage);
168 TRACE(
"Failed to find LoadedImageHandle with status: %d\n",
Status);
177 TRACE(
"UefiMemGetMemoryMap: Gather memory map\n");
183 TRACE(
"Value of MapKey: %d\n", MapKey);
184 TRACE(
"Value of MapSize: %d\n", MapSize);
186 TRACE(
"Value of DescriptorVersion: %d\n", DescriptorVersion);
193 (
void**)&FreeldrMem);
196 TRACE(
"Failed to allocate pool with status %d\n",
Status);
257 TRACE(
"Attempting to exit bootsevices\n");
270 TRACE(
"Failed to exit boot services with status: %d\n",
Status);
274 "Failed to exit boot services with status: %d",
279 TRACE(
"Exited bootservices\n");
#define EFI_LOADED_IMAGE_PROTOCOL_GUID
@ EfiMemoryMappedIOPortSpace
EFI_GUID EfiLoadedImageProtocol
BIOS_MEMORY_MAP MemoryMap[32]
VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PSTR Format,...)
#define DBG_DEFAULT_CHANNEL(ch)
struct _FREELDR_MEMORY_DESCRIPTOR FREELDR_MEMORY_DESCRIPTOR
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
@ LoaderFirmwareTemporary
@ LoaderFirmwarePermanent
enum _TYPE_OF_MEMORY TYPE_OF_MEMORY
EFI_ALLOCATE_PAGES AllocatePages
EFI_HANDLE_PROTOCOL HandleProtocol
EFI_EXIT_BOOT_SERVICES ExitBootServices
EFI_ALLOCATE_POOL AllocatePool
EFI_GET_MEMORY_MAP GetMemoryMap
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
UINT64 ImageSize
The size in bytes of the loaded image.
VOID * ImageBase
The base address at which the image was loaded.
EFI_PHYSICAL_ADDRESS PhysicalStart
EFI_BOOT_SERVICES * BootServices
_In_ SIZE_T DescriptorSize
#define RtlZeroMemory(Destination, Length)
VOID UefiExitBootServices(VOID)
EFI_MEMORY_DESCRIPTOR * EfiMemoryMap
static VOID PUEFI_LoadMemoryMap(_Out_ UINTN *LocMapKey, _Out_ UINTN *LocMapSize, _Out_ UINTN *LocDescriptorSize, _Out_ UINT32 *LocDescriptorVersion)
ULONG AddMemoryDescriptor(_Inout_ PFREELDR_MEMORY_DESCRIPTOR List, _In_ ULONG MaxCount, _In_ PFN_NUMBER BasePage, _In_ PFN_NUMBER PageCount, _In_ TYPE_OF_MEMORY MemoryType)
EFI_HANDLE PublicBootHandle
EFI_SYSTEM_TABLE * GlobalSystemTable
REACTOS_INTERNAL_BGCONTEXT framebufferData
static TYPE_OF_MEMORY UefiConvertToFreeldrDesc(EFI_MEMORY_TYPE EfiMemoryType)
PFREELDR_MEMORY_DESCRIPTOR UefiMemGetMemoryMap(ULONG *MemoryMapSize)
static VOID UefiSetMemory(_Inout_ PFREELDR_MEMORY_DESCRIPTOR MemoryMap, _In_ ULONG_PTR BaseAddress, _In_ PFN_COUNT SizeInPages, _In_ TYPE_OF_MEMORY MemoryType)
EFI_HANDLE GlobalImageHandle
#define UNUSED_MAX_DESCRIPTOR_COUNT
#define NEXT_MEMORY_DESCRIPTOR(Descriptor, DescriptorSize)
VOID UefiPrepareForReactOS(VOID)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFCMRESLIST List