diff options
author | Star Zeng <star.zeng@intel.com> | 2016-01-19 09:19:28 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2016-01-19 09:19:28 +0000 |
commit | 5d2afd44bbdc8e24f9d33865561cab93c36b8656 (patch) | |
tree | 0b380a118821f9e7a807b295c1bfb2f896659dfb /PerformancePkg/Dp_App | |
parent | a7bd6695c5b3e4c4d5daa0ba05cf6b518811fb8e (diff) | |
download | edk2-5d2afd44bbdc8e24f9d33865561cab93c36b8656.tar.gz edk2-5d2afd44bbdc8e24f9d33865561cab93c36b8656.tar.bz2 edk2-5d2afd44bbdc8e24f9d33865561cab93c36b8656.zip |
PerformancePkg Dp_App: Use Image->FilePath to get name for SMM drivers
This enhancement is to use the FilePath field in the loaded image
protocol to find the name of an image as a fallback for when the
loaded image device path protocol is not installed on the image handle.
This is necessary because the SMM core does not install the loaded
image device path protocol, so DP was displaying "Unknown Driver Name"
for every SMM driver.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19682 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'PerformancePkg/Dp_App')
-rw-r--r-- | PerformancePkg/Dp_App/DpUtilities.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/PerformancePkg/Dp_App/DpUtilities.c b/PerformancePkg/Dp_App/DpUtilities.c index ec5a524475..b49844a058 100644 --- a/PerformancePkg/Dp_App/DpUtilities.c +++ b/PerformancePkg/Dp_App/DpUtilities.c @@ -1,7 +1,7 @@ /** @file
Utility functions used by the Dp application.
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2016, 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
@@ -221,6 +221,9 @@ GetNameFromHandle ( CHAR8 *BestLanguage;
EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;
+ Image = NULL;
+ LoadedImageDevicePath = NULL;
+ DevicePath = NULL;
BestLanguage = NULL;
PlatformLanguage = NULL;
@@ -307,9 +310,13 @@ GetNameFromHandle ( );
if (!EFI_ERROR (Status) && (LoadedImageDevicePath != NULL)) {
DevicePath = LoadedImageDevicePath;
+ } else if (Image != NULL) {
+ DevicePath = Image->FilePath;
+ }
+ if (DevicePath != NULL) {
//
- // Try to get image GUID from LoadedImageDevicePath protocol
+ // Try to get image GUID from image DevicePath
//
NameGuid = NULL;
while (!IsDevicePathEndType (DevicePath)) {
@@ -356,7 +363,7 @@ GetNameFromHandle ( //
// Method 5: Get the name string from image DevicePath
//
- NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);
+ NameString = ConvertDevicePathToText (DevicePath, TRUE, FALSE);
if (NameString != NULL) {
StrnCpyS (
mGaugeString,
|