Allow to provide page size during initialization
This commit is contained in:
@@ -157,8 +157,9 @@ BlInitializeConsole();
|
||||
XTCDECL
|
||||
VOID
|
||||
BlInitializePageMap(OUT PXTBL_PAGE_MAPPING PageMap,
|
||||
IN PVOID *MemoryMapAddress,
|
||||
IN SHORT PageMapLevel,
|
||||
IN PVOID *MemoryMapAddress);
|
||||
IN PAGE_SIZE PageSize);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
|
@@ -173,15 +173,17 @@ BlGetMemoryMap(OUT PEFI_MEMORY_MAP MemoryMap)
|
||||
XTCDECL
|
||||
VOID
|
||||
BlInitializePageMap(OUT PXTBL_PAGE_MAPPING PageMap,
|
||||
IN PVOID *MemoryMapAddress,
|
||||
IN SHORT PageMapLevel,
|
||||
IN PVOID *MemoryMapAddress)
|
||||
IN PAGE_SIZE PageSize)
|
||||
{
|
||||
/* Initialize memory mappings */
|
||||
RtlInitializeListHead(&PageMap->MemoryMap);
|
||||
|
||||
/* Set page map level and memory map address */
|
||||
PageMap->PageMapLevel = PageMapLevel;
|
||||
/* Set page map size/level and memory map address */
|
||||
PageMap->MemoryMapAddress = &MemoryMapAddress;
|
||||
PageMap->PageMapLevel = PageMapLevel;
|
||||
PageMap->PageSize = PageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -186,21 +186,18 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
/* Initialize XTOS startup sequence */
|
||||
XtLdrProtocol->Debug.Print(L"Initializing XTOS startup sequence\n");
|
||||
|
||||
XtLdrProtocol->Debug.Print(L"DUPA1\n");
|
||||
/* Set base virtual memory area for the kernel mappings */
|
||||
VirtualMemoryArea = (PVOID)KSEG0_BASE;
|
||||
VirtualAddress = (PVOID)(KSEG0_BASE + KSEG0_KERNEL_BASE);
|
||||
|
||||
/* Initialize virtual memory mappings */
|
||||
XtLdrProtocol->Memory.InitializePageMap(&PageMap, 3, VirtualMemoryArea);
|
||||
XtLdrProtocol->Debug.Print(L"DUPA2\n");
|
||||
XtLdrProtocol->Memory.InitializePageMap(&PageMap, VirtualMemoryArea, 3, Size4K);
|
||||
|
||||
Status = XtLdrProtocol->Memory.MapEfiMemory(&PageMap, NULL);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
XtLdrProtocol->Debug.Print(L"DUPA3\n");
|
||||
|
||||
/* Load the kernel */
|
||||
Status = XtpLoadModule(BootDir, Parameters->KernelFile, VirtualAddress, LoaderSystemCode, &ImageContext);
|
||||
|
Reference in New Issue
Block a user