From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 06 Jun 2019 10:13:18 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9114231628F2; Thu, 6 Jun 2019 17:13:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-49.ams2.redhat.com [10.36.116.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E98963F72; Thu, 6 Jun 2019 17:13:02 +0000 (UTC) Subject: Re: [PATCH v2 1/4] MdeModulePkg: Introduce EDKII_SERIAL_PORT_LIB_VENDOR_GUID To: Anthony PERARD , devel@edk2.groups.io Cc: Ray Ni , Julien Grall , Ard Biesheuvel , Leif Lindholm , Jian J Wang , Hao A Wu , Star Zeng References: <20190606131459.1464-1-anthony.perard@citrix.com> <20190606131459.1464-2-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 6 Jun 2019 19:13:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190606131459.1464-2-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 06 Jun 2019 17:13:11 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/06/19 15:14, Anthony PERARD wrote: > SERIAL_DXE_FILE_GUID is used in different places, create a single > define that other can use. Also fix SerialDxe to actually use > EDKII_SERIAL_PORT_LIB_VENDOR_GUID in the device path instead of the > FILE_GUID. > > Suggested-by: Laszlo Ersek > Signed-off-by: Anthony PERARD > --- > > Notes: > Suggested in: Message-ID: <7d6adf5d-baca-7e9c-68ef-2f8479bbd902@redhat.com> > > MdeModulePkg/MdeModulePkg.dec | 3 +++ > .../Universal/SerialDxe/SerialDxe.inf | 1 + > .../Include/Guid/SerialPortLibVendor.h | 19 +++++++++++++++++++ > MdeModulePkg/Universal/SerialDxe/SerialIo.c | 3 ++- > 4 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 MdeModulePkg/Include/Guid/SerialPortLibVendor.h > > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec > index 6cba729982..2dee139ba3 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -396,6 +396,9 @@ [Guids] > ## Include/Guid/S3StorageDeviceInitList.h > gS3StorageDeviceInitListGuid = { 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } } > > + ## Include/Guid/SerialPortLibVendor.h > + gEdkiiSerialPortLibVendorGuid = { 0xD3987D4B, 0x971A, 0x435F, { 0x8C, 0xAF, 0x49, 0x67, 0xEB, 0x62, 0x72, 0x41 } } > + > [Ppis] > ## Include/Ppi/AtaController.h > gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} > diff --git a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > index 81066a26a2..b6c85b3f84 100644 > --- a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > +++ b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > @@ -22,6 +22,7 @@ [Sources.common] > > [Packages] > MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > > [LibraryClasses] > UefiDriverEntryPoint > diff --git a/MdeModulePkg/Include/Guid/SerialPortLibVendor.h b/MdeModulePkg/Include/Guid/SerialPortLibVendor.h > new file mode 100644 > index 0000000000..887f96c30a > --- /dev/null > +++ b/MdeModulePkg/Include/Guid/SerialPortLibVendor.h > @@ -0,0 +1,19 @@ > +/** @file > + Define the SerialDxe GUID. I think we could elaborate a bit more here, if we really wanted to, but in the end I'm fine with this. (I'm not an MdeModulePkg maintainer though.) Reviewed-by: Laszlo Ersek Thanks Laszlo > + > + Copyright (c) 2019, Citrix Systems, Inc. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#ifndef __SERIAL_PORT_LIB_VENDOR_H__ > +#define __SERIAL_PORT_LIB_VENDOR_H__ > + > +#define EDKII_SERIAL_PORT_LIB_VENDOR_GUID { \ > + 0xD3987D4B, 0x971A, 0x435F, \ > + { 0x8C, 0xAF, 0x49, 0x67, 0xEB, 0x62, 0x72, 0x41 } \ > + } > + > +extern EFI_GUID gEdkiiSerialPortLibVendorGuid; > + > +#endif // __SERIAL_PORT_LIB_VENDOR_H__ > diff --git a/MdeModulePkg/Universal/SerialDxe/SerialIo.c b/MdeModulePkg/Universal/SerialDxe/SerialIo.c > index 720a3f264a..fb816a1611 100644 > --- a/MdeModulePkg/Universal/SerialDxe/SerialIo.c > +++ b/MdeModulePkg/Universal/SerialDxe/SerialIo.c > @@ -16,6 +16,7 @@ > > #include > #include > +#include > > typedef struct { > VENDOR_DEVICE_PATH Guid; > @@ -159,7 +160,7 @@ EFI_HANDLE mSerialHandle = NULL; > SERIAL_DEVICE_PATH mSerialDevicePath = { > { > { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, { sizeof (VENDOR_DEVICE_PATH), 0} }, > - EFI_CALLER_ID_GUID // Use the driver's GUID > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID > }, > { > { MESSAGING_DEVICE_PATH, MSG_UART_DP, { sizeof (UART_DEVICE_PATH), 0} }, >