Use uppercase when printing status codes
This commit is contained in:
parent
6d66629124
commit
98acc6f3d4
@ -102,7 +102,7 @@ BlBuildPageMap(IN PXTBL_PAGE_MAPPING PageMap)
|
||||
if(Mapping->VirtualAddress)
|
||||
{
|
||||
/* Dump memory mapping */
|
||||
BlDebugPrint(L" Type=%02lu, PhysicalBase=0x%016lx, VirtualBase=0x%016lx, Pages=%lu\n", Mapping->MemoryType,
|
||||
BlDebugPrint(L" Type=%02lu, PhysicalBase=0x%016lX, VirtualBase=0x%016lX, Pages=%lu\n", Mapping->MemoryType,
|
||||
Mapping->PhysicalAddress, Mapping->VirtualAddress, Mapping->NumberOfPages);
|
||||
|
||||
/* Map memory */
|
||||
|
@ -125,7 +125,7 @@ BlBuildPageMap(IN PXTBL_PAGE_MAPPING PageMap)
|
||||
if(Mapping->VirtualAddress)
|
||||
{
|
||||
/* Dump memory mapping */
|
||||
BlDebugPrint(L" Type=%02lu, PhysicalBase=0x%016lx, VirtualBase=0x%016lx, Pages=%lu\n", Mapping->MemoryType,
|
||||
BlDebugPrint(L" Type=%02lu, PhysicalBase=0x%016lX, VirtualBase=0x%016lX, Pages=%lu\n", Mapping->MemoryType,
|
||||
Mapping->PhysicalAddress, Mapping->VirtualAddress, Mapping->NumberOfPages);
|
||||
|
||||
/* Map memory */
|
||||
|
@ -48,7 +48,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open a volume, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open boot volume (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open boot volume (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open directory */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open system boot directory (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open system boot directory (Status Code: 0x%lX)\n", Status);
|
||||
|
||||
/* Close volume and return error code */
|
||||
XtLdrProtocol->Disk.CloseVolume(DiskHandle);
|
||||
@ -91,7 +91,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to chainload EFI binary, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to chainload '%S' (Status Code: 0x%lx)\n",
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to chainload '%S' (Status Code: 0x%lX)\n",
|
||||
Parameters->KernelFile, Status);
|
||||
return Status;
|
||||
}
|
||||
@ -101,7 +101,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open EFI_LOADED_IMAGE_PROTOCOL, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to access binary interface (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to access binary interface (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ FbInitializeDisplay()
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to get current UGA mode */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get current UGA mode (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get current UGA mode (Status Code: 0x%lX)\n", Status);
|
||||
|
||||
/* Close UGA protocol and return error */
|
||||
XtLdrProtocol->Protocol.Close(Handle, &UgaGuid);
|
||||
@ -166,7 +166,7 @@ FbInitializeDisplay()
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to find framebuffer address */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get EFI FB address (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get EFI FB address (Status Code: 0x%lX)\n", Status);
|
||||
|
||||
/* Close UGA protocol and return error */
|
||||
XtLdrProtocol->Protocol.Close(Handle, &UgaGuid);
|
||||
@ -240,7 +240,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to get handles, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get handles (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get handles (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open protocol, continue with next handle */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to open protocol (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to open protocol (Status Code: 0x%lX)\n", Status);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to read PCI device class */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read class (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read class (Status Code: 0x%lX)\n", Status);
|
||||
|
||||
/* Close protocol and continue with next handle */
|
||||
XtLdrProtocol->Protocol.Close(Handles[Index], &PciIoGuid);
|
||||
|
@ -246,7 +246,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to get file information */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get PE/COFF file information (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get PE/COFF file information (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Pages allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
}
|
||||
@ -309,7 +309,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to read data */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read PE/COFF image file (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read PE/COFF image file (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePages(Pages, (EFI_PHYSICAL_ADDRESS)(UINT_PTR)Data);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
@ -324,7 +324,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Header validation failed, probably broken or invalid PE/COFF image */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Invalid PE/COFF image headers (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Invalid PE/COFF image headers (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePages(Pages, (EFI_PHYSICAL_ADDRESS)(UINT_PTR)Data);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
@ -349,7 +349,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Pages reallocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages reallocation failure (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages reallocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
}
|
||||
@ -415,7 +415,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to relocate image */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: PE/COFF image relocation failed (Status Code: 0x%lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: PE/COFF image relocation failed (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ XtEnablePaging(IN PXTBL_PAGE_MAPPING PageMap)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to exit boot services */
|
||||
XtLdrProtocol->Console.Print(L"Failed to exit boot services (Status code: %lx)\n", Status);
|
||||
XtLdrProtocol->Console.Print(L"Failed to exit boot services (Status code: %lX)\n", Status);
|
||||
return STATUS_EFI_ABORTED;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ XtEnablePaging(IN PXTBL_PAGE_MAPPING PageMap)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to exit boot services */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to exit boot services (Status code: %lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to exit boot services (Status code: %lX)\n", Status);
|
||||
return STATUS_EFI_ABORTED;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to setup kernel initialization block */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to initialize APIC (Status Code: %lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to initialize APIC (Status Code: %lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to setup kernel initialization block */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to setup kernel initialization block (Status Code: %lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to setup kernel initialization block (Status Code: %lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to enable paging */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to enable paging (Status Code: %lx)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to enable paging (Status Code: %lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -581,7 +581,7 @@ XtpLoadModule(IN PEFI_FILE_HANDLE SystemDir,
|
||||
}
|
||||
|
||||
/* Print debug message */
|
||||
XtLdrProtocol->Debug.Print(L"Loaded %S at PA: 0x%lx, VA: 0x%lx\n", FileName,
|
||||
XtLdrProtocol->Debug.Print(L"Loaded %S at PA: 0x%lX, VA: 0x%lX\n", FileName,
|
||||
(*ImageContext)->PhysicalAddress, (*ImageContext)->VirtualAddress);
|
||||
|
||||
/* Return success */
|
||||
|
Loading…
Reference in New Issue
Block a user