mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Fix %X and %u format for char and short.
This commit is contained in:
parent
647955dd8c
commit
4faa0aa8a2
@ -100,6 +100,24 @@
|
||||
9A4185BB2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185B52439F29D00BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
9A4185BC2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185B52439F29D00BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
9A4185BD2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185B52439F29D00BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
9A4F68532449D4AB004B2F7E /* strcmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4A24483AE30006DE06 /* strcmp.cpp */; };
|
||||
9A4F68542449D4AB004B2F7E /* strcmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4A24483AE30006DE06 /* strcmp.cpp */; };
|
||||
9A4F68552449D4AB004B2F7E /* strcmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4A24483AE30006DE06 /* strcmp.cpp */; };
|
||||
9A4F68562449D4AE004B2F7E /* stdio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4C24483AE30006DE06 /* stdio.cpp */; };
|
||||
9A4F68572449D4AE004B2F7E /* stdio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4C24483AE30006DE06 /* stdio.cpp */; };
|
||||
9A4F68582449D4AE004B2F7E /* stdio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4C24483AE30006DE06 /* stdio.cpp */; };
|
||||
9A4F68592449D4B4004B2F7E /* abort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4D24483AE30006DE06 /* abort.cpp */; };
|
||||
9A4F685A2449D4B4004B2F7E /* wchar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4E24483AE30006DE06 /* wchar.cpp */; };
|
||||
9A4F685B2449D4B4004B2F7E /* strlen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B5124483AE30006DE06 /* strlen.cpp */; };
|
||||
9A4F685C2449D4B4004B2F7E /* abort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4D24483AE30006DE06 /* abort.cpp */; };
|
||||
9A4F685D2449D4B4004B2F7E /* wchar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4E24483AE30006DE06 /* wchar.cpp */; };
|
||||
9A4F685E2449D4B4004B2F7E /* strlen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B5124483AE30006DE06 /* strlen.cpp */; };
|
||||
9A4F685F2449D4B5004B2F7E /* abort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4D24483AE30006DE06 /* abort.cpp */; };
|
||||
9A4F68602449D4B5004B2F7E /* wchar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4E24483AE30006DE06 /* wchar.cpp */; };
|
||||
9A4F68612449D4B5004B2F7E /* strlen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B5124483AE30006DE06 /* strlen.cpp */; };
|
||||
9A4F68622449D4CB004B2F7E /* APFS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4624483AE30006DE06 /* APFS.cpp */; };
|
||||
9A4F68642449D4CC004B2F7E /* APFS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4624483AE30006DE06 /* APFS.cpp */; };
|
||||
9A4F68652449D533004B2F7E /* APFS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B4624483AE30006DE06 /* APFS.cpp */; };
|
||||
9A637AE82430D927000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
|
||||
9A637AE92430D928000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
|
||||
9A637AEA2430D928000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
|
||||
@ -2216,6 +2234,7 @@
|
||||
9ACFE6C924309AF80071CC93 /* XStringW_test.cpp in Sources */,
|
||||
9ACFE6CA24309AF80071CC93 /* tool.cpp in Sources */,
|
||||
9ACFE6CB24309AF80071CC93 /* BasicIO.cpp in Sources */,
|
||||
9A4F68582449D4AE004B2F7E /* stdio.cpp in Sources */,
|
||||
9ACFE6CC24309AF80071CC93 /* lib.cpp in Sources */,
|
||||
9ACFE6CD24309AF80071CC93 /* Injectors.cpp in Sources */,
|
||||
9ACFE6CF24309AF80071CC93 /* b64cdecode.cpp in Sources */,
|
||||
@ -2230,6 +2249,7 @@
|
||||
9ACFE6D824309AF80071CC93 /* strncmp_test.cpp in Sources */,
|
||||
9ACFE6D924309AF80071CC93 /* list.cpp in Sources */,
|
||||
9ACFE6DA24309AF80071CC93 /* IO.cpp in Sources */,
|
||||
9A4F68552449D4AB004B2F7E /* strcmp.cpp in Sources */,
|
||||
9ACFE6DB24309AF80071CC93 /* sound.cpp in Sources */,
|
||||
9ACFE6DC24309AF80071CC93 /* usbfix.cpp in Sources */,
|
||||
9ACFE6DD24309AF80071CC93 /* BmLib.cpp in Sources */,
|
||||
@ -2237,6 +2257,7 @@
|
||||
9ACFE6DF24309AF80071CC93 /* global_test.cpp in Sources */,
|
||||
9ACFE6E024309AF80071CC93 /* XTheme.cpp in Sources */,
|
||||
9ACFE6E124309AF80071CC93 /* load_icns.cpp in Sources */,
|
||||
9A4F68642449D4CC004B2F7E /* APFS.cpp in Sources */,
|
||||
9ACFE6E224309AF80071CC93 /* egemb_font.cpp in Sources */,
|
||||
9ACFE6E324309AF80071CC93 /* securemenu.cpp in Sources */,
|
||||
9ACFE6E424309AF80071CC93 /* text.cpp in Sources */,
|
||||
@ -2255,6 +2276,7 @@
|
||||
9A9AEB9F243F7B9200FBD7D8 /* XStringArray.cpp in Sources */,
|
||||
9ACFE6F324309AF80071CC93 /* lockedgraphics.cpp in Sources */,
|
||||
9A4185BD2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9A4F68612449D4B5004B2F7E /* strlen.cpp in Sources */,
|
||||
9ACFE6F424309AF80071CC93 /* XString_test.cpp in Sources */,
|
||||
9ACFE6F524309AF80071CC93 /* device_inject.cpp in Sources */,
|
||||
9A09863A2438A15400826276 /* shared_with_menu.cpp in Sources */,
|
||||
@ -2266,6 +2288,7 @@
|
||||
9ACFE6FB24309AF80071CC93 /* spd.cpp in Sources */,
|
||||
9ACFE6FC24309AF80071CC93 /* printf_lite-test.cpp in Sources */,
|
||||
9ACFE6FD24309AF80071CC93 /* kext_patcher.cpp in Sources */,
|
||||
9A4F685F2449D4B5004B2F7E /* abort.cpp in Sources */,
|
||||
9ACFE6FF24309AF80071CC93 /* gma.cpp in Sources */,
|
||||
9ACFE70024309AF80071CC93 /* FloatLib.cpp in Sources */,
|
||||
9ACFE70124309AF80071CC93 /* menu_items.cpp in Sources */,
|
||||
@ -2294,6 +2317,7 @@
|
||||
9ACFE71B24309AF80071CC93 /* StartupSound.cpp in Sources */,
|
||||
9ACFE71C24309AF80071CC93 /* globals_ctor.cpp in Sources */,
|
||||
9ACFE71D24309AF80071CC93 /* screen.cpp in Sources */,
|
||||
9A4F68602449D4B5004B2F7E /* wchar.cpp in Sources */,
|
||||
9ACFE71E24309AF80071CC93 /* VectorGraphics.cpp in Sources */,
|
||||
9ACFE71F24309AF80071CC93 /* common.cpp in Sources */,
|
||||
9ACFE72024309AF80071CC93 /* egemb_icons.cpp in Sources */,
|
||||
@ -2328,6 +2352,7 @@
|
||||
9AF415FF242CD75C00D2644C /* XStringW_test.cpp in Sources */,
|
||||
9AF41600242CD75C00D2644C /* tool.cpp in Sources */,
|
||||
9AF41742242F15D600D2644C /* BasicIO.cpp in Sources */,
|
||||
9A4F68562449D4AE004B2F7E /* stdio.cpp in Sources */,
|
||||
9AF41601242CD75C00D2644C /* lib.cpp in Sources */,
|
||||
9AF41602242CD75C00D2644C /* Injectors.cpp in Sources */,
|
||||
9AF41604242CD75C00D2644C /* b64cdecode.cpp in Sources */,
|
||||
@ -2342,6 +2367,7 @@
|
||||
9AF4160D242CD75C00D2644C /* strncmp_test.cpp in Sources */,
|
||||
9AF4160E242CD75C00D2644C /* list.cpp in Sources */,
|
||||
9AF4160F242CD75C00D2644C /* IO.cpp in Sources */,
|
||||
9A4F68532449D4AB004B2F7E /* strcmp.cpp in Sources */,
|
||||
9AF41610242CD75C00D2644C /* sound.cpp in Sources */,
|
||||
9AF41611242CD75C00D2644C /* usbfix.cpp in Sources */,
|
||||
9AF41612242CD75C00D2644C /* BmLib.cpp in Sources */,
|
||||
@ -2349,6 +2375,7 @@
|
||||
9AF41614242CD75C00D2644C /* global_test.cpp in Sources */,
|
||||
9AF41616242CD75C00D2644C /* load_icns.cpp in Sources */,
|
||||
9AF41617242CD75C00D2644C /* egemb_font.cpp in Sources */,
|
||||
9A4F68622449D4CB004B2F7E /* APFS.cpp in Sources */,
|
||||
9AF41618242CD75C00D2644C /* securemenu.cpp in Sources */,
|
||||
9AF41619242CD75C00D2644C /* text.cpp in Sources */,
|
||||
9AF4161A242CD75C00D2644C /* AmlGenerator.cpp in Sources */,
|
||||
@ -2367,6 +2394,7 @@
|
||||
9A9AEB9D243F7B9000FBD7D8 /* XStringArray.cpp in Sources */,
|
||||
9AF4162A242CD75C00D2644C /* XString_test.cpp in Sources */,
|
||||
9A4185BB2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9A4F685B2449D4B4004B2F7E /* strlen.cpp in Sources */,
|
||||
9AF4162B242CD75C00D2644C /* device_inject.cpp in Sources */,
|
||||
9AF4162C242CD75C00D2644C /* Settings.cpp in Sources */,
|
||||
9A0986382438A15400826276 /* shared_with_menu.cpp in Sources */,
|
||||
@ -2378,6 +2406,7 @@
|
||||
9AF41632242CD75C00D2644C /* printf_lite-test.cpp in Sources */,
|
||||
9AF41633242CD75C00D2644C /* kext_patcher.cpp in Sources */,
|
||||
9AF41635242CD75C00D2644C /* gma.cpp in Sources */,
|
||||
9A4F68592449D4B4004B2F7E /* abort.cpp in Sources */,
|
||||
9AF41636242CD75C00D2644C /* FloatLib.cpp in Sources */,
|
||||
9AF41637242CD75C00D2644C /* menu_items.cpp in Sources */,
|
||||
9AF41638242CD75C00D2644C /* lodepng.cpp in Sources */,
|
||||
@ -2406,6 +2435,7 @@
|
||||
9AF41651242CD75C00D2644C /* StartupSound.cpp in Sources */,
|
||||
9AF41652242CD75C00D2644C /* globals_ctor.cpp in Sources */,
|
||||
9AF41653242CD75C00D2644C /* screen.cpp in Sources */,
|
||||
9A4F685A2449D4B4004B2F7E /* wchar.cpp in Sources */,
|
||||
9AF41654242CD75C00D2644C /* VectorGraphics.cpp in Sources */,
|
||||
9AF41655242CD75C00D2644C /* common.cpp in Sources */,
|
||||
9AF41656242CD75C00D2644C /* egemb_icons.cpp in Sources */,
|
||||
@ -2440,6 +2470,7 @@
|
||||
9AF416DC242CDA5800D2644C /* XStringW_test.cpp in Sources */,
|
||||
9AF416DD242CDA5800D2644C /* tool.cpp in Sources */,
|
||||
9AF41743242F15D700D2644C /* BasicIO.cpp in Sources */,
|
||||
9A4F68572449D4AE004B2F7E /* stdio.cpp in Sources */,
|
||||
9AF416DE242CDA5800D2644C /* lib.cpp in Sources */,
|
||||
9AF416DF242CDA5800D2644C /* Injectors.cpp in Sources */,
|
||||
9AF416E1242CDA5800D2644C /* b64cdecode.cpp in Sources */,
|
||||
@ -2454,6 +2485,7 @@
|
||||
9AF416EA242CDA5800D2644C /* strncmp_test.cpp in Sources */,
|
||||
9AF416EB242CDA5800D2644C /* list.cpp in Sources */,
|
||||
9AF416EC242CDA5800D2644C /* IO.cpp in Sources */,
|
||||
9A4F68542449D4AB004B2F7E /* strcmp.cpp in Sources */,
|
||||
9AF416ED242CDA5800D2644C /* sound.cpp in Sources */,
|
||||
9AF416EE242CDA5800D2644C /* usbfix.cpp in Sources */,
|
||||
9AF416EF242CDA5800D2644C /* BmLib.cpp in Sources */,
|
||||
@ -2461,6 +2493,7 @@
|
||||
9AF416F1242CDA5800D2644C /* global_test.cpp in Sources */,
|
||||
9AF416F3242CDA5800D2644C /* load_icns.cpp in Sources */,
|
||||
9AF416F4242CDA5800D2644C /* egemb_font.cpp in Sources */,
|
||||
9A4F68652449D533004B2F7E /* APFS.cpp in Sources */,
|
||||
9AF416F5242CDA5800D2644C /* securemenu.cpp in Sources */,
|
||||
9AF416F6242CDA5800D2644C /* text.cpp in Sources */,
|
||||
9AF416F7242CDA5800D2644C /* AmlGenerator.cpp in Sources */,
|
||||
@ -2479,6 +2512,7 @@
|
||||
9A9AEB9E243F7B9100FBD7D8 /* XStringArray.cpp in Sources */,
|
||||
9AF41707242CDA5800D2644C /* XString_test.cpp in Sources */,
|
||||
9A4185BC2439F29D00BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9A4F685E2449D4B4004B2F7E /* strlen.cpp in Sources */,
|
||||
9AF41708242CDA5800D2644C /* device_inject.cpp in Sources */,
|
||||
9AF41709242CDA5800D2644C /* Settings.cpp in Sources */,
|
||||
9A0986392438A15400826276 /* shared_with_menu.cpp in Sources */,
|
||||
@ -2490,6 +2524,7 @@
|
||||
9AF4170F242CDA5800D2644C /* printf_lite-test.cpp in Sources */,
|
||||
9AF41710242CDA5800D2644C /* kext_patcher.cpp in Sources */,
|
||||
9AF41712242CDA5800D2644C /* gma.cpp in Sources */,
|
||||
9A4F685C2449D4B4004B2F7E /* abort.cpp in Sources */,
|
||||
9AF41713242CDA5800D2644C /* FloatLib.cpp in Sources */,
|
||||
9AF41714242CDA5800D2644C /* menu_items.cpp in Sources */,
|
||||
9AF41715242CDA5800D2644C /* lodepng.cpp in Sources */,
|
||||
@ -2518,6 +2553,7 @@
|
||||
9AF4172E242CDA5800D2644C /* StartupSound.cpp in Sources */,
|
||||
9AF4172F242CDA5800D2644C /* globals_ctor.cpp in Sources */,
|
||||
9AF41730242CDA5800D2644C /* screen.cpp in Sources */,
|
||||
9A4F685D2449D4B4004B2F7E /* wchar.cpp in Sources */,
|
||||
9AF41731242CDA5800D2644C /* VectorGraphics.cpp in Sources */,
|
||||
9AF41732242CDA5800D2644C /* common.cpp in Sources */,
|
||||
9AF41733242CDA5800D2644C /* egemb_icons.cpp in Sources */,
|
||||
|
@ -933,7 +933,7 @@ VOID DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam
|
||||
DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId,
|
||||
((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length);
|
||||
for (k = 0; k < 16; k++) {
|
||||
DBG("%02X ", ((UINT8*)adr)[k]);
|
||||
DBG("%02hhX ", ((UINT8*)adr)[k]);
|
||||
}
|
||||
if ((AsciiStrCmp(Signature, "SSDT") == 0) && (len < 0x20000) && DirName != NULL && !IsTableSaved((VOID*)adr)) {
|
||||
FileName = GenerateFileName(FileNamePrefix, SsdtCount, ChildCount, OemTableId);
|
||||
@ -979,7 +979,7 @@ VOID DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam
|
||||
DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId,
|
||||
((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length);
|
||||
for(k=0; k<16; k++){
|
||||
DBG("%02X ", ((UINT8*)adr)[k]);
|
||||
DBG("%02hhX ", ((UINT8*)adr)[k]);
|
||||
}
|
||||
if ((AsciiStrCmp(Signature, "SSDT") == 0) && (len < 0x20000) && DirName != NULL && !IsTableSaved((VOID*)adr)) {
|
||||
FileName = GenerateFileName(FileNamePrefix, SsdtCount, ChildCount, OemTableId);
|
||||
@ -2063,7 +2063,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, CHAR8 *OSVersion)
|
||||
//native DSDT or loaded we want to apply autoFix to this
|
||||
// if (gSettings.FixDsdt) { //fix even with zero mask because we want to know PCIRootUID and count(?)
|
||||
DBG("Apply DsdtFixMask=0x%08X\n", gSettings.FixDsdt);
|
||||
DBG(" drop _DSM mask=0x%04X\n", dropDSM);
|
||||
DBG(" drop _DSM mask=0x%04hX\n", dropDSM);
|
||||
FixBiosDsdt((UINT8*)(UINTN)FadtPointer->XDsdt, FadtPointer, OSVersion);
|
||||
if (gSettings.DebugDSDT) {
|
||||
for (Index=0; Index < 60; Index++) {
|
||||
@ -2179,10 +2179,10 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, CHAR8 *OSVersion)
|
||||
// here we're trying to assign first IDs found in DSDT to enabled processors in MADT, such that macOS assumption to be true
|
||||
if (ProcLocalApic->Flags & EFI_ACPI_4_0_LOCAL_APIC_ENABLED) {
|
||||
if (ProcLocalApic->AcpiProcessorId != acpi_cpu_processor_id[Index]) {
|
||||
DBG("AcpiProcessorId changed: 0x%02X to 0x%02X\n", ProcLocalApic->AcpiProcessorId, acpi_cpu_processor_id[Index]);
|
||||
DBG("AcpiProcessorId changed: 0x%02hhX to 0x%02hhX\n", ProcLocalApic->AcpiProcessorId, acpi_cpu_processor_id[Index]);
|
||||
ProcLocalApic->AcpiProcessorId = acpi_cpu_processor_id[Index];
|
||||
} else {
|
||||
DBG("AcpiProcessorId: 0x%02X\n", ProcLocalApic->AcpiProcessorId);
|
||||
DBG("AcpiProcessorId: 0x%02hhX\n", ProcLocalApic->AcpiProcessorId);
|
||||
}
|
||||
Index++;
|
||||
}
|
||||
|
@ -671,7 +671,7 @@ UINT32 aml_write_node(AML_CHUNK* node, CHAR8* buffer, UINT32 offset)
|
||||
}
|
||||
|
||||
if (offset - old != node->Size) {
|
||||
MsgLog("Node size incorrect: type=0x%X size=%X offset=%X\n",
|
||||
MsgLog("Node size incorrect: type=0x%hhX size=%hX offset=%X\n",
|
||||
node->Type, node->Size, (offset - old));
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ PrintBytesRow(IN UINT8 *Bytes, IN UINTN Number, IN UINTN MaxNumber)
|
||||
|
||||
// print hex vals
|
||||
for (Index = 0; Index < Number; Index++) {
|
||||
DebugLog(1, "%02X ", Bytes[Index]);
|
||||
DebugLog(1, "%02hhX ", Bytes[Index]);
|
||||
}
|
||||
|
||||
// pad to MaxNumber if needed
|
||||
|
@ -324,7 +324,7 @@ PrintBootOrder (
|
||||
if (Index > 0) {
|
||||
DBG(", ");
|
||||
}
|
||||
DBG("Boot%04X", BootOrder[Index]);
|
||||
DBG("Boot%04hX", BootOrder[Index]);
|
||||
}
|
||||
DBG("\n");
|
||||
//WaitForKeyPress(L"press a key to continue\n");
|
||||
@ -383,7 +383,7 @@ AddToBootOrder (
|
||||
UINTN Index;
|
||||
|
||||
|
||||
DBG("AddToBootOrder: Boot%04X at index %llu\n", BootNumNew, BootIndexNew);
|
||||
DBG("AddToBootOrder: Boot%04hX at index %llu\n", BootNumNew, BootIndexNew);
|
||||
Status = GetBootOrder (&BootOrder, &BootOrderLen);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
@ -461,7 +461,7 @@ DeleteFromBootOrder (
|
||||
UINTN Index;
|
||||
|
||||
|
||||
DBG("DeleteFromBootOrder: %04X\n", BootNum);
|
||||
DBG("DeleteFromBootOrder: %04hX\n", BootNum);
|
||||
|
||||
Status = GetBootOrder (&BootOrder, &BootOrderLen);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@ -532,7 +532,7 @@ PrintBootOption (
|
||||
CHAR16 *FPStr;
|
||||
|
||||
|
||||
DBG("%2llu) Boot%04X: %ls, Attr: 0x%X\n",
|
||||
DBG("%2llu) Boot%04hX: %ls, Attr: 0x%X\n",
|
||||
Index, BootOption->BootNum, BootOption->Description, BootOption->Attributes);
|
||||
FPStr = FileDevicePathToStr(BootOption->FilePathList);
|
||||
DBG(" %ls\n", FPStr);
|
||||
@ -699,7 +699,7 @@ GetBootOption (
|
||||
// Get BootXXXX var.
|
||||
//
|
||||
BootOption->BootNum = BootNum;
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04X", BootNum);
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04hX", BootNum);
|
||||
|
||||
BootOption->Variable = (__typeof__(BootOption->Variable))GetNvramVariable (VarName, &gEfiGlobalVariableGuid, NULL, (UINTN *)(UINTN)(OFFSET_OF(BO_BOOT_OPTION, VariableSize) + (UINTN)BootOption));
|
||||
if (BootOption->Variable == NULL) {
|
||||
@ -801,7 +801,7 @@ FindBootOptionForFile (
|
||||
//
|
||||
Status = GetBootOption (BootOrder[Index], &BootOption);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("FindBootOptionForFile: Boot%04X: %s\n", BootOrder[Index], strerror(Status));
|
||||
DBG("FindBootOptionForFile: Boot%04hX: %s\n", BootOrder[Index], strerror(Status));
|
||||
//WaitForKeyPress(L"press a key to continue\n\n");
|
||||
continue;
|
||||
}
|
||||
@ -810,7 +810,7 @@ FindBootOptionForFile (
|
||||
|
||||
if (DevicePathEqual (SearchedDevicePath[0], BootOption.FilePathList) ||
|
||||
DevicePathEqual (SearchedDevicePath[1], BootOption.FilePathList)) {
|
||||
DBG("FindBootOptionForFile: Found Boot%04X, at index %llu\n", BootOrder[Index], Index);
|
||||
DBG("FindBootOptionForFile: Found Boot%04hX, at index %llu\n", BootOrder[Index], Index);
|
||||
if (BootNum != NULL) {
|
||||
*BootNum = BootOrder[Index];
|
||||
}
|
||||
@ -867,7 +867,7 @@ PrintBootOptions (
|
||||
//
|
||||
Status = GetBootOption (BootOrder[Index], &BootOption);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("%2llu) Boot%04X: ERROR, not found: %s\n", Index, BootOrder[Index], strerror(Status));
|
||||
DBG("%2llu) Boot%04hX: ERROR, not found: %s\n", Index, BootOrder[Index], strerror(Status));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -948,8 +948,8 @@ AddBootOption (
|
||||
DBG("FindFreeBootNum: %s\n", strerror(Status));
|
||||
return Status;
|
||||
}
|
||||
DBG(" Found BootNum: %04X\n", BootOption->BootNum);
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04X", BootOption->BootNum);
|
||||
DBG(" Found BootNum: %04hX\n", BootOption->BootNum);
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04hX", BootOption->BootNum);
|
||||
|
||||
//
|
||||
// Prepare BootOption variable
|
||||
@ -1072,9 +1072,9 @@ DeleteBootOption (
|
||||
CHAR16 VarName[16];
|
||||
|
||||
|
||||
DBG("DeleteBootOption: Boot%04X\n", BootNum);
|
||||
DBG("DeleteBootOption: Boot%04hX\n", BootNum);
|
||||
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04X", BootNum);
|
||||
snwprintf(VarName, sizeof(VarName), "Boot%04hX", BootNum);
|
||||
|
||||
//
|
||||
// Delete BootXXXX var
|
||||
@ -1119,7 +1119,7 @@ DeleteBootOptionForFile (
|
||||
do {
|
||||
Status = FindBootOptionForFile (FileDeviceHandle, FileName, &BootNum, NULL);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DBG("\tdeleted option: %04X\n", BootNum);
|
||||
DBG("\tdeleted option: %04hX\n", BootNum);
|
||||
DeleteBootOption (BootNum);
|
||||
}
|
||||
} while (!EFI_ERROR(Status));
|
||||
@ -1170,7 +1170,7 @@ DeleteBootOptionsContainingFile (
|
||||
//
|
||||
Status = GetBootOption (BootOrder[Index], &BootOption);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("DeleteBootOptionContainingFile: Boot%04X: ERROR: %s\n", BootOrder[Index], strerror(Status));
|
||||
DBG("DeleteBootOptionContainingFile: Boot%04hX: ERROR: %s\n", BootOrder[Index], strerror(Status));
|
||||
//WaitForKeyPress(L"press a key to continue\n\n");
|
||||
continue;
|
||||
}
|
||||
@ -1181,7 +1181,7 @@ DeleteBootOptionsContainingFile (
|
||||
|
||||
if ((FilePathDP != NULL) &&
|
||||
(StriStr (FilePathDP->PathName, FileName) != NULL)) {
|
||||
DBG("DeleteBootOptionContainingFile: Found Boot%04X, at index %llu\n", BootOrder[Index], Index);
|
||||
DBG("DeleteBootOptionContainingFile: Found Boot%04hX, at index %llu\n", BootOrder[Index], Index);
|
||||
Status = DeleteBootOption (BootOrder[Index]);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ReturnStatus = EFI_SUCCESS;
|
||||
|
@ -90,7 +90,7 @@ VOID DebugDumpEDID(CONST CHAR8 *Message, INTN N)
|
||||
DBG("%03lld |", i);
|
||||
for (j=0; j<10; j++) {
|
||||
if (i+j > N-1) break;
|
||||
DBG(" %02X", gSettings.CustomEDID[i+j]);
|
||||
DBG(" %02hhX", gSettings.CustomEDID[i+j]);
|
||||
}
|
||||
DBG("\n");
|
||||
}
|
||||
|
@ -125,9 +125,9 @@ VOID CorrectMemoryMap(IN UINT32 memMap,
|
||||
case EfiBootServicesData:
|
||||
memDescriptor->Type = EfiConventionalMemory;
|
||||
memDescriptor->Attribute = 0;
|
||||
// DBG(L"Range BS %X corrected to conventional\n", memDescriptor->PhysicalStart);
|
||||
// DBG(L"Range BS %hhX corrected to conventional\n", memDescriptor->PhysicalStart);
|
||||
if(MEM_DEB) {
|
||||
snwprintf(tmp, 160, "Range BS %X corrected to conventional\n\r", memDescriptor->PhysicalStart);
|
||||
snwprintf(tmp, 160, "Range BS %hhX corrected to conventional\n\r", memDescriptor->PhysicalStart);
|
||||
gST->ConOut->OutputString (gST->ConOut, tmp);
|
||||
// gBS->Stall(2000000);
|
||||
WaitForCR();
|
||||
@ -143,9 +143,9 @@ VOID CorrectMemoryMap(IN UINT32 memMap,
|
||||
(memDescriptor->Attribute == EFI_MEMORY_WB)) {
|
||||
memDescriptor->Type = EfiConventionalMemory;
|
||||
memDescriptor->Attribute = 0xF;
|
||||
// DBG(L"Range WB %X corrected to conventional\n", memDescriptor->PhysicalStart);
|
||||
// DBG(L"Range WB %hhX corrected to conventional\n", memDescriptor->PhysicalStart);
|
||||
if(MEM_DEB) {
|
||||
snwprintf(tmp, 160, "Range WB %X corrected to conventional\n\r", memDescriptor->PhysicalStart);
|
||||
snwprintf(tmp, 160, "Range WB %hhX corrected to conventional\n\r", memDescriptor->PhysicalStart);
|
||||
gST->ConOut->OutputString (gST->ConOut, tmp);
|
||||
//gBS->Stall(2000000);
|
||||
// WaitForCR();
|
||||
@ -183,8 +183,7 @@ VOID CorrectMemoryMap(IN UINT32 memMap,
|
||||
memDescriptor = (EfiMemoryRange *)(UINTN)memMap;
|
||||
for (Index = 0; Index < *memMapSize / memDescriptorSize; Index ++) {
|
||||
Bytes = LShiftU64 (memDescriptor->NumberOfPages, 12);
|
||||
// DBG(L"%lX-%lX %lX %lX %X\n",
|
||||
snwprintf(tmp, 160, "%lX-%lX pages %lX type %lX attr %X \r\n\r\t",
|
||||
snwprintf(tmp, 160, "%lX-%lX pages %lX type %lX attr %hhX \r\n\r\t",
|
||||
memDescriptor->PhysicalStart,
|
||||
memDescriptor->PhysicalStart + Bytes - 1,
|
||||
memDescriptor->NumberOfPages,
|
||||
|
@ -727,7 +727,7 @@ VOID CheckHardware()
|
||||
ArptAtheros = (Pci.Hdr.VendorId == 0x168c);
|
||||
ArptDID = Pci.Hdr.DeviceId;
|
||||
if (ArptAtheros) {
|
||||
DBG("Found Airport Atheros at 0x%X, 0x%X, DeviceID=0x%04X\n", ArptADR1, ArptADR2, ArptDID);
|
||||
DBG("Found Airport Atheros at 0x%X, 0x%X, DeviceID=0x%04hX\n", ArptADR1, ArptADR2, ArptDID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ VOID findCPU(UINT8* dsdt, UINT32 length)
|
||||
|
||||
if (!(IS_UPPER(c) || IS_DIGIT(c) || c == '_')) {
|
||||
add_name = FALSE;
|
||||
DBG("Invalid character found in ProcessorOP 0x%X!\n", c);
|
||||
DBG("Invalid character found in ProcessorOP 0x%hhX!\n", c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1753,7 +1753,7 @@ UINT32 FixAny (UINT8* dsdt, UINT32 len, UINT8* ToFind, UINT32 LenTF, UINT8* ToRe
|
||||
DBG(" invalid patches!\n");
|
||||
return len;
|
||||
}
|
||||
MsgLog(" pattern %02X%02X%02X%02X,", ToFind[0], ToFind[1], ToFind[2], ToFind[3]);
|
||||
MsgLog(" pattern %02hhX%02hhX%02hhX%02hhX,", ToFind[0], ToFind[1], ToFind[2], ToFind[3]);
|
||||
if ((LenTF + sizeof(EFI_ACPI_DESCRIPTION_HEADER)) > len) {
|
||||
MsgLog(" the patch is too large!\n");
|
||||
return len;
|
||||
@ -1808,7 +1808,7 @@ UINT32 FixRenameByBridge2 (UINT8* dsdt, UINT32 len, CHAR8* TgtBrgName, UINT8* To
|
||||
return len;
|
||||
}
|
||||
|
||||
DBG(" pattern %02X%02X%02X%02X,", ToFind[0], ToFind[1], ToFind[2], ToFind[3]);
|
||||
DBG(" pattern %02hhX%02hhX%02hhX%02hhX,", ToFind[0], ToFind[1], ToFind[2], ToFind[3]);
|
||||
if ((LenTF + sizeof(EFI_ACPI_DESCRIPTION_HEADER)) > len) {
|
||||
DBG(" the patch is too large!\n");
|
||||
return len;
|
||||
@ -2277,7 +2277,7 @@ UINT32 FixPIC (UINT8 *dsdt, UINT32 len)
|
||||
((dsdt[i+1] & 0xF0) == 0x40)) {
|
||||
RESADR = i+1; //Format 11, size1, size2, 0A, size-4,... 79, 00
|
||||
IOADR = i+4; //IO (Decode16 ==> 47, 01
|
||||
DBG("found CRS at %X size %X\n", RESADR, dsdt[IOADR]);
|
||||
DBG("found CRS at %X size %hhX\n", RESADR, dsdt[IOADR]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -4958,7 +4958,7 @@ UINT32 FIXOTHER (UINT8 *dsdt, UINT32 len)
|
||||
// get USB name
|
||||
UsbName[j] = (__typeof__(UsbName[j]))AllocateZeroPool(5);
|
||||
CopyMem(UsbName[j], dsdt+i, 4);
|
||||
DBG("found USB device NAME(_ADR,0x%08X) And Name is %s\n",
|
||||
DBG("found USB device NAME(_ADR,0x%08hhX) And Name is %s\n",
|
||||
USBADR[j], UsbName[j]);
|
||||
|
||||
k = (i+1);
|
||||
|
@ -66,7 +66,7 @@ HdaCodecDumpPrintRatesFormats(
|
||||
IN UINT32 Rates,
|
||||
IN UINT32 Formats) {
|
||||
// Print sample rates.
|
||||
HdaLog(" rates [0x%04X]:", (UINT16)Rates);
|
||||
HdaLog(" rates [0x%04hX]:", (UINT16)Rates);
|
||||
if (Rates & HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_8KHZ)
|
||||
HdaLog(" 8000");
|
||||
if (Rates & HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_11KHZ)
|
||||
@ -94,7 +94,7 @@ HdaCodecDumpPrintRatesFormats(
|
||||
HdaLog("\n");
|
||||
|
||||
// Print bits.
|
||||
HdaLog(" bits [0x%04X]:", (UINT16)(Rates >> 16));
|
||||
HdaLog(" bits [0x%04hX]:", (UINT16)(Rates >> 16));
|
||||
if (Rates & HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_8BIT)
|
||||
HdaLog(" 8");
|
||||
if (Rates & HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_16BIT)
|
||||
@ -123,7 +123,7 @@ EFIAPI
|
||||
HdaCodecDumpPrintAmpCaps(
|
||||
IN UINT32 AmpCaps) {
|
||||
if (AmpCaps) {
|
||||
HdaLog("ofs=0x%02X, nsteps=0x%02X, stepsize=%02X, mute=%u\n",
|
||||
HdaLog("ofs=0x%02hhX, nsteps=0x%02hhX, stepsize=%02hhX, mute=%u\n",
|
||||
HDA_PARAMETER_AMP_CAPS_OFFSET(AmpCaps), HDA_PARAMETER_AMP_CAPS_NUM_STEPS(AmpCaps),
|
||||
HDA_PARAMETER_AMP_CAPS_STEP_SIZE(AmpCaps), (AmpCaps & HDA_PARAMETER_AMP_CAPS_MUTE) != 0);
|
||||
} else
|
||||
@ -140,7 +140,7 @@ HdaCodecDumpPrintWidgets(
|
||||
// Print each widget.
|
||||
for (UINTN w = 0; w < WidgetCount; w++) {
|
||||
// Print header and capabilities.
|
||||
HdaLog("Node 0x%02X [%s] wcaps 0x%08X:", Widgets[w].NodeId,
|
||||
HdaLog("Node 0x%02hhX [%s] wcaps 0x%08X:", Widgets[w].NodeId,
|
||||
gWidgetNames[HDA_PARAMETER_WIDGET_CAPS_TYPE(Widgets[w].Capabilities)], Widgets[w].Capabilities);
|
||||
if (Widgets[w].Capabilities & HDA_PARAMETER_WIDGET_CAPS_STEREO)
|
||||
HdaLog(" Stereo");
|
||||
@ -166,9 +166,9 @@ HdaCodecDumpPrintWidgets(
|
||||
HdaLog(" Amp-In vals:");
|
||||
for (UINT8 i = 0; i < HDA_PARAMETER_CONN_LIST_LENGTH_LEN(Widgets[w].ConnectionListLength); i++) {
|
||||
if (Widgets[w].Capabilities & HDA_PARAMETER_WIDGET_CAPS_STEREO)
|
||||
HdaLog(" [0x%02X 0x%02X]", Widgets[w].AmpInLeftDefaultGainMute[i], Widgets[w].AmpInRightDefaultGainMute[i]);
|
||||
HdaLog(" [0x%02hhX 0x%02hhX]", Widgets[w].AmpInLeftDefaultGainMute[i], Widgets[w].AmpInRightDefaultGainMute[i]);
|
||||
else
|
||||
HdaLog(" [0x%02X]", Widgets[w].AmpInLeftDefaultGainMute[i]);
|
||||
HdaLog(" [0x%02hhX]", Widgets[w].AmpInLeftDefaultGainMute[i]);
|
||||
}
|
||||
HdaLog("\n");
|
||||
}
|
||||
@ -182,9 +182,9 @@ HdaCodecDumpPrintWidgets(
|
||||
// Print default values.
|
||||
HdaLog(" Amp-Out vals:");
|
||||
if (Widgets[w].Capabilities & HDA_PARAMETER_WIDGET_CAPS_STEREO)
|
||||
HdaLog(" [0x%02X 0x%02X]\n", Widgets[w].AmpOutLeftDefaultGainMute, Widgets[w].AmpOutRightDefaultGainMute);
|
||||
HdaLog(" [0x%02hhX 0x%02hhX]\n", Widgets[w].AmpOutLeftDefaultGainMute, Widgets[w].AmpOutRightDefaultGainMute);
|
||||
else
|
||||
HdaLog(" [0x%02X]\n", Widgets[w].AmpOutLeftDefaultGainMute);
|
||||
HdaLog(" [0x%02hhX]\n", Widgets[w].AmpOutLeftDefaultGainMute);
|
||||
}
|
||||
|
||||
// Print pin complexe info.
|
||||
@ -213,7 +213,7 @@ HdaCodecDumpPrintWidgets(
|
||||
|
||||
// Print EAPD info.
|
||||
if (Widgets[w].PinCapabilities & HDA_PARAMETER_PIN_CAPS_EAPD) {
|
||||
HdaLog(" EAPD 0x%X:", Widgets[w].DefaultEapd);
|
||||
HdaLog(" EAPD 0x%hhX:", Widgets[w].DefaultEapd);
|
||||
if (Widgets[w].DefaultEapd & HDA_EAPD_BTL_ENABLE_BTL)
|
||||
HdaLog(" BTL");
|
||||
if (Widgets[w].DefaultEapd & HDA_EAPD_BTL_ENABLE_EAPD)
|
||||
@ -236,12 +236,12 @@ HdaCodecDumpPrintWidgets(
|
||||
gColors[HDA_VERB_GET_CONFIGURATION_DEFAULT_COLOR(Widgets[w].DefaultConfiguration)]);
|
||||
|
||||
// Print default association and sequence.
|
||||
HdaLog(" DefAssociation = 0x%1X, Sequence = 0x%1X\n",
|
||||
HdaLog(" DefAssociation = 0x%1hhX, Sequence = 0x%1hhX\n",
|
||||
HDA_VERB_GET_CONFIGURATION_DEFAULT_ASSOCIATION(Widgets[w].DefaultConfiguration),
|
||||
HDA_VERB_GET_CONFIGURATION_DEFAULT_SEQUENCE(Widgets[w].DefaultConfiguration));
|
||||
|
||||
// Print default pin control.
|
||||
HdaLog(" Pin-ctls: 0x%02X:", Widgets[w].DefaultPinControl);
|
||||
HdaLog(" Pin-ctls: 0x%02hhX:", Widgets[w].DefaultPinControl);
|
||||
if (Widgets[w].DefaultPinControl & HDA_PIN_WIDGET_CONTROL_VREF_EN)
|
||||
HdaLog(" VREF");
|
||||
if (Widgets[w].DefaultPinControl & HDA_PIN_WIDGET_CONTROL_IN_EN)
|
||||
@ -255,9 +255,9 @@ HdaCodecDumpPrintWidgets(
|
||||
|
||||
// Print connections.
|
||||
if (Widgets[w].Capabilities & HDA_PARAMETER_WIDGET_CAPS_CONN_LIST) {
|
||||
HdaLog(" Connection: %u\n ", HDA_PARAMETER_CONN_LIST_LENGTH_LEN(Widgets[w].ConnectionListLength));
|
||||
HdaLog(" Connection: %hhu\n ", HDA_PARAMETER_CONN_LIST_LENGTH_LEN(Widgets[w].ConnectionListLength));
|
||||
for (UINT8 c = 0; c < HDA_PARAMETER_CONN_LIST_LENGTH_LEN(Widgets[w].ConnectionListLength); c++) {
|
||||
HdaLog(" 0x%02X", Widgets[w].Connections[c]);
|
||||
HdaLog(" 0x%02hX", Widgets[w].Connections[c]);
|
||||
//if (c == Widgets[w].ConnectionSelect)
|
||||
// HdaLog("*");
|
||||
}
|
||||
@ -306,10 +306,10 @@ EFI_STATUS SaveHdaDumpTxt() {
|
||||
// Get address
|
||||
UINT8 CodecAddress;
|
||||
Status = HdaIo->GetAddress(HdaIo, &CodecAddress);
|
||||
HdaLog("Address: %u\n", CodecAddress);
|
||||
HdaLog("Address: %hhu\n", CodecAddress);
|
||||
|
||||
// Get AFG ID.
|
||||
HdaLog("AFG Function Id: 0x%1X (unsol %u)\n", AudioFuncGroup->NodeId, AudioFuncGroup->UnsolCapable);
|
||||
HdaLog("AFG Function Id: 0x%1hhX (unsol %hhu)\n", AudioFuncGroup->NodeId, AudioFuncGroup->UnsolCapable);
|
||||
|
||||
HdaLog("Vendor ID: 0x%08X\n", HdaCodecDev->VendorId);
|
||||
HdaLog("Revision ID: 0x%08X\n", HdaCodecDev->RevisionId);
|
||||
|
@ -374,7 +374,7 @@ LegacyBiosFarCall86 (
|
||||
ThunkRegSet.E.CS = Segment;
|
||||
ThunkRegSet.E.Eip = Offset;
|
||||
mThunkContext->RealModeState = &ThunkRegSet;
|
||||
DBG("SS=%X, ESP=%X, CS=%X, Eip=%X\n", ThunkRegSet.E.SS, ThunkRegSet.E.ESP, ThunkRegSet.E.CS, ThunkRegSet.E.Eip);
|
||||
DBG("SS=%hX, ESP=%X, CS=%hX, Eip=%X\n", ThunkRegSet.E.SS, ThunkRegSet.E.ESP, ThunkRegSet.E.CS, ThunkRegSet.E.Eip);
|
||||
#if DEBUG_LBTHUNK == 2
|
||||
PauseForKey(L"LegacyBiosFarCall86");
|
||||
#endif
|
||||
|
@ -192,13 +192,13 @@ EFI_STATUS BiosReadSectorsFromDrive(UINT8 DriveNum, UINT64 Lba, UINTN NumSectors
|
||||
SetMem (&Regs, sizeof (Regs), 0);
|
||||
|
||||
// first reset disk controller as the controller seems to be in an undefined state sometimes
|
||||
DBG("Reset disk controller: %X\n", DriveNum);
|
||||
DBG("Reset disk controller: %hhX\n", DriveNum);
|
||||
Regs.H.AH = 0x00; // INT 13h AH=00h: Reset disk controller
|
||||
Regs.H.DL = DriveNum;
|
||||
Status = EFI_SUCCESS;
|
||||
if (LegacyBiosInt86(0x13, &Regs)) {
|
||||
// TRUE = error
|
||||
DBG("Reset 0 disk controller: %X\n", DriveNum);
|
||||
DBG("Reset 0 disk controller: %hhX\n", DriveNum);
|
||||
Regs.H.AH = 0x0D; // INT 13h AH=00h: Reset disk controller
|
||||
Regs.H.DL = DriveNum;
|
||||
if (LegacyBiosInt86(0x13, &Regs)) {
|
||||
@ -214,9 +214,9 @@ EFI_STATUS BiosReadSectorsFromDrive(UINT8 DriveNum, UINT64 Lba, UINTN NumSectors
|
||||
Regs.E.DS = (UINT16) (((UINTN) Dap >> 16) << 12);
|
||||
Regs.X.SI = (UINT16) (UINTN) Dap;
|
||||
|
||||
// DBG("Drive: %X, Dap=%p, Buffer=%p, d.size=%X, d.nsect=%d, d.buff=[%X:%X]\n",
|
||||
// DBG("Drive: %hhX, Dap=%p, Buffer=%p, d.size=%hhX, d.nsect=%d, d.buff=[%hhX:%hhX]\n",
|
||||
// DriveNum, Dap, Buffer, Dap->size, Dap->numSectors, Dap->buffSegment, Dap->buffOffset);
|
||||
// DBG("Dap: Reg.DS:SI = [%X:%X]\n", Regs.E.DS, Regs.X.SI);
|
||||
// DBG("Dap: Reg.DS:SI = [%hhX:%hhX]\n", Regs.E.DS, Regs.X.SI);
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
if (LegacyBiosInt86(0x13, &Regs)) {
|
||||
@ -225,7 +225,7 @@ EFI_STATUS BiosReadSectorsFromDrive(UINT8 DriveNum, UINT64 Lba, UINTN NumSectors
|
||||
LegacyBiosInt86(0x13, &Regs);
|
||||
Status = EFI_NOT_FOUND;
|
||||
}
|
||||
DBG("LegacyBiosInt86 status=%s, AH=%X\n", strerror(Status), Regs.H.AH);
|
||||
DBG("LegacyBiosInt86 status=%s, AH=%hhX\n", strerror(Status), Regs.H.AH);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ UINT8 GetBiosDriveNumForVolume(REFIT_VOLUME *Volume)
|
||||
UINTN LegacyRegionPages;
|
||||
EFI_PHYSICAL_ADDRESS LegacyRegion;
|
||||
|
||||
// DBG("Expected volume CRC32 = %X\n", Volume->DriveCRC32);
|
||||
// DBG("Expected volume CRC32 = %hhX\n", Volume->DriveCRC32);
|
||||
LegacyRegion = 0x0C0000;
|
||||
LegacyRegionPages = EFI_SIZE_TO_PAGES(sizeof(BIOS_DISK_ADDRESS_PACKET) + 2 * 512)+1 /* dap + 2 sectors */;
|
||||
Status = gBS->AllocatePages(AllocateMaxAddress,
|
||||
@ -286,17 +286,17 @@ UINT8 GetBiosDriveNumForVolume(REFIT_VOLUME *Volume)
|
||||
if (EFI_ERROR(Status)) {
|
||||
// error or no more disks
|
||||
//DriveNum = 0;
|
||||
DBG("Can't get drive 0x%X CRC32\n", DriveNum);
|
||||
DBG("Can't get drive 0x%hhX CRC32\n", DriveNum);
|
||||
continue;
|
||||
}
|
||||
BestNum = DriveNum;
|
||||
DBG("Calculated CRC=%X at drive 0x%X\n", Volume->DriveCRC32, BestNum);
|
||||
DBG("Calculated CRC=%X at drive 0x%hhX\n", Volume->DriveCRC32, BestNum);
|
||||
if (Volume->DriveCRC32 == DriveCRC32) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
gBS->FreePages(LegacyRegion, LegacyRegionPages);
|
||||
DBG("Returning Bios drive %X\n", BestNum);
|
||||
DBG("Returning Bios drive %hhX\n", BestNum);
|
||||
return BestNum;
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ EFI_STATUS bootMBR(REFIT_VOLUME* volume)
|
||||
for (i=0; i<16; i++) {
|
||||
DBG("%04llX: ", i*16);
|
||||
for (j=0; j<16; j++) {
|
||||
DBG("%02X ", pMBR[i*16+j]);
|
||||
DBG("%02hhX ", pMBR[i*16+j]);
|
||||
}
|
||||
DBG("\n");
|
||||
}
|
||||
@ -526,7 +526,7 @@ EFI_STATUS bootMBR(REFIT_VOLUME* volume)
|
||||
|
||||
// Check validity of MBR
|
||||
if (pMBR[510] != 0x55 || pMBR[511] != 0xAA) {
|
||||
DBG("HDBoot: Invalid MBR signature 0x%02X%02X (not 0xAA55)\n", pMBR[511], pMBR[510]);
|
||||
DBG("HDBoot: Invalid MBR signature 0x%02hhX%02hhX (not 0xAA55)\n", pMBR[511], pMBR[510]);
|
||||
Status = EFI_NOT_FOUND;
|
||||
return Status;
|
||||
}
|
||||
@ -550,7 +550,7 @@ EFI_STATUS bootMBR(REFIT_VOLUME* volume)
|
||||
|
||||
// Is the partition valid?
|
||||
if (partition->StartLBA == 0 || partition->Size == 0) {
|
||||
DBG("HDBoot: Invalid active partition %d: (%08X L %08X)\n", partition->StartLBA, partition->Size);
|
||||
DBG("HDBoot: Invalid active partition %d: (%08hhX L %08hhX)\n", partition->StartLBA, partition->Size);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ EFI_STATUS bootMBR(REFIT_VOLUME* volume)
|
||||
|
||||
// Check boot sector
|
||||
if (pBootSector[0x1FE] != 0x55 || pBootSector[0x1FF] != 0xAA) {
|
||||
DBG("HDBoot: Invalid Boot Sector signature 0x%02X%02X (not 0xAA55)\n", pBootSector[0x1FF], pBootSector[0x1FE]);
|
||||
DBG("HDBoot: Invalid Boot Sector signature 0x%02hhX%02hhX (not 0xAA55)\n", pBootSector[0x1FF], pBootSector[0x1FE]);
|
||||
Status = EFI_NOT_FOUND;
|
||||
return Status;
|
||||
}
|
||||
@ -661,7 +661,7 @@ EFI_STATUS bootPBRtest(REFIT_VOLUME* volume)
|
||||
for (i=0; i<4; i++) {
|
||||
DBG("%04llX: ", i*16);
|
||||
for (j=0; j<16; j++) {
|
||||
DBG("%02X ", pBootSector[i*16+j]);
|
||||
DBG("%02hhX ", pBootSector[i*16+j]);
|
||||
}
|
||||
DBG("\n");
|
||||
}
|
||||
@ -855,7 +855,7 @@ EFI_STATUS bootPBR(REFIT_VOLUME* volume, BOOLEAN SataReset)
|
||||
break;
|
||||
}
|
||||
|
||||
DBG("%llu: Drv: %X P: %X %ls PCI(%X,%X,%X), DT: %X %ls SF: %X Txt: '%s'\n",
|
||||
DBG("%llu: Drv: %hhX P: %hX %ls PCI(%X,%X,%X), DT: %hX %ls SF: %X Txt: '%s'\n",
|
||||
i, BbsTableIt->AssignedDriveNumber, BbsTableIt->BootPriority, BbsPriorityTxt,
|
||||
BbsTableIt->Bus, BbsTableIt->Device, BbsTableIt->Function,
|
||||
BbsTableIt->DeviceType, BbsDevTypeTxt, *(UINT32*)(&BbsTableIt->StatusFlags),
|
||||
@ -911,7 +911,7 @@ EFI_STATUS bootPBR(REFIT_VOLUME* volume, BOOLEAN SataReset)
|
||||
for (i=0; i<4; i++) {
|
||||
DBG("%04llX: ", i*16);
|
||||
for (j=0; j<16; j++) {
|
||||
DBG("%02X ", pBootSector[i*16+j]);
|
||||
DBG("%02hhX ", pBootSector[i*16+j]);
|
||||
}
|
||||
DBG("\n");
|
||||
}
|
||||
@ -957,7 +957,7 @@ EFI_STATUS bootPBR(REFIT_VOLUME* volume, BOOLEAN SataReset)
|
||||
Regs.X.SI = (UINT16)(UINTN)pMBR;
|
||||
}
|
||||
|
||||
DBG("mbr: %X index: %llX pointer: %llX dx: %X si: %X\n", volume->IsMbrPartition, volume->MbrPartitionIndex, (uintptr_t)volume->MbrPartitionTable, Regs.X.DX, Regs.X.SI);
|
||||
DBG("mbr: %hhX index: %llX pointer: %llX dx: %hX si: %hX\n", volume->IsMbrPartition, volume->MbrPartitionIndex, (uintptr_t)volume->MbrPartitionTable, Regs.X.DX, Regs.X.SI);
|
||||
DBG("pmbr: %llX start: %X size: %X\n", (uintptr_t)&pMBR[volume->MbrPartitionIndex], pMBR[volume->MbrPartitionIndex].StartLBA, pMBR[volume->MbrPartitionIndex].Size);
|
||||
|
||||
//
|
||||
|
@ -133,7 +133,7 @@ GetMacAddress()
|
||||
DBG("MAC address of LAN #%llu= ", nLanPaths);
|
||||
HwAddress = &MacAddressNode->MacAddress.Addr[0];
|
||||
for (Index2 = 0; Index2 < HwAddressSize; Index2++) {
|
||||
DBG("%02X:", *HwAddress++);
|
||||
DBG("%02hhX:", *HwAddress++);
|
||||
}
|
||||
DBG("\n");
|
||||
Found = TRUE;
|
||||
@ -222,7 +222,7 @@ GetMacAddress()
|
||||
DBG("Legacy MAC address of LAN #%llu= ", Index);
|
||||
HwAddress = &gLanMac[Index][0];
|
||||
for (Index2 = 0; Index2 < HwAddressSize; Index2++) {
|
||||
DBG("%02X:", *HwAddress++);
|
||||
DBG("%02hhX:", *HwAddress++);
|
||||
}
|
||||
DBG("\n");
|
||||
|
||||
|
@ -456,7 +456,7 @@ GetSmcKeys (BOOLEAN WriteToSMC)
|
||||
/* UINTN Index;
|
||||
DBG(" %ls:", Name);
|
||||
for (Index = 0; Index < DataSize; Index++) {
|
||||
DBG("%02X ", *((UINT8*)Data + Index));
|
||||
DBG("%02hhX ", *((UINT8*)Data + Index));
|
||||
}
|
||||
DBG("\n"); */
|
||||
if (gAppleSmc && WriteToSMC) {
|
||||
|
@ -131,7 +131,7 @@ OurPlatformDriverLoaded (
|
||||
}
|
||||
Status = CompName->GetDriverName(CompName, "eng", &DriverName);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DBG(" DriverName=%ls at Controller=%X\n", DriverName, ControllerHandle);
|
||||
DBG(" DriverName=%ls at Controller=%hhX\n", DriverName, ControllerHandle);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -567,7 +567,7 @@ UINT8
|
||||
/*
|
||||
DBG ("Data: %p, Len: %d = ", Data, Prop->dataLen);
|
||||
for (i = 0; i < Prop->dataLen; i++) {
|
||||
DBG ("%02X ", Data[i]);
|
||||
DBG ("%02hhX ", Data[i]);
|
||||
}
|
||||
DBG ("\n");
|
||||
*/
|
||||
@ -583,7 +583,7 @@ UINT8
|
||||
/*
|
||||
DBG ("Data(str): %p, Len: %d = ", data, len);
|
||||
for (i = 0; i < Len; i++) {
|
||||
DBG ("%02X ", data[i]);
|
||||
DBG ("%02hhX ", data[i]);
|
||||
}
|
||||
DBG ("\n");
|
||||
*/
|
||||
@ -4434,7 +4434,7 @@ ParseSMBIOSSettings(
|
||||
Prop = GetProperty (DictPointer, "BoardType");
|
||||
if (Prop != NULL) {
|
||||
gSettings.BoardType = (UINT8)GetPropertyInteger (Prop, gSettings.BoardType);
|
||||
DBG ("BoardType: 0x%X\n", gSettings.BoardType);
|
||||
DBG ("BoardType: 0x%hhX\n", gSettings.BoardType);
|
||||
}
|
||||
|
||||
Prop = GetProperty (DictPointer, "Mobile");
|
||||
@ -4465,7 +4465,7 @@ ParseSMBIOSSettings(
|
||||
Prop = GetProperty (DictPointer, "ChassisType");
|
||||
if (Prop != NULL) {
|
||||
gSettings.ChassisType = (UINT8)GetPropertyInteger (Prop, gSettings.ChassisType);
|
||||
DBG ("ChassisType: 0x%X\n", gSettings.ChassisType);
|
||||
DBG ("ChassisType: 0x%hhX\n", gSettings.ChassisType);
|
||||
}
|
||||
|
||||
Prop = GetProperty (DictPointer, "NoRomInfo");
|
||||
@ -4583,7 +4583,7 @@ GetUserSettings(
|
||||
DBG ("Read NVCAP:");
|
||||
|
||||
for (i = 0; i<20; i++) {
|
||||
DBG ("%02X", gSettings.NVCAP[i]);
|
||||
DBG ("%02hhX", gSettings.NVCAP[i]);
|
||||
}
|
||||
|
||||
DBG ("\n");
|
||||
@ -4811,7 +4811,7 @@ GetUserSettings(
|
||||
Dev = hexstrtouint8(&Str[3]);
|
||||
Func = hexstrtouint8(&Str[6]);
|
||||
DeviceAddr = PCIADDR(Bus, Dev, Func);
|
||||
snprintf(Label, 64, "[%02X:%02X.%02X] ", Bus, Dev, Func);
|
||||
snprintf(Label, 64, "[%02hhX:%02hhX.%02hhX] ", Bus, Dev, Func);
|
||||
DBG(" %s", Label);
|
||||
} else {
|
||||
DBG (" no PciAddr\n");
|
||||
@ -5528,13 +5528,13 @@ GetUserSettings(
|
||||
gSettings.ResetVal = 0x06;
|
||||
}
|
||||
|
||||
DBG ("Calc ResetVal: 0x%X\n", gSettings.ResetVal);
|
||||
DBG ("Calc ResetVal: 0x%hhX\n", gSettings.ResetVal);
|
||||
}
|
||||
|
||||
Prop = GetProperty (DictPointer, "ResetValue");
|
||||
if (Prop) {
|
||||
gSettings.ResetVal = (UINT8)GetPropertyInteger (Prop, gSettings.ResetVal);
|
||||
DBG ("ResetVal: 0x%X\n", gSettings.ResetVal);
|
||||
DBG ("ResetVal: 0x%hhX\n", gSettings.ResetVal);
|
||||
}
|
||||
//other known pair is 0x0CF9/0x06. What about 0x92/0x01 ?
|
||||
|
||||
@ -5869,7 +5869,7 @@ GetUserSettings(
|
||||
gSettings.CpuType = GetAdvancedCpuType();
|
||||
if (Prop != NULL) {
|
||||
gSettings.CpuType = (UINT16)GetPropertyInteger (Prop, gSettings.CpuType);
|
||||
DBG ("CpuType: %X\n", gSettings.CpuType);
|
||||
DBG ("CpuType: %hX\n", gSettings.CpuType);
|
||||
}
|
||||
|
||||
Prop = GetProperty (DictPointer, "QEMU");
|
||||
@ -6250,7 +6250,7 @@ CHAR8 *GetOSVersion(IN LOADER_ENTRY *Entry)
|
||||
if (!EFI_ERROR (Status) && PlistBuffer != NULL && ParseXML (PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||
Prop = GetProperty (Dict, "Kernel Flags");
|
||||
if (Prop != NULL && Prop->string != NULL && Prop->string[0] != '\0') {
|
||||
if (AsciiStrStr (Prop->string, "Install%20OS%20X%20Mavericks.app")) {
|
||||
if (AsciiStrStr (Prop->string, "Install%20OS%20hhX%20Mavericks.app")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (5, "10.9");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20macOS%20Catalina") || AsciiStrStr (Prop->string, "Install%20macOS%2010.15")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.15");
|
||||
@ -6258,15 +6258,15 @@ CHAR8 *GetOSVersion(IN LOADER_ENTRY *Entry)
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.14");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20macOS%20High%20Sierra") || AsciiStrStr (Prop->string, "Install%20macOS%2010.13")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.13");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20macOS%20Sierra") || AsciiStrStr (Prop->string, "Install%20OS%20X%2010.12")) {
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20macOS%20Sierra") || AsciiStrStr (Prop->string, "Install%20OS%20hhX%2010.12")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.12");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20X%20El%20Capitan") || AsciiStrStr (Prop->string, "Install%20OS%20X%2010.11")) {
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20hhX%20El%20Capitan") || AsciiStrStr (Prop->string, "Install%20OS%20hhX%2010.11")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.11");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20X%20Yosemite") || AsciiStrStr (Prop->string, "Install%20OS%20X%2010.10")) {
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20hhX%20Yosemite") || AsciiStrStr (Prop->string, "Install%20OS%20hhX%2010.10")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (6, "10.10");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20X%20Mountain%20Lion")) {
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20OS%20hhX%20Mountain%20Lion")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (5, "10.8");
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20Mac%20OS%20X%20Lion")) {
|
||||
} else if (AsciiStrStr (Prop->string, "Install%20Mac%20OS%20hhX%20Lion")) {
|
||||
OSVersion = (__typeof__(OSVersion))AllocateCopyPool (5, "10.7");
|
||||
}
|
||||
}
|
||||
@ -6655,7 +6655,7 @@ GetDevices ()
|
||||
&Pci
|
||||
);
|
||||
|
||||
DBG ("PCI (%02llX|%02llX:%02llX.%02llX) : %04X %04X class=%02X%02X%02X\n",
|
||||
DBG ("PCI (%02llX|%02llX:%02llX.%02llX) : %04hX %04hX class=%02hhX%02hhX%02hhX\n",
|
||||
Segment,
|
||||
Bus,
|
||||
Device,
|
||||
@ -6796,7 +6796,7 @@ GetDevices ()
|
||||
NULL) //NULL: get from generic lists
|
||||
);
|
||||
|
||||
DBG(" - GFX: Model=%s family %X (%s)\n", gfx->Model, gfx->Family, CardFamily);
|
||||
DBG(" - GFX: Model=%s family %hX (%s)\n", gfx->Model, gfx->Family, CardFamily);
|
||||
gfx->Ports = 0;
|
||||
|
||||
SlotDevice = &SlotDevices[1];
|
||||
@ -7146,7 +7146,7 @@ SetDevices (LOADER_ENTRY *Entry)
|
||||
if (gSettings.InjectIntel) {
|
||||
TmpDirty = setup_gma_devprop(Entry, &PCIdevice);
|
||||
StringDirty |= TmpDirty;
|
||||
MsgLog ("Intel GFX revision = 0x%X\n", PCIdevice.revision);
|
||||
MsgLog ("Intel GFX revision = 0x%hhX\n", PCIdevice.revision);
|
||||
} else {
|
||||
MsgLog ("Intel GFX injection not set\n");
|
||||
}
|
||||
@ -7708,7 +7708,7 @@ SetDevices (LOADER_ENTRY *Entry)
|
||||
{
|
||||
if (gSettings.LpcTune) {
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint16, GEN_PMCON_1, 1, &PmCon);
|
||||
MsgLog ("Initial PmCon value=%X\n", PmCon);
|
||||
MsgLog ("Initial PmCon value=%hX\n", PmCon);
|
||||
|
||||
if (gSettings.EnableC6) {
|
||||
PmCon |= 1 << 11;
|
||||
@ -7745,7 +7745,7 @@ SetDevices (LOADER_ENTRY *Entry)
|
||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint16, GEN_PMCON_1, 1, &PmCon);
|
||||
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint16,GEN_PMCON_1, 1, &PmCon);
|
||||
MsgLog ("Set PmCon value=%X\n", PmCon);
|
||||
MsgLog ("Set PmCon value=%hX\n", PmCon);
|
||||
|
||||
}
|
||||
Rcba = 0;
|
||||
|
@ -98,7 +98,7 @@ StartupSoundPlay(EFI_FILE *Dir, CONST CHAR16* SoundFile)
|
||||
return Status;
|
||||
}
|
||||
AllocAsPage = TRUE;
|
||||
MsgLog(" Channels: %u Sample rate: %u Hz Bits: %u\n", WaveData.Format->Channels, WaveData.Format->SamplesPerSec, WaveData.Format->BitsPerSample);
|
||||
MsgLog(" Channels: %hu Sample rate: %u Hz Bits: %hu\n", WaveData.Format->Channels, WaveData.Format->SamplesPerSec, WaveData.Format->BitsPerSample);
|
||||
|
||||
EFI_AUDIO_IO_PROTOCOL_BITS bits;
|
||||
switch (WaveData.Format->BitsPerSample) {
|
||||
|
@ -157,13 +157,13 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
|
||||
|
||||
cpu_noninteger_bus_ratio = ((AsmReadMsr64(MSR_IA32_PERF_STATUS) & (1ULL << 46)) != 0)?1:0;
|
||||
initial.Control.Control = (UINT16)AsmReadMsr64(MSR_IA32_PERF_STATUS);
|
||||
DBG("Initial control=0x%X\n", initial.Control.Control);
|
||||
DBG("Initial control=0x%hX\n", initial.Control.Control);
|
||||
|
||||
maximum.Control.Control = (RShiftU64(AsmReadMsr64(MSR_IA32_PERF_STATUS), 32) & 0x1F3F) | (0x4000 * cpu_noninteger_bus_ratio);
|
||||
DBG("Maximum control=0x%X\n", maximum.Control.Control);
|
||||
DBG("Maximum control=0x%hX\n", maximum.Control.Control);
|
||||
if (gSettings.Turbo) {
|
||||
maximum.Control.VID_FID.FID++;
|
||||
MsgLog("Turbo FID=0x%X\n", maximum.Control.VID_FID.FID);
|
||||
MsgLog("Turbo FID=0x%hhX\n", maximum.Control.VID_FID.FID);
|
||||
}
|
||||
MsgLog("UnderVoltStep=%d\n", gSettings.UnderVoltStep);
|
||||
MsgLog("PLimitDict=%d\n", gSettings.PLimitDict);
|
||||
@ -276,12 +276,12 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
|
||||
}
|
||||
|
||||
realMax = maximum.Control.Control;
|
||||
DBG("Maximum control=0x%X\n", realMax);
|
||||
DBG("Maximum control=0x%hX\n", realMax);
|
||||
if (gSettings.Turbo) {
|
||||
realTurbo = (gCPUStructure.Turbo4 > gCPUStructure.Turbo1) ?
|
||||
(gCPUStructure.Turbo4 / 10) : (gCPUStructure.Turbo1 / 10);
|
||||
maximum.Control.Control = realTurbo;
|
||||
MsgLog("Turbo control=0x%X\n", realTurbo);
|
||||
MsgLog("Turbo control=0x%hX\n", realTurbo);
|
||||
}
|
||||
Apsn = (realTurbo > realMax)?(realTurbo - realMax):0;
|
||||
realMin = RShiftU64(AsmReadMsr64(MSR_PLATFORM_INFO), 40) & 0xff;
|
||||
@ -292,7 +292,7 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
|
||||
minimum.Control.Control = realMin;
|
||||
}
|
||||
|
||||
MsgLog("P-States: min 0x%X, max 0x%X\n", minimum.Control.Control, maximum.Control.Control);
|
||||
MsgLog("P-States: min 0x%hX, max 0x%hX\n", minimum.Control.Control, maximum.Control.Control);
|
||||
|
||||
// Sanity check
|
||||
if (maximum.Control.Control < minimum.Control.Control) {
|
||||
|
@ -1607,7 +1607,7 @@ BOOLEAN validate_rom(option_rom_header_t *rom_header, pci_dt_t *pci_dev)
|
||||
option_rom_pci_header_t *rom_pci_header;
|
||||
|
||||
if (rom_header->signature != 0xaa55) {
|
||||
DBG("invalid ROM signature %X\n", rom_header->signature);
|
||||
DBG("invalid ROM signature %hX\n", rom_header->signature);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1619,7 +1619,7 @@ BOOLEAN validate_rom(option_rom_header_t *rom_header, pci_dt_t *pci_dev)
|
||||
}
|
||||
|
||||
if (rom_pci_header->vendor_id != pci_dev->vendor_id || rom_pci_header->device_id != pci_dev->device_id){
|
||||
DBG("invalid ROM vendor=%04X deviceID=%04X\n", rom_pci_header->vendor_id, rom_pci_header->device_id);
|
||||
DBG("invalid ROM vendor=%04hX deviceID=%04hX\n", rom_pci_header->vendor_id, rom_pci_header->device_id);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1633,15 +1633,15 @@ BOOLEAN load_vbios_file(UINT16 vendor_id, UINT16 device_id)
|
||||
CHAR16 FileName[64];
|
||||
UINT8* buffer = 0;
|
||||
|
||||
snwprintf(FileName, 128, "\\ROM\\%04X_%04X.rom", vendor_id, device_id);
|
||||
snwprintf(FileName, 128, "\\ROM\\%04hX_%04hX.rom", vendor_id, device_id);
|
||||
if (FileExists(OEMDir, FileName)) {
|
||||
DBG("Found generic VBIOS ROM file (%04X_%04X.rom)\n", vendor_id, device_id);
|
||||
DBG("Found generic VBIOS ROM file (%04hX_%04hX.rom)\n", vendor_id, device_id);
|
||||
Status = egLoadFile(OEMDir, FileName, &buffer, &bufferLen);
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\%04X_%04X.rom", vendor_id, device_id);
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\%04hX_%04hX.rom", vendor_id, device_id);
|
||||
if (FileExists(SelfRootDir, FileName)){
|
||||
DBG("Found generic VBIOS ROM file (%04X_%04X.rom)\n", vendor_id, device_id);
|
||||
DBG("Found generic VBIOS ROM file (%04hX_%04hX.rom)\n", vendor_id, device_id);
|
||||
Status = egLoadFile(SelfRootDir, FileName, &buffer, &bufferLen);
|
||||
}
|
||||
}
|
||||
@ -1959,7 +1959,7 @@ static BOOLEAN init_card(pci_dt_t *pci_dev)
|
||||
}
|
||||
|
||||
if (!card->info || !card->info->device_id || !card->info->cfg_name) {
|
||||
DBG("Unsupported ATI card! Device ID: [%04X:%04X] Subsystem ID: [%08X] \n",
|
||||
DBG("Unsupported ATI card! Device ID: [%04hX:%04hX] Subsystem ID: [%08X] \n",
|
||||
pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys_id);
|
||||
DBG("search for brothers family\n");
|
||||
for (i = 0; radeon_cards[i].device_id ; i++) {
|
||||
@ -2157,7 +2157,7 @@ BOOLEAN setup_ati_devprop(LOADER_ENTRY *Entry, pci_dt_t *ati_dev)
|
||||
}
|
||||
|
||||
|
||||
DBG("ATI %s %s %dMB (%s) [%04X:%04X] (subsys [%04X:%04X]):: %s\n",
|
||||
DBG("ATI %s %s %dMB (%s) [%04hX:%04hX] (subsys [%04hX:%04hX]):: %s\n",
|
||||
chip_family_name[card->info->chip_family], card->info->model_name,
|
||||
(UINT32)RShiftU64(card->vram_size, 20), card->cfg_name,
|
||||
ati_dev->vendor_id, ati_dev->device_id,
|
||||
|
@ -290,17 +290,17 @@ CHAR8 *devprop_generate_string(DevPropString *StringBuf)
|
||||
if(!buffer)
|
||||
return NULL;
|
||||
|
||||
snprintf(buffer, len, "%08X%08X%04X%04X", SwapBytes32(StringBuf->length), StringBuf->WHAT2,
|
||||
snprintf(buffer, len, "%08X%08X%04hX%04hX", SwapBytes32(StringBuf->length), StringBuf->WHAT2,
|
||||
SwapBytes16(StringBuf->numentries), StringBuf->WHAT3);
|
||||
buffer += 24;
|
||||
|
||||
while(i < StringBuf->numentries) {
|
||||
UINT8 *dataptr = StringBuf->entries[i]->data;
|
||||
snprintf(buffer, len, "%08X%04X%04X", SwapBytes32(StringBuf->entries[i]->length),
|
||||
snprintf(buffer, len, "%08X%04hX%04hX", SwapBytes32(StringBuf->entries[i]->length),
|
||||
SwapBytes16(StringBuf->entries[i]->numentries), StringBuf->entries[i]->WHAT2); //FIXME: wrong buffer sizes!
|
||||
|
||||
buffer += 16;
|
||||
snprintf(buffer, len, "%02X%02X%04X%08X%08X", StringBuf->entries[i]->acpi_dev_path.type,
|
||||
snprintf(buffer, len, "%02hhX%02hhX%04hX%08X%08X", StringBuf->entries[i]->acpi_dev_path.type,
|
||||
StringBuf->entries[i]->acpi_dev_path.subtype,
|
||||
SwapBytes16(StringBuf->entries[i]->acpi_dev_path.length),
|
||||
SwapBytes32(StringBuf->entries[i]->acpi_dev_path._HID),
|
||||
@ -308,7 +308,7 @@ CHAR8 *devprop_generate_string(DevPropString *StringBuf)
|
||||
|
||||
buffer += 24;
|
||||
for(x = 0; x < StringBuf->entries[i]->num_pci_devpaths; x++) {
|
||||
snprintf(buffer, len, "%02X%02X%04X%02X%02X", StringBuf->entries[i]->pci_dev_path[x].type,
|
||||
snprintf(buffer, len, "%02hhX%02hhX%04hX%02hhX%02hhX", StringBuf->entries[i]->pci_dev_path[x].type,
|
||||
StringBuf->entries[i]->pci_dev_path[x].subtype,
|
||||
SwapBytes16(StringBuf->entries[i]->pci_dev_path[x].length),
|
||||
StringBuf->entries[i]->pci_dev_path[x].function,
|
||||
@ -316,13 +316,13 @@ CHAR8 *devprop_generate_string(DevPropString *StringBuf)
|
||||
buffer += 12;
|
||||
}
|
||||
|
||||
snprintf(buffer, len, "%02X%02X%04X", StringBuf->entries[i]->path_end.type,
|
||||
snprintf(buffer, len, "%02hhX%02hhX%04hX", StringBuf->entries[i]->path_end.type,
|
||||
StringBuf->entries[i]->path_end.subtype,
|
||||
SwapBytes16(StringBuf->entries[i]->path_end.length));
|
||||
|
||||
buffer += 8;
|
||||
for(x = 0; x < (StringBuf->entries[i]->length) - (24 + (6 * StringBuf->entries[i]->num_pci_devpaths)); x++) {
|
||||
snprintf(buffer, len, "%02X", *dataptr++);
|
||||
snprintf(buffer, len, "%02hhX", *dataptr++);
|
||||
buffer += 2;
|
||||
}
|
||||
i++;
|
||||
|
@ -989,7 +989,7 @@ BOOLEAN setup_gma_devprop(LOADER_ENTRY *Entry, pci_dt_t *gma_dev)
|
||||
}
|
||||
//DBG("Finally model=%s\n", model);
|
||||
|
||||
MsgLog("%s [%04X:%04X] :: %s\n",
|
||||
MsgLog("%s [%04hX:%04hX] :: %s\n",
|
||||
model, gma_dev->vendor_id, gma_dev->device_id, devicepath);
|
||||
|
||||
// Resolution
|
||||
@ -3387,7 +3387,7 @@ BOOLEAN setup_gma_devprop(LOADER_ENTRY *Entry, pci_dt_t *gma_dev)
|
||||
|
||||
|
||||
default:
|
||||
DBG(" Intel card id=%X unsupported, please report to the clover thread\n", gma_dev->device_id);
|
||||
DBG(" Intel card id=%hX unsupported, please report to the clover thread\n", gma_dev->device_id);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1245,7 +1245,7 @@ UINT64 GetPlistHexValue(CONST CHAR8 *Plist, CONST CHAR8 *Key, CONST CHAR8 *Whole
|
||||
/*
|
||||
if (DbgCount < 3) {
|
||||
AsciiStrnCpy(Buffer, IntTag, sizeof(Buffer) - 1);
|
||||
DBG(L"Found num: %X\n", NumValue);
|
||||
DBG(L"Found num: %hhX\n", NumValue);
|
||||
gBS->Stall(10000000);
|
||||
}
|
||||
DbgCount++;
|
||||
@ -1346,7 +1346,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
|
||||
/*if (DbgCount < 3
|
||||
|| DbgCount == 100 || DbgCount == 101 || DbgCount == 102
|
||||
) {
|
||||
DBG(L"\n\nKext: St = %X, Size = %X\n", KextAddr, KextSize);
|
||||
DBG(L"\n\nKext: St = %hhX, Size = %hhX\n", KextAddr, KextSize);
|
||||
DBG(L"Info: St = %p, End = %p\n%s\n", InfoPlistStart, InfoPlistEnd, InfoPlistStart);
|
||||
gBS->Stall(20000000);
|
||||
}
|
||||
@ -1403,7 +1403,7 @@ VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
|
||||
if (AsciiStrStr(PropName,"Driver-")) {
|
||||
// PropEntry _DeviceTreeBuffer is the value of Driver-XXXXXX property
|
||||
PropEntry = (_DeviceTreeBuffer*)(((UINT8*)PropIter->CurrentProperty) + sizeof(DeviceTreeNodeProperty));
|
||||
//if (DbgCount < 3) DBG(L"%s: paddr = %X, length = %X\n", PropName, PropEntry->paddr, PropEntry->length);
|
||||
//if (DbgCount < 3) DBG(L"%s: paddr = %hhX, length = %hhX\n", PropName, PropEntry->paddr, PropEntry->length);
|
||||
|
||||
// PropEntry->paddr points to _BooterKextFileInfo
|
||||
KextFileInfo = (_BooterKextFileInfo *)(UINTN)PropEntry->paddr;
|
||||
|
@ -1829,7 +1829,7 @@ static INT32 patch_nvidia_rom(UINT8 *rom)
|
||||
|
||||
// DBG("patch_nvidia_rom\n");
|
||||
if (!rom || (rom[0] != 0x55 && rom[1] != 0xaa)) {
|
||||
DBG("FALSE ROM signature: 0x%02X%02X\n", rom[0], rom[1]);
|
||||
DBG("FALSE ROM signature: 0x%02hhX%02hhX\n", rom[0], rom[1]);
|
||||
return PATCH_ROM_FAILED;
|
||||
}
|
||||
|
||||
@ -1874,7 +1874,7 @@ static INT32 patch_nvidia_rom(UINT8 *rom)
|
||||
return PATCH_ROM_FAILED;
|
||||
}
|
||||
} else {
|
||||
DBG("ERROR: dcbtable_version is 0x%X\n", dcbtable_version);
|
||||
DBG("ERROR: dcbtable_version is 0x%hhX\n", dcbtable_version);
|
||||
return PATCH_ROM_FAILED;
|
||||
}
|
||||
|
||||
@ -2260,32 +2260,32 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
|
||||
|
||||
if (load_vbios) {
|
||||
snwprintf(FileName, 128, "ROM\\10de_%04X_%04X_%04X.rom", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
snwprintf(FileName, 128, "ROM\\10de_%04hX_%04hX_%04hX.rom", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
|
||||
if (FileExists(OEMDir, FileName)) {
|
||||
DBG("Found specific VBIOS ROM file (10de_%04X_%04X_%04X.rom)\n", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
DBG("Found specific VBIOS ROM file (10de_%04hX_%04hX_%04hX.rom)\n", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
|
||||
Status = egLoadFile(OEMDir, FileName, &buffer, &bufferLen);
|
||||
} else {
|
||||
snwprintf(FileName, 128, "ROM\\10de_%04X.rom", nvda_dev->device_id);
|
||||
snwprintf(FileName, 128, "ROM\\10de_%04hX.rom", nvda_dev->device_id);
|
||||
if (FileExists(OEMDir, FileName)) {
|
||||
DBG("Found generic VBIOS ROM file (10de_%04X.rom)\n", nvda_dev->device_id);
|
||||
DBG("Found generic VBIOS ROM file (10de_%04hX.rom)\n", nvda_dev->device_id);
|
||||
|
||||
Status = egLoadFile(OEMDir, FileName, &buffer, &bufferLen);
|
||||
}
|
||||
}
|
||||
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\10de_%04X_%04X_%04X.rom", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\10de_%04hX_%04hX_%04hX.rom", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (FileExists(SelfRootDir, FileName)) {
|
||||
DBG("Found specific VBIOS ROM file (10de_%04X_%04X_%04X.rom)\n", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
DBG("Found specific VBIOS ROM file (10de_%04hX_%04hX_%04hX.rom)\n", nvda_dev->device_id, nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id);
|
||||
|
||||
Status = egLoadFile(SelfRootDir, FileName, &buffer, &bufferLen);
|
||||
} else {
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\10de_%04X.rom", nvda_dev->device_id);
|
||||
snwprintf(FileName, 128, "\\EFI\\CLOVER\\ROM\\10de_%04hX.rom", nvda_dev->device_id);
|
||||
|
||||
if (FileExists(SelfRootDir, FileName)) {
|
||||
DBG("Found generic VBIOS ROM file (10de_%04X.rom)\n", nvda_dev->device_id);
|
||||
DBG("Found generic VBIOS ROM file (10de_%04hX.rom)\n", nvda_dev->device_id);
|
||||
|
||||
Status = egLoadFile(SelfRootDir, FileName, &buffer, &bufferLen);
|
||||
}
|
||||
@ -2298,7 +2298,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
// PRAMIN first
|
||||
read_nVidia_PRAMIN(nvda_dev, rom, nvCardType);
|
||||
|
||||
//DBG("%X%X\n", rom[0], rom[1]);
|
||||
//DBG("%hhX%hhX\n", rom[0], rom[1]);
|
||||
rom_pci_header = NULL;
|
||||
|
||||
if (rom[0] != 0x55 || rom[1] != 0xaa) {
|
||||
@ -2317,7 +2317,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
//DBG("buffer->size: %d\n", bufferLen);
|
||||
i = 0;
|
||||
while (i < bufferLen) {
|
||||
//DBG("%X%X\n", buffer[i], buffer[i+1]);
|
||||
//DBG("%hhX%hhX\n", buffer[i], buffer[i+1]);
|
||||
if (buffer[i] == 0x55 && buffer[i+1] == 0xaa) {
|
||||
DBG(" header found at: %llu\n", i);
|
||||
bufferLen -= i;
|
||||
@ -2395,7 +2395,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
}
|
||||
|
||||
DBG("nVidia %s ", model);
|
||||
DBG(" %dMB NV%02X [%04X:%04X] :: %s => device #%d\n", (UINT32)(RShiftU64(videoRam, 20)),
|
||||
DBG(" %dMB NV%02hX [%04hX:%04hX] :: %s => device #%d\n", (UINT32)(RShiftU64(videoRam, 20)),
|
||||
nvCardType, nvda_dev->vendor_id, nvda_dev->device_id,
|
||||
devicepath, devices_number);
|
||||
|
||||
@ -2454,7 +2454,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
|
||||
if (gSettings.FakeNVidia) {
|
||||
UINT32 FakeID = gSettings.FakeNVidia >> 16;
|
||||
DBG("NVidia: FakeID %X:%X\n",gSettings.FakeNVidia & 0xFFFF, FakeID);
|
||||
DBG("NVidia: FakeID %X:%X\n",gSettings.FakeNVidia & 0xFFFF, FakeID);
|
||||
devprop_add_value(device, "device-id", (UINT8*)&FakeID, 4);
|
||||
FakeID = gSettings.FakeNVidia & 0xFFFF;
|
||||
devprop_add_value(device, "vendor-id", (UINT8*)&FakeID, 4);
|
||||
@ -2462,7 +2462,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
|
||||
if (gSettings.NVCAP[0] != 0) {
|
||||
devprop_add_value(device, "NVCAP", &gSettings.NVCAP[0], NVCAP_LEN);
|
||||
DBG("set NVCAP: %02X%02X%02X%02X-%02X%02X%02X%02X-%02X%02X%02X%02X-%02X%02X%02X%02X-%02X%02X%02X%02X\n",
|
||||
DBG("set NVCAP: %02hhX%02hhX%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX\n",
|
||||
gSettings.NVCAP[0], gSettings.NVCAP[1], gSettings.NVCAP[2], gSettings.NVCAP[3],
|
||||
gSettings.NVCAP[4], gSettings.NVCAP[5], gSettings.NVCAP[6], gSettings.NVCAP[7],
|
||||
gSettings.NVCAP[8], gSettings.NVCAP[9], gSettings.NVCAP[10], gSettings.NVCAP[11],
|
||||
@ -2492,7 +2492,7 @@ BOOLEAN setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
// if not set this is default property
|
||||
devprop_add_value(device, "@0,AAPL,boot-display", (UINT8*)&boot_display, 4);
|
||||
}/* else {
|
||||
DBG("Nvidia: BootDisplay: %X\n", gSettings.BootDisplay);
|
||||
DBG("Nvidia: BootDisplay: %hhX\n", gSettings.BootDisplay);
|
||||
}*/
|
||||
|
||||
if (gSettings.UseIntelHDMI) {
|
||||
|
@ -683,7 +683,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag,UINT32* lenPtr)
|
||||
integer = (integer * 16) + (*val++ - 'a' + 10);
|
||||
}
|
||||
else {
|
||||
MsgLog("ParseTagInteger hex error (0x%X) in buffer %s\n", *val, buffer);
|
||||
MsgLog("ParseTagInteger hex error (0x%hhX) in buffer %s\n", *val, buffer);
|
||||
// getchar();
|
||||
FreeTag(tmpTag);
|
||||
return EFI_UNSUPPORTED;
|
||||
@ -700,7 +700,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag,UINT32* lenPtr)
|
||||
for (integer = 0; size > 0; size--) {
|
||||
if(*val) { // UGLY HACK, fix me.
|
||||
if (*val < '0' || *val > '9') {
|
||||
MsgLog("ParseTagInteger decimal error (0x%X) in buffer %s\n", *val, buffer);
|
||||
MsgLog("ParseTagInteger decimal error (0x%hhX) in buffer %s\n", *val, buffer);
|
||||
// getchar();
|
||||
FreeTag(tmpTag);
|
||||
return EFI_UNSUPPORTED;
|
||||
|
@ -1913,8 +1913,8 @@ VOID PatchTableType131()
|
||||
// Get Table Type131
|
||||
SmbiosTable = GetSmbiosTableFromType (EntryPoint, 131, 0);
|
||||
if (SmbiosTable.Raw != NULL) {
|
||||
MsgLog("Table 131 is present, CPUType=%X\n", SmbiosTable.Type131->ProcessorType);
|
||||
MsgLog("Change to: %X\n", gSettings.CpuType);
|
||||
MsgLog("Table 131 is present, CPUType=%hX\n", SmbiosTable.Type131->ProcessorType);
|
||||
MsgLog("Change to: %hX\n", gSettings.CpuType);
|
||||
}
|
||||
|
||||
ZeroMem((VOID*)newSmbiosTable.Type131, MAX_TABLE_SIZE);
|
||||
@ -1937,8 +1937,8 @@ VOID PatchTableType132()
|
||||
// Get Table Type132
|
||||
SmbiosTable = GetSmbiosTableFromType (EntryPoint, 132, 0);
|
||||
if (SmbiosTable.Raw != NULL) {
|
||||
MsgLog("Table 132 is present, QPI=%X\n", SmbiosTable.Type132->ProcessorBusSpeed);
|
||||
MsgLog("Change to: %X\n", gSettings.QPI);
|
||||
MsgLog("Table 132 is present, QPI=%hX\n", SmbiosTable.Type132->ProcessorBusSpeed);
|
||||
MsgLog("Change to: %hX\n", gSettings.QPI);
|
||||
}
|
||||
|
||||
ZeroMem((VOID*)newSmbiosTable.Type132, MAX_TABLE_SIZE);
|
||||
@ -2066,7 +2066,7 @@ EFI_STATUS PrepatchSmbios()
|
||||
GetTableType16();
|
||||
GetTableType17();
|
||||
GetTableType32(); //get BootStatus here to decide what to do
|
||||
MsgLog("Boot status=%X\n", gBootStatus);
|
||||
MsgLog("Boot status=%hhX\n", gBootStatus);
|
||||
//for example the bootloader may go to Recovery is BootStatus is Fail
|
||||
return Status;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ UINT8 smb_read_byte(UINT32 base, UINT8 adr, UINT16 cmd)
|
||||
DivU64x32(gCPUStructure.TSCFrequency, 1000),
|
||||
0);
|
||||
if (t > 5) {
|
||||
DBG("host is busy for too long for byte %2X:%d!\n", adr, cmd);
|
||||
DBG("host is busy for too long for byte %2hhX:%d!\n", adr, cmd);
|
||||
return 0xFF; // break
|
||||
}
|
||||
}
|
||||
@ -223,16 +223,16 @@ UINT8 smb_read_byte(UINT32 base, UINT8 adr, UINT16 cmd)
|
||||
t = DivU64x64Remainder((t2 - t1), DivU64x32(gCPUStructure.TSCFrequency, 1000), 0);
|
||||
/*
|
||||
if (c != p) {
|
||||
DBG("%02d %02X spd page change status %2X\n", t, cmd, c);
|
||||
DBG("%02d %02hhX spd page change status %2hhX\n", t, cmd, c);
|
||||
p = c;
|
||||
}
|
||||
*/
|
||||
if (c & 4) {
|
||||
DBG("spd page change error for byte %2X:%d!\n", adr, cmd);
|
||||
DBG("spd page change error for byte %2hhX:%d!\n", adr, cmd);
|
||||
break;
|
||||
}
|
||||
if (t > 5) {
|
||||
DBG("spd page change taking too long for byte %2X:%d!\n", adr, cmd);
|
||||
DBG("spd page change taking too long for byte %2hhX:%d!\n", adr, cmd);
|
||||
break; // break after 5ms
|
||||
}
|
||||
}
|
||||
@ -251,18 +251,18 @@ UINT8 smb_read_byte(UINT32 base, UINT8 adr, UINT16 cmd)
|
||||
t = DivU64x64Remainder((t2 - t1), DivU64x32(gCPUStructure.TSCFrequency, 1000), 0);
|
||||
/*
|
||||
if (c != p) {
|
||||
DBG("%02d %02X spd read status %2X\n", t, cmd, c);
|
||||
DBG("%02d %02hhX spd read status %2hhX\n", t, cmd, c);
|
||||
p = c;
|
||||
}
|
||||
*/
|
||||
if (c & 4) {
|
||||
// This alway happens when trying to read the memory type (cmd 2) of an empty slot
|
||||
// DBG("spd byte read error for byte %2X:%d!\n", adr, cmd);
|
||||
// DBG("spd byte read error for byte %2hhX:%d!\n", adr, cmd);
|
||||
break;
|
||||
}
|
||||
if (t > 5) {
|
||||
// if (cmd != 2)
|
||||
DBG("spd byte read taking too long for byte %2X:%d!\n", adr, cmd);
|
||||
DBG("spd byte read taking too long for byte %2hhX:%d!\n", adr, cmd);
|
||||
break; // break after 5ms
|
||||
}
|
||||
}
|
||||
@ -316,7 +316,7 @@ VOID init_spd(UINT16* spd_indexes, UINT8* spd, UINT32 base, UINT8 slot)
|
||||
DBG("Reading entire spd data\n");
|
||||
for (i = 0; i < 512; i++) {
|
||||
UINT8 b = smb_read_byte(base, 0x50 + slot, i);
|
||||
DBG("%02X", b);
|
||||
DBG("%02hhX", b);
|
||||
}
|
||||
DBG(".\n");
|
||||
#endif
|
||||
@ -338,7 +338,7 @@ CONST CHAR8* getVendorName(RAM_SLOT_INFO* slot, UINT8 *spd, UINT32 base, UINT8 s
|
||||
testbit = bank;
|
||||
for (INTN i=6; i >= 0; i--) { parity ^= (testbit <<= 1); }
|
||||
if ( (parity & 0x80) == 0 ) {
|
||||
DBG("Bad parity bank=0x%2X code=0x%2X\n", bank, code);
|
||||
DBG("Bad parity bank=0x%2hhX code=0x%2hhX\n", bank, code);
|
||||
}
|
||||
bank &= 0x7f;
|
||||
for (UINTN i=0; i < VEN_MAP_SIZE; i++) {
|
||||
@ -346,7 +346,7 @@ CONST CHAR8* getVendorName(RAM_SLOT_INFO* slot, UINT8 *spd, UINT32 base, UINT8 s
|
||||
return vendorMap[i].name;
|
||||
}
|
||||
}
|
||||
DBG("Unknown vendor bank=0x%2X code=0x%2X\n", bank, code);
|
||||
DBG("Unknown vendor bank=0x%2hhX code=0x%2hhX\n", bank, code);
|
||||
} else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3) { // DDR3
|
||||
bank = spd[SPD_DDR3_MEMORY_BANK]; // constructors like Patriot use b7=1
|
||||
code = spd[SPD_DDR3_MEMORY_CODE];
|
||||
@ -354,7 +354,7 @@ CONST CHAR8* getVendorName(RAM_SLOT_INFO* slot, UINT8 *spd, UINT32 base, UINT8 s
|
||||
testbit = bank;
|
||||
for (INTN i=6; i >= 0; i--) { parity ^= (testbit <<= 1); }
|
||||
if ( (parity & 0x80) == 0 ) {
|
||||
DBG("Bad parity bank=0x%2X code=0x%2X\n", bank, code);
|
||||
DBG("Bad parity bank=0x%2hhX code=0x%2hhX\n", bank, code);
|
||||
}
|
||||
bank &= 0x7f;
|
||||
|
||||
@ -542,12 +542,12 @@ CHAR8* getDDRSerial(UINT8* spd)
|
||||
CHAR8* asciiSerial; //[16];
|
||||
asciiSerial = (__typeof__(asciiSerial))AllocatePool(17);
|
||||
if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR4) { // DDR4
|
||||
snprintf(asciiSerial, 17, "%02X%02X%02X%02X%02X%02X%02X%02X", SMST(325) /*& 0x7*/, SLST(325), SMST(326), SLST(326), SMST(327), SLST(327), SMST(328), SLST(328));
|
||||
snprintf(asciiSerial, 17, "%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX", SMST(325) /*& 0x7*/, SLST(325), SMST(326), SLST(326), SMST(327), SLST(327), SMST(328), SLST(328));
|
||||
} else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3) { // DDR3
|
||||
snprintf(asciiSerial, 17, "%02X%02X%02X%02X%02X%02X%02X%02X", SMST(122) /*& 0x7*/, SLST(122), SMST(123), SLST(123), SMST(124), SLST(124), SMST(125), SLST(125));
|
||||
snprintf(asciiSerial, 17, "%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX", SMST(122) /*& 0x7*/, SLST(122), SMST(123), SLST(123), SMST(124), SLST(124), SMST(125), SLST(125));
|
||||
} else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR2 ||
|
||||
spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR) { // DDR2 or DDR
|
||||
snprintf(asciiSerial, 17, "%02X%02X%02X%02X%02X%02X%02X%02X", SMST(95) /*& 0x7*/, SLST(95), SMST(96), SLST(96), SMST(97), SLST(97), SMST(98), SLST(98));
|
||||
snprintf(asciiSerial, 17, "%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX", SMST(95) /*& 0x7*/, SLST(95), SMST(96), SLST(96), SMST(97), SLST(97), SMST(98), SLST(98));
|
||||
} else {
|
||||
AsciiStrCpyS(asciiSerial, 17, "0000000000000000");
|
||||
}
|
||||
@ -624,7 +624,7 @@ STATIC VOID read_smb(EFI_PCI_IO_PROTOCOL *PciIo, UINT16 vid, UINT16 did)
|
||||
&Command
|
||||
);
|
||||
|
||||
DBG("SMBus CmdReg: 0x%X\n", Command);
|
||||
DBG("SMBus CmdReg: 0x%hX\n", Command);
|
||||
|
||||
/*Status = */PciIo->Pci.Read (
|
||||
PciIo,
|
||||
@ -665,7 +665,7 @@ STATIC VOID read_smb(EFI_PCI_IO_PROTOCOL *PciIo, UINT16 vid, UINT16 did)
|
||||
);
|
||||
|
||||
|
||||
MsgLog("Scanning SMBus [%04X:%04X], mmio: 0x%X, ioport: 0x%X, hostc: 0x%X\n",
|
||||
MsgLog("Scanning SMBus [%04hX:%04hX], mmio: 0x%X, ioport: 0x%X, hostc: 0x%X\n",
|
||||
vid, did, mmio, base, hostc);
|
||||
|
||||
// needed at least for laptops
|
||||
@ -898,7 +898,7 @@ VOID ScanSPD()
|
||||
//SmBus controller has class = 0x0c0500
|
||||
if ((gPci.Hdr.ClassCode[2] == 0x0c) && (gPci.Hdr.ClassCode[1] == 5)
|
||||
&& (gPci.Hdr.ClassCode[0] == 0) && (gPci.Hdr.VendorId == 0x8086 || gPci.Hdr.VendorId == 0x10DE)) {
|
||||
DBG ("SMBus device : %04X %04X class=%02X%02X%02X status=%s\n",
|
||||
DBG ("SMBus device : %04hX %04hX class=%02hhX%02hhX%02hhX status=%s\n",
|
||||
gPci.Hdr.VendorId,
|
||||
gPci.Hdr.DeviceId,
|
||||
gPci.Hdr.ClassCode[2],
|
||||
|
@ -117,7 +117,7 @@ FixOwnership(VOID)
|
||||
IoWrite16 (PortBase, 0);
|
||||
}
|
||||
|
||||
MsgLog("USB UHCI reset for device %04X\n", Pci.Hdr.DeviceId);
|
||||
MsgLog("USB UHCI reset for device %04hX\n", Pci.Hdr.DeviceId);
|
||||
break;
|
||||
/* case PCI_IF_OHCI:
|
||||
|
||||
@ -127,7 +127,7 @@ FixOwnership(VOID)
|
||||
Command = *(UINT32 *)(UINTN)(Base + OHCI_CONTROL);
|
||||
*(UINT32 *)(UINTN)(Base + OHCI_CONTROL) = Command & OHCI_CTRL_MASK;
|
||||
Command = *(UINT32 *)(UINTN)(Base + OHCI_CONTROL);
|
||||
MsgLog("USB OHCI reset for device %04X control=0x%X\n", Pci.Hdr.DeviceId, Command);
|
||||
MsgLog("USB OHCI reset for device %04hhX control=0x%hhX\n", Pci.Hdr.DeviceId, Command);
|
||||
break;*/
|
||||
case PCI_IF_EHCI:
|
||||
//Slice - the algo is reworked from Chameleon
|
||||
@ -282,7 +282,7 @@ FixOwnership(VOID)
|
||||
Status = EFI_NOT_FOUND; //Slice - why? :)
|
||||
break;
|
||||
}
|
||||
MsgLog("USB EHCI Ownership for device %04X value=%X\n", Pci.Hdr.DeviceId, Value);
|
||||
MsgLog("USB EHCI Ownership for device %04hX value=%X\n", Pci.Hdr.DeviceId, Value);
|
||||
|
||||
break;
|
||||
case PCI_IF_XHCI:
|
||||
|
@ -1543,7 +1543,7 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex,
|
||||
if (Custom->Options != NULL) {
|
||||
DBG("Options:\"%ls\" ", Custom->Options);
|
||||
}
|
||||
DBG("Type:%d Flags:0x%X matching ", Custom->Type, Custom->Flags);
|
||||
DBG("Type:%d Flags:0x%hhX matching ", Custom->Type, Custom->Flags);
|
||||
if (Custom->Volume) {
|
||||
DBG("Volume:\"%ls\"\n", Custom->Volume);
|
||||
} else {
|
||||
|
@ -607,7 +607,7 @@ STATIC VOID *CreateImageSignatureDatabase(IN VOID *FileBuffer,
|
||||
HashPtr = (UINT8 *)(&(PeHeader.Pe32Plus->OptionalHeader.CheckSum));
|
||||
} else {
|
||||
// Invalid image
|
||||
DBG("Invalid image: 0x%X (0x%X)\n", FileBuffer, FileSize);
|
||||
DBG("Invalid image: 0x%hhX (0x%hhX)\n", FileBuffer, FileSize);
|
||||
return NULL;
|
||||
}
|
||||
HashSize = (UINTN)(HashPtr - HashBase);
|
||||
@ -795,7 +795,7 @@ VOID *GetImageSignatureDatabase(IN VOID *FileBuffer,
|
||||
// PE32+
|
||||
SecDataDir = (EFI_IMAGE_DATA_DIRECTORY *)&(PeHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY]);
|
||||
}
|
||||
DBG("Get image database: 0x%X (0x%X) 0x%X 0x%X 0x%X (0x%X)\n", FileBuffer, FileSize, SecDataDir, SecDataDir->VirtualAddress, ((UINT8 *)FileBuffer) + SecDataDir->VirtualAddress, SecDataDir->Size);
|
||||
DBG("Get image database: 0x%hhX (0x%hhX) 0x%hhX 0x%hhX 0x%hhX (0x%hhX)\n", FileBuffer, FileSize, SecDataDir, SecDataDir->VirtualAddress, ((UINT8 *)FileBuffer) + SecDataDir->VirtualAddress, SecDataDir->Size);
|
||||
// Check the security data directory is found and valid
|
||||
if ((SecDataDir->VirtualAddress >= FileSize) || ((SecDataDir->VirtualAddress + SecDataDir->Size) > FileSize)) {
|
||||
DBG("Security directory exceeds the file limits\n");
|
||||
@ -824,7 +824,7 @@ VOID *GetImageSignatureDatabase(IN VOID *FileBuffer,
|
||||
if (Alignment != 0) {
|
||||
Alignment = SECDIR_ALIGNMENT_SIZE - Alignment;
|
||||
}
|
||||
DBG("Embedded certificate: 0x%X (0x%X) [0x%X]\n", Cert, Length, Cert->wCertificateType);
|
||||
DBG("Embedded certificate: 0x%hhX (0x%hhX) [0x%hhX]\n", Cert, Length, Cert->wCertificateType);
|
||||
// Get the certificate's type
|
||||
if (Cert->wCertificateType == WIN_CERT_TYPE_PKCS_SIGNED_DATA) {
|
||||
// PKCS#7
|
||||
@ -862,19 +862,19 @@ VOID *GetImageSignatureDatabase(IN VOID *FileBuffer,
|
||||
}
|
||||
// Append the signature if valid
|
||||
if ((SigGuid != NULL) && (Signature != NULL) && (SigSize > 0)) {
|
||||
DBG("Found signature certificate: 0x%X (0x%X) %s\n", Signature, SigSize, strguid(SigGuid));
|
||||
DBG("Found signature certificate: 0x%hhX (0x%hhX) %s\n", Signature, SigSize, strguid(SigGuid));
|
||||
if (EFI_ERROR(AppendSignatureToDatabase(&Database, &Size, SigGuid, Signature, SigSize))) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
DBG("Skipping non-signature certificate: 0x%X (0x%X) [0x%X]\n", Cert, Length, Cert->wCertificateType);
|
||||
DBG("Skipping non-signature certificate: 0x%hhX (0x%hhX) [0x%hhX]\n", Cert, Length, Cert->wCertificateType);
|
||||
}
|
||||
// Advance to next certificate
|
||||
Ptr += (Length + Alignment);
|
||||
}
|
||||
// Check if there is some sort of corruption
|
||||
if (Ptr != End) {
|
||||
DBG("Failed to retrieve image database: 0x%X - 0x%X @ 0x%X\n", (((UINT8 *)FileBuffer) + SecDataDir->VirtualAddress), End, Ptr);
|
||||
DBG("Failed to retrieve image database: 0x%hhX - 0x%hhX @ 0x%hhX\n", (((UINT8 *)FileBuffer) + SecDataDir->VirtualAddress), End, Ptr);
|
||||
// Don't return anything if not at end
|
||||
if (Database != NULL) {
|
||||
FreePool(Database);
|
||||
|
@ -389,7 +389,7 @@ EFI_STATUS SetSignedVariable(IN CHAR16 *DatabaseName,
|
||||
if ((DatabaseName == NULL) || (DatabaseGuid == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
DBG("Setting secure variable: %s %ls 0x%X (0x%X)\n", strguid(DatabaseGuid), DatabaseName, Database, DatabaseSize);
|
||||
DBG("Setting secure variable: %s %ls 0x%hhX (0x%hhX)\n", strguid(DatabaseGuid), DatabaseName, Database, DatabaseSize);
|
||||
NameLen = StrLen(DatabaseName);
|
||||
if (NameLen == 0) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@ -488,7 +488,7 @@ EFI_STATUS SetSignedVariable(IN CHAR16 *DatabaseName,
|
||||
} else {
|
||||
CopyMem(((UINT8 *)Authentication) + sizeof(EFI_TIME) + sizeof(EFI_GUID) + sizeof(UINT32) + sizeof(UINT16) + sizeof(UINT16), Database, DatabaseSize); //Payload, PayloadSize);
|
||||
}
|
||||
DBG("Writing secure variable 0x%X (0x%X) ...\n", Authentication, Size);
|
||||
DBG("Writing secure variable 0x%hhX (0x%hhX) ...\n", Authentication, Size);
|
||||
// Write the database variable
|
||||
Status = gRT->SetVariable(DatabaseName, DatabaseGuid, SET_DATABASE_ATTRIBUTES, Size, Authentication);
|
||||
// Cleanup the authentication buffer
|
||||
|
@ -2825,7 +2825,7 @@ static void nsvg__parseText(NSVGparser* p, const char** dict)
|
||||
nsvg__parseAttr(p, dict[i], dict[i + 1]);
|
||||
}
|
||||
}
|
||||
DBG("text: x=%f y=%f attr:Style=%X, size=%f, id=%s\n", x, y, attr->fontFace->fontStyle, attr->fontFace->fontSize, attr->id);
|
||||
DBG("text: x=%f y=%f attr:Style=%hhX, size=%f, id=%s\n", x, y, attr->fontFace->fontStyle, attr->fontFace->fontSize, attr->id);
|
||||
text->x = x;
|
||||
text->y = y;
|
||||
text->fontSize = attr->fontFace->fontSize;
|
||||
|
@ -460,7 +460,7 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
|
||||
Volume->HasBootCode = TRUE; //we assume that all CD are bootable
|
||||
/* DBG("check SectorBuffer\n");
|
||||
for (i=0; i<32; i++) {
|
||||
DBG("%2X ", SectorBuffer[i]);
|
||||
DBG("%2hhX ", SectorBuffer[i]);
|
||||
}
|
||||
DBG("\n"); */
|
||||
VCrc32 = GetCrc32(SectorBuffer, 512 * 2);
|
||||
@ -479,7 +479,7 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DBG("Volume kind=%ls CRC=0x%X\n", kind, VCrc32); */
|
||||
DBG("Volume kind=%ls CRC=0x%hhX\n", kind, VCrc32); */
|
||||
if (Volume->DiskKind == DISK_KIND_OPTICAL) { //CDROM
|
||||
CHAR8* p = (CHAR8*)&SectorBuffer[8];
|
||||
while (*p == 0x20) {
|
||||
@ -879,7 +879,7 @@ static EFI_STATUS ScanVolume(IN OUT REFIT_VOLUME *Volume)
|
||||
// look at the BlockIO protocol
|
||||
Status = gBS->HandleProtocol(WholeDiskHandle, &gEfiBlockIoProtocolGuid, (VOID **) &Volume->WholeDiskBlockIO);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
// DBG("WholeDiskBlockIO %X BlockSize=%d\n", Volume->WholeDiskBlockIO, Volume->WholeDiskBlockIO->Media->BlockSize);
|
||||
// DBG("WholeDiskBlockIO %hhX BlockSize=%d\n", Volume->WholeDiskBlockIO, Volume->WholeDiskBlockIO->Media->BlockSize);
|
||||
// check the media block size
|
||||
if (Volume->WholeDiskBlockIO->Media->BlockSize == 2048)
|
||||
Volume->DiskKind = DISK_KIND_OPTICAL;
|
||||
@ -1373,7 +1373,7 @@ BOOLEAN DeleteFile(IN EFI_FILE *Root, IN CONST CHAR16 *RelativePath)
|
||||
File->Close(File);
|
||||
return FALSE;
|
||||
}
|
||||
//DBG(" FileInfo attr: %X\n", FileInfo->Attribute);
|
||||
//DBG(" FileInfo attr: %hhX\n", FileInfo->Attribute);
|
||||
if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) == EFI_FILE_DIRECTORY) {
|
||||
// it's directory - return error
|
||||
//DBG(" File is DIR\n");
|
||||
@ -1692,7 +1692,7 @@ BOOLEAN DumpVariable(CHAR16* Name, EFI_GUID* Guid, INTN DevicePathAt)
|
||||
} else {
|
||||
DBG("%ls var size=%llu\n", Name, dataSize);
|
||||
for (i = 0; i < dataSize; i++) {
|
||||
DBG("%02X ", data[i]);
|
||||
DBG("%02hhX ", data[i]);
|
||||
}
|
||||
DBG("\n");
|
||||
if (DevicePathAt >= 0) {
|
||||
|
@ -201,7 +201,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(36);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 36, "0x%X", gSettings.BacklightLevel);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 36, "0x%hX", gSettings.BacklightLevel);
|
||||
InputItems[InputItemsCount].ItemType = Decimal; //19
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(16);
|
||||
@ -236,7 +236,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
InputItems[InputItemsCount++].BValue = gSettings.InjectNVidia;
|
||||
InputItems[InputItemsCount].ItemType = ASString; //22+6i
|
||||
for (j=0; j<8; j++) {
|
||||
snprintf((CHAR8*)&tmp[2*j], 3, "%02X", gSettings.Dcfg[j]);
|
||||
snprintf((CHAR8*)&tmp[2*j], 3, "%02hhX", gSettings.Dcfg[j]);
|
||||
}
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(40);
|
||||
@ -251,7 +251,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(20);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 26, "0x%08X", gSettings.IgPlatform);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 26, "0x%08X", gSettings.IgPlatform);
|
||||
// InputItemsCount += 3;
|
||||
// continue;
|
||||
}
|
||||
@ -269,7 +269,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (gGraphics[i].Vendor == Nvidia) {
|
||||
InputItems[InputItemsCount].ItemType = ASString; //24+6i
|
||||
for (j=0; j<20; j++) {
|
||||
snprintf((CHAR8*)&tmp[2*j], 3, "%02X", gSettings.NVCAP[j]);
|
||||
snprintf((CHAR8*)&tmp[2*j], 3, "%02hhX", gSettings.NVCAP[j]);
|
||||
}
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(84);
|
||||
@ -322,12 +322,12 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(16);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04X", gSettings.VendorEDID);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04hX", gSettings.VendorEDID);
|
||||
InputItems[InputItemsCount].ItemType = Decimal; //54
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(16);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04X", gSettings.ProductEDID);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04hX", gSettings.ProductEDID);
|
||||
|
||||
// ErmaC: NvidiaGeneric menu selector y/n
|
||||
InputItems[InputItemsCount].ItemType = BoolValue; //55
|
||||
@ -405,7 +405,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(16);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04X", gSettings.C3Latency);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 16, "0x%04hX", gSettings.C3Latency);
|
||||
InputItems[InputItemsCount].ItemType = Decimal; //76
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(16);
|
||||
@ -487,7 +487,7 @@ VOID FillInputs(BOOLEAN New)
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(26);
|
||||
}
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 26, "0x%08X", gSettings.FakeATI);
|
||||
snwprintf(InputItems[InputItemsCount++].SValue, 26, "0x%08X", gSettings.FakeATI);
|
||||
InputItems[InputItemsCount].ItemType = Hex; //95
|
||||
if (New) {
|
||||
InputItems[InputItemsCount].SValue = (__typeof__(InputItems[InputItemsCount].SValue))AllocateZeroPool(26);
|
||||
@ -1806,7 +1806,7 @@ REFIT_ABSTRACT_MENU_ENTRY *SubMenuAudio()
|
||||
SubScreen->AddMenuInfoLine_f("Choose options to tune the HDA devices");
|
||||
SubScreen->AddMenuInfoLine_f("Number of Audio Controller%s=%llu", ((NHDA!=1)?"s":""), NHDA);
|
||||
for (i = 0; i < NHDA; i++) {
|
||||
SubScreen->AddMenuInfoLine_f("%llu) %ls [%04X][%04X]",
|
||||
SubScreen->AddMenuInfoLine_f("%llu) %ls [%04hX][%04hX]",
|
||||
(i+1),
|
||||
gAudios[i].controller_name,
|
||||
gAudios[i].controller_vendor_id,
|
||||
@ -2139,7 +2139,7 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuBinaries()
|
||||
Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_BINARIES, "Binaries patching->");
|
||||
|
||||
SubScreen->AddMenuInfoLine_f("%s", gCPUStructure.BrandString);
|
||||
SubScreen->AddMenuInfoLine_f("Real CPUID: 0x%06X", gCPUStructure.Signature);
|
||||
SubScreen->AddMenuInfoLine_f("Real CPUID: 0x%06X", gCPUStructure.Signature);
|
||||
|
||||
|
||||
SubScreen->AddMenuItemInput(64, "Debug", FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user