public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [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.
@ 2019-05-08  2:02 Nick Wang
  2019-05-08 20:20 ` Supreeth Venkatesh
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Wang @ 2019-05-08  2:02 UTC (permalink / raw)
  To: devel, supreeth.venkatesh, Jin, Eric
  Cc: IMCEAINVALID-+40intel+2Ecom+20+3E+3E+20Jin, ruth.li

[-- Attachment #1: Type: text/plain, Size: 4520 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 6575 bytes --]

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

* Re: [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.
  2019-05-08  2:02 [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 Nick Wang
@ 2019-05-08 20:20 ` Supreeth Venkatesh
  0 siblings, 0 replies; 2+ messages in thread
From: Supreeth Venkatesh @ 2019-05-08 20:20 UTC (permalink / raw)
  To: Nick Wang, devel, Jin, Eric; +Cc: ruth.li

On Wed, 2019-05-08 at 10:02 +0800, Nick Wang wrote:
> 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>
Reviewed-by: Supreeth Venkatesh <supreeth.venkatesh@arm.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/D
> evicePathToTextBBTestMain.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c
> index d0809776..32ce720d 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.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
> 


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

end of thread, other threads:[~2019-05-08 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-08  2:02 [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 Nick Wang
2019-05-08 20:20 ` Supreeth Venkatesh

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