[BOOT] Small refactoring
This commit is contained in:
parent
72f7e5057c
commit
c7298452ff
@ -703,7 +703,7 @@ Return Value:
|
|||||||
ScratchUsed += sizeof(MEMORY_DESCRIPTOR);
|
ScratchUsed += sizeof(MEMORY_DESCRIPTOR);
|
||||||
MemoryDescriptor->BasePage = (UINTN)InputParameters->ImageBase >> PAGE_SHIFT;
|
MemoryDescriptor->BasePage = (UINTN)InputParameters->ImageBase >> PAGE_SHIFT;
|
||||||
MemoryDescriptor->Pages = ALIGN_UP(InputParameters->ImageSize, PAGE_SIZE) >> PAGE_SHIFT;
|
MemoryDescriptor->Pages = ALIGN_UP(InputParameters->ImageSize, PAGE_SIZE) >> PAGE_SHIFT;
|
||||||
MemoryDescriptor->Attributes = MEMORY_ATTRIBUTE_CACHE_WB;
|
MemoryDescriptor->Attributes = MEMORY_ATTRIBUTE_WB;
|
||||||
MemoryDescriptor->Type = MEMORY_TYPE_BOOT_APPLICATION;
|
MemoryDescriptor->Type = MEMORY_TYPE_BOOT_APPLICATION;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -32,8 +32,8 @@ MEMORY_DESCRIPTOR_LIST MmMdlUnmappedUnallocated;
|
|||||||
|
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
VOID
|
VOID
|
||||||
InitializeList (
|
InitializeMdl (
|
||||||
IN PMEMORY_DESCRIPTOR_LIST List
|
IN PMEMORY_DESCRIPTOR_LIST Mdl
|
||||||
)
|
)
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
@ -44,7 +44,7 @@ Routine Description:
|
|||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
List - the MDL to initialize.
|
Mdl - the MDL to initialize.
|
||||||
|
|
||||||
Return Value:
|
Return Value:
|
||||||
|
|
||||||
@ -53,9 +53,9 @@ Return Value:
|
|||||||
--*/
|
--*/
|
||||||
|
|
||||||
{
|
{
|
||||||
List->Head = NULL;
|
Mdl->Head = NULL;
|
||||||
List->Current = NULL;
|
Mdl->Current = NULL;
|
||||||
List->Type = MDL_TYPE_PHYSICAL;
|
Mdl->Type = MDL_TYPE_PHYSICAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
@ -100,15 +100,15 @@ Return Value:
|
|||||||
//
|
//
|
||||||
// Initialize MDLs.
|
// Initialize MDLs.
|
||||||
//
|
//
|
||||||
InitializeList(&MmMdlFwAllocationTracker);
|
InitializeMdl(&MmMdlFwAllocationTracker);
|
||||||
InitializeList(&MmMdlBadMemory);
|
InitializeMdl(&MmMdlBadMemory);
|
||||||
InitializeList(&MmMdlTruncatedMemory);
|
InitializeMdl(&MmMdlTruncatedMemory);
|
||||||
InitializeList(&MmMdlPersistentMemory);
|
InitializeMdl(&MmMdlPersistentMemory);
|
||||||
InitializeList(&MmMdlReservedAllocated);;
|
InitializeMdl(&MmMdlReservedAllocated);;
|
||||||
InitializeList(&MmMdlMappedAllocated);
|
InitializeMdl(&MmMdlMappedAllocated);
|
||||||
InitializeList(&MmMdlMappedUnallocated);
|
InitializeMdl(&MmMdlMappedUnallocated);
|
||||||
InitializeList(&MmMdlUnmappedAllocated);
|
InitializeMdl(&MmMdlUnmappedAllocated);
|
||||||
InitializeList(&MmMdlUnmappedUnallocated);
|
InitializeMdl(&MmMdlUnmappedUnallocated);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the firmware memory map.
|
// Get the firmware memory map.
|
||||||
|
Loading…
Reference in New Issue
Block a user