diff --git a/sdk/xtdk/xtfw.h b/sdk/xtdk/xtfw.h index 828903f..82b54da 100644 --- a/sdk/xtdk/xtfw.h +++ b/sdk/xtdk/xtfw.h @@ -93,13 +93,13 @@ typedef struct _LOADER_INFORMATION_BLOCK } LOADER_INFORMATION_BLOCK, *PLOADER_INFORMATION_BLOCK; /* Boot Loader memory mapping information */ -typedef struct _LOADER_MEMORY_MAPPING +typedef struct _LOADER_MEMORY_DESCRIPTOR { LIST_ENTRY ListEntry; LOADER_MEMORY_TYPE MemoryType; ULONG BasePage; ULONG PageCount; -} LOADER_MEMORY_MAPPING, *PLOADER_MEMORY_MAPPING; +} LOADER_MEMORY_DESCRIPTOR, *PLOADER_MEMORY_DESCRIPTOR; /* Loader provided information needed by the kernel to initialize */ typedef struct _KERNEL_INITIALIZATION_BLOCK diff --git a/sdk/xtdk/xtstruct.h b/sdk/xtdk/xtstruct.h index 7d80c83..f961d64 100644 --- a/sdk/xtdk/xtstruct.h +++ b/sdk/xtdk/xtstruct.h @@ -244,7 +244,7 @@ typedef struct _LIST_ENTRY32 LIST_ENTRY32, *PLIST_ENTRY32; typedef struct _LIST_ENTRY64 LIST_ENTRY64, *PLIST_ENTRY64; typedef struct _LOADER_GRAPHICS_INFORMATION_BLOCK LOADER_GRAPHICS_INFORMATION_BLOCK, *PLOADER_GRAPHICS_INFORMATION_BLOCK; typedef struct _LOADER_INFORMATION_BLOCK LOADER_INFORMATION_BLOCK, *PLOADER_INFORMATION_BLOCK; -typedef struct _LOADER_MEMORY_MAPPING LOADER_MEMORY_MAPPING, *PLOADER_MEMORY_MAPPING; +typedef struct _LOADER_MEMORY_DESCRIPTOR LOADER_MEMORY_DESCRIPTOR, *PLOADER_MEMORY_DESCRIPTOR; typedef struct _M128 M128, *PM128; typedef struct _MMCOLOR_TABLES MMCOLOR_TABLES, *PMMCOLOR_TABLES; typedef struct _MMPFNENTRY MMPFNENTRY, *PMMPFNENTRY; diff --git a/xtldr/modules/xtos_o/xtos.c b/xtldr/modules/xtos_o/xtos.c index 18c4071..5d7eb1f 100644 --- a/xtldr/modules/xtos_o/xtos.c +++ b/xtldr/modules/xtos_o/xtos.c @@ -73,7 +73,7 @@ XtGetMemoryDescriptorList(IN PXTBL_PAGE_MAPPING PageMap, EFI_STATUS Status; ULONGLONG Pages; - Pages = (ULONGLONG)EFI_SIZE_TO_PAGES((PageMap->MapSize + 1) * sizeof(LOADER_MEMORY_MAPPING)); + Pages = (ULONGLONG)EFI_SIZE_TO_PAGES((PageMap->MapSize + 1) * sizeof(LOADER_MEMORY_DESCRIPTOR)); Status = XtLdrProtocol->Memory.AllocatePages(Pages, &Address); if(Status != STATUS_EFI_SUCCESS) @@ -95,7 +95,7 @@ XtGetMemoryDescriptorList(IN PXTBL_PAGE_MAPPING PageMap, while(ListEntry != &PageMap->MemoryMap) { PXTBL_MEMORY_MAPPING MemoryMapping = CONTAIN_RECORD(ListEntry, XTBL_MEMORY_MAPPING, ListEntry); - PLOADER_MEMORY_MAPPING MemoryDescriptor = (PLOADER_MEMORY_MAPPING)Address; + PLOADER_MEMORY_DESCRIPTOR MemoryDescriptor = (PLOADER_MEMORY_DESCRIPTOR)Address; MemoryDescriptor->MemoryType = MemoryMapping->MemoryType; MemoryDescriptor->BasePage = (UINT_PTR)MemoryMapping->PhysicalAddress / EFI_PAGE_SIZE; @@ -103,7 +103,7 @@ XtGetMemoryDescriptorList(IN PXTBL_PAGE_MAPPING PageMap, RtlInsertTailList(MemoryDescriptorList, &MemoryDescriptor->ListEntry); - Address = Address + sizeof(LOADER_MEMORY_MAPPING); + Address = Address + sizeof(LOADER_MEMORY_DESCRIPTOR); ListEntry = ListEntry->Flink; } diff --git a/xtoskrnl/includes/globals.h b/xtoskrnl/includes/globals.h index 1a97e6f..ef2ea1f 100644 --- a/xtoskrnl/includes/globals.h +++ b/xtoskrnl/includes/globals.h @@ -49,7 +49,7 @@ EXTERN LIST_ENTRY KepSystemResourcesListHead; EXTERN KSPIN_LOCK KepSystemResourcesLock; /* Biggest free memory descriptor */ -EXTERN PLOADER_MEMORY_MAPPING MmFreeDescriptor; +EXTERN PLOADER_MEMORY_DESCRIPTOR MmFreeDescriptor; /* Highest physical page number */ EXTERN ULONG_PTR MmHighestPhysicalPage; @@ -61,7 +61,7 @@ EXTERN ULONG_PTR MmLowestPhysicalPage; EXTERN ULONG MmNumberOfPhysicalPages; /* Old biggest free memory descriptor */ -EXTERN LOADER_MEMORY_MAPPING MmOldFreeDescriptor; +EXTERN LOADER_MEMORY_DESCRIPTOR MmOldFreeDescriptor; /* Page Map Level */ EXTERN ULONG MmPageMapLevel; @@ -70,7 +70,7 @@ EXTERN ULONG MmPageMapLevel; EXTERN UCHAR MmProcessorStructuresData[MAXIMUM_PROCESSORS][KPROCESSOR_STRUCTURES_SIZE]; /* Allocation descriptors dedicated for HAL */ -EXTERN LOADER_MEMORY_MAPPING MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS]; +EXTERN LOADER_MEMORY_DESCRIPTOR MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS]; /* Live address of kernel HAL heap */ EXTERN PVOID MmpHalHeapStart; diff --git a/xtoskrnl/mm/globals.c b/xtoskrnl/mm/globals.c index 1c1b9ba..78e2515 100644 --- a/xtoskrnl/mm/globals.c +++ b/xtoskrnl/mm/globals.c @@ -10,7 +10,7 @@ /* Biggest free memory descriptor */ -PLOADER_MEMORY_MAPPING MmFreeDescriptor; +PLOADER_MEMORY_DESCRIPTOR MmFreeDescriptor; /* Highest physical page number */ ULONG_PTR MmHighestPhysicalPage; @@ -22,7 +22,7 @@ ULONG_PTR MmLowestPhysicalPage = -1; ULONG MmNumberOfPhysicalPages; /* Old biggest free memory descriptor */ -LOADER_MEMORY_MAPPING MmOldFreeDescriptor; +LOADER_MEMORY_DESCRIPTOR MmOldFreeDescriptor; /* Page Map Level */ ULONG MmPageMapLevel; @@ -31,7 +31,7 @@ ULONG MmPageMapLevel; UCHAR MmProcessorStructuresData[MAXIMUM_PROCESSORS][KPROCESSOR_STRUCTURES_SIZE] = {0}; /* Allocation descriptors dedicated for HAL */ -LOADER_MEMORY_MAPPING MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS]; +LOADER_MEMORY_DESCRIPTOR MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS]; /* Live address of kernel HAL heap */ PVOID MmpHalHeapStart = MM_HAL_HEAP_START_ADDRESS; diff --git a/xtoskrnl/mm/hlpool.c b/xtoskrnl/mm/hlpool.c index c525232..d4c62c1 100644 --- a/xtoskrnl/mm/hlpool.c +++ b/xtoskrnl/mm/hlpool.c @@ -31,7 +31,7 @@ MmAllocateHalMemory(IN PFN_NUMBER PageCount, IN BOOLEAN Aligned, OUT PULONG_PTR Buffer) { - PLOADER_MEMORY_MAPPING Descriptor, ExtraDescriptor, HalDescriptor; + PLOADER_MEMORY_DESCRIPTOR Descriptor, ExtraDescriptor, HalDescriptor; PFN_NUMBER Alignment, MaxPage; ULONGLONG PhysicalAddress; PLIST_ENTRY ListEntry; @@ -53,7 +53,7 @@ MmAllocateHalMemory(IN PFN_NUMBER PageCount, ListEntry = KeInitializationBlock->MemoryDescriptorListHead.Flink; while(ListEntry != &KeInitializationBlock->MemoryDescriptorListHead) { - Descriptor = CONTAIN_RECORD(ListEntry, LOADER_MEMORY_MAPPING, ListEntry); + Descriptor = CONTAIN_RECORD(ListEntry, LOADER_MEMORY_DESCRIPTOR, ListEntry); /* Align memory to 64KB if needed */ Alignment = Aligned ? (((Descriptor->BasePage + 0x0F) & ~0x0F) - Descriptor->BasePage) : 0; diff --git a/xtoskrnl/mm/init.c b/xtoskrnl/mm/init.c index 4116891..8cd87cf 100644 --- a/xtoskrnl/mm/init.c +++ b/xtoskrnl/mm/init.c @@ -64,7 +64,7 @@ XTAPI VOID MmpScanMemoryDescriptors(VOID) { - PLOADER_MEMORY_MAPPING MemoryDescriptor; + PLOADER_MEMORY_DESCRIPTOR MemoryDescriptor; PLIST_ENTRY MemoryMappings; PFN_NUMBER FreePages; @@ -76,7 +76,7 @@ MmpScanMemoryDescriptors(VOID) while(MemoryMappings != &KeInitializationBlock->MemoryDescriptorListHead) { /* Get memory descriptor */ - MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_MAPPING, ListEntry); + MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_DESCRIPTOR, ListEntry); /* Check if memory type is invisible or cached */ if(MmpVerifyMemoryTypeInvisible(MemoryDescriptor->MemoryType) || @@ -125,7 +125,7 @@ MmpScanMemoryDescriptors(VOID) } /* Store original free descriptor */ - RtlCopyMemory(&MmOldFreeDescriptor, MmFreeDescriptor, sizeof(LOADER_MEMORY_MAPPING)); + RtlCopyMemory(&MmOldFreeDescriptor, MmFreeDescriptor, sizeof(LOADER_MEMORY_DESCRIPTOR)); } /** Checks whether the specified memory type should be considered as free.