* [PATCH 00/14] Refine output of "dh"
@ 2017-09-22 5:50 Ruiyu Ni
2017-09-22 5:50 ` [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line Ruiyu Ni
` (15 more replies)
0 siblings, 16 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel
The patches refine the output of "dh":
1. Support more detailed dump for some protocols.
2. Refine the output by changing the hilight, indent, EOL
Huajing Li (13):
ShellPkg/dh: display all the protocol names in a single line
ShellPkg/dh: change the key information color from blue to hilight
ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
ShellPkg/dh: Display the protocol instance pointer value for "-v"
ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
ShellPkg/dh: Modify the dump of LoadedImage protocol
ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
ShellPkg/dh: Modify the dump of BlockIo protocol
ShellPkg/dh: Modify the dump of DebugSupport protocol
ShellPkg/dh: Modify the dump of GraphicsOutput protocol
ShellPkg/dh: Modify the dump of PciIo protocol
ShellPkg/dh: Modify the dump of UsbIo protocol
ShellPkg/dh: Modify the dump of UsbIo protocol
Ruiyu Ni (1):
ShellPkg/dh: Refine the dump output
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 472 +++++++++++++++++++--
.../UefiHandleParsingLib/UefiHandleParsingLib.h | 3 +-
.../UefiHandleParsingLib/UefiHandleParsingLib.inf | 3 +-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 127 +++---
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 55 ++-
.../UefiShellDriver1CommandsLib.uni | 42 +-
6 files changed, 572 insertions(+), 130 deletions(-)
--
2.12.2.windows.2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 02/14] ShellPkg/dh: change the key information color from blue to hilight Ruiyu Ni
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 36 ++++++++++++++--------
.../UefiShellDriver1CommandsLib.uni | 1 +
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
index 170a868e07..3694e501b6 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
@@ -319,7 +319,7 @@ GetProtocolInfoString(
if (!Verbose) {
StrnCatGrow(&RetVal, &Size, L"(", 0);
StrnCatGrow(&RetVal, &Size, Temp, 0);
- StrnCatGrow(&RetVal, &Size, L")\r\n", 0);
+ StrnCatGrow(&RetVal, &Size, L")", 0);
} else {
StrnCatGrow(&RetVal, &Size, Separator, 0);
StrnCatGrow(&RetVal, &Size, Temp, 0);
@@ -802,17 +802,29 @@ DoDhByHandle(
ProtocolInfoString==NULL?L"":ProtocolInfoString
);
} else {
- ProtocolInfoString = GetProtocolInfoString(TheHandle, Language, L"\r\n", Verbose, TRUE);
- ShellPrintHiiEx(
- -1,
- -1,
- NULL,
- STRING_TOKEN (STR_DH_OUTPUT_SINGLE),
- gShellDriver1HiiHandle,
- ConvertHandleToHandleIndex(TheHandle),
- TheHandle,
- ProtocolInfoString==NULL?L"":ProtocolInfoString
- );
+ ProtocolInfoString = GetProtocolInfoString(TheHandle, Language, Verbose ? L"\r\n" : L" ", Verbose, TRUE);
+ if (Verbose) {
+ ShellPrintHiiEx(
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_DH_OUTPUT_SINGLE),
+ gShellDriver1HiiHandle,
+ ConvertHandleToHandleIndex(TheHandle),
+ TheHandle,
+ ProtocolInfoString==NULL?L"":ProtocolInfoString
+ );
+ } else {
+ ShellPrintHiiEx(
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_DH_OUTPUT_SINGLE_D),
+ gShellDriver1HiiHandle,
+ ConvertHandleToHandleIndex(TheHandle),
+ ProtocolInfoString==NULL?L"":ProtocolInfoString
+ );
+ }
}
if (DriverInfo) {
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index 05101f3782..07e8657113 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
@@ -106,6 +106,7 @@
#string STR_DH_OUTPUT_ALL_HEADER #language en-US "Handle dump\r\n"
#string STR_DH_OUTPUT_GUID_HEADER #language en-US "Handle dump by protocol '%g'\r\n"
#string STR_DH_OUTPUT_NAME_HEADER #language en-US "Handle dump by protocol '%s'\r\n"
+#string STR_DH_OUTPUT_SINGLE_D #language en-US "%H%02x%N: %s\r\n"
#string STR_DH_OUTPUT_SINGLE #language en-US "%H%02x%N: %x\r\n%s"
#string STR_DH_OUTPUT_SFO #language en-US "%s, %s, %s, %H%02x%N, %s, %s\r\n"
#string STR_DH_OUTPUT_DRIVER1 #language en-US " Controller Name : %B%s%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 02/14] ShellPkg/dh: change the key information color from blue to hilight
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 03/14] ShellPkg/dh: fix the error display "Child Controllers" to "Managing" Ruiyu Ni
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
The blue text is very hard to see.
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiShellDriver1CommandsLib.uni | 40 +++++++++++-----------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index 07e8657113..55008f5057 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
@@ -109,26 +109,26 @@
#string STR_DH_OUTPUT_SINGLE_D #language en-US "%H%02x%N: %s\r\n"
#string STR_DH_OUTPUT_SINGLE #language en-US "%H%02x%N: %x\r\n%s"
#string STR_DH_OUTPUT_SFO #language en-US "%s, %s, %s, %H%02x%N, %s, %s\r\n"
-#string STR_DH_OUTPUT_DRIVER1 #language en-US " Controller Name : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER2 #language en-US " Device Path : %B%s%N\r\n"
- " Controller Type : %B%s%N\r\n"
- " Configuration : %B%s%N\r\n"
- " Diagnostics : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER3 #language en-US " Managed by : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER4A #language en-US " Drv[%H%02x%N] : Image(%B%s%N)r\n"
-#string STR_DH_OUTPUT_DRIVER4B #language en-US " Drv[%H%02x%N] : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER5 #language en-US " Parent Controllers : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER5B #language en-US " Parent[%H%02x%N] : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER6 #language en-US " Child Controllers : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER6B #language en-US " Child[%H%02x%N] : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER7 #language en-US " Driver Name [%H%02x%N] : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER7B #language en-US " Driver Image Name : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER8 #language en-US " Driver Version : %B%08x%N\r\n"
- " Driver Type : %B%s%N\r\n"
- " Configuration : %B%s%N\r\n"
- " Diagnostics : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER9 #language en-US " Managing : %B%s%N\r\n"
-#string STR_DH_OUTPUT_DRIVER9B #language en-US " Ctrl[%H%02x%N] : %B%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER1 #language en-US " Controller Name : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER2 #language en-US " Device Path : %H%s%N\r\n"
+ " Controller Type : %H%s%N\r\n"
+ " Configuration : %H%s%N\r\n"
+ " Diagnostics : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER3 #language en-US " Managed by : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER4A #language en-US " Drv[%H%02x%N] : Image(%H%s%N)r\n"
+#string STR_DH_OUTPUT_DRIVER4B #language en-US " Drv[%H%02x%N] : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER5 #language en-US " Parent Controllers : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER5B #language en-US " Parent[%H%02x%N] : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER6 #language en-US " Child Controllers : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER6B #language en-US " Child[%H%02x%N] : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER7 #language en-US " Driver Name [%H%02x%N] : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER7B #language en-US " Driver Image Name : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER8 #language en-US " Driver Version : %H%08x%N\r\n"
+ " Driver Type : %H%s%N\r\n"
+ " Configuration : %H%s%N\r\n"
+ " Diagnostics : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER9 #language en-US " Managing : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER9B #language en-US " Ctrl[%H%02x%N] : %H%s%N\r\n"
#string STR_DEV_TREE_OUTPUT #language en-US "Ctrl[%H%02x%N] %s\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 03/14] ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line Ruiyu Ni
2017-09-22 5:50 ` [PATCH 02/14] ShellPkg/dh: change the key information color from blue to hilight Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v" Ruiyu Ni
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 6 +++---
.../UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
index 3694e501b6..f37f7e9a9e 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
@@ -705,7 +705,7 @@ DisplayDriverModelHandle (
-1,
-1,
NULL,
- STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
+ STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
gShellDriver1HiiHandle,
L"None"
);
@@ -714,7 +714,7 @@ DisplayDriverModelHandle (
-1,
-1,
NULL,
- STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
+ STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
gShellDriver1HiiHandle,
L""
);
@@ -746,7 +746,7 @@ DisplayDriverModelHandle (
-1,
-1,
NULL,
- STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B),
+ STRING_TOKEN (STR_DH_OUTPUT_DRIVER6C),
gShellDriver1HiiHandle,
ConvertHandleToHandleIndex(ChildControllerHandleBuffer[ChildIndex]),
TempStringPointer!=NULL?TempStringPointer:L"<Unknown>"
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index 55008f5057..e4bff68838 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
@@ -121,6 +121,7 @@
#string STR_DH_OUTPUT_DRIVER5B #language en-US " Parent[%H%02x%N] : %H%s%N\r\n"
#string STR_DH_OUTPUT_DRIVER6 #language en-US " Child Controllers : %H%s%N\r\n"
#string STR_DH_OUTPUT_DRIVER6B #language en-US " Child[%H%02x%N] : %H%s%N\r\n"
+#string STR_DH_OUTPUT_DRIVER6C #language en-US " Child[%H%02x%N] : %H%s%N\r\n"
#string STR_DH_OUTPUT_DRIVER7 #language en-US " Driver Name [%H%02x%N] : %H%s%N\r\n"
#string STR_DH_OUTPUT_DRIVER7B #language en-US " Driver Image Name : %H%s%N\r\n"
#string STR_DH_OUTPUT_DRIVER8 #language en-US " Driver Version : %H%08x%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v"
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (2 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 03/14] ShellPkg/dh: fix the error display "Child Controllers" to "Managing" Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 05/14] ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath" Ruiyu Ni
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
index f37f7e9a9e..7d06163a7b 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
@@ -286,6 +286,8 @@ GetProtocolInfoString(
UINTN Size;
CHAR16 *Temp;
CHAR16 GuidStr[40];
+ VOID *instance;
+ CHAR16 InstanceStr[17];
ProtocolGuidArray = NULL;
RetVal = NULL;
@@ -312,6 +314,17 @@ GetProtocolInfoString(
FreePool(Temp);
}
StrnCatGrow(&RetVal, &Size, L"%N", 0);
+
+ if(Verbose) {
+ Status = gBS->HandleProtocol (TheHandle, ProtocolGuidArray[ProtocolIndex], &instance);
+ if (!EFI_ERROR (Status)) {
+ StrnCatGrow (&RetVal, &Size, L"(%H", 0);
+ UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", instance);
+ StrnCatGrow (&RetVal, &Size, InstanceStr, 0);
+ StrnCatGrow (&RetVal, &Size, L"%N)", 0);
+ }
+ }
+
if (ExtraInfo) {
Temp = GetProtocolInformationDump(TheHandle, ProtocolGuidArray[ProtocolIndex], Verbose);
if (Temp != NULL) {
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 05/14] ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (3 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v" Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 06/14] ShellPkg/dh: Modify the dump of LoadedImage protocol Ruiyu Ni
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 68 +++++++++++++++-------
1 file changed, 46 insertions(+), 22 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index d3ee068eba..1f2ca92bdd 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -848,6 +848,50 @@ ConvertDevicePathToShortText(
}
/**
+ Function to dump protocol information.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has the protocol installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+ @param[in] Protocol The protocol is needed to dump.
+
+ @retval A pointer to a string containing the information.
+**/
+STATIC CHAR16*
+EFIAPI
+DevicePathProtocolDumpInformationEx (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose,
+ IN EFI_GUID *Protocol
+)
+{
+ EFI_DEVICE_PATH_PROTOCOL *DevPath;
+ CHAR16 *DevPathStr;
+ CHAR16 *DevPathStrTemp;
+ UINTN Size;
+ EFI_STATUS Status;
+ DevPathStr = NULL;
+ DevPathStrTemp = NULL;
+ Status = gBS->OpenProtocol(TheHandle, Protocol, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+ if (!EFI_ERROR(Status)) {
+ DevPathStr = ConvertDevicePathToShortText (DevPath, Verbose, 30);
+ if (Verbose) {
+ Size = StrSize(DevPathStr) + sizeof(CHAR16) * 2;
+ DevPathStrTemp = AllocateZeroPool (Size);
+ if (DevPathStrTemp != NULL) {
+ StrnCatS (DevPathStrTemp, Size/sizeof(CHAR16), L" ", 2);
+ StrnCatS (DevPathStrTemp, Size/sizeof(CHAR16), DevPathStr, StrLen (DevPathStr));
+ }
+ FreePool (DevPathStr);
+ DevPathStr = DevPathStrTemp;
+ }
+ gBS->CloseProtocol(TheHandle, Protocol, gImageHandle, NULL);
+ }
+ return DevPathStr;
+}
+
+/**
Function to dump information about DevicePath protocol.
This will allocate the return buffer from boot services pool.
@@ -864,17 +908,7 @@ DevicePathProtocolDumpInformation(
IN CONST BOOLEAN Verbose
)
{
- EFI_DEVICE_PATH_PROTOCOL *DevPath;
- CHAR16 *Temp;
- EFI_STATUS Status;
- Temp = NULL;
-
- Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
- if (!EFI_ERROR(Status)) {
- Temp = ConvertDevicePathToShortText (DevPath, Verbose, 30);
- gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);
- }
- return (Temp);
+ return DevicePathProtocolDumpInformationEx (TheHandle, Verbose, &gEfiDevicePathProtocolGuid);
}
/**
@@ -894,17 +928,7 @@ LoadedImageDevicePathProtocolDumpInformation(
IN CONST BOOLEAN Verbose
)
{
- EFI_DEVICE_PATH_PROTOCOL *DevPath;
- CHAR16 *Temp;
- EFI_STATUS Status;
- Temp = NULL;
-
- Status = gBS->OpenProtocol(TheHandle, &gEfiLoadedImageDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
- if (!EFI_ERROR(Status)) {
- Temp = ConvertDevicePathToShortText (DevPath, Verbose, 30);
- gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);
- }
- return (Temp);
+ return DevicePathProtocolDumpInformationEx (TheHandle, Verbose, &gEfiLoadedImageDevicePathProtocolGuid);
}
/**
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 06/14] ShellPkg/dh: Modify the dump of LoadedImage protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (4 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 05/14] ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath" Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 07/14] ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol Ruiyu Ni
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 24 ++++++++++++++--------
.../UefiHandleParsingLib/UefiHandleParsingLib.h | 3 ++-
.../UefiHandleParsingLib/UefiHandleParsingLib.inf | 3 ++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 3 ++-
4 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 1f2ca92bdd..b9eb564dd0 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -232,14 +232,11 @@ LoadedImageProtocolDumpInformation(
CHAR16 *RetVal;
CHAR16 *Temp;
CHAR16 *FileName;
+ CHAR8 *PdbFileName;
CHAR16 *FilePath;
CHAR16 *CodeType;
CHAR16 *DataType;
- if (!Verbose) {
- return (CatSPrint(NULL, L"LoadedImage"));
- }
-
Status = gBS->OpenProtocol (
TheHandle,
&gEfiLoadedImageProtocolGuid,
@@ -253,10 +250,20 @@ LoadedImageProtocolDumpInformation(
return NULL;
}
- HandleParsingHiiInit();
-
FileName = FindLoadedImageFileName(LoadedImage);
+ FilePath = ConvertDevicePathToText(LoadedImage->FilePath, TRUE, TRUE);
+ if (!Verbose) {
+ if (FileName == NULL) {
+ FileName = FilePath;
+ } else {
+ SHELL_FREE_NON_NULL(FilePath);
+ }
+ RetVal = CatSPrint(NULL, FileName);
+ SHELL_FREE_NON_NULL(FileName);
+ return RetVal;
+ }
+ HandleParsingHiiInit();
RetVal = NULL;
if (FileName != NULL) {
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_LI_DUMP_NAME), NULL);
@@ -273,9 +280,7 @@ LoadedImageProtocolDumpInformation(
if (Temp == NULL) {
return NULL;
}
-
- FilePath = ConvertDevicePathToText(LoadedImage->FilePath, TRUE, TRUE);
-
+ PdbFileName = PeCoffLoaderGetPdbPointer (LoadedImage->ImageBase);
DataType = ConvertMemoryType(LoadedImage->ImageDataType);
CodeType = ConvertMemoryType(LoadedImage->ImageCodeType);
@@ -287,6 +292,7 @@ LoadedImageProtocolDumpInformation(
LoadedImage->SystemTable,
LoadedImage->DeviceHandle,
FilePath,
+ PdbFileName,
LoadedImage->LoadOptionsSize,
LoadedImage->LoadOptions,
LoadedImage->ImageBase,
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
index ada2b4aa38..cf849658aa 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
@@ -1,7 +1,7 @@
/** @file
Provides interface to advanced shell functionality for parsing both handle and protocol database.
- Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
(C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
@@ -153,6 +153,7 @@
#include <Library/ShellLib.h>
#include <Library/SortLib.h>
#include <Library/ShellCommandLib.h>
+#include <Library/PeCoffGetEntryPointLib.h>
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
index 3bd4dbe423..4c1c3d3846 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
@@ -1,6 +1,6 @@
## @file
# Provides interface to advanced shell functionality for parsing both handle and protocol database.
-# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
#
@@ -50,6 +50,7 @@ [LibraryClasses]
UefiLib
HiiLib
SortLib
+ PeCoffGetEntryPointLib
[Protocols]
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index e07c9a1670..8541399b68 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -355,13 +355,14 @@
" SystemTable...: %%H%x%%N\r\n"
" DeviceHandle..: %%H%x%%N\r\n"
" FilePath......: %%H%s%%N\r\n"
+ " PdbFileName...: %%H%a%%N\r\n"
" OptionsSize...: %%H%x%%N\r\n"
" LoadOptions...: %%H%x%%N\r\n"
" ImageBase.....: %%H%x%%N\r\n"
" ImageSize.....: %%H%Lx%%N\r\n"
" CodeType......: %%H%s%%N\r\n"
" DataType......: %%H%s%%N\r\n"
- " Unload........: %%H%x%%N\r\n"
+ " Unload........: %%H%x%%N"
#string STR_GOP_DUMP_MAIN #language en-US " Max Mode............: %%H0x%08x%%N\r\n"
" Current Mode........: %%H0x%08x%%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 07/14] ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (5 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 06/14] ShellPkg/dh: Modify the dump of LoadedImage protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 08/14] ShellPkg/dh: Modify the dump of BlockIo protocol Ruiyu Ni
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 81 +++++++++++++++++++++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 +-
2 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index b9eb564dd0..ce2b49b5a2 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -938,6 +938,85 @@ LoadedImageDevicePathProtocolDumpInformation(
}
/**
+ Function to dump information about BusSpecificDriverOverride protocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has the protocol installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A pointer to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+BusSpecificDriverOverrideProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_STATUS Status;
+ CHAR16 *GetString;
+ CHAR16 *RetVal;
+ CHAR16 *TempRetVal;
+ EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *BusSpecificDriverOverride;
+ EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
+ EFI_HANDLE ImageHandle;
+ UINTN Size;
+
+ if (!Verbose) {
+ return NULL;
+ }
+ Size = 0;
+ GetString = NULL;
+ RetVal = NULL;
+ TempRetVal = NULL;
+ ImageHandle = 0;
+
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiBusSpecificDriverOverrideProtocolGuid,
+ (VOID**)&BusSpecificDriverOverride,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ return NULL;
+ }
+ HandleParsingHiiInit ();
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_BSDO_DUMP_MAIN), NULL);
+ if (GetString == NULL) {
+ return NULL;
+ }
+ do {
+ Status = BusSpecificDriverOverride->GetDriver (
+ BusSpecificDriverOverride,
+ &ImageHandle
+ );
+ if (!EFI_ERROR (Status)) {
+ Status = gBS->HandleProtocol (
+ ImageHandle,
+ &gEfiLoadedImageProtocolGuid,
+ (VOID **) &LoadedImage
+ );
+ if(!EFI_ERROR (Status)) {
+ TempRetVal = CatSPrint (
+ TempRetVal,
+ GetString,
+ ConvertHandleToHandleIndex (ImageHandle),
+ ConvertDevicePathToText (LoadedImage->FilePath, TRUE, TRUE)
+ );
+ StrnCatGrow (&RetVal, &Size, TempRetVal, 0);
+ SHELL_FREE_NON_NULL (TempRetVal);
+ }
+ }
+ } while (!EFI_ERROR (Status));
+
+ SHELL_FREE_NON_NULL (GetString);
+ return RetVal;
+}
+
+/**
Function to dump information about EfiAdapterInformation Protocol.
@param[in] TheHandle The handle that has the protocol installed.
@@ -1623,7 +1702,7 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_DEVICE_PATH_VTUTF8), &gEfiVTUTF8Guid, NULL},
{STRING_TOKEN(STR_DRIVER_BINDING), &gEfiDriverBindingProtocolGuid, NULL},
{STRING_TOKEN(STR_PLATFORM_OVERRIDE), &gEfiPlatformDriverOverrideProtocolGuid, NULL},
- {STRING_TOKEN(STR_BUS_OVERRIDE), &gEfiBusSpecificDriverOverrideProtocolGuid, NULL},
+ {STRING_TOKEN(STR_BUS_OVERRIDE), &gEfiBusSpecificDriverOverrideProtocolGuid, BusSpecificDriverOverrideProtocolDumpInformation},
{STRING_TOKEN(STR_DRIVER_DIAG), &gEfiDriverDiagnosticsProtocolGuid, NULL},
{STRING_TOKEN(STR_DRIVER_DIAG2), &gEfiDriverDiagnostics2ProtocolGuid, NULL},
{STRING_TOKEN(STR_DRIVER_CN), &gEfiComponentNameProtocolGuid, NULL},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 8541399b68..3f9fc9cbac 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -384,7 +384,7 @@
#string STR_GOP_RES_LIST_ENTRY #language en-US " Resolution[%%H%d%%N]:\r\n"
" Res Hor.........: %%H0x%08x%%N\r\n"
" Res Ver.........: %%H0x%08x%%N\r\n"
-
+#string STR_BSDO_DUMP_MAIN #language en-US " Drv[%02x] File:%%H%s%%N"
#string STR_EDID_DISCOVERED_MAIN #language en-US " EDID Discovered Size : %%H0x%08x%%N\r\n"
#string STR_EDID_DISCOVERED_DATA #language en-US " EDID Discovered Data :\r\n"
#string STR_EDID_ACTIVE_MAIN #language en-US " EDID Active Size : %%H0x%08x%%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 08/14] ShellPkg/dh: Modify the dump of BlockIo protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (6 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 07/14] ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 09/14] ShellPkg/dh: Modify the dump of DebugSupport protocol Ruiyu Ni
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 80 +++++++++++++++++++++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 1 +
2 files changed, 80 insertions(+), 1 deletion(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index ce2b49b5a2..fb67197171 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1017,6 +1017,84 @@ BusSpecificDriverOverrideProtocolDumpInformation (
}
/**
+ Function to dump information about BlockIo protocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has the protocol installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A pointer to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+BlockIoProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_STATUS Status;
+ EFI_BLOCK_IO_PROTOCOL *BlockIo;
+ EFI_BLOCK_IO_MEDIA *BlockMedia;
+ CHAR16 *GetString;
+ CHAR16 *RetVal;
+
+ if (!Verbose) {
+ return NULL;
+ }
+ GetString = NULL;
+ RetVal = NULL;
+
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiBlockIoProtocolGuid,
+ (VOID**)&BlockIo,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ return NULL;
+ }
+ BlockMedia = BlockIo->Media;
+ //
+ // Per spec:
+ // The function (ReadBlocks) must return EFI_NO_MEDIA or
+ // EFI_MEDIA_CHANGED even if LBA, BufferSize, or Buffer are invalid so the caller can probe
+ // for changes in media state.
+ //
+ BlockIo->ReadBlocks (
+ BlockIo,
+ BlockIo->Media->MediaId,
+ 0,
+ 0,
+ NULL
+ );
+
+ HandleParsingHiiInit ();
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_BLOCKIO_INFO), NULL);
+ if (GetString == NULL) {
+ return NULL;
+ }
+ RetVal = CatSPrint (
+ RetVal,
+ GetString,
+ BlockMedia->RemovableMedia ? L"Removable " : L"Fixed ",
+ BlockMedia->MediaPresent ? L"" : L"not-present ",
+ BlockMedia->MediaId,
+ BlockMedia->BlockSize,
+ BlockMedia->LastBlock,
+ MultU64x32 (BlockMedia->LastBlock + 1, BlockMedia->BlockSize),
+ BlockMedia->LogicalPartition ? L"partition" : L"raw",
+ BlockMedia->ReadOnly ? L"ro" : L"rw",
+ BlockMedia->WriteCaching ? L"cached" : L"!cached"
+ );
+
+ SHELL_FREE_NON_NULL (GetString);
+ return RetVal;
+}
+
+/**
Function to dump information about EfiAdapterInformation Protocol.
@param[in] TheHandle The handle that has the protocol installed.
@@ -1727,7 +1805,7 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_SIMPLE_FILE_SYS), &gEfiSimpleFileSystemProtocolGuid, NULL},
{STRING_TOKEN(STR_TAPE_IO), &gEfiTapeIoProtocolGuid, NULL},
{STRING_TOKEN(STR_DISK_IO), &gEfiDiskIoProtocolGuid, NULL},
- {STRING_TOKEN(STR_BLK_IO), &gEfiBlockIoProtocolGuid, NULL},
+ {STRING_TOKEN(STR_BLK_IO), &gEfiBlockIoProtocolGuid, BlockIoProtocolDumpInformation},
{STRING_TOKEN(STR_UC), &gEfiUnicodeCollationProtocolGuid, NULL},
{STRING_TOKEN(STR_UC2), &gEfiUnicodeCollation2ProtocolGuid, NULL},
{STRING_TOKEN(STR_PCIRB_IO), &gEfiPciRootBridgeIoProtocolGuid, PciRootBridgeIoDumpInformation},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 3f9fc9cbac..eeb6aded6f 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -335,6 +335,7 @@
#string STR_IDE_CONT_INIT #language en-US "IdeControllerInit"
#string STR_DISK_INFO #language en-US "DiskInfo"
+#string STR_BLOCKIO_INFO #language en-US " %s%sMId:%%H%x%%N bsize %%H%x%%N, lblock %lx (%,ld), %s %s %s"
#string STR_PCIRB_DUMP_PH #language en-US " ParentHandle..: %H%x%N\r\n"
#string STR_PCIRB_DUMP_SEG #language en-US " Segment #.....: %H%x%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 09/14] ShellPkg/dh: Modify the dump of DebugSupport protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (7 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 08/14] ShellPkg/dh: Modify the dump of BlockIo protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 10/14] ShellPkg/dh: Modify the dump of GraphicsOutput protocol Ruiyu Ni
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 67 +++++++++++++++++++++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 +
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index fb67197171..1c62415e86 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1095,6 +1095,71 @@ BlockIoProtocolDumpInformation (
}
/**
+ Function to dump information about DebugSupport Protocol.
+
+ @param[in] TheHandle The handle that has the protocol installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A pointer to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+DebugSupportProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_STATUS Status;
+ EFI_DEBUG_SUPPORT_PROTOCOL *DebugSupport;
+ CHAR16 *GetString;
+ CHAR16 *RetVal;
+
+ if (!Verbose) {
+ return NULL;
+ }
+ GetString = NULL;
+ RetVal = NULL;
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiDebugSupportProtocolGuid,
+ (VOID**)&DebugSupport,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ return NULL;
+ }
+ HandleParsingHiiInit ();
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_DEBUGSUPPORT_INFO), NULL);
+ if (GetString == NULL) {
+ return NULL;
+ }
+ //
+ // Dump Debug support info
+ //
+ switch (DebugSupport->Isa) {
+ case (IsaIa32):
+ RetVal = CatSPrint (RetVal, GetString, L"IA-32");
+ break;
+ case (IsaIpf):
+ RetVal = CatSPrint (RetVal, GetString, L"IPF");
+ break;
+ case (IsaEbc):
+ RetVal = CatSPrint (RetVal, GetString, L"EBC");
+ break;
+ default:
+ SHELL_FREE_NON_NULL (GetString);
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_DEBUGSUPPORT_UNKNOWN), NULL);
+ RetVal = GetString != NULL ? CatSPrint (RetVal, GetString, DebugSupport->Isa) : NULL;
+ break;
+ }
+
+ SHELL_FREE_NON_NULL (GetString);
+ return RetVal;
+}
+
+/**
Function to dump information about EfiAdapterInformation Protocol.
@param[in] TheHandle The handle that has the protocol installed.
@@ -1817,7 +1882,7 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_USB_IO), &gEfiUsbIoProtocolGuid, NULL},
{STRING_TOKEN(STR_USB_HC), &gEfiUsbHcProtocolGuid, NULL},
{STRING_TOKEN(STR_USB_HC2), &gEfiUsb2HcProtocolGuid, NULL},
- {STRING_TOKEN(STR_DEBUG_SUPPORT), &gEfiDebugSupportProtocolGuid, NULL},
+ {STRING_TOKEN(STR_DEBUG_SUPPORT), &gEfiDebugSupportProtocolGuid, DebugSupportProtocolDumpInformation},
{STRING_TOKEN(STR_DEBUG_PORT), &gEfiDebugPortProtocolGuid, NULL},
{STRING_TOKEN(STR_DECOMPRESS), &gEfiDecompressProtocolGuid, NULL},
{STRING_TOKEN(STR_ACPI_TABLE), &gEfiAcpiTableProtocolGuid, NULL},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index eeb6aded6f..ca5e362bc7 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -336,6 +336,8 @@
#string STR_IDE_CONT_INIT #language en-US "IdeControllerInit"
#string STR_DISK_INFO #language en-US "DiskInfo"
#string STR_BLOCKIO_INFO #language en-US " %s%sMId:%%H%x%%N bsize %%H%x%%N, lblock %lx (%,ld), %s %s %s"
+#string STR_DEBUGSUPPORT_INFO #language en-US " Isa = %s"
+#string STR_DEBUGSUPPORT_UNKNOWN #language en-US " Unknown (%%H%s%%N)"
#string STR_PCIRB_DUMP_PH #language en-US " ParentHandle..: %H%x%N\r\n"
#string STR_PCIRB_DUMP_SEG #language en-US " Segment #.....: %H%x%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 10/14] ShellPkg/dh: Modify the dump of GraphicsOutput protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (8 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 09/14] ShellPkg/dh: Modify the dump of DebugSupport protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 11/14] ShellPkg/dh: Modify the dump of PciIo protocol Ruiyu Ni
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 36 +++++++++++-----------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index ca5e362bc7..4b0c67b42a 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -367,26 +367,26 @@
" DataType......: %%H%s%%N\r\n"
" Unload........: %%H%x%%N"
-#string STR_GOP_DUMP_MAIN #language en-US " Max Mode............: %%H0x%08x%%N\r\n"
- " Current Mode........: %%H0x%08x%%N\r\n"
- " Frame Buffer Base...: %%H0x%L016x%%N\r\n"
- " Frame Buffer Size...: %%H0x%L016x%%N\r\n"
- " Mode Info Size......: %%H0x%L016x%%N\r\n"
+#string STR_GOP_DUMP_MAIN #language en-US " Max Mode..............: %%H0x%08x%%N\r\n"
+ " Current Mode..........: %%H0x%08x%%N\r\n"
+ " Frame Buffer Base.....: %%H0x%L016x%%N\r\n"
+ " Frame Buffer Size.....: %%H0x%L016x%%N\r\n"
+ " Mode Info Size........: %%H0x%L016x%%N\r\n"
" Information\r\n"
- " Version...........: %%H0x%08x%%N\r\n"
- " Res Hor...........: %%H0x%08x%%N\r\n"
- " Res Ver...........: %%H0x%08x%%N\r\n"
- " Pixel Format......: %%H%s%%N\r\n"
- " Pixels / Scan Line: %%H0x%08x%%N\r\n"
+ " Version.............: %%H0x%08x%%N\r\n"
+ " HorizontalResolution: %%H%d%%N\r\n"
+ " VerticalResolution..: %%H%d%%N\r\n"
+ " Pixel Format........: %%H%s%%N\r\n"
+ " Pixels / Scan Line..: %%H%d%%N\r\n"
" Pixel Info\r\n"
- " RedMask.........: %%H0x%08x%%N\r\n"
- " GreenMask.......: %%H0x%08x%%N\r\n"
- " BlueMask........: %%H0x%08x%%N\r\n"
-
-#string STR_GOP_RES_LIST_MAIN #language en-US " Supported Resolution List\r\n"
-#string STR_GOP_RES_LIST_ENTRY #language en-US " Resolution[%%H%d%%N]:\r\n"
- " Res Hor.........: %%H0x%08x%%N\r\n"
- " Res Ver.........: %%H0x%08x%%N\r\n"
+ " RedMask...........: %%H0x%08x%%N\r\n"
+ " GreenMask.........: %%H0x%08x%%N\r\n"
+ " BlueMask..........: %%H0x%08x%%N\r\n"
+
+#string STR_GOP_RES_LIST_MAIN #language en-US " Supported Resolution List"
+#string STR_GOP_RES_LIST_ENTRY #language en-US "\r\n Resolution[%%H%d%%N]:\r\n"
+ " Horizontal........: %%H%d%%N\r\n"
+ " Vertical..........: %%H%d%%N"
#string STR_BSDO_DUMP_MAIN #language en-US " Drv[%02x] File:%%H%s%%N"
#string STR_EDID_DISCOVERED_MAIN #language en-US " EDID Discovered Size : %%H0x%08x%%N\r\n"
#string STR_EDID_DISCOVERED_DATA #language en-US " EDID Discovered Data :\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 11/14] ShellPkg/dh: Modify the dump of PciIo protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (9 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 10/14] ShellPkg/dh: Modify the dump of GraphicsOutput protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 12/14] ShellPkg/dh: Modify the dump of UsbIo protocol Ruiyu Ni
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 87 +++++++++++++++++++++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 11 ++-
2 files changed, 96 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 1c62415e86..e5b4bea8f6 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -16,6 +16,7 @@
#include "UefiHandleParsingLib.h"
#include "IndustryStandard/Acpi10.h"
+#include "IndustryStandard/Pci.h"
#include <PiDxe.h>
#include <Protocol/FirmwareVolume2.h>
@@ -1160,6 +1161,90 @@ DebugSupportProtocolDumpInformation (
}
/**
+ Function to dump information about PciIoProtocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has PciRootBridgeIo installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A poitner to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+PciIoProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_STATUS Status;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ PCI_TYPE00 Pci;
+ UINTN Segment;
+ UINTN Bus;
+ UINTN Device;
+ UINTN Function;
+ UINTN Index;
+ CHAR16 *GetString;
+ CHAR16 *TempRetVal;
+ CHAR16 *RetVal;
+
+ if (!Verbose) {
+ return (NULL);
+ }
+ RetVal = NULL;
+ GetString = NULL;
+ TempRetVal = NULL;
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiPciIoProtocolGuid,
+ (VOID**)&PciIo,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+ if (EFI_ERROR(Status)) {
+ return NULL;
+ }
+ PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0, sizeof (Pci), &Pci);
+ PciIo->GetLocation (PciIo, &Segment, &Bus, &Device, &Function);
+ HandleParsingHiiInit ();
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIIO_DUMP_MAIN), NULL);
+ if (GetString == NULL) {
+ return NULL;
+ }
+ RetVal = CatSPrint (
+ NULL,
+ GetString,
+ Segment,
+ Bus,
+ Device,
+ Function,
+ PciIo->RomSize,
+ PciIo->RomImage,
+ Pci.Hdr.VendorId,
+ Pci.Hdr.DeviceId,
+ Pci.Hdr.ClassCode[0],
+ Pci.Hdr.ClassCode[1],
+ Pci.Hdr.ClassCode[2]
+ );
+ for (Index = 0; Index < sizeof (Pci); Index ++) {
+ if ((Index % 0x10) == 0) {
+ TempRetVal = CatSPrint (RetVal, L"\r\n %02x", *((UINT8 *) (&Pci) + Index));
+ } else {
+ TempRetVal = CatSPrint (RetVal, L"%02x", *((UINT8 *) (&Pci) + Index));
+ }
+ FreePool (RetVal);
+ RetVal = TempRetVal;
+ TempRetVal = NULL;
+ }
+
+ FreePool(GetString);
+ return RetVal;
+}
+
+/**
Function to dump information about EfiAdapterInformation Protocol.
@param[in] TheHandle The handle that has the protocol installed.
@@ -1874,7 +1959,7 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_UC), &gEfiUnicodeCollationProtocolGuid, NULL},
{STRING_TOKEN(STR_UC2), &gEfiUnicodeCollation2ProtocolGuid, NULL},
{STRING_TOKEN(STR_PCIRB_IO), &gEfiPciRootBridgeIoProtocolGuid, PciRootBridgeIoDumpInformation},
- {STRING_TOKEN(STR_PCI_IO), &gEfiPciIoProtocolGuid, NULL},
+ {STRING_TOKEN(STR_PCI_IO), &gEfiPciIoProtocolGuid, PciIoProtocolDumpInformation},
{STRING_TOKEN(STR_SCSI_PT), &gEfiScsiPassThruProtocolGuid, NULL},
{STRING_TOKEN(STR_SCSI_IO), &gEfiScsiIoProtocolGuid, NULL},
{STRING_TOKEN(STR_SCSI_PT_EXT), &gEfiExtScsiPassThruProtocolGuid, NULL},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 4b0c67b42a..59409d9ca0 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -348,7 +348,16 @@
#string STR_PCIRB_DUMP_IO #language en-US " IO : "
#string STR_PCIRB_DUMP_TITLE #language en-US " Type Flag Base Limit Gran\r\n"
" ==== ==== ================ ================ ====\r\n"
-
+#string STR_PCIIO_DUMP_MAIN #language en-US " Segment #.....: %02x\r\n"
+ " Bus #.........: %02x\r\n"
+ " Device #......: %02x\r\n"
+ " Function #....: %02x\r\n"
+ " ROM Size......: %lx\r\n"
+ " ROM Location..: %08x\r\n"
+ " Vendor ID.....: %04x\r\n"
+ " Device ID.....: %04x\r\n"
+ " Class Code....: %02x %02x %02x\r\n"
+ " Configuration Header :"
#string STR_LI_DUMP_NAME #language en-US " Name..........: %%H%s%%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 12/14] ShellPkg/dh: Modify the dump of UsbIo protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (10 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 11/14] ShellPkg/dh: Modify the dump of PciIo protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 13/14] " Ruiyu Ni
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 61 +++++++++++++++++++++-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 5 +-
2 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index e5b4bea8f6..164caa9b91 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1245,6 +1245,65 @@ PciIoProtocolDumpInformation (
}
/**
+ Function to dump information about UsbIoProtocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has PciRootBridgeIo installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A poitner to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+UsbIoProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_STATUS Status;
+ EFI_USB_IO_PROTOCOL *UsbIo;
+ EFI_USB_INTERFACE_DESCRIPTOR InterfaceDesc;
+ CHAR16 *GetString;
+ CHAR16 *RetVal;
+
+ if (!Verbose) {
+ return (NULL);
+ }
+ RetVal = NULL;
+ GetString = NULL;
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiUsbIoProtocolGuid,
+ (VOID**)&UsbIo,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+ if (EFI_ERROR(Status)) {
+ return NULL;
+ }
+ UsbIo->UsbGetInterfaceDescriptor (UsbIo, &InterfaceDesc);
+ HandleParsingHiiInit ();
+ GetString = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_USBIO_DUMP_MAIN), NULL);
+ if (GetString == NULL) {
+ return NULL;
+ }
+ RetVal = CatSPrint (
+ NULL,
+ GetString,
+ InterfaceDesc.InterfaceNumber,
+ InterfaceDesc.InterfaceClass,
+ InterfaceDesc.InterfaceSubClass,
+ InterfaceDesc.InterfaceProtocol
+ );
+
+ FreePool (GetString);
+ return RetVal;
+}
+
+/**
Function to dump information about EfiAdapterInformation Protocol.
@param[in] TheHandle The handle that has the protocol installed.
@@ -1964,7 +2023,7 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_SCSI_IO), &gEfiScsiIoProtocolGuid, NULL},
{STRING_TOKEN(STR_SCSI_PT_EXT), &gEfiExtScsiPassThruProtocolGuid, NULL},
{STRING_TOKEN(STR_ISCSI), &gEfiIScsiInitiatorNameProtocolGuid, NULL},
- {STRING_TOKEN(STR_USB_IO), &gEfiUsbIoProtocolGuid, NULL},
+ {STRING_TOKEN(STR_USB_IO), &gEfiUsbIoProtocolGuid, UsbIoProtocolDumpInformation},
{STRING_TOKEN(STR_USB_HC), &gEfiUsbHcProtocolGuid, NULL},
{STRING_TOKEN(STR_USB_HC2), &gEfiUsb2HcProtocolGuid, NULL},
{STRING_TOKEN(STR_DEBUG_SUPPORT), &gEfiDebugSupportProtocolGuid, DebugSupportProtocolDumpInformation},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 59409d9ca0..98299cd1d0 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -358,7 +358,10 @@
" Device ID.....: %04x\r\n"
" Class Code....: %02x %02x %02x\r\n"
" Configuration Header :"
-
+#string STR_USBIO_DUMP_MAIN #language en-US " Interface Number #.....: %02x\r\n"
+ " Interface Class #......: %02x\r\n"
+ " Interface Subclass #...: %02x\r\n"
+ " Interface Protocol #...: %02x"
#string STR_LI_DUMP_NAME #language en-US " Name..........: %%H%s%%N\r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 13/14] ShellPkg/dh: Modify the dump of UsbIo protocol
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (11 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 12/14] ShellPkg/dh: Modify the dump of UsbIo protocol Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 5:50 ` [PATCH 14/14] ShellPkg/dh: Refine the dump output Ruiyu Ni
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Huajing Li, Jaben Carsey
From: Huajing Li <huajing.li@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
---
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 98299cd1d0..5d8a0d1bb9 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -179,8 +179,8 @@
#string STR_HII #language en-US "HII"
#string STR_HII_FORM_CALLBACK #language en-US "HIICallback"
-#string STR_TXT_OUT_DUMP_HEADER #language en-US " Address: %%H%X%%N Attrib %02x\r\n"
-#string STR_TXT_OUT_DUMP_LINE #language en-US " %c mode %d: Col %d Row %d\r\n"
+#string STR_TXT_OUT_DUMP_HEADER #language en-US " Address: %%H%X%%N Attrib %02x"
+#string STR_TXT_OUT_DUMP_LINE #language en-US "\r\n %c mode %d: Col %d Row %d"
#string STR_DRIVER_FAM_OVERRIDE #language en-US "DriverFamilyOverride"
#string STR_PCD #language en-US "Pcd"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 14/14] ShellPkg/dh: Refine the dump output
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (12 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 13/14] " Ruiyu Ni
@ 2017-09-22 5:50 ` Ruiyu Ni
2017-09-22 11:57 ` [PATCH 00/14] Refine output of "dh" Laszlo Ersek
2017-09-22 14:04 ` Carsey, Jaben
15 siblings, 0 replies; 17+ messages in thread
From: Ruiyu Ni @ 2017-09-22 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: Jaben Carsey
The patch doesn't change any real functionality.
Only the indent width and EOL are changed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
---
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 8 +-
.../UefiHandleParsingLib/UefiHandleParsingLib.uni | 129 +++++++++++----------
2 files changed, 69 insertions(+), 68 deletions(-)
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 164caa9b91..d12466c7b0 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -497,7 +497,7 @@ EdidDiscoveredProtocolDumpInformation (
SHELL_FREE_NON_NULL (RetVal);
RetVal = TempRetVal;
- TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid);
+ TempRetVal = CatSDumpHex (RetVal, 4, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid);
RetVal = TempRetVal;
}
return RetVal;
@@ -561,7 +561,7 @@ EdidActiveProtocolDumpInformation (
SHELL_FREE_NON_NULL (RetVal);
RetVal = TempRetVal;
- TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidActive->SizeOfEdid, EdidActive->Edid);
+ TempRetVal = CatSDumpHex (RetVal, 4, 0, EdidActive->SizeOfEdid, EdidActive->Edid);
RetVal = TempRetVal;
}
return RetVal;
@@ -614,7 +614,7 @@ PciRootBridgeIoDumpInformation(
if (Temp == NULL) {
return NULL;
}
- Temp2 = CatSPrint(L"\r\n", Temp, PciRootBridgeIo->ParentHandle);
+ Temp2 = CatSPrint(NULL, Temp, PciRootBridgeIo->ParentHandle);
FreePool(Temp);
RetVal = Temp2;
Temp2 = NULL;
@@ -692,7 +692,7 @@ PciRootBridgeIoDumpInformation(
}
Temp2 = CatSPrint(RetVal,
- L"%H%02x %016lx %016lx %02x%N\r\n",
+ L"\r\n%%H%02x %016lx %016lx %02x%%N",
Configuration->SpecificFlag,
Configuration->AddrRangeMin,
Configuration->AddrRangeMax,
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 5d8a0d1bb9..f49ca94623 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -339,71 +339,72 @@
#string STR_DEBUGSUPPORT_INFO #language en-US " Isa = %s"
#string STR_DEBUGSUPPORT_UNKNOWN #language en-US " Unknown (%%H%s%%N)"
-#string STR_PCIRB_DUMP_PH #language en-US " ParentHandle..: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_SEG #language en-US " Segment #.....: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_ATT #language en-US " Attributes....: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_SUPPORTS #language en-US " Supports......: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_BUS #language en-US " BUS : "
-#string STR_PCIRB_DUMP_MEM #language en-US " MEM : "
-#string STR_PCIRB_DUMP_IO #language en-US " IO : "
-#string STR_PCIRB_DUMP_TITLE #language en-US " Type Flag Base Limit Gran\r\n"
- " ==== ==== ================ ================ ====\r\n"
-#string STR_PCIIO_DUMP_MAIN #language en-US " Segment #.....: %02x\r\n"
- " Bus #.........: %02x\r\n"
- " Device #......: %02x\r\n"
- " Function #....: %02x\r\n"
- " ROM Size......: %lx\r\n"
- " ROM Location..: %08x\r\n"
- " Vendor ID.....: %04x\r\n"
- " Device ID.....: %04x\r\n"
- " Class Code....: %02x %02x %02x\r\n"
- " Configuration Header :"
-#string STR_USBIO_DUMP_MAIN #language en-US " Interface Number #.....: %02x\r\n"
- " Interface Class #......: %02x\r\n"
- " Interface Subclass #...: %02x\r\n"
- " Interface Protocol #...: %02x"
-
-#string STR_LI_DUMP_NAME #language en-US " Name..........: %%H%s%%N\r\n"
-
-#string STR_LI_DUMP_MAIN #language en-US " Revision......: %%H0x%08x%%N\r\n"
- " ParentHandle..: %%H%x%%N\r\n"
- " SystemTable...: %%H%x%%N\r\n"
- " DeviceHandle..: %%H%x%%N\r\n"
- " FilePath......: %%H%s%%N\r\n"
- " PdbFileName...: %%H%a%%N\r\n"
- " OptionsSize...: %%H%x%%N\r\n"
- " LoadOptions...: %%H%x%%N\r\n"
- " ImageBase.....: %%H%x%%N\r\n"
- " ImageSize.....: %%H%Lx%%N\r\n"
- " CodeType......: %%H%s%%N\r\n"
- " DataType......: %%H%s%%N\r\n"
- " Unload........: %%H%x%%N"
-
-#string STR_GOP_DUMP_MAIN #language en-US " Max Mode..............: %%H0x%08x%%N\r\n"
- " Current Mode..........: %%H0x%08x%%N\r\n"
- " Frame Buffer Base.....: %%H0x%L016x%%N\r\n"
- " Frame Buffer Size.....: %%H0x%L016x%%N\r\n"
- " Mode Info Size........: %%H0x%L016x%%N\r\n"
- " Information\r\n"
- " Version.............: %%H0x%08x%%N\r\n"
- " HorizontalResolution: %%H%d%%N\r\n"
- " VerticalResolution..: %%H%d%%N\r\n"
- " Pixel Format........: %%H%s%%N\r\n"
- " Pixels / Scan Line..: %%H%d%%N\r\n"
- " Pixel Info\r\n"
- " RedMask...........: %%H0x%08x%%N\r\n"
- " GreenMask.........: %%H0x%08x%%N\r\n"
- " BlueMask..........: %%H0x%08x%%N\r\n"
-
-#string STR_GOP_RES_LIST_MAIN #language en-US " Supported Resolution List"
-#string STR_GOP_RES_LIST_ENTRY #language en-US "\r\n Resolution[%%H%d%%N]:\r\n"
- " Horizontal........: %%H%d%%N\r\n"
- " Vertical..........: %%H%d%%N"
+#string STR_PCIRB_DUMP_PH #language en-US " ParentHandle..: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_SEG #language en-US " Segment #.....: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_ATT #language en-US " Attributes....: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_SUPPORTS #language en-US " Supports......: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_BUS #language en-US " BUS : "
+#string STR_PCIRB_DUMP_MEM #language en-US " MEM : "
+#string STR_PCIRB_DUMP_IO #language en-US " IO : "
+#string STR_PCIRB_DUMP_TITLE #language en-US " Type Flag Base Limit Gran\r\n"
+ " ==== ==== ================ ================ ===="
+#string STR_PCIIO_DUMP_MAIN #language en-US " Segment #.....: %02x\r\n"
+ " Bus #.........: %02x\r\n"
+ " Device #......: %02x\r\n"
+ " Function #....: %02x\r\n"
+ " ROM Size......: %lx\r\n"
+ " ROM Location..: %08x\r\n"
+ " Vendor ID.....: %04x\r\n"
+ " Device ID.....: %04x\r\n"
+ " Class Code....: %02x %02x %02x\r\n"
+ " Configuration Header :"
+#string STR_USBIO_DUMP_MAIN #language en-US " Interface Number #.....: %02x\r\n"
+ " Interface Class #......: %02x\r\n"
+ " Interface Subclass #...: %02x\r\n"
+ " Interface Protocol #...: %02x"
+
+#string STR_LI_DUMP_NAME #language en-US " Name..........: %%H%s%%N\r\n"
+
+#string STR_LI_DUMP_MAIN #language en-US " Revision......: %%H0x%08x%%N\r\n"
+ " ParentHandle..: %%H%x%%N\r\n"
+ " SystemTable...: %%H%x%%N\r\n"
+ " DeviceHandle..: %%H%x%%N\r\n"
+ " FilePath......: %%H%s%%N\r\n"
+ " PdbFileName...: %%H%a%%N\r\n"
+ " OptionsSize...: %%H%x%%N\r\n"
+ " LoadOptions...: %%H%x%%N\r\n"
+ " ImageBase.....: %%H%x%%N\r\n"
+ " ImageSize.....: %%H%Lx%%N\r\n"
+ " CodeType......: %%H%s%%N\r\n"
+ " DataType......: %%H%s%%N\r\n"
+ " Unload........: %%H%x%%N"
+
+#string STR_GOP_DUMP_MAIN #language en-US " Max Mode..............: %%H0x%08x%%N\r\n"
+ " Current Mode..........: %%H0x%08x%%N\r\n"
+ " Frame Buffer Base.....: %%H0x%L016x%%N\r\n"
+ " Frame Buffer Size.....: %%H0x%L016x%%N\r\n"
+ " Mode Info Size........: %%H0x%L016x%%N\r\n"
+ " Information\r\n"
+ " Version.............: %%H0x%08x%%N\r\n"
+ " HorizontalResolution: %%H%d%%N\r\n"
+ " VerticalResolution..: %%H%d%%N\r\n"
+ " Pixel Format........: %%H%s%%N\r\n"
+ " Pixels / Scan Line..: %%H%d%%N\r\n"
+ " Pixel Info\r\n"
+ " RedMask...........: %%H0x%08x%%N\r\n"
+ " GreenMask.........: %%H0x%08x%%N\r\n"
+ " BlueMask..........: %%H0x%08x%%N\r\n"
+
+#string STR_GOP_RES_LIST_MAIN #language en-US " Supported Resolution List"
+#string STR_GOP_RES_LIST_ENTRY #language en-US "\r\n"
+ " Resolution[%%H%d%%N]:\r\n"
+ " Horizontal........: %%H%d%%N\r\n"
+ " Vertical..........: %%H%d%%N"
#string STR_BSDO_DUMP_MAIN #language en-US " Drv[%02x] File:%%H%s%%N"
-#string STR_EDID_DISCOVERED_MAIN #language en-US " EDID Discovered Size : %%H0x%08x%%N\r\n"
-#string STR_EDID_DISCOVERED_DATA #language en-US " EDID Discovered Data :\r\n"
-#string STR_EDID_ACTIVE_MAIN #language en-US " EDID Active Size : %%H0x%08x%%N\r\n"
-#string STR_EDID_ACTIVE_DATA #language en-US " EDID Active Data :\r\n"
+#string STR_EDID_DISCOVERED_MAIN #language en-US " EDID Discovered Size : %%H0x%08x%%N\r\n"
+#string STR_EDID_DISCOVERED_DATA #language en-US " EDID Discovered Data :\r\n"
+#string STR_EDID_ACTIVE_MAIN #language en-US " EDID Active Size : %%H0x%08x%%N\r\n"
+#string STR_EDID_ACTIVE_DATA #language en-US " EDID Active Data :\r\n"
#string STR_GET_SUPP_TYPES_FAILED #language en-US "Unable to get supported types - %%H%r%%N\r\n"
#string STR_SUPP_TYPE_HEADER #language en-US " Supported Information Types: \r\n"
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 00/14] Refine output of "dh"
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (13 preceding siblings ...)
2017-09-22 5:50 ` [PATCH 14/14] ShellPkg/dh: Refine the dump output Ruiyu Ni
@ 2017-09-22 11:57 ` Laszlo Ersek
2017-09-22 14:04 ` Carsey, Jaben
15 siblings, 0 replies; 17+ messages in thread
From: Laszlo Ersek @ 2017-09-22 11:57 UTC (permalink / raw)
To: Ruiyu Ni, edk2-devel
On 09/22/17 07:50, Ruiyu Ni wrote:
> The patches refine the output of "dh":
> 1. Support more detailed dump for some protocols.
> 2. Refine the output by changing the hilight, indent, EOL
>
> Huajing Li (13):
> ShellPkg/dh: display all the protocol names in a single line
> ShellPkg/dh: change the key information color from blue to hilight
> ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
> ShellPkg/dh: Display the protocol instance pointer value for "-v"
> ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
> ShellPkg/dh: Modify the dump of LoadedImage protocol
> ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
> ShellPkg/dh: Modify the dump of BlockIo protocol
> ShellPkg/dh: Modify the dump of DebugSupport protocol
> ShellPkg/dh: Modify the dump of GraphicsOutput protocol
> ShellPkg/dh: Modify the dump of PciIo protocol
> ShellPkg/dh: Modify the dump of UsbIo protocol
> ShellPkg/dh: Modify the dump of UsbIo protocol
>
> Ruiyu Ni (1):
> ShellPkg/dh: Refine the dump output
>
> .../UefiHandleParsingLib/UefiHandleParsingLib.c | 472 +++++++++++++++++++--
> .../UefiHandleParsingLib/UefiHandleParsingLib.h | 3 +-
> .../UefiHandleParsingLib/UefiHandleParsingLib.inf | 3 +-
> .../UefiHandleParsingLib/UefiHandleParsingLib.uni | 127 +++---
> ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 55 ++-
> .../UefiShellDriver1CommandsLib.uni | 42 +-
> 6 files changed, 572 insertions(+), 130 deletions(-)
>
Thanks for working on this, Ray, the DH command is the Swiss Army knife
of the UEFI shell. :) I use it all the time.
Laszlo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 00/14] Refine output of "dh"
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
` (14 preceding siblings ...)
2017-09-22 11:57 ` [PATCH 00/14] Refine output of "dh" Laszlo Ersek
@ 2017-09-22 14:04 ` Carsey, Jaben
15 siblings, 0 replies; 17+ messages in thread
From: Carsey, Jaben @ 2017-09-22 14:04 UTC (permalink / raw)
To: Ni, Ruiyu, edk2-devel@lists.01.org
For series. Good changes all. DH is a lifesaver.
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Thursday, September 21, 2017 10:50 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH 00/14] Refine output of "dh"
> Importance: High
>
> The patches refine the output of "dh":
> 1. Support more detailed dump for some protocols.
> 2. Refine the output by changing the hilight, indent, EOL
>
> Huajing Li (13):
> ShellPkg/dh: display all the protocol names in a single line
> ShellPkg/dh: change the key information color from blue to hilight
> ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
> ShellPkg/dh: Display the protocol instance pointer value for "-v"
> ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
> ShellPkg/dh: Modify the dump of LoadedImage protocol
> ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
> ShellPkg/dh: Modify the dump of BlockIo protocol
> ShellPkg/dh: Modify the dump of DebugSupport protocol
> ShellPkg/dh: Modify the dump of GraphicsOutput protocol
> ShellPkg/dh: Modify the dump of PciIo protocol
> ShellPkg/dh: Modify the dump of UsbIo protocol
> ShellPkg/dh: Modify the dump of UsbIo protocol
>
> Ruiyu Ni (1):
> ShellPkg/dh: Refine the dump output
>
> .../UefiHandleParsingLib/UefiHandleParsingLib.c | 472
> +++++++++++++++++++--
> .../UefiHandleParsingLib/UefiHandleParsingLib.h | 3 +-
> .../UefiHandleParsingLib/UefiHandleParsingLib.inf | 3 +-
> .../UefiHandleParsingLib/UefiHandleParsingLib.uni | 127 +++---
> ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 55 ++-
> .../UefiShellDriver1CommandsLib.uni | 42 +-
> 6 files changed, 572 insertions(+), 130 deletions(-)
>
> --
> 2.12.2.windows.2
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-09-22 14:01 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line Ruiyu Ni
2017-09-22 5:50 ` [PATCH 02/14] ShellPkg/dh: change the key information color from blue to hilight Ruiyu Ni
2017-09-22 5:50 ` [PATCH 03/14] ShellPkg/dh: fix the error display "Child Controllers" to "Managing" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 05/14] ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 06/14] ShellPkg/dh: Modify the dump of LoadedImage protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 07/14] ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 08/14] ShellPkg/dh: Modify the dump of BlockIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 09/14] ShellPkg/dh: Modify the dump of DebugSupport protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 10/14] ShellPkg/dh: Modify the dump of GraphicsOutput protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 11/14] ShellPkg/dh: Modify the dump of PciIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 12/14] ShellPkg/dh: Modify the dump of UsbIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 13/14] " Ruiyu Ni
2017-09-22 5:50 ` [PATCH 14/14] ShellPkg/dh: Refine the dump output Ruiyu Ni
2017-09-22 11:57 ` [PATCH 00/14] Refine output of "dh" Laszlo Ersek
2017-09-22 14:04 ` Carsey, Jaben
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox