[BOOT] Small refactoring

This commit is contained in:
Quinn Stephens 2024-08-26 19:55:32 -04:00
parent 72f7e5057c
commit c7298452ff
2 changed files with 16 additions and 16 deletions

View File

@ -703,7 +703,7 @@ Return Value:
ScratchUsed += sizeof(MEMORY_DESCRIPTOR);
MemoryDescriptor->BasePage = (UINTN)InputParameters->ImageBase >> 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;
//

View File

@ -32,8 +32,8 @@ MEMORY_DESCRIPTOR_LIST MmMdlUnmappedUnallocated;
FORCEINLINE
VOID
InitializeList (
IN PMEMORY_DESCRIPTOR_LIST List
InitializeMdl (
IN PMEMORY_DESCRIPTOR_LIST Mdl
)
/*++
@ -44,7 +44,7 @@ Routine Description:
Arguments:
List - the MDL to initialize.
Mdl - the MDL to initialize.
Return Value:
@ -53,9 +53,9 @@ Return Value:
--*/
{
List->Head = NULL;
List->Current = NULL;
List->Type = MDL_TYPE_PHYSICAL;
Mdl->Head = NULL;
Mdl->Current = NULL;
Mdl->Type = MDL_TYPE_PHYSICAL;
}
NTSTATUS
@ -100,15 +100,15 @@ Return Value:
//
// Initialize MDLs.
//
InitializeList(&MmMdlFwAllocationTracker);
InitializeList(&MmMdlBadMemory);
InitializeList(&MmMdlTruncatedMemory);
InitializeList(&MmMdlPersistentMemory);
InitializeList(&MmMdlReservedAllocated);;
InitializeList(&MmMdlMappedAllocated);
InitializeList(&MmMdlMappedUnallocated);
InitializeList(&MmMdlUnmappedAllocated);
InitializeList(&MmMdlUnmappedUnallocated);
InitializeMdl(&MmMdlFwAllocationTracker);
InitializeMdl(&MmMdlBadMemory);
InitializeMdl(&MmMdlTruncatedMemory);
InitializeMdl(&MmMdlPersistentMemory);
InitializeMdl(&MmMdlReservedAllocated);;
InitializeMdl(&MmMdlMappedAllocated);
InitializeMdl(&MmMdlMappedUnallocated);
InitializeMdl(&MmMdlUnmappedAllocated);
InitializeMdl(&MmMdlUnmappedUnallocated);
//
// Get the firmware memory map.