From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 325AF740039 for ; Tue, 20 Feb 2024 17:11:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YwhX8tXV+0Jz1Tx6YDdNzg8mk3kAXHtbYR986RO+/kI=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708449098; v=1; b=oBI8zU3yi4yUGR44QSgWNzigMqLj1VnW7EQm6+3pf+mLtePwtzd81aT7ZVRG7YbEeN5GVfpm eSWyHJSStILB5dFo7Ql90SDomyeEG5Ukim760EJFUCSr2f43gK7b+bW58pDs5loZNBnwqabz/gO oeA56OHToX3muEyrjFRY1BkM= X-Received: by 127.0.0.2 with SMTP id r1PPYY7687511xRujN4BkY2b; Tue, 20 Feb 2024 09:11:38 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mx.groups.io with SMTP id smtpd.web11.18760.1708449098008210988 for ; Tue, 20 Feb 2024 09:11:38 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10990"; a="2472751" X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="2472751" X-Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2024 09:11:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="9410865" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Feb 2024 09:11:37 -0800 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 09:11:36 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 09:11:36 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 20 Feb 2024 09:11:36 -0800 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 20 Feb 2024 09:11:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BTUmT4Ox3IMimMbvI93b2WmuYZiuF28wm6YhK+yL2IoTojtMXRVc2lgLuIU/IkRz7gAR1LO8jYYjqEHjWf26sTdwiKo7r69e4IEPYKpXDjqxQZ7PGts1TJ3Sp8N/lbhDeXR1UUtetqwVhlPMJdssDC2E85RVEYZ5AnwuDhcORmL4tAX6m3RAh/iBLCa/pGZ60mfnYvYNU584kxtA6xoP4S5wKx6zQYhBTF7RloEAWSMe6wdHBO9owOS5AVORpAseBNDjv8Kt1NqubbiSH90vAUjRIlxzMzIm41EApeWD5b2cUHSd1J1NgO/orqG+KMLmeJJOSfdybbuvPAdL965xHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iTIm44R0VGax8uNJUW+caSamSxwlX4TrjcyeUWW7vIo=; b=daO+TIdJv8WnrTUARtCVV2CHIEVCx1WSgfoB7iQJX2SlGTrkacaCmwQF4eshJCsxkkoln25AU4KTrHKTQph+Dx5gf56Bd9b7RMdjkIB3Z9T5Gv+6MxQkL3KLyMPcmzE0rkZupUR9X7UDci5Fmyp9DvFCpwVlFV8021pM2UDVTiPMO5suOlF6egqUFz6vXWV1PopeFs6D09gGFJOvLogRnsVksOk/DgIJC8BwiSoC0PJodrOuYmDLYGCo4OesXr07YuD6zAMrJVwfbT4FVRfBucrPwzO9OD/ZkGazYj3/1yQIRvCJR5Y5NgJoMWOIrhN3iqwQmvpnmEEWNrsxj0qa1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by MW5PR11MB5859.namprd11.prod.outlook.com (2603:10b6:303:19e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Tue, 20 Feb 2024 17:11:32 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00%6]) with mapi id 15.20.7316.018; Tue, 20 Feb 2024 17:11:32 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "Borzeszkowski, Alan" CC: "Albecki, Mateusz" , "Gao, Zhichao" , "Ni, Ray" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Load Serial driver earlier in DXE Thread-Topic: [edk2-devel] [PATCH 1/1] MdeModulePkg: Load Serial driver earlier in DXE Thread-Index: AQHaZBH4FJ3V47yyvkSrD7No48pbkbETdiLw Date: Tue, 20 Feb 2024 17:11:32 +0000 Message-ID: References: <20240220121045.2149320-1-alan.borzeszkowski@intel.com> <20240220121045.2149320-2-alan.borzeszkowski@intel.com> In-Reply-To: <20240220121045.2149320-2-alan.borzeszkowski@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|MW5PR11MB5859:EE_ x-ms-office365-filtering-correlation-id: 8eadafb0-1704-4bfa-90d6-08dc3236fc9c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: EI3N3UaIbYsG2KuXCqZ+fFjygoihMTK7j/YkKiGji5nCM0KZXHHYcAlHA7XIHtFg5WH6j3k3SdL00s9FoJLoSCsF+rp7uW8HXqLcMvEfqWTqIaNVu1IYUwowQxKRAEBHstpXm8DZpjC66Ik0PSkSNhr4JjKxZhK54yKl7Hyf3c2rEbIufXeFfDFj+cFW+5Jh1+H5qJL8MK7On/1O7MCedyfaes7EHpT2sosWAnsnKF2DbdumaDIgoO1Xv9bYi7fPL/8ci4b9PK24XD1LHr9Hcm7AiJMWuPAvohRJQswMO5dtz/GOdKV+3rt9JwiQfoAAB9nm90YyzM9fax8g1nmkK+Z1zCgztPcC9Wn/Ueo/5rqnV7oZrhiJLoVuRRVzX9cD/i1zgo6u0kMpWrMdg1iXoVwZnY59Cc265AeJW7AdmW15Fwwj1NtLnTKxf4tZIxS4RcgzTi0r4/6It4083Yp9GYvQemf4yD8qRvUROtTZe7VFuE3mFFg3SxsQOBFn+2fiiCmfzUFzx18khHUe7kPwY12IaN2O7JiYwkcwEsg9xLXggTv9bGhCwMKNjTF4SHeK6oB3YVt4MJ2LYZyigMFZKSlL779pUuhovD7LBuWv6xo= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qmGfiOZT/91duqibqbgzJjfsJKDHy8G2Op/abRWEHBfw3WZIqk0KgaFfC0Dz?= =?us-ascii?Q?T5qzKaAH9BjebHZdpdiUn8M/P8jGmxs/Jl+2dlvjWghVz1azcUxPftNDblje?= =?us-ascii?Q?XLhhIA5amCyeYRhuRjhOTKywr1IxIofzrzIfQdcCB0zyv2GOytszViE443bA?= =?us-ascii?Q?nhZdTGnF9L1oIUQaHhTV7mF0bSvmEYdozw7+ZZbjUWl/u/rJi/2318xYDxlx?= =?us-ascii?Q?iyCRwGkEpFbPt48N6CqGwIPHfYk2KVlSntfsJuEKV+vGLgv8E8E0pw0BbMZg?= =?us-ascii?Q?uXLA7t0+hFznzI7nfvJm56ubIHLu/KsBN9CY4dRxstTnUqU4UdLnKqLljHPj?= =?us-ascii?Q?BFsyvz1MkW7hJ23RjTOqC2loronx5/+Af2JB7aia4z/0D+mgO6KulZfmQU0M?= =?us-ascii?Q?K0iHKqwUOjMmEj6TTRw5SwWGaisxARDTm3i2RTlJv4Nid4+z6zBfW35Zv6cW?= =?us-ascii?Q?KEYY31QpJu0EAbA2yKoPtYSk/j1+5mSsbl+JgaXrf6NHC/wApwHlSC5W/pc/?= =?us-ascii?Q?JFNnrSwSLhaiW3z2y6SXAkEX4Hg/wKAf5psms1L33SkJK65c+YxnK6O6Hxih?= =?us-ascii?Q?vn5hief5RqAnlUUpA6KPoTYJOQTGle63aXQdqnMN4+77MJHpWA1ww+TGyptq?= =?us-ascii?Q?wyi/Ry+wRGyWc7dkeqTAzREVBrmXSLAoLcQP6jDDrCihDeOOHqokf5U1uQ+E?= =?us-ascii?Q?TYdS86WTHP97LN6uhDBNwSq6unEcAgn+BzqQBSCUPBk5WIkOH4h2fH6ak6T5?= =?us-ascii?Q?uibEAoiIhz45fQnCGDtnvqeV2xzAX2Ido3u6z/Znhmd/ShKkyzJgHPAqcX1J?= =?us-ascii?Q?hXqol6zpgW9APPYbrVivcv0b28Two4yRG/5qs7jOD8BPxwvti1KcbU2z4+Le?= =?us-ascii?Q?8yMHqRASm7/fFcRb9cfNFAhXJUX0TFCLJ5Rf8yg9RsiT0qhFHH51Xnj9rcw3?= =?us-ascii?Q?cO18jIc+mOJjJssN5FXN0mbubtvhLSY3K3LDnC6mJYUv8YvatYIXpmb/VTn7?= =?us-ascii?Q?B/OBactj4X85B9ohMFwxGbwoidkZ+LDiJtz5m+pBEjmucuvfUo9AGfetX4mR?= =?us-ascii?Q?bBGtPsVlctr/a2uAfBCQd6DMlVLNshEkTdoYqYJXxRYv34TZpz1AMauyjK8P?= =?us-ascii?Q?NEeUxqrk1SeDanlCMRxvL/4gWmdyPIgKsGBj7kV3zpELmnmJ3CCxiARZs+rP?= =?us-ascii?Q?gl7GbqLlLctfmIhuxxCB2pvr/VF3vivvRy2p+YbgSpUydULGI49V2Hd4D9Wj?= =?us-ascii?Q?XOJG+JUp7Ccaxw0E4QzGzMSt6SouCFY1JyhwRp4o07x3cc+d8YMjdwWC7/KN?= =?us-ascii?Q?U76CAceiogAUobQhxaqDk9KysGr+BUMdMjak5GP3iInM0FJ5kv2L6qAWZzuA?= =?us-ascii?Q?OsekadjuJtdOmvUnjksltbDvf/zoQZ0418C7BQ/6t4Kd/7YwDYVrjYqys0jW?= =?us-ascii?Q?0w1FaXxB4+hlWN1p3eruesKlbASNpaEwh7+bFw8GzYJN9P1amHrr2QMvKKWD?= =?us-ascii?Q?48p5K2sZNC+88fWdqKtjr0wkaNBqiWIKsxlhios47Q43pJDz5eb2EjfLuwBD?= =?us-ascii?Q?QEgj17qvN4LS5XGqRgJmJVnpOzPJ31/8T0s0NPb6mRlYTEHBfchf8Ww9/4tL?= =?us-ascii?Q?Gg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8eadafb0-1704-4bfa-90d6-08dc3236fc9c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2024 17:11:32.7181 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6zQqTN691jTeSs8apGEOSXpc3vzw5DMv78XdSqtEK5ZfqN90mGjI1B4K86S/Ecdd2DatlWwyH83Wi2s3PX668o6ScAqIM+DSLA7as+WWzMA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5859 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: THAcZynykVUCo5QQMfBVRY3Dx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=oBI8zU3y; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") This is a UEFI Driver that depends on the Driver Binding Protocol and use of ConnectController(). These drivers cannot be used until the BDS phase when the active consoles and boot devices are evaluated and the smallest set of drivers required to boot are connected. It does not make sense to have a UEFI Driver active in early=20 DXE because it will not be connected yet and has dependencies on other UEFI drivers that will not be connected yet. Did you consider the use of the SerialPortLib for early DXE that=20 can use PCI serial devices with PcdSerialPciDeviceInfo that can be used for DEBUG() messages. The other option is to map the PCI UART into Report Status Code. Best regards, Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of > Borzeszkowski, Alan > Sent: Tuesday, February 20, 2024 4:11 AM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz ; Gao, Zhichao > ; Ni, Ray ; Borzeszkowski, > Alan > Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg: Load Serial driver > earlier in DXE >=20 > For the purpose of UEFI debug prints enablement in DXE phase, > Serial driver should load earlier. Separate .inf file is created > in order to make minimal changes to current implementation. >=20 > Signed-off-by: Alan Borzeszkowski > --- > .../PciSioSerialDxe/PciSioSerialDxeEarly.inf | 80 +++++++++++++++++++ > 1 file changed, 80 insertions(+) > create mode 100644 > MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeEarly.inf >=20 > diff --git > a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeEarly.inf > b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeEarly.inf > new file mode 100644 > index 0000000000..2ead654898 > --- /dev/null > +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeEarly.inf > @@ -0,0 +1,80 @@ > +## @file > +# Serial driver for standard UARTS on a SIO chip or PCI/PCIE card. > +# > +# Produces the Serial I/O protocol for standard UARTS using Super I/O > or PCI I/O. > +# This version is used shortly after DXE Core is invoked > +# > +# Copyright (c) 2007 - 2018, Intel Corporation. All rights > reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D PciSioSerialDxeEarly > + MODULE_UNI_FILE =3D PciSioSerialDxe.uni > + FILE_GUID =3D 8BCC425E-585F-4E66-ADA5- > FEA9A635F911 > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + ENTRY_POINT =3D InitializePciSioSerial > + > +# > +# The following information is for reference only and not required by > the build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 EBC > +# > +# DRIVER_BINDING =3D gSerialControllerDriver > +# COMPONENT_NAME =3D gPciSioSerialComponentName > +# COMPONENT_NAME2 =3D gPciSioSerialComponentName2 > +# > + > +[Sources] > + ComponentName.c > + SerialIo.c > + SerialIoCommon.c > + Serial.h > + Serial.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + > +[LibraryClasses] > + PcdLib > + ReportStatusCodeLib > + UefiBootServicesTableLib > + MemoryAllocationLib > + BaseMemoryLib > + DevicePathLib > + UefiLib > + UefiDriverEntryPoint > + DebugLib > + IoLib > + > +[Guids] > + gEfiUartDevicePathGuid ## SOMETIMES_CONSUMES > ## GUID > + > +[Protocols] > + gEfiSioProtocolGuid ## TO_START > + gEfiDevicePathProtocolGuid ## TO_START > + gEfiPciIoProtocolGuid ## TO_START > + gEfiSerialIoProtocolGuid ## BY_START > + gEfiDevicePathProtocolGuid ## BY_START > + > +[FeaturePcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHalfHandshake|FALSE ## > CONSUMES > + > +[Pcd] > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 ## > CONSUMES > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 ## > CONSUMES > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 ## > CONSUMES > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 ## > CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|1843200 ## > CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters ## > CONSUMES > + > +[UserExtensions.TianoCore."ExtraFiles"] > + PciSioSerialDxeExtra.uni > + > +[Depex] > + TRUE > -- > 2.34.1 >=20 > --------------------------------------------------------------------- > Intel Technology Poland sp. z o.o. > ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII > Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957- > 07-52-316 | Kapital zakladowy 200.000 PLN. > Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu > ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom > w transakcjach handlowych. >=20 > Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego > adresata i moze zawierac informacje poufne. W razie przypadkowego > otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale > jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest > zabronione. > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). If you are not the intended > recipient, please contact the sender and delete all copies; any review > or distribution by others is strictly prohibited. >=20 >=20 >=20 >=20 >=20 -=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 (#115663): https://edk2.groups.io/g/devel/message/115663 Mute This Topic: https://groups.io/mt/104469297/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-