Store page map level
All checks were successful
Builds / ExectOS (i686) (push) Successful in 32s
Builds / ExectOS (amd64) (push) Successful in 33s

This commit is contained in:
Rafal Kupiec 2024-04-07 17:49:24 +02:00
parent 388ac1a8c2
commit 7193e698f1
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
5 changed files with 13 additions and 1 deletions

View File

@ -108,6 +108,7 @@ typedef struct _LOADER_GRAPHICS_INFORMATION_BLOCK
typedef struct _LOADER_INFORMATION_BLOCK
{
PVOID DbgPrint;
ULONG PageMapLevel;
LOADER_GRAPHICS_INFORMATION_BLOCK FrameBuffer;
} LOADER_INFORMATION_BLOCK, *PLOADER_INFORMATION_BLOCK;

View File

@ -468,6 +468,9 @@ XtpInitializeLoaderBlock(IN PXTBL_PAGE_MAPPING PageMap,
LoaderBlock->LoaderInformation.FrameBuffer.Initialized = FALSE;
}
/* Store page map level */
LoaderBlock->LoaderInformation.PageMapLevel = 3;
/* Close FrameBuffer protocol */
XtLdrProtocol->Protocol.Close(ProtocolHandle, &FrameBufGuid);

View File

@ -57,4 +57,7 @@ EXTERN ULONG MmNumberOfPhysicalPages;
/* Old biggest free memory descriptor */
EXTERN LOADER_MEMORY_MAPPING MmOldFreeDescriptor;
/* Page Map Level */
EXTERN ULONG MmPageMapLevel;
#endif /* __XTOSKRNL_GLOBALS_H */

View File

@ -23,3 +23,6 @@ ULONG MmNumberOfPhysicalPages;
/* Old biggest free memory descriptor */
LOADER_MEMORY_MAPPING MmOldFreeDescriptor;
/* Page Map Level */
ULONG MmPageMapLevel;

View File

@ -31,6 +31,9 @@ MmInitializeMemoryManager(VOID)
KePanic(0);
}
/* Store Page Map Level */
MmPageMapLevel = KeInitializationBlock->LoaderInformation.PageMapLevel;
/* Proceed with architecture specific initialization */
MmpInitializeArchitecture();
}
@ -108,7 +111,6 @@ MmpScanMemoryDescriptors(VOID)
/* Store original free descriptor */
RtlCopyMemory(&MmOldFreeDescriptor, MmFreeDescriptor, sizeof(LOADER_MEMORY_MAPPING));
}
/** Checks whether the specified memory type should be considered as free.