change format printing

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-10-10 18:15:54 +03:00
parent 914349ec14
commit 743b036202
6 changed files with 23 additions and 21 deletions

View File

@ -213,13 +213,13 @@ vbios_map * open_vbios(chipset_type forced_chipset)
map->bios = BT_ATI_1; map->bios = BT_ATI_1;
map->ati_tables.MasterDataTables = (UINT16 *) &((ATOM_MASTER_DATA_TABLE *) (map->bios_ptr + map->ati_tables.AtomRomHeader->usMasterDataTableOffset))->ListOfDataTables; map->ati_tables.MasterDataTables = (UINT16 *) &((ATOM_MASTER_DATA_TABLE *) (map->bios_ptr + map->ati_tables.AtomRomHeader->usMasterDataTableOffset))->ListOfDataTables;
DBG(", MasterDataTables: 0x%p", map->ati_tables.MasterDataTables); DBG(", MasterDataTables: 0x%llx", (UINTN)map->ati_tables.MasterDataTables);
std_vesa_offset = (UINT16) ((ATOM_MASTER_LIST_OF_DATA_TABLES *)map->ati_tables.MasterDataTables)->StandardVESA_Timing; std_vesa_offset = (UINT16) ((ATOM_MASTER_LIST_OF_DATA_TABLES *)map->ati_tables.MasterDataTables)->StandardVESA_Timing;
std_vesa = (ATOM_STANDARD_VESA_TIMING *) (map->bios_ptr + std_vesa_offset); std_vesa = (ATOM_STANDARD_VESA_TIMING *) (map->bios_ptr + std_vesa_offset);
DBG(", std_vesa: 0x%p", std_vesa); DBG(", std_vesa: 0x%llx", (UINTN)std_vesa);
map->ati_mode_table = (CHAR8 *) &std_vesa->aModeTimings; map->ati_mode_table = (CHAR8 *) &std_vesa->aModeTimings;
DBG(", ati_mode_table: 0x%p", map->ati_mode_table); DBG(", ati_mode_table: 0x%llx", (UINTN)map->ati_mode_table);
if (map->ati_mode_table == 0) if (map->ati_mode_table == 0)
{ {
DBG("\n Unable to locate the mode table.\n"); DBG("\n Unable to locate the mode table.\n");

View File

@ -1018,7 +1018,7 @@ EFI_STATUS DumpTable(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR8 *Check
OemTableId[8] = 0; OemTableId[8] = 0;
stripTrailingSpaces(OemTableId); stripTrailingSpaces(OemTableId);
DBG(" %p: '%s', '%s', Rev: %d, Len: %d", TableEntry, Signature, OemTableId, TableEntry->Revision, TableEntry->Length); DBG(" %llx: '%s', '%s', Rev: %d, Len: %d", (UINTN)TableEntry, Signature, OemTableId, TableEntry->Revision, TableEntry->Length);
// //
// Additional checks // Additional checks
@ -1150,7 +1150,7 @@ EFI_STATUS DumpFadtTables(EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt, CONST
// Take Signature for printing // Take Signature for printing
CopyMem(&Signature[0], &Facs->Signature, 4); CopyMem(&Signature[0], &Facs->Signature, 4);
Signature[4] = 0; Signature[4] = 0;
DBG(" %p: '%s', Ver: %d, Len: %d", Facs, Signature, Facs->Version, Facs->Length); DBG(" %llx: '%s', Ver: %d, Len: %d", (UINTN)Facs, Signature, Facs->Version, Facs->Length);
// FACS checks // FACS checks
if (Facs->Signature != EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) { if (Facs->Signature != EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) {
@ -1208,7 +1208,7 @@ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE* GetFadt()
RsdPtr = NULL; RsdPtr = NULL;
/*Status = */EfiGetSystemConfigurationTable (&gEfiAcpi20TableGuid, (void**)&RsdPtr); /*Status = */EfiGetSystemConfigurationTable (&gEfiAcpi20TableGuid, (void**)&RsdPtr);
if (RsdPtr != NULL) { if (RsdPtr != NULL) {
DBG("Found UEFI Acpi 2.0 RSDP at %p\n", RsdPtr); DBG("Found UEFI Acpi 2.0 RSDP at %llx\n", (UINTN)RsdPtr);
Rsdt = (RSDT_TABLE*)(UINTN)(RsdPtr->RsdtAddress); Rsdt = (RSDT_TABLE*)(UINTN)(RsdPtr->RsdtAddress);
if (RsdPtr->Revision > 0) { if (RsdPtr->Revision > 0) {
if (Rsdt == NULL || Rsdt->Header.Signature != EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) { if (Rsdt == NULL || Rsdt->Header.Signature != EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) {
@ -1251,13 +1251,13 @@ void DumpTables(void *RsdPtrVoid, CONST CHAR16 *DirName)
// //
EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER* RsdPtr = (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER*)RsdPtrVoid; EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER* RsdPtr = (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER*)RsdPtrVoid;
if (DirName != NULL) { if (DirName != NULL) {
DBG("Saving ACPI tables from RSDP %p to %ls ...\n", RsdPtr, DirName); DBG("Saving ACPI tables from RSDP %llx to %ls ...\n", (UINTN)RsdPtr, DirName);
} else { } else {
DBG("Printing ACPI tables from RSDP %p ...\n", RsdPtr); DBG("Printing ACPI tables from RSDP %llx ...\n", (UINTN)RsdPtr);
} }
if (RsdPtr->Signature != EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE) { if (RsdPtr->Signature != EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE) {
DBG(" RsdPrt at %p has invaid signature 0x%llx - exiting.\n", RsdPtr, RsdPtr->Signature); DBG(" RsdPrt at %llx has invaid signature 0x%llx - exiting.\n", (UINTN)RsdPtr, RsdPtr->Signature);
return; return;
} }
@ -1270,7 +1270,7 @@ void DumpTables(void *RsdPtrVoid, CONST CHAR16 *DirName)
Rsdt = NULL; Rsdt = NULL;
Xsdt = NULL; Xsdt = NULL;
DBG(" %p: '%s', Rev: %d", RsdPtr, Signature, RsdPtr->Revision); DBG(" %llx: '%s', Rev: %d", (UINTN)RsdPtr, Signature, RsdPtr->Revision);
if (RsdPtr->Revision == 0) { if (RsdPtr->Revision == 0) {
// Acpi 1.0 // Acpi 1.0
Length = sizeof(EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER); Length = sizeof(EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER);

View File

@ -183,7 +183,7 @@ CreateBootOptionDevicePath (
// //
Status = gBS->HandleProtocol (FileDeviceHandle, &gEfiSimpleFileSystemProtocolGuid, (void**)&Volume); Status = gBS->HandleProtocol (FileDeviceHandle, &gEfiSimpleFileSystemProtocolGuid, (void**)&Volume);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DBG("CreateBootOptionDevicePath: FileDeviceHandle %p is not fs volume", FileDeviceHandle); DBG("CreateBootOptionDevicePath: FileDeviceHandle %llx is not fs volume", (UINTN)FileDeviceHandle);
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -756,7 +756,7 @@ FindBootOptionForFile (
UINTN SearchedDevicePathSize[2]; UINTN SearchedDevicePathSize[2];
DBG("FindBootOptionForFile: %p, %ls\n", FileDeviceHandle, FileName.wc_str()); DBG("FindBootOptionForFile: %llx, %ls\n", (UINTN)FileDeviceHandle, FileName.wc_str());
// //
// Get BootOrder - we will search only options listed in BootOrder. // Get BootOrder - we will search only options listed in BootOrder.
@ -1011,8 +1011,8 @@ AddBootOptionForFile (
BO_BOOT_OPTION BootOption; BO_BOOT_OPTION BootOption;
DBG("\nAddBootOptionForFile: %p, %ls, %ls\n %ls, %llu\n", DBG("\nAddBootOptionForFile: %llx, %ls, %ls\n %ls, %llu\n",
FileDeviceHandle, FileName.wc_str(), (UINTN)FileDeviceHandle, FileName.wc_str(),
UseShortForm ? L"ShortDevPath" : L"FullDevPath", UseShortForm ? L"ShortDevPath" : L"FullDevPath",
Description, BootIndex); Description, BootIndex);
@ -1111,7 +1111,7 @@ DeleteBootOptionForFile (
IN UINT16 BootNum; IN UINT16 BootNum;
DBG("\nDeleteBootOptionForFile: %p, %ls\n", FileDeviceHandle, FileName.wc_str()); DBG("\nDeleteBootOptionForFile: %llx, %ls\n", (UINTN)FileDeviceHandle, FileName.wc_str());
do { do {
Status = FindBootOptionForFile (FileDeviceHandle, FileName, &BootNum, NULL); Status = FindBootOptionForFile (FileDeviceHandle, FileName, &BootNum, NULL);
if (!EFI_ERROR(Status)) { if (!EFI_ERROR(Status)) {

View File

@ -68,7 +68,7 @@ InitializeBiosIntCaller (
mThunkContext->RealModeBuffer = (void*)(UINTN)LegacyRegionBase; mThunkContext->RealModeBuffer = (void*)(UINTN)LegacyRegionBase;
mThunkContext->RealModeBufferSize = LegacyRegionSize; mThunkContext->RealModeBufferSize = LegacyRegionSize;
mThunkContext->ThunkAttributes = THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15; mThunkContext->ThunkAttributes = THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15;
DBG("mThunkContext->RealModeBuffer: %p, mThunkContext->RealModeBufferSize: %d\n", mThunkContext->RealModeBuffer, mThunkContext->RealModeBufferSize); DBG("mThunkContext->RealModeBuffer: %llx, mThunkContext->RealModeBufferSize: %d\n", (UINTN)(mThunkContext->RealModeBuffer), mThunkContext->RealModeBufferSize);
AsmPrepareThunk16(mThunkContext); AsmPrepareThunk16(mThunkContext);
return Status; return Status;
} }

View File

@ -803,7 +803,7 @@ EFI_STATUS bootPBR(REFIT_VOLUME* volume, BOOLEAN SataReset)
//Status = LegacyBios->GetBbsInfo(LegacyBios, &HddCount, &HddInfo, &BbsCount, &BbsTable); //Status = LegacyBios->GetBbsInfo(LegacyBios, &HddCount, &HddInfo, &BbsCount, &BbsTable);
//DBG("GetBbsInfo = %s, HddCnt=%d, HddInfo=%p, BbsCount=%d, BbsTabl%p\n", efiStrError(Status), HddCount, HddInfo, BbsCount, BbsTable); //DBG("GetBbsInfo = %s, HddCnt=%d, HddInfo=%p, BbsCount=%d, BbsTabl%p\n", efiStrError(Status), HddCount, HddInfo, BbsCount, BbsTable);
Status = LegacyBios->PrepareToBootEfi(LegacyBios, &BbsCount, &BbsTable); Status = LegacyBios->PrepareToBootEfi(LegacyBios, &BbsCount, &BbsTable);
DBG("PrepareToBootEfi = %s, BbsCount=%d, BbsTabl%p\n", efiStrError(Status), BbsCount, BbsTable); DBG("PrepareToBootEfi = %s, BbsCount=%d, BbsTabl%llx\n", efiStrError(Status), BbsCount, (UINTN)BbsTable);
//PauseForKey(L"continue ...\n"); //PauseForKey(L"continue ...\n");
// //

View File

@ -385,7 +385,7 @@ void DumpKernelAndKextPatches(KERNEL_AND_KEXT_PATCHES *Patches)
DBG("Kernel and Kext Patches null pointer\n"); DBG("Kernel and Kext Patches null pointer\n");
return; return;
} }
DBG("Kernel and Kext Patches at %p:\n", Patches); DBG("Kernel and Kext Patches at %llx:\n", (UINTN)Patches);
DBG("\tAllowed: %c\n", gSettings.KextPatchesAllowed ? 'y' : 'n'); DBG("\tAllowed: %c\n", gSettings.KextPatchesAllowed ? 'y' : 'n');
DBG("\tDebug: %c\n", Patches->KPDebug ? 'y' : 'n'); DBG("\tDebug: %c\n", Patches->KPDebug ? 'y' : 'n');
// DBG("\tKernelCpu: %c\n", Patches->KPKernelCpu ? 'y' : 'n'); // DBG("\tKernelCpu: %c\n", Patches->KPKernelCpu ? 'y' : 'n');
@ -1067,11 +1067,13 @@ DBG("Beginning OC\n");
XObjArray<KEXT_PATCH> selectedPathArray; XObjArray<KEXT_PATCH> selectedPathArray;
for (size_t kextPatchIdx = 0 ; kextPatchIdx < KernelAndKextPatches.KextPatches.size() ; kextPatchIdx++ ) for (size_t kextPatchIdx = 0 ; kextPatchIdx < KernelAndKextPatches.KextPatches.size() ; kextPatchIdx++ )
{ {
if ( KernelAndKextPatches.KextPatches[kextPatchIdx].MenuItem.BValue ) selectedPathArray.AddReference(&KernelAndKextPatches.KextPatches[kextPatchIdx], false); // if ( KernelAndKextPatches.KextPatches[kextPatchIdx].MenuItem.BValue )
selectedPathArray.AddReference(&KernelAndKextPatches.KextPatches[kextPatchIdx], false);
} }
for (size_t kernelPatchIdx = 0 ; kernelPatchIdx < KernelAndKextPatches.KernelPatches.size() ; kernelPatchIdx++ ) for (size_t kernelPatchIdx = 0 ; kernelPatchIdx < KernelAndKextPatches.KernelPatches.size() ; kernelPatchIdx++ )
{ {
if ( KernelAndKextPatches.KernelPatches[kernelPatchIdx].MenuItem.BValue ) selectedPathArray.AddReference(&KernelAndKextPatches.KernelPatches[kernelPatchIdx], false); // if ( KernelAndKextPatches.KernelPatches[kernelPatchIdx].MenuItem.BValue )
selectedPathArray.AddReference(&KernelAndKextPatches.KernelPatches[kernelPatchIdx], false);
} }
mOpenCoreConfiguration.Kernel.Patch.Count = (UINT32)selectedPathArray.size(); mOpenCoreConfiguration.Kernel.Patch.Count = (UINT32)selectedPathArray.size();
mOpenCoreConfiguration.Kernel.Patch.AllocCount = mOpenCoreConfiguration.Kernel.Patch.Count; mOpenCoreConfiguration.Kernel.Patch.AllocCount = mOpenCoreConfiguration.Kernel.Patch.Count;
@ -1849,7 +1851,7 @@ void DisconnectInvalidDiskIoChildDrivers(void)
Found = TRUE; Found = TRUE;
Status = gBS->DisconnectController (Handles[Index], OpenInfo[OpenInfoIndex].AgentHandle, NULL); Status = gBS->DisconnectController (Handles[Index], OpenInfo[OpenInfoIndex].AgentHandle, NULL);
//DBG(" BY_DRIVER Agent: %p, Disconnect: %s", OpenInfo[OpenInfoIndex].AgentHandle, efiStrError(Status)); //DBG(" BY_DRIVER Agent: %p, Disconnect: %s", OpenInfo[OpenInfoIndex].AgentHandle, efiStrError(Status));
DBG(" - Handle %p with DiskIo, is Partition, no Fs, BY_DRIVER Agent: %p, Disconnect: %s\n", Handles[Index], OpenInfo[OpenInfoIndex].AgentHandle, efiStrError(Status)); DBG(" - Handle %llx with DiskIo, is Partition, no Fs, BY_DRIVER Agent: %llx, Disconnect: %s\n", (UINTN)Handles[Index], (UINTN)(OpenInfo[OpenInfoIndex].AgentHandle), efiStrError(Status));
} }
} }
FreePool(OpenInfo); FreePool(OpenInfo);