[BOOT] Get rid of useless comments

This commit is contained in:
2024-08-27 08:13:49 -04:00
parent d759302400
commit 831a676af8
9 changed files with 90 additions and 161 deletions

View File

@@ -16,9 +16,6 @@ Abstract:
#include <ntrtl.h>
#include "bootlib.h"
//
// Total size of required structures.
//
#define MIN_INPUT_PARAMETERS_SIZE ( \
sizeof(BOOT_INPUT_PARAMETERS) + \
sizeof(BOOT_MEMORY_INFO) + \
@@ -40,13 +37,13 @@ InitializeLibrary (
Routine Description:
Internal routine to initialize the boot library.
Initializes the boot library.
Arguments:
InputParameters - pointer to the input parameters structure.
InputParameters - Pointer to the application's input parameters.
LibraryParameters - pointer to the library parameters structure.
LibraryParameters - Pointer to the library parameters.
Return Value:
@@ -64,18 +61,12 @@ Return Value:
(VOID)LibraryParameters;
//
// Verify input parameters structure.
//
if (InputParameters == NULL ||
InputParameters->Signature != BOOT_INPUT_PARAMETERS_SIGNATURE ||
InputParameters->Size < MIN_INPUT_PARAMETERS_SIZE) {
return STATUS_INVALID_PARAMETER;
}
//
// Calculate structure addresses from offsets.
//
MemoryInfo = (PBOOT_MEMORY_INFO)((PUCHAR)InputParameters + InputParameters->MemoryInfoOffset);
ApplicationEntry = (PBOOT_INPUT_APPLICATION_ENTRY)((PUCHAR)InputParameters + InputParameters->ApplicationEntryOffset);
BlpBootDevice = (PBOOT_DEVICE)((PUCHAR)InputParameters + InputParameters->BootDeviceOffset);
@@ -91,31 +82,22 @@ Return Value:
return Status;
}
//
// Print image information.
//
ConsolePrintf(L"Image base: %x %x\r\n", (ULONG)((ULONG_PTR)InputParameters->ImageBase >> 32), (ULONG)((ULONG_PTR)InputParameters->ImageBase));
ConsolePrintf(L"Image size: %x\r\n", InputParameters->ImageSize);
//
// Check application entry signature.
//
if (ApplicationEntry->Signature != BOOT_INPUT_APPLICATION_ENTRY_SIGNATURE) {
DebugPrint(L"InitializeLibrary(): ApplicationEntry Signature is invalid\r\n");
return STATUS_INVALID_PARAMETER_9;
}
//
// Save input parameters and application entry data.
// Save input parameters and application entry.
//
BlpApplicationParameters = InputParameters;
BlpApplicationEntry.Attributes = ApplicationEntry->Attributes;
RtlCopyMemory(&BlpApplicationEntry.BcdIdentifier, &ApplicationEntry->BcdIdentifier, sizeof(GUID));
BlpApplicationEntry.Options = &ApplicationEntry->Options;
//
// Initialize memory manager.
//
Status = BlpMmInitialize(MemoryInfo, InputParameters->TranslationType, LibraryParameters);
if (!NT_SUCCESS(Status)) {
return Status;
@@ -191,13 +173,13 @@ BlInitializeLibrary (
Routine Description:
Initializes the boot library.
Initializes the boot library. Wrapper for InitializeLibrary().
Arguments:
InputParameters - pointer to the input parameters structure.
InputParameters - Pointer to the application's input parameters.
LibraryParameters - pointer to the library parameters structure.
LibraryParameters - Pointer to the library parameters.
Return Value:
@@ -226,8 +208,7 @@ Arguments:
Return Value:
STATUS_SUCCESS if successful.
Error status if an error is encountered.
STATUS_SUCCESS.
--*/