From nobody Sat May 4 08:23:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40162+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40162+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1557280984; cv=none; d=zoho.com; s=zohoarc; b=Yi/xTYCNWnqchruxbOZg9rfEqCJCkalVFPtXpuxbQK7zQ/blG+KK2YNJCATC4B4T+qqC71ye6yzTO39hejW65bLEbAMPtUs6hmkwlD9Ugyb4ezRr+83HWoh7agEFFCvTL8ajaB6Gor6aq+UZGicsl8Ot7TPmp6eIf/jq8I1BPrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557280984; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=SgtIb1NBviBek9Uc+CBo4Kv5wmi5Mvx93FRolv2PVjo=; b=DlncSNNgmgwn2V2rsuu9PxzrZeTDA65eD+46zCD+CMEoVkuMf2cd1iAPmxk2g+wsQj6pgzPO1SItCSJBVoqSjYrfyAhFQeR2HH707Ah95RyIdwfINukrIUs0UOqSO7CD8RqQbiDs8OUuVaD8du2+hZjRtgmdLh/PYxL63j9UwHs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40162+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557280984280926.7808654029649; Tue, 7 May 2019 19:03:04 -0700 (PDT) Return-Path: X-Received: from out01.hibox.biz (out01.hibox.biz [210.71.195.45]) by groups.io with SMTP; Tue, 07 May 2019 19:03:02 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2ADAADoNdJc/ww0GKxkGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBUQQBAQEBAQsBhCWEEIgcn19jhRgUgWcQgXiCdYI7NAk?= =?us-ascii?q?OAQMBAQUBAQEBAoEJDIV0BFEBKBQWBAcCCwMCAQIBSwEMAQUCAQGyZnwlDho?= =?us-ascii?q?CA4UpgyGBRYEyAYFfiFCCdT+DdWyBDoJ7g0WCWASSWTo8k3MHAoILVQSRdhu?= =?us-ascii?q?MMQOJIy2DRYgyjRqIBIFPgg4zGiODPIIaARcUi2WCM2WRSAEB?= X-IronPort-AV: E=Sophos;i="5.60,444,1549900800"; d="scan'208,217";a="35791355" X-Received: from unknown (HELO hb3-BKT202.hibox.biz) ([172.24.52.12]) by out01.hibox.biz with ESMTP; 08 May 2019 10:03:00 +0800 X-Received: from unknown (HELO hb3-BKT102.hibox.biz) ([172.24.51.12]) by hb3-BKT202.hibox.biz with ESMTP; 08 May 2019 10:02:58 +0800 X-Received: from unknown (HELO hb3-IN03.hibox.biz) ([172.24.12.13]) by hb3-BKT102.hibox.biz with ESMTP; 08 May 2019 10:03:00 +0800 X-Remote-IP: 60.250.30.118 X-Remote-Host: 60-250-30-118.hinet-ip.hinet.net X-SBRS: 2.7 X-MID: 23889613 X-Auth-ID: nick.wang@insyde.com X-EnvelopeFrom: nick.wang@insyde.com X-Received: from 60-250-30-118.hinet-ip.hinet.net (HELO [127.0.0.1]) ([60.250.30.118]) by hb3-IN03.hibox.biz with ESMTP/TLS/AES128-SHA; 08 May 2019 10:03:00 +0800 Message-ID: <5CD238D2.3030909@insyde.com> Date: Wed, 08 May 2019 10:02:58 +0800 From: "Nick Wang" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: devel@edk2.groups.io, supreeth.venkatesh@arm.com, "Jin, Eric" CC: IMCEAINVALID-+40intel+2Ecom+20+3E+3E+20Jin@arm.com, ruth.li@intel.com Subject: [edk2-devel][edk2-test][PATCH V2] EFI/Protocol: Fix to use VENDOR_DEVICE_PATH to create the Debug port device node for DevicePath related protocol tests. Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nick.wang@insyde.com Content-Type: multipart/alternative; boundary="------------030504030502070108050402" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557280983; bh=ap1E5nwZBL/kIFYxvv88lUZSD8gX3aDv60LFja32z7w=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=AVBMSmRZ6hHvCzI0r6mBlIewac+m5c0X/p/kJlPGFuP7ULdHdbczQvqg9pD9uILgMox KQeGkmHaW459dopNRshry/L+iebhkGq8EnWG8/AvQCgvXclUAY7ABnXOk8REt6b58dSfW aV/vfCulBOoPvVRSlNn9PSCuDZ6qeh5IFOM= X-ZohoMail-DKIM: pass (identity @groups.io) --------------030504030502070108050402 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format="flowed" Follow edk2 tree hash: 9343d0a1cd09544686b14dba5b428d7bc811f6b9 to use=20 VENDOR_DEVICE_PATH to create the Debug port device node. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Nick Wang Reviewed-by: Supreeth Venkatesh --- .../DevicePathFromTextBBTestCoverage.c | 16 +++++++--------- .../BlackBoxTest/DevicePathToTextBBTestMain.c | 5 +++-- uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 11 deletions(-) diff --git=20 a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTes= t/DevicePathFromTextBBTestCoverage.c=20 b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTes= t/DevicePathFromTextBBTestCoverage.c index 96cd84fd..98187a62 100644 ---=20 a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTes= t/DevicePathFromTextBBTestCoverage.c +++=20 b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTes= t/DevicePathFromTextBBTestCoverage.c @@ -2,6 +2,7 @@ Copyright 2006 - 2017 Unified EFI, Inc. Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. + Copyright (c) 2019, Insyde Software Corp. All Rights Reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the=20 BSD License @@ -1105,22 +1106,19 @@ CreateSASExDeviceNode ( return (EFI_DEVICE_PATH_PROTOCOL *) SasEx; } -#define DebugPortNodeType 3 -#define DebugPortNodeSubType 10 - STATIC EFI_DEVICE_PATH_PROTOCOL * CreateDebugPortDeviceNode ( IN CHAR16 *TextDeviceNode ) { - VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend; + VENDOR_DEVICE_PATH *Vend; - Vend =3D (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode ( - DebugPortNodeType, - DebugPortNodeSubType, - sizeof(VENDOR_DEFINED_MESSAGING_DEVICE_PATH) - ); + Vend =3D (VENDOR_DEVICE_PATH *) CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + sizeof(VENDOR_DEVICE_PATH) + ); Vend->Guid =3D gBlackBoxEfiDebugPortProtocolGuid; return (EFI_DEVICE_PATH_PROTOCOL *) Vend; diff --git=20 a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/= DevicePathToTextBBTestMain.c=20 b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/= DevicePathToTextBBTestMain.c index d0809776..32ce720d 100644 ---=20 a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/= DevicePathToTextBBTestMain.c +++=20 b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/= DevicePathToTextBBTestMain.c @@ -2,6 +2,7 @@ Copyright 2006 - 2017 Unified EFI, Inc. Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019, Insyde Software Corp. All Rights Reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the=20 BSD License @@ -1708,9 +1709,9 @@ BuildDebugPortDeviceNode ( IN CHAR16 *TextDeviceNode ) { - VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend; + VENDOR_DEVICE_PATH *Vend; - Vend =3D (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (0x3,=20 0x0a, sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)); + Vend =3D (VENDOR_DEVICE_PATH *) CreateDeviceNode (MESSAGING_DEVICE_PATH,=20 MSG_VENDOR_DP, sizeof (VENDOR_DEVICE_PATH)); Vend->Guid =3D gBlackBoxEfiDebugPortProtocolGuid; diff --git a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h=20 b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h index f69dc761..8bce7f14 100644 --- a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h +++ b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h @@ -2,6 +2,7 @@ Copyright 2006 - 2017 Unified EFI, Inc. Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. + Copyright (c) 2019, Insyde Software Corp. All Rights Reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the=20 BSD License @@ -502,6 +503,14 @@ typedef struct { // } ACPI_ADR_DEVICE_PATH; + +/// +/// Messaging Device Paths. +/// This Device Path is used to describe the connection of devices=20 outside the resource domain of the +/// system. This Device Path can describe physical messaging=20 information like SCSI ID, or abstract +/// information like networking protocol IP addresses. +/// +#define MESSAGING_DEVICE_PATH 0x03 /// /// SCSI Device Path SubType. /// @@ -662,6 +671,12 @@ typedef struct { UINT8 Lun; } DEVICE_LOGICAL_UNIT_DEVICE_PATH; +// +// Use VENDOR_DEVICE_PATH struct +// +#define MSG_VENDOR_DP 0x0a +typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; + /// /// CD-ROM Media Device Path SubType. /// --=20 2.19.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40162): https://edk2.groups.io/g/devel/message/40162 Mute This Topic: https://groups.io/mt/31539240/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --------------030504030502070108050402 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Follow edk2 tree hash: 9343d0a1cd09544686b14dba5b428d7bc811f6b9 to use VENDOR_DEVICE_PATH to create the Debug port device node.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Nick Wang <nick.wang@insyde.com>
---
.../DevicePathFromTextBBTestCoverage.c | 16 +++++++---------
.../BlackBoxTest/DevicePathToTextBBTestMain.c | 5 +++--
uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h | 15 +++++++++++++++
3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
index 96cd84fd..98187a62 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1105,22 +1106,19 @@ CreateSASExDeviceNode (
return (EFI_DEVICE_PATH_PROTOCOL *) SasEx;
}

-#define DebugPortNodeType 3
-#define DebugPortNodeSubType 10
-
STATIC
EFI_DEVICE_PATH_PROTOCOL *
CreateDebugPortDeviceNode (
IN CHAR16 *TextDeviceNode
)
{
- VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
+ VENDOR_DEVICE_PATH *Vend;

- Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
- DebugPortNodeType,
- DebugPortNodeSubType,
- sizeof(VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
- );
+ Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (
+ MESSAGING_DEVICE_PATH,
+ MSG_VENDOR_DP,
+ sizeof(VENDOR_DEVICE_PATH)
+ );
Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;

return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
index d0809776..32ce720d 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1708,9 +1709,9 @@ BuildDebugPortDeviceNode (
IN CHAR16 *TextDeviceNode
)
{
- VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
+ VENDOR_DEVICE_PATH *Vend;

- Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (0x3, 0x0a, sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH));
+ Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, sizeof (VENDOR_DEVICE_PATH));

Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;

diff --git a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h
index f69dc761..8bce7f14 100644
--- a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h
+++ b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h
@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -502,6 +503,14 @@ typedef struct {
//
} ACPI_ADR_DEVICE_PATH;

+
+///
+/// Messaging Device Paths.
+/// This Device Path is used to describe the connection of devices outside the resource domain of the
+/// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
+/// information like networking protocol IP addresses.
+///
+#define MESSAGING_DEVICE_PATH 0x03
///
/// SCSI Device Path SubType.
///
@@ -662,6 +671,12 @@ typedef struct {
UINT8 Lun;
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;

+//
+// Use VENDOR_DEVICE_PATH struct
+//
+#define MSG_VENDOR_DP 0x0a
+typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
+
///
/// CD-ROM Media Device Path SubType.
///
--
2.19.1.windows.1

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#40162) | | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
--------------030504030502070108050402--