[BOOT] Huge refactor

This commit is contained in:
2024-10-05 15:39:04 -04:00
parent 6a678794d3
commit 7c3dafc051
18 changed files with 982 additions and 399 deletions

View File

@@ -9,16 +9,15 @@ Module Name:
Abstract:
Main functions of the boot manager.
Boot manager main routine.
--*/
#include "bootmgr.h"
#include "bootlib.h"
NTSTATUS
BmMain (
IN PBOOT_INPUT_PARAMETERS InputParameters
IN PBOOT_APPLICATION_PARAMETERS ApplicationParameters
)
/*++
@@ -29,7 +28,7 @@ Routine Description:
Arguments:
InputParameters - Input parameters for the boot manager.
ApplicationParameters - Input parameters for the boot manager.
Return Value:
@@ -41,15 +40,16 @@ Return Value:
{
NTSTATUS Status;
BOOT_LIBRARY_PARAMETERS LibraryParameters;
HANDLE DataStore;
HANDLE DataStoreHandle;
LibraryParameters.Flags = 0;
LibraryParameters.TranslationType = TRANSLATION_TYPE_NONE;
LibraryParameters.MinimumPageAllocation = 16;
//
// Initialize the boot library.
//
Status = BlInitializeLibrary(InputParameters, &LibraryParameters);
Status = BlInitializeLibrary(ApplicationParameters, &LibraryParameters);
if (!NT_SUCCESS(Status)) {
ConsolePrintf(L"BlInitializeLibrary() failed: 0x%x\r\n", Status);
goto Exit;
@@ -58,9 +58,7 @@ Return Value:
//
// Open the boot data store.
//
(VOID)BmOpenDataStore(&DataStore);
while (TRUE);
(VOID)BmOpenDataStore(&DataStoreHandle);
Exit:
BlDestroyLibrary();