X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FApplication%2FSmiHandlerProfileInfo%2FSmiHandlerProfileInfo.c;h=0f7163160b4e9076d7fd0a64fb11a6c22d5ac2fe;hp=338671374c727a1d4970b5a1f1571fa4a41f5901;hb=9d510e61fceee7b92955ef9a3c20343752d8ce3f;hpb=8ced192d5cf1e8ccd56fa5daed2c2ca28fb04cff
diff --git a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
index 338671374c..0f7163160b 100644
--- a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
+++ b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
@@ -2,13 +2,7 @@
Shell application to dump SMI handler profile information.
Copyright (c) 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -22,7 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
-#include
#include
#include
#include
@@ -348,9 +341,9 @@ DumpSmmLoadedImage(
if (ImageStruct->Header.Signature == SMM_CORE_IMAGE_DATABASE_SIGNATURE) {
NameString = GetDriverNameString (ImageStruct);
Print(L" ImageBase, ImageStruct->ImageSize);
+ Print(L" Base=\"0x%lx\" Size=\"0x%lx\"", ImageStruct->ImageBase, ImageStruct->ImageSize);
if (ImageStruct->EntryPoint != 0) {
- Print(L" EntryPoint=\"0x%x\"", ImageStruct->EntryPoint);
+ Print(L" EntryPoint=\"0x%lx\"", ImageStruct->EntryPoint);
}
Print(L" FvFile=\"%g\"", &ImageStruct->FileGuid);
Print(L" RefId=\"0x%x\"", ImageStruct->ImageRef);
@@ -540,7 +533,7 @@ DumpSmiChildContext (
CHAR16 *Str;
if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {
- Print(L" SwSmi=\"0x%x\"", ((EFI_SMM_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);
+ Print(L" SwSmi=\"0x%lx\"", ((SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);
} else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {
Print(L" SxType=\"%a\"", SxTypeToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));
Print(L" SxPhase=\"%a\"", SxPhaseToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));
@@ -609,14 +602,14 @@ DumpSmiHandler(
Print(L" %a\n", (UINT8 *)ImageStruct + ImageStruct->PdbStringOffset);
}
Print(L" \n");
- Print(L" \n", SmiHandlerStruct->Handler);
+ Print(L" \n", SmiHandlerStruct->Handler);
if (ImageStruct != NULL) {
- Print(L" 0x%x\n", SmiHandlerStruct->Handler - ImageStruct->ImageBase);
+ Print(L" 0x%x\n", (UINTN) (SmiHandlerStruct->Handler - ImageStruct->ImageBase));
}
Print(L" \n", SmiHandlerStruct->Handler);
- Print(L" \n", SmiHandlerStruct->CallerAddr);
+ Print(L" \n", SmiHandlerStruct->CallerAddr);
if (ImageStruct != NULL) {
- Print(L" 0x%x\n", SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase);
+ Print(L" 0x%x\n", (UINTN) (SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase));
}
Print(L" \n", SmiHandlerStruct->Handler);
SmiHandlerStruct = (VOID *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);