lindows/lcrash/efi/memmap.h

25 lines
622 B
C

#pragma once
#include "types.h"
/// EFI Memory Descriptor
struct EfiMemoryDescription {
EfiUint32 Type;
EfiVoid *PhysicalStart;
EfiVoid *VirtualStart;
EfiUint64 NumberOfPages;
EfiUint64 Attribute;
};
/**
* Load a memory map to use for translating pointers recovered from EFI tables.
*/
void EfiLoadStoredMemoryMap(
struct EfiMemoryDescription* StoredMemoryMap,
u32 StoredMemoryMapEntryCount,
u32 StoredMemoryMapEntrySize
);
/// Translate a pointer to something we can use using the stored memory map.
void* EfiTranslatePointer(void* FirmwarePointer);