Compare commits

...

2 Commits

Author SHA1 Message Date
437b19a0f5 [BOOT] Better debug logging 2024-08-27 13:21:45 -04:00
860874640e [SDK:NT] Add bit extraction helpers
Added LO/HIDWORD(), LO/HIWORD(), and LO/HIBYTE() macros
2024-08-27 13:20:09 -04:00
3 changed files with 14 additions and 3 deletions

View File

@ -95,7 +95,7 @@ Return Value:
PapMinimumAllocationCount = MinimumAllocation; PapMinimumAllocationCount = MinimumAllocation;
PapMinimumPhysicalPage = 1; PapMinimumPhysicalPage = 1;
PapMaximumPhysicalPage = MAXULONGLONG >> PAGE_SHIFT; PapMaximumPhysicalPage = MAXULONGLONG >> PAGE_SHIFT;
DebugPrintf(L"Maximum physical page: %x %x\r\n", (ULONG)(PapMaximumPhysicalPage >> 32), (ULONG)(PapMaximumPhysicalPage)); DebugPrintf(L"Maximum physical page: %x %x\r\n", HIDWORD(PapMaximumPhysicalPage), LODWORD(PapMaximumPhysicalPage));
// //
// Initialize MDLs. // Initialize MDLs.

View File

@ -82,8 +82,10 @@ Return Value:
return Status; return Status;
} }
ConsolePrintf(L"Image base: %x %x\r\n", (ULONG)((ULONG_PTR)InputParameters->ImageBase >> 32), (ULONG)((ULONG_PTR)InputParameters->ImageBase)); ConsolePrint(L"-------- Alcyone EFI Boot Manager --------\r\n");
ConsolePrintf(L"Image size: %x\r\n", InputParameters->ImageSize); ConsolePrintf(L"Image base: %x %x\r\nImage size: %x\r\n", HIDWORD((ULONG_PTR)InputParameters->ImageBase), LODWORD((ULONG_PTR)InputParameters->ImageBase), InputParameters->ImageSize);
DebugPrint(L"Initializing boot library...\r\n");
if (ApplicationEntry->Signature != BOOT_INPUT_APPLICATION_ENTRY_SIGNATURE) { if (ApplicationEntry->Signature != BOOT_INPUT_APPLICATION_ENTRY_SIGNATURE) {
DebugPrint(L"InitializeLibrary(): ApplicationEntry Signature is invalid\r\n"); DebugPrint(L"InitializeLibrary(): ApplicationEntry Signature is invalid\r\n");

View File

@ -117,6 +117,15 @@ typedef ULONGLONG *PULONGLONG;
#define MAXLONGLONG 0x7fffffffffffffff #define MAXLONGLONG 0x7fffffffffffffff
#define MAXULONGLONG 0xffffffffffffffff #define MAXULONGLONG 0xffffffffffffffff
#define LODWORD(x) ((ULONG)(x))
#define HIDWORD(x) ((ULONG)((x) >> 32))
#define LOWORD(x) ((USHORT)(x))
#define HIWORD(x) ((USHORT)((x) >> 16))
#define LOBYTE(x) ((UCHAR)(x))
#define HIBYTE(x) ((UCHAR)((x) >> 8))
// //
// Logical/boolean value types. // Logical/boolean value types.
// //