]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
MdeModulePkg SmiHandlerProfile: Use fixed data type in data structure
[mirror_edk2.git] / MdeModulePkg / Application / SmiHandlerProfileInfo / SmiHandlerProfileInfo.c
index 338671374c727a1d4970b5a1f1571fa4a41f5901..96e9977aad0ce8322c02f59d3566c07227f3f49b 100644 (file)
@@ -348,9 +348,9 @@ DumpSmmLoadedImage(
     if (ImageStruct->Header.Signature == SMM_CORE_IMAGE_DATABASE_SIGNATURE) {\r
       NameString = GetDriverNameString (ImageStruct);\r
       Print(L"  <Image Name=\"%a\"", NameString);\r
-      Print(L" Base=\"0x%x\" Size=\"0x%x\"", ImageStruct->ImageBase, ImageStruct->ImageSize);\r
+      Print(L" Base=\"0x%lx\" Size=\"0x%lx\"", ImageStruct->ImageBase, ImageStruct->ImageSize);\r
       if (ImageStruct->EntryPoint != 0) {\r
-        Print(L" EntryPoint=\"0x%x\"", ImageStruct->EntryPoint);\r
+        Print(L" EntryPoint=\"0x%lx\"", ImageStruct->EntryPoint);\r
       }\r
       Print(L" FvFile=\"%g\"", &ImageStruct->FileGuid);\r
       Print(L" RefId=\"0x%x\"", ImageStruct->ImageRef);\r
@@ -540,7 +540,7 @@ DumpSmiChildContext (
   CHAR16        *Str;\r
 \r
   if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {\r
-    Print(L" SwSmi=\"0x%x\"", ((EFI_SMM_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);\r
+    Print(L" SwSmi=\"0x%lx\"", ((SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);\r
   } else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {\r
     Print(L" SxType=\"%a\"", SxTypeToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));\r
     Print(L" SxPhase=\"%a\"", SxPhaseToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));\r
@@ -609,14 +609,14 @@ DumpSmiHandler(
           Print(L"      <Pdb>%a</Pdb>\n", (UINT8 *)ImageStruct + ImageStruct->PdbStringOffset);\r
         }\r
         Print(L"      </Module>\n");\r
-        Print(L"      <Handler Address=\"0x%x\">\n", SmiHandlerStruct->Handler);\r
+        Print(L"      <Handler Address=\"0x%lx\">\n", SmiHandlerStruct->Handler);\r
         if (ImageStruct != NULL) {\r
-          Print(L"         <RVA>0x%x</RVA>\n", SmiHandlerStruct->Handler - ImageStruct->ImageBase);\r
+          Print(L"         <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->Handler - ImageStruct->ImageBase));\r
         }\r
         Print(L"      </Handler>\n", SmiHandlerStruct->Handler);\r
-        Print(L"      <Caller Address=\"0x%x\">\n", SmiHandlerStruct->CallerAddr);\r
+        Print(L"      <Caller Address=\"0x%lx\">\n", SmiHandlerStruct->CallerAddr);\r
         if (ImageStruct != NULL) {\r
-          Print(L"         <RVA>0x%x</RVA>\n", SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase);\r
+          Print(L"         <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase));\r
         }\r
         Print(L"      </Caller>\n", SmiHandlerStruct->Handler);\r
         SmiHandlerStruct = (VOID *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);\r