[edk2-devel][edk2-test][PATCH] EFI/Protocol: Fix to use VENDOR_DEVICE_PATH to create the Debug port device node for DevicePath related protocol tests.

Supreeth Venkatesh supreeth.venkatesh at arm.com
Mon May 6 16:42:12 UTC 2019


Hi Nick,
Thanks for the patch.

On Sun, 2019-05-05 at 22:10 -0500,  via Groups.Io 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
Please add your email E.g., Signed-off-by: Name <email>

> ---
> .../BlackBoxTest/DevicePathFromTextBBTestCoverage.c | 13 +++++++-----
> -
> .../BlackBoxTest/DevicePathToTextBBTestMain.c | 5 +++--
> 2 files changed, 10 insertions(+), 8 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..56128f2a 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 
> @@ -1114,13 +1115,13 @@ 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 ( 
> + DebugPortNodeType, 
> + DebugPortNodeSubType, 
> + 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..2fe58337 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 (0x3, 0x0a, sizeof
> (VENDOR_DEVICE_PATH));
Can you please define meaningful macros/constants for 0x03 and 0x0a
(E.g., DebugNodeType, DebugNodeSubType) ?

>  
> 
> Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid; 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40050): https://edk2.groups.io/g/devel/message/40050
Mute This Topic: https://groups.io/mt/31520513/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list