PrmPkg: Fix debug log format specifier for PhysicalAddress
The debug print incorrectly uses "%016x" to print a UINT64 PhysicalAddress. This can cause truncation since "%x" expects UINT32. Update the format specifier to "%016llx" to properly handle UINT64 values and ensure correct output across all architectures. Signed-off-by: Aaron Li <aaron.li@intel.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#string STR_PRMINFO_HANDLER_GUID #language en-US " Handler GUID: %g\r\n"
|
||||
#string STR_PRMINFO_HANDLER_NAME #language en-US " Handler Name: %a\r\n"
|
||||
#string STR_PRMINFO_HANDLER_NAME_HL #language en-US " Handler Name: %H%a%N\r\n"
|
||||
#string STR_PRMINFO_HANDLER_PA #language en-US " Handler Physical Address: 0x%016x\r\n"
|
||||
#string STR_PRMINFO_HANDLER_PA #language en-US " Handler Physical Address: 0x%016llx\r\n"
|
||||
#string STR_PRMINFO_HANDLER_ERR_STATUS #language en-US " Return Status: %E%r%N\r\n"
|
||||
#string STR_PRMINFO_HANDLER_SUCC_STATUS #language en-US " Return Status: %V%r%N\r\n"
|
||||
#string STR_PRMINFO_HANDLERS_FOUND #language en-US " %d PRM handlers found.\r\n"
|
||||
@@ -42,8 +42,8 @@
|
||||
#string STR_PRMINFO_NO_MMIO_RANGES #language en-US " No runtime MMIO ranges used by this module.\r\n"
|
||||
#string STR_PRMINFO_NO_STATIC_BUFFER #language en-US " This handler does not define a static data buffer.\r\n\r\n"
|
||||
#string STR_PRMINFO_RUNTIME_MMIO_COUNT #language en-US " Runtime MMIO Range Count: %d\r\n"
|
||||
#string STR_PRMINFO_RUNTIME_MMIO_INFO #language en-US " [%d]: Physical Base Address = 0x%016x\r\n Virtual Base Address = 0x%016x\r\n Length = 0x%x\r\n"
|
||||
#string STR_PRMINFO_STATIC_DATA_BUFFER #language en-US " Static Data Buffer: 0x%016x\r\n"
|
||||
#string STR_PRMINFO_RUNTIME_MMIO_INFO #language en-US " [%d]: Physical Base Address = 0x%016llx\r\n Virtual Base Address = 0x%016llx\r\n Length = 0x%x\r\n"
|
||||
#string STR_PRMINFO_STATIC_DATA_BUFFER #language en-US " Static Data Buffer: 0x%016llx\r\n"
|
||||
#string STR_PRMINFO_UNKNOWN #language en-US "Unknown"
|
||||
#string STR_PRMINFO_USECS #language en-US "%H%ld.%ld microseconds%N"
|
||||
#string STR_PRMINFO_NANO_SECS #language en-US "%H%ld nanoseconds%N"
|
||||
|
||||
@@ -87,7 +87,7 @@ SetRuntimeMemoryRangeAttributes (
|
||||
));
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
" %a %a: Physical address = 0x%016x. Length = 0x%x.\n",
|
||||
" %a %a: Physical address = 0x%016llx. Length = 0x%x.\n",
|
||||
_DBGMSGID_,
|
||||
__func__,
|
||||
RuntimeMmioRanges->Range[Index].PhysicalBaseAddress,
|
||||
@@ -144,7 +144,7 @@ SetRuntimeMemoryRangeAttributes (
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
" %a %a: Error [%r] finding descriptor for runtime memory range 0x%016x.\n",
|
||||
" %a %a: Error [%r] finding descriptor for runtime memory range 0x%016llx.\n",
|
||||
_DBGMSGID_,
|
||||
__func__,
|
||||
Status,
|
||||
@@ -171,7 +171,7 @@ SetRuntimeMemoryRangeAttributes (
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
" %a %a: Error [%r] setting descriptor for runtime memory range 0x%016x.\n",
|
||||
" %a %a: Error [%r] setting descriptor for runtime memory range 0x%016llx.\n",
|
||||
_DBGMSGID_,
|
||||
__func__,
|
||||
Status,
|
||||
|
||||
@@ -210,7 +210,7 @@ ProcessPrmModules (
|
||||
CurrentHandlerInfoStruct->PhysicalAddress = HandlerPhysicalAddress;
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
" %a %a: Found %a handler physical address at 0x%016x.\n",
|
||||
" %a %a: Found %a handler physical address at 0x%016llx.\n",
|
||||
_DBGMSGID_,
|
||||
__func__,
|
||||
CurrentExportDescriptorHandlerName,
|
||||
|
||||
Reference in New Issue
Block a user