diff options
author | Star Zeng <star.zeng@intel.com> | 2017-06-21 13:28:26 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-06-23 14:46:41 +0800 |
commit | c01f13d52a85f097e1cc6b194df1316a3ed24710 (patch) | |
tree | 084181708ca23698f005d4e2bc4b589de90bc57f /MdeModulePkg/Core/PiSmmCore | |
parent | b243ead0aa6b0ca904a5b3f30d31e2917dda360f (diff) | |
download | edk2-c01f13d52a85f097e1cc6b194df1316a3ed24710.tar.gz edk2-c01f13d52a85f097e1cc6b194df1316a3ed24710.tar.bz2 edk2-c01f13d52a85f097e1cc6b194df1316a3ed24710.zip |
MdeModulePkg: Enhance the debug message for InstallProtocolInterface
Current code is using debug message like below for
InstallProtocolInterface.
InstallProtocolInterface: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX XXX
User could not know whether the installation is failed or not by the
debug message, for example, the code below does not initialize Handle
before calling InstallProtocolInterface, EFI_INVALID_PARAMETER will be
returned.
EFI_HANDLE Handle;
Status = gBS->InstallProtocolInterface (
&Handle,
&XXX,
EFI_NATIVE_INTERFACE,
XXX
);
This patch is to add additional debug message if the installation
is failed and specific debug message for the case that the input
handle is invalid.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/Handle.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Handle.c b/MdeModulePkg/Core/PiSmmCore/Handle.c index 9cedb2aeb5..19faac8444 100644 --- a/MdeModulePkg/Core/PiSmmCore/Handle.c +++ b/MdeModulePkg/Core/PiSmmCore/Handle.c @@ -1,7 +1,7 @@ /** @file
SMM handle & protocol handling.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
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
@@ -287,11 +287,12 @@ SmmInstallProtocolInterfaceNotify ( // in the system
//
InsertTailList (&gHandleList, &Handle->AllHandles);
- }
-
- Status = SmmValidateHandle (Handle);
- if (EFI_ERROR (Status)) {
- goto Done;
+ } else {
+ Status = SmmValidateHandle (Handle);
+ if (EFI_ERROR (Status)) {
+ DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: input handle at 0x%x is invalid\n", Handle));
+ goto Done;
+ }
}
//
@@ -340,6 +341,7 @@ Done: if (Prot != NULL) {
FreePool (Prot);
}
+ DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: %g %p failed with %r\n", Protocol, Interface, Status));
}
return Status;
}
|