]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path
authorDandan Bi <dandan.bi@intel.com>
Fri, 5 Oct 2018 09:30:31 +0000 (17:30 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 12 Oct 2018 06:46:01 +0000 (14:46 +0800)
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>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c

index c5f3764fc096475de834c76695e4b71bdc45d334..49da8268ebc894ba841dbb3fbf5a6f17748aae5f 100644 (file)
@@ -1758,12 +1758,12 @@ DevPathFromTextDebugPort (
   IN CHAR16 *TextDeviceNode\r
   )\r
 {\r
-  VENDOR_DEFINED_MESSAGING_DEVICE_PATH  *Vend;\r
+  VENDOR_DEVICE_PATH  *Vend;\r
 \r
-  Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (\r
+  Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (\r
                                                     MESSAGING_DEVICE_PATH,\r
                                                     MSG_VENDOR_DP,\r
-                                                    (UINT16) sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)\r
+                                                    (UINT16) sizeof (VENDOR_DEVICE_PATH)\r
                                                     );\r
 \r
   CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);\r