public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path
Date: Mon,  8 Oct 2018 11:31:58 +0800	[thread overview]
Message-ID: <20181008033158.10652-5-dandan.bi@intel.com> (raw)
In-Reply-To: <20181008033158.10652-1-dandan.bi@intel.com>

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



  parent reply	other threads:[~2018-10-08  3:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Dandan Bi [this message]
2018-10-08  6:54   ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181008033158.10652-5-dandan.bi@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox