public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path
@ 2018-10-08  3:31 Dandan Bi
  2018-10-08  3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Dandan Bi @ 2018-10-08  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1225

According to UEFI spec, the string expression of UTF8 vendor
device node should be displayed as: VenUtf8(). Current code
display it as: VenUft8() by mistake when convert device
path node to text.

This commit is to fix this bug.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 7d8d304f6f..85f5e97131 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -193,11 +193,11 @@ DevPathToTextVendor (
         return ;
       } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {
         UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");
         return ;
       } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
-        UefiDevicePathLibCatPrint (Str, L"VenUft8()");
+        UefiDevicePathLibCatPrint (Str, L"VenUtf8()");
         return ;
       } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
         FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);
         switch (FlowControlMap & 0x00000003) {
         case 0:
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
@ 2018-10-08  3:31 ` Dandan Bi
  2018-10-08  6:45   ` Ni, Ruiyu
  2018-10-08  3:31 ` [patch 3/5] MdePkg: Correct condition check for AcpiExp text format Dandan Bi
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Dandan Bi @ 2018-10-08  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1227

According to UEFI Spec, ACPI Expanded Device Path can be display
AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDSTR)), but current code display
UID|UIDSTR before CID|CIDSTR.
This patch is to fix this issue.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 85f5e97131..1c08a3ec2f 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -475,20 +475,20 @@ DevPathToTextAcpiEx (
         UefiDevicePathLibCatPrint (Str, L"AcpiEx(%a,", HIDStr);
       } else {
         UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText);
       }
 
-      if (AcpiEx->UID == 0) {
-        UefiDevicePathLibCatPrint (Str, L"%a,", UIDStr);
+      if (AcpiEx->CID == 0) {
+        UefiDevicePathLibCatPrint (Str, L"%a,", CIDStr);
       } else {
-        UefiDevicePathLibCatPrint (Str, L"0x%x,", AcpiEx->UID);
+        UefiDevicePathLibCatPrint (Str, L"%s,", CIDText);
       }
 
-      if (AcpiEx->CID == 0) {
-        UefiDevicePathLibCatPrint (Str, L"%a)", CIDStr);
+      if (AcpiEx->UID == 0) {
+        UefiDevicePathLibCatPrint (Str, L"%a)", UIDStr);
       } else {
-        UefiDevicePathLibCatPrint (Str, L"%s)", CIDText);
+        UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID);
       }
     } else {
       UefiDevicePathLibCatPrint (
         Str,
         L"AcpiEx(%s,%s,0x%x,%a,%a,%a)",
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [patch 3/5] MdePkg: Correct condition check for AcpiExp text format
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
  2018-10-08  3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
@ 2018-10-08  3:31 ` Dandan Bi
  2018-10-08  6:49   ` Ni, Ruiyu
  2018-10-08  3:31 ` [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path Dandan Bi
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Dandan Bi @ 2018-10-08  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1226

According to UEFI Spec, for ACPI Expanded Device Path,
when HIDSTR=empty, CIDSTR=empty, UID STR!=empty,
the ACPI Expanded Device Path node can be displayed as
AcpiExp(HID,CID,UIDSTR) format.
And if UID is 0 and UIDSTR is empty, then use AcpiEx format.

This patch is to correct the condition check to follow UEFI
Spec when convert the device path node to the AcpiExp text
format.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 1c08a3ec2f..8e5efba1e8 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -453,11 +453,11 @@ DevPathToTextAcpiEx (
     ((AcpiEx->CID >>  5) & 0x1f) + 'A' - 1,
     ((AcpiEx->CID >>  0) & 0x1f) + 'A' - 1,
     (AcpiEx->CID >> 16) & 0xFFFF
     );
 
-  if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) {
+  if ((*HIDStr == '\0') && (*CIDStr == '\0') && (*UIDStr != '\0')) {
     //
     // use AcpiExp()
     //
     UefiDevicePathLibCatPrint (
       Str,
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
  2018-10-08  3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
  2018-10-08  3:31 ` [patch 3/5] MdePkg: Correct condition check for AcpiExp text format Dandan Bi
@ 2018-10-08  3:31 ` Dandan Bi
  2018-10-08  6:50   ` Ni, Ruiyu
  2018-10-08  3:31 ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path Dandan Bi
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Dandan Bi @ 2018-10-08  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1228

According to UEFI spec,for ACPI Expanded Device Path
when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08,
the device path node can be displayed as: PciRoot(UID|UIDSTR)
When HID=PNP0A08 or CID=PNP0A08, the device path node can be
displayed as: PcieRoot(UID|UIDSTR). But current code miss the
code logic.

This commit is to do the enhancement.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../UefiDevicePathLib/DevicePathToText.c      | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 8e5efba1e8..7ad9eadf6c 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -431,10 +431,31 @@ DevPathToTextAcpiEx (
   AcpiEx = DevPath;
   HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH));
   UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1;
   CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1;
 
+  if (DisplayOnly) {
+    if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||
+        (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) {
+      if (AcpiEx->UID == 0) {
+        UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr);
+      } else {
+        UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);
+      }
+      return;
+    }
+
+    if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) {
+      if (AcpiEx->UID == 0) {
+        UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr);
+      } else {
+        UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);
+      }
+      return;
+    }
+  }
+
   //
   // Converts EISA identification to string.
   //
   UnicodeSPrint (
     HIDText,
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
                   ` (2 preceding siblings ...)
  2018-10-08  3:31 ` [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path Dandan Bi
@ 2018-10-08  3:31 ` Dandan Bi
  2018-10-08  6:54   ` Ni, Ruiyu
  2018-10-08  6:43 ` [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor " Ni, Ruiyu
  2018-10-08 11:54 ` Laszlo Ersek
  5 siblings, 1 reply; 12+ messages in thread
From: Dandan Bi @ 2018-10-08  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1229

When converting DebugPort device path from text,
current code use VENDOR_DEFINED_MESSAGING_DEVICE_PATH structure
for Debug port device node.
typedef struct {
  EFI_DEVICE_PATH_PROTOCOL  Header;
  EFI_GUID                  Guid;
  UINT8                     VendorDefinedData[1];
} VENDOR_DEFINED_MESSAGING_DEVICE_PATH;

And Debugport Device Path is a vendor-defined messaging
device path with no data, only a GUID. So it's better to
use VENDOR_DEVICE_PATH to create the Debug port device node.
typedef struct {
  EFI_DEVICE_PATH_PROTOCOL        Header;
  EFI_GUID                        Guid;
} VENDOR_DEVICE_PATH;

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
index c5f3764fc0..49da8268eb 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
@@ -1756,16 +1756,16 @@ DevPathFromTextEmmc (
 EFI_DEVICE_PATH_PROTOCOL *
 DevPathFromTextDebugPort (
   IN CHAR16 *TextDeviceNode
   )
 {
-  VENDOR_DEFINED_MESSAGING_DEVICE_PATH  *Vend;
+  VENDOR_DEVICE_PATH  *Vend;
 
-  Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
+  Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (
                                                     MESSAGING_DEVICE_PATH,
                                                     MSG_VENDOR_DP,
-                                                    (UINT16) sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
+                                                    (UINT16) sizeof (VENDOR_DEVICE_PATH)
                                                     );
 
   CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
                   ` (3 preceding siblings ...)
  2018-10-08  3:31 ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path Dandan Bi
@ 2018-10-08  6:43 ` Ni, Ruiyu
  2018-10-08 11:54 ` Laszlo Ersek
  5 siblings, 0 replies; 12+ messages in thread
From: Ni, Ruiyu @ 2018-10-08  6:43 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Michael D Kinney, Liming Gao

On 10/8/2018 11:31 AM, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1225
> 
> According to UEFI spec, the string expression of UTF8 vendor
> device node should be displayed as: VenUtf8(). Current code
> display it as: VenUft8() by mistake when convert device
> path node to text.
> 
> This commit is to fix this bug.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 7d8d304f6f..85f5e97131 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -193,11 +193,11 @@ DevPathToTextVendor (
>           return ;
>         } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {
>           UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");
>           return ;
>         } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
> -        UefiDevicePathLibCatPrint (Str, L"VenUft8()");
> +        UefiDevicePathLibCatPrint (Str, L"VenUtf8()");
>           return ;
>         } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
>           FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);
>           switch (FlowControlMap & 0x00000003) {
>           case 0:
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path
  2018-10-08  3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
@ 2018-10-08  6:45   ` Ni, Ruiyu
  0 siblings, 0 replies; 12+ messages in thread
From: Ni, Ruiyu @ 2018-10-08  6:45 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Michael D Kinney, Liming Gao

On 10/8/2018 11:31 AM, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1227
> 
> According to UEFI Spec, ACPI Expanded Device Path can be display
> AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDSTR)), but current code display
> UID|UIDSTR before CID|CIDSTR.
> This patch is to fix this issue.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 85f5e97131..1c08a3ec2f 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -475,20 +475,20 @@ DevPathToTextAcpiEx (
>           UefiDevicePathLibCatPrint (Str, L"AcpiEx(%a,", HIDStr);
>         } else {
>           UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText);
>         }
>   
> -      if (AcpiEx->UID == 0) {
> -        UefiDevicePathLibCatPrint (Str, L"%a,", UIDStr);
> +      if (AcpiEx->CID == 0) {
> +        UefiDevicePathLibCatPrint (Str, L"%a,", CIDStr);
>         } else {
> -        UefiDevicePathLibCatPrint (Str, L"0x%x,", AcpiEx->UID);
> +        UefiDevicePathLibCatPrint (Str, L"%s,", CIDText);
>         }
>   
> -      if (AcpiEx->CID == 0) {
> -        UefiDevicePathLibCatPrint (Str, L"%a)", CIDStr);
> +      if (AcpiEx->UID == 0) {
> +        UefiDevicePathLibCatPrint (Str, L"%a)", UIDStr);
>         } else {
> -        UefiDevicePathLibCatPrint (Str, L"%s)", CIDText);
> +        UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID);
>         }
>       } else {
>         UefiDevicePathLibCatPrint (
>           Str,
>           L"AcpiEx(%s,%s,0x%x,%a,%a,%a)",
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 3/5] MdePkg: Correct condition check for AcpiExp text format
  2018-10-08  3:31 ` [patch 3/5] MdePkg: Correct condition check for AcpiExp text format Dandan Bi
@ 2018-10-08  6:49   ` Ni, Ruiyu
  0 siblings, 0 replies; 12+ messages in thread
From: Ni, Ruiyu @ 2018-10-08  6:49 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Michael D Kinney, Liming Gao

On 10/8/2018 11:31 AM, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1226
> 
> According to UEFI Spec, for ACPI Expanded Device Path,
> when HIDSTR=empty, CIDSTR=empty, UID STR!=empty,
> the ACPI Expanded Device Path node can be displayed as
> AcpiExp(HID,CID,UIDSTR) format.
> And if UID is 0 and UIDSTR is empty, then use AcpiEx format.
> 
> This patch is to correct the condition check to follow UEFI
> Spec when convert the device path node to the AcpiExp text
> format.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 1c08a3ec2f..8e5efba1e8 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -453,11 +453,11 @@ DevPathToTextAcpiEx (
>       ((AcpiEx->CID >>  5) & 0x1f) + 'A' - 1,
>       ((AcpiEx->CID >>  0) & 0x1f) + 'A' - 1,
>       (AcpiEx->CID >> 16) & 0xFFFF
>       );
>   
> -  if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) {
> +  if ((*HIDStr == '\0') && (*CIDStr == '\0') && (*UIDStr != '\0')) {
>       //
>       // use AcpiExp()
>       //
>       UefiDevicePathLibCatPrint (
>         Str,
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
  2018-10-08  3:31 ` [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path Dandan Bi
@ 2018-10-08  6:50   ` Ni, Ruiyu
  0 siblings, 0 replies; 12+ messages in thread
From: Ni, Ruiyu @ 2018-10-08  6:50 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Michael D Kinney, Liming Gao

On 10/8/2018 11:31 AM, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1228
> 
> According to UEFI spec,for ACPI Expanded Device Path
> when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08,
> the device path node can be displayed as: PciRoot(UID|UIDSTR)
> When HID=PNP0A08 or CID=PNP0A08, the device path node can be
> displayed as: PcieRoot(UID|UIDSTR). But current code miss the
> code logic.
> 
> This commit is to do the enhancement.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   .../UefiDevicePathLib/DevicePathToText.c      | 21 +++++++++++++++++++
>   1 file changed, 21 insertions(+)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 8e5efba1e8..7ad9eadf6c 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -431,10 +431,31 @@ DevPathToTextAcpiEx (
>     AcpiEx = DevPath;
>     HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH));
>     UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1;
>     CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1;
>   
> +  if (DisplayOnly) {
> +    if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||
> +        (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) {
> +      if (AcpiEx->UID == 0) {
> +        UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr);
> +      } else {
> +        UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);
> +      }
> +      return;
> +    }
> +
> +    if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) {
> +      if (AcpiEx->UID == 0) {
> +        UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr);
> +      } else {
> +        UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);
> +      }
> +      return;
> +    }
> +  }
> +
>     //
>     // Converts EISA identification to string.
>     //
>     UnicodeSPrint (
>       HIDText,
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path
  2018-10-08  3:31 ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path Dandan Bi
@ 2018-10-08  6:54   ` Ni, Ruiyu
  0 siblings, 0 replies; 12+ messages in thread
From: Ni, Ruiyu @ 2018-10-08  6:54 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Michael D Kinney, Liming Gao

On 10/8/2018 11:31 AM, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1229
> 
> When converting DebugPort device path from text,
> current code use VENDOR_DEFINED_MESSAGING_DEVICE_PATH structure
> for Debug port device node.
> typedef struct {
>    EFI_DEVICE_PATH_PROTOCOL  Header;
>    EFI_GUID                  Guid;
>    UINT8                     VendorDefinedData[1];
> } VENDOR_DEFINED_MESSAGING_DEVICE_PATH;
> 
> And Debugport Device Path is a vendor-defined messaging
> device path with no data, only a GUID. So it's better to
> use VENDOR_DEVICE_PATH to create the Debug port device node.
> typedef struct {
>    EFI_DEVICE_PATH_PROTOCOL        Header;
>    EFI_GUID                        Guid;
> } VENDOR_DEVICE_PATH;
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
> index c5f3764fc0..49da8268eb 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
> @@ -1756,16 +1756,16 @@ DevPathFromTextEmmc (
>   EFI_DEVICE_PATH_PROTOCOL *
>   DevPathFromTextDebugPort (
>     IN CHAR16 *TextDeviceNode
>     )
>   {
> -  VENDOR_DEFINED_MESSAGING_DEVICE_PATH  *Vend;
> +  VENDOR_DEVICE_PATH  *Vend;
>   
> -  Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
> +  Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (
>                                                       MESSAGING_DEVICE_PATH,
>                                                       MSG_VENDOR_DP,
> -                                                    (UINT16) sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
> +                                                    (UINT16) sizeof (VENDOR_DEVICE_PATH)
>                                                       );
>   
>     CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);
>   
>     return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path
  2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
                   ` (4 preceding siblings ...)
  2018-10-08  6:43 ` [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor " Ni, Ruiyu
@ 2018-10-08 11:54 ` Laszlo Ersek
  2018-10-08 14:36   ` Bi, Dandan
  5 siblings, 1 reply; 12+ messages in thread
From: Laszlo Ersek @ 2018-10-08 11:54 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Ruiyu Ni, Michael D Kinney, Liming Gao

Hi Dandan,

On 10/08/18 05:31, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1225
> 
> According to UEFI spec, the string expression of UTF8 vendor
> device node should be displayed as: VenUtf8(). Current code
> display it as: VenUft8() by mistake when convert device
> path node to text.
> 
> This commit is to fix this bug.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> index 7d8d304f6f..85f5e97131 100644
> --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> @@ -193,11 +193,11 @@ DevPathToTextVendor (
>          return ;
>        } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {
>          UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");
>          return ;
>        } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
> -        UefiDevicePathLibCatPrint (Str, L"VenUft8()");
> +        UefiDevicePathLibCatPrint (Str, L"VenUtf8()");
>          return ;
>        } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
>          FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);
>          switch (FlowControlMap & 0x00000003) {
>          case 0:
> 

it makes sense to send a set of patches that are correlated in some
fashion, even if they individually address different BZs and don't form
a coherent "feature" or larger "bugfix". However, even in such cases,
please send a common cover letter (0/5 in this case). Seeing a unified
diffstat, and a few intro words (about the common theme of the patch
set) is helpful.

(no need to repost, just for the future)

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path
  2018-10-08 11:54 ` Laszlo Ersek
@ 2018-10-08 14:36   ` Bi, Dandan
  0 siblings, 0 replies; 12+ messages in thread
From: Bi, Dandan @ 2018-10-08 14:36 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org
  Cc: Ni, Ruiyu, Kinney, Michael D, Gao, Liming, Bi, Dandan

Hi Laszlo,

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Laszlo Ersek
> Sent: Monday, October 08, 2018 7:55 PM
> To: Bi, Dandan <dandan.bi@intel.com>; edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2] [patch 1/5] MdePkg: Correct the string expression of
> UTF8 vendor device path
> 
> Hi Dandan,
> 
> On 10/08/18 05:31, Dandan Bi wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1225
> >
> > According to UEFI spec, the string expression of UTF8 vendor device
> > node should be displayed as: VenUtf8(). Current code display it as:
> > VenUft8() by mistake when convert device path node to text.
> >
> > This commit is to fix this bug.
> >
> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> > ---
> >  MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> > b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> > index 7d8d304f6f..85f5e97131 100644
> > --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> > +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
> > @@ -193,11 +193,11 @@ DevPathToTextVendor (
> >          return ;
> >        } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {
> >          UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");
> >          return ;
> >        } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
> > -        UefiDevicePathLibCatPrint (Str, L"VenUft8()");
> > +        UefiDevicePathLibCatPrint (Str, L"VenUtf8()");
> >          return ;
> >        } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
> >          FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *)
> Vendor)->FlowControlMap);
> >          switch (FlowControlMap & 0x00000003) {
> >          case 0:
> >
> 
> it makes sense to send a set of patches that are correlated in some fashion,
> even if they individually address different BZs and don't form a coherent
> "feature" or larger "bugfix". However, even in such cases, please send a
> common cover letter (0/5 in this case). Seeing a unified diffstat, and a few
> intro words (about the common theme of the patch
> set) is helpful.
> 
> (no need to repost, just for the future)
> 
Thanks for the reminder, I will pay more attention in the future.

Thanks,
Dandan

> Thanks
> Laszlo
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-08 14:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08  3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
2018-10-08  3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
2018-10-08  6:45   ` Ni, Ruiyu
2018-10-08  3:31 ` [patch 3/5] MdePkg: Correct condition check for AcpiExp text format Dandan Bi
2018-10-08  6:49   ` Ni, Ruiyu
2018-10-08  3:31 ` [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path Dandan Bi
2018-10-08  6:50   ` Ni, Ruiyu
2018-10-08  3:31 ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path Dandan Bi
2018-10-08  6:54   ` Ni, Ruiyu
2018-10-08  6:43 ` [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor " Ni, Ruiyu
2018-10-08 11:54 ` Laszlo Ersek
2018-10-08 14:36   ` Bi, Dandan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox