46 NextEntry = ListHead->
Flink;
61 NextEntry = NextEntry->
Flink;
67 if (NextEntry == ListHead)
135 EfiPrintf(
L"Need to handle reserved allocation: %llx %llx\r\n",
143 NextEntry = NextEntry->
Flink;
183 EfiPrintf(
L"Persistent bad page list not supported\r\n");
200 PVOID MappingAddress;
204 UCHAR CacheAttributes;
365 if (FoundBasePage < BasePage)
368 PageOffset = BasePage - FoundBasePage;
388 PageOffset =
EndPage - BasePage;
436 MappedPage += AddPages;
437 BasePage += AddPages;
553 if ((TranslationType >
BlPae) || (LibraryParameters->TranslationType >
BlPae))
556 EfiPrintf(
L"Invalid translation types present\r\n");
569 LibraryParameters->MinimumAllocationCount);
589 LibraryParameters->TranslationType);
597 LibraryParameters->HeapAllocationAttributes);
613 if (LibraryParameters->DescriptorCount > 512)
616 EfiPrintf(
L"Warning: too many descriptors\r\n");
629 LibraryParameters->TranslationType);
@ BcdLibraryIntegerList_BadMemoryList
@ BcdLibraryBoolean_AllowBadMemoryAccess
NTSTATUS BlGetBootOptionBoolean(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBOOLEAN Value)
NTSTATUS MmPaInitialize(_In_ PBL_MEMORY_DATA MemoryData, _In_ ULONG MinimumPages)
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappedUnallocated
NTSTATUS MmMdAddDescriptorToList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR MemoryDescriptor, _In_ ULONG Flags)
NTSTATUS MmMapPhysicalAddress(_Inout_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID *VirtualAddress, _Inout_ PULONGLONG Size, _In_ ULONG CacheAttributes)
VOID EfiPrintf(_In_ PWCHAR Format,...)
NTSTATUS MmArchInitialize(_In_ ULONG Phase, _In_ PBL_MEMORY_DATA MemoryData, _In_ BL_TRANSLATION_TYPE TranslationType, _In_ BL_TRANSLATION_TYPE LibraryTranslationType)
FORCEINLINE VOID MmMdInitializeListHead(_In_ PBL_MEMORY_DESCRIPTOR_LIST List)
PBL_MEMORY_DESCRIPTOR MmMdInitByteGranularDescriptor(_In_ ULONG Flags, _In_ BL_MEMORY_TYPE Type, _In_ ULONGLONG BasePage, _In_ ULONGLONG VirtualPage, _In_ ULONGLONG PageCount)
BL_MEMORY_DESCRIPTOR_LIST MmMdlReservedAllocated
NTSTATUS MmHaInitialize(_In_ ULONG HeapSize, _In_ ULONG HeapAttributes)
#define BL_MM_INCLUDE_UNMAPPED_UNALLOCATED
VOID MmMdRemoveDescriptorFromList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR Entry)
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedAllocated
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappingTrackers
BOOLEAN MmArchTranslateVirtualAddress(_In_ PVOID VirtualAddress, _Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_opt_ PULONG CachingFlags)
#define BL_MM_ADD_DESCRIPTOR_COALESCE_FLAG
#define BL_MM_REMOVE_PHYSICAL_REGION_FLAG
VOID MmMdFreeGlobalDescriptors(VOID)
enum _BL_TRANSLATION_TYPE BL_TRANSLATION_TYPE
NTSTATUS EfiStall(_In_ ULONG StallTime)
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappedAllocated
BL_MEMORY_DESCRIPTOR_LIST MmMdlFreeVirtual
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedUnallocated
#define BL_MM_INCLUDE_PERSISTENT_MEMORY
NTSTATUS BlpGetBootOptionIntegerList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG *Value, _Out_ PULONGLONG Count, _In_ BOOLEAN NoCopy)
NTSTATUS MmMdRemoveRegionFromMdlEx(__in PBL_MEMORY_DESCRIPTOR_LIST MdList, __in ULONG Flags, __in ULONGLONG BasePage, __in ULONGLONG PageCount, __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList)
@ BlMemoryValidCacheAttributeMask
@ BlMemoryValidAllocationAttributes
VOID MmMdInitialize(_In_ ULONG Phase, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
BL_LOADED_APPLICATION_ENTRY BlpApplicationEntry
#define BL_MM_INCLUDE_UNMAPPED_ALLOCATED
#define BL_MM_INCLUDE_RESERVED_ALLOCATED
NTSTATUS MmBaInitialize(VOID)
NTSTATUS MmSelectMappingAddress(_Out_ PVOID *MappingAddress, _In_ PVOID PreferredAddress, _In_ ULONGLONG Size, _In_ ULONG AllocationAttributes, _In_ ULONG Flags, _In_ PHYSICAL_ADDRESS PhysicalAddress)
BL_MEMORY_DESCRIPTOR_LIST MmMdlPersistentMemory
PBL_MEMORY_DESCRIPTOR MmMdFindDescriptor(_In_ ULONG WhichList, _In_ ULONG Flags, _In_ ULONGLONG Page)
#define BL_MM_REMOVE_VIRTUAL_REGION_FLAG
#define NT_SUCCESS(StatCode)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
BL_TRANSLATION_TYPE MmTranslationType
NTSTATUS BlMmUnmapVirtualAddressEx(_In_ PVOID VirtualAddress, _In_ ULONGLONG Size)
NTSTATUS BlMmRemoveBadMemory(VOID)
NTSTATUS BlpMmInitialize(_In_ PBL_MEMORY_DATA MemoryData, _In_ BL_TRANSLATION_TYPE TranslationType, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
NTSTATUS MmTrInitialize(VOID)
NTSTATUS BlMmMapPhysicalAddressEx(_In_ PVOID *VirtualAddress, _In_ ULONG Flags, _In_ ULONGLONG Size, _In_ PHYSICAL_ADDRESS PhysicalAddress)
ULONG MmDescriptorCallTreeCount
NTSTATUS MmUnmapVirtualAddress(_Inout_ PVOID *VirtualAddress, _Inout_ PULONGLONG Size)
NTSTATUS TrpGenerateMappingTracker(_In_ PVOID VirtualAddress, _In_ ULONG Flags, _In_ LARGE_INTEGER PhysicalAddress, _In_ ULONGLONG Size)
BL_TRANSLATION_TYPE MmOriginalTranslationType
BOOLEAN BlMmTranslateVirtualAddress(_In_ PVOID VirtualAddress, _Out_ PPHYSICAL_ADDRESS PhysicalAddress)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
#define STATUS_NOT_IMPLEMENTED
struct _LIST_ENTRY * Flink
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
_Must_inspect_result_ _In_ WDFCMRESLIST List
int WINAPI EndPage(_In_ HDC)
_Must_inspect_result_ _In_ ULONG Flags
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR * NewDescriptor