From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.28531.1605489637182352142 for ; Sun, 15 Nov 2020 17:20:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=CPh8PWh6; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: heng.luo@intel.com) IronPort-SDR: Rk7tg/0AZAiL5cPZIBushfebA326sgKBkx31GG5ubzDUCLAOafaDiVBB+Y0ayijjAdb4VHyGvO Rn9SIGeMZdNg== X-IronPort-AV: E=McAfee;i="6000,8403,9806"; a="234844849" X-IronPort-AV: E=Sophos;i="5.77,481,1596524400"; d="scan'208";a="234844849" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2020 17:20:35 -0800 IronPort-SDR: C7UmseQumafScV7MM/tmsFkpnaOaBHGHxItbg0hiCRLU9ra3NretkV2q3zxJCZMI35vGK6zao9 hSeGJfVJqJTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,481,1596524400"; d="scan'208";a="543403935" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga005.jf.intel.com with ESMTP; 15 Nov 2020 17:20:35 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 15 Nov 2020 17:20:34 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 15 Nov 2020 17:20:34 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.53) 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.1713.5; Sun, 15 Nov 2020 17:20:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d70a69IzXdF3/OyvUYjYIazECxg7XwiJyiKUPevmgAqydHszThb7GAsqvBPy6E5kv4APYrfOX8oaJg0ri0bAdaCvEw1zcahhpZvZVB1QRLQlypJpVM/2DRor0Hec9fOIPFy3vosy16+HokoYJxOW9v3MccSvHduBzT+aVAvH5+K8wYpBA8vLkotDYrWbj6geJWlgg+TN1r+GpvvVA7Ze/Oiz7GmYnYncsIoURhpFcB55aiTAYO5zaUXRpfvo2AIh0mCNE2hFqlV92kMpbMjIU82xG4Ma9Qpu2vr9a+Kut3g5FkmQY/pd4aOtt9QZVwKqlLKdTanD59Hj62R9b6Mvzg== 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-SenderADCheck; bh=JM2JIvwwITjb0z3hlJBp2OT0Igx80r/TvGa5y2On9UA=; b=LXBkxCPDYfS0WXM8b0S1fLwCpHFV5wGxFjqZum88VHq5UnnM1UlXQMVW6w0K/mmAOreFAWXBlSnGCi/A3HxOt7T+fGQMMjKzfK4RmqAWX+bdTkbK4p4LW+VhCyNsBGYRSoOmdsCptXJ5yuRUR1VDsdaGLAxSGUNxsTO5qsHMk5f05DfuK3n8p8TKLxJpYP/tPSZ9Z4ppheH/O09WrnVYwdYLt6C1ZoUVo5I12Ea2yTKcDKuELrRagtSjiiaf1gMc4jxfcGchPkkoUVxJCTyCvEjYUXGKjN7duA2T3r+LGARJD7CCIEDe8DyylFwVksgIunzdvJFFWPgaoW3kl1FBlQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JM2JIvwwITjb0z3hlJBp2OT0Igx80r/TvGa5y2On9UA=; b=CPh8PWh6DgL0T+/BTPF+fTNRktXqQ2/dwDOx8oGxCJk2LdGoifE2HCzmD5RjKRrcvLYYJKzx1/FqoLwuEHg42JZVI/bgJG0xwTKFmeG/u4tOfsY0nwM1QTqYgZQXJk2X34xcwRR7T7bEMCvRAXp63E113kMAJuDttisIUirYaMo= Received: from MWHPR11MB1805.namprd11.prod.outlook.com (2603:10b6:300:114::14) by MWHPR11MB1760.namprd11.prod.outlook.com (2603:10b6:300:10e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.28; Mon, 16 Nov 2020 01:20:31 +0000 Received: from MWHPR11MB1805.namprd11.prod.outlook.com ([fe80::bd78:5a79:d875:65e4]) by MWHPR11MB1805.namprd11.prod.outlook.com ([fe80::bd78:5a79:d875:65e4%12]) with mapi id 15.20.3564.028; Mon, 16 Nov 2020 01:20:31 +0000 From: "Heng Luo" To: "Desimone, Nathaniel L" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Chiu, Chasel" , Liming Gao Subject: Re: [Patch V6 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Thread-Topic: [Patch V6 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Thread-Index: AQHWuKALswl+CGEIPUmFNSI6nWkTDanGrUBAgANHYnA= Date: Mon, 16 Nov 2020 01:20:30 +0000 Message-ID: References: <20201112030031.1481-1-heng.luo@intel.com> <20201112030031.1481-3-heng.luo@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f0e8f8bc-ccfc-47e7-a136-08d889cdcf53 x-ms-traffictypediagnostic: MWHPR11MB1760: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QBoYkbDrOD1zTGjS2AcLhy05VEAILyq5yIqShPvaMuMH6efiabTwwtdOsAAK0ivoKAKuw6CTmZHNPwqja+dujUzkUmy3wu+9qWXJFnSk+g5RYSsZ31TKEXbjc2p5q5lyCtnz9F5oNbaQQzrgM9UymBh/NcampwenSjV1OiW2dfSbdjzOYl+PCPb7cLvXpaOVOFZRrTODAhSKZYVnJoSwhHFv2QuNUk+Tg4+az/zJYsFo0XzL9LMTq6R0DCAPFm3euEYC+krpG64Ow6ENe1aHKyshR/DlpIuF9wINbz7Zy+C09emGyqdz56cnTsxsJkr+/C4S3rMG8Lbceca6kGaqUV7n8P6CvmqpuWTYwNn0INeuOtXNcEGzk1aNxDKa3A5vf7MBEpBE3JlHZPb1FKMAAA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1805.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(136003)(366004)(396003)(478600001)(966005)(2906002)(83380400001)(55016002)(9686003)(52536014)(76116006)(5660300002)(26005)(7696005)(316002)(6506007)(71200400001)(53546011)(54906003)(110136005)(33656002)(86362001)(8676002)(30864003)(8936002)(4326008)(66476007)(66946007)(66556008)(64756008)(66446008)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: gjkPhpMAqGFu6+rozXCf/tgRCU0XQVOFuQAiK9Zr4DXTI7/I3ZYywXDdzMrcEq3JfacENPv2ML3GZbz45x+kTxyPylbS5/DG+3+Ktj/XUVZVO4N+rdBLRJPt2vbUhYb04vtRY7k4x7T8ObLCcLy0LGfcip3AUF26wkl7Z9rsGPw96p4oB0iNAV6Tm1RDvk0W9YXWplTK0NOHaOhVuyl25YXUXB+zbMQBVGQLlGk2vTlToQBwJV/odr4xf8LM9KmKlijW9gt+EXySg48cHldlNiQje33cTbq2QloazIjf6L9rY9TjaWVnCG8R5VzwstA0BfdbYiHYgzC59t3MLm9TKzEWi+IiBRXefZosqRQ48PO2dx5aGH7vfdre7TpAVHNxQdW+fZaVgAUgfDob2j9TBq9GFAHtg0nXOUr0wtBEaKqfnwtJlVl4SGj92j56rbEsMUoVWMoouRcD7CW0D/e8A0vB9j/xJcfqb4cLMLrQZY23c0rsUD7UHAZAJ0pW/tOnlMGDATkMVwdus6arJHEUD5F4zaOPQv2UnJrZ4Ho6i4gjstO3qN9LeIT+Riwyd9VSLkqA60+Bo/9nk+1HHwQ6OVwUkJf7WQpUXKzvv/QG+tW3LCt+2fouMC9FrjVcinA6z6/vCpR0CpuV1ibeih2+OA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1805.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0e8f8bc-ccfc-47e7-a136-08d889cdcf53 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2020 01:20:31.0091 (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: 1a1JlPnmhBd2c8su+bKXck9DxZPjvMp3WfqWTmUHhya5dRG2L+iDgLbWLBgR+u0S0aK/72LBViadQwqgstgkbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1760 Return-Path: heng.luo@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Nate, Thank you for your review, sorry about the mistake, I will submit Patch V7,= the first 2 changes are same, and fix the bug in last change. Thanks, Heng > -----Original Message----- > From: Desimone, Nathaniel L > Sent: Sunday, November 15, 2020 7:35 AM > To: Luo, Heng ; devel@edk2.groups.io > Cc: Dong, Eric ; Chiu, Chasel ; > Liming Gao > Subject: RE: [Patch V6 3/3] MinPlatformPkg: Add SerialPortTerminalLib to > suport Serial Terminal feature >=20 > Hi Heng, >=20 > There is a bug in this code. You need to change > SerialTerminalFeaturePkg/Library/SerialPortTerminalLib/SerialPortTerminal= Li > b.inf to > MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf >=20 > Other than that, look's good! >=20 > Thanks, > Nate >=20 > On 11/11/20, 7:01 PM, Luo, Heng wrote: >=20 > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3014 > > > > 1. Add SerialPortTerminalLib to MinPlatformPkg/Library. > > 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device= to > > ConIn and ConOut variables > > 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and > > CoreUefiBootInclude.fdf. > > > > Cc: Eric Dong > > Cc: Chasel Chiu > > Cc: Nate DeSimone > > Cc: Liming Gao > > Signed-off-by: Heng Luo > > --- > > Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc > > | 15 +++++++++++++-- > > Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf > > | 8 +++++++- > > > > Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortT= er > > minalLib.c | 102 > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > ++++++++++++++++++++++++++++++++++++++++++++ > > > > Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortT= er > > minalLib.h | 34 ++++++++++++++++++++++++++++++++++ > > > > Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPort > > Ter minalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++ > > 5 files changed, 196 insertions(+), 3 deletions(-) > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc > > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc > > index f0e578f8cc..86bf5e6f22 100644 > > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc > > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc > > @@ -1,7 +1,7 @@ > > ## @file > > > > # Platform description. > > > > # > > > > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights > > reserved.
> > > > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights > > +reserved.
> > > > # > > > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > > > # > > > > @@ -46,7 +46,18 @@ > > > > > > > > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCoun > > terRuntimeDxe.inf > > > > > > > > - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > > > > + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { > > > > + > > > > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable =3D=3D TRUE > > > > + > > NULL|SerialTerminalFeaturePkg/Library/SerialPortTerminalLib/SerialPort > > NULL|Ter > > minalLib.inf >=20 > This is the bug, please change to > MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf >=20 > > > > +!endif > > > > + } > > > > + > > > > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable =3D=3D TRUE > > > > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > > > > + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf > > > > +!endif > > > > + > > > > > > MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManager > > Dxe.inf > > > > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf { > > > > > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf > > b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf > > index 7859c0b1a5..ef4576eedf 100644 > > --- > > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf > > +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fd > > +++ f > > @@ -1,7 +1,7 @@ > > ## @file > > > > # FDF file of Platform. > > > > # > > > > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights > > reserved.
> > > > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights > > +reserved.
> > > > # > > > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > > > # > > > > @@ -26,6 +26,12 @@ INF > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > INF > > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCoun > > terRuntimeDxe.inf > > > > > > > > INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > > > > + > > > > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable =3D=3D TRUE > > > > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > > > > +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf > > > > +!endif > > > > + > > > > INF > > MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManager > > Dxe.inf > > > > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > > > > INF > > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.c > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.c > > new file mode 100644 > > index 0000000000..94de475173 > > --- /dev/null > > +++ > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.c > > @@ -0,0 +1,102 @@ > > +/** @file > > > > + Main file for NULL named library for Serial Port Terminal Redirectio= n > library. > > > > + > > > > + Copyright (c) 2020, Intel Corporation. All rights reserved.
> > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > + > > > > +**/ > > > > + > > > > +#include "SerialPortTerminalLib.h" > > > > + > > > > +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH > > mSerialDevicePath =3D { > > > > + { > > > > + { > > > > + HARDWARE_DEVICE_PATH, > > > > + HW_VENDOR_DP, > > > > + { > > > > + (UINT8) sizeof (VENDOR_DEVICE_PATH), > > > > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) > > > > + } > > > > + }, > > > > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID > > > > + }, > > > > + { > > > > + { > > > > + MESSAGING_DEVICE_PATH, > > > > + MSG_UART_DP, > > > > + { > > > > + (UINT8) sizeof (UART_DEVICE_PATH), > > > > + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) > > > > + } > > > > + }, > > > > + 0, // Reserved > > > > + 0, // BaudRate > > > > + 0, // DataBits > > > > + 0, // Parity > > > > + 0 // StopBits > > > > + }, > > > > + { > > > > + { > > > > + MESSAGING_DEVICE_PATH, > > > > + MSG_VENDOR_DP, > > > > + { > > > > + (UINT8) (sizeof (VENDOR_DEVICE_PATH)), > > > > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8), > > > > + } > > > > + }, > > > > + DEVICE_PATH_MESSAGING_PC_ANSI > > > > + }, > > > > + gEndEntire > > > > +}; > > > > + > > > > +/** > > > > + Updates the ConOut, ConIn, ErrOut variables with the serial > > + terminal > > device path > > > > + @param none > > > > + @retval none > > > > +**/ > > > > +VOID > > > > +AddSerialTerminal ( > > > > + VOID > > > > + ) > > > > +{ > > > > + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n")); > > > > + > > > > + // > > > > + // Append Serial Terminal into "ConIn" > > > > + // > > > > + EfiBootManagerUpdateConsoleVariable (ConOut, > > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL); > > > > + EfiBootManagerUpdateConsoleVariable (ConIn, > > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL); > > > > + EfiBootManagerUpdateConsoleVariable (ErrOut, > > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL); > > > > +} > > > > + > > > > + > > > > +/** > > > > + Constructor for the Serial Port Device controller library. > > > > + > > > > + @param ImageHandle the image handle of the process > > > > + @param SystemTable the EFI System Table pointer > > > > + > > > > + @retval EFI_SUCCESS the shell command handlers were installed > > sucessfully > > > > + @retval EFI_UNSUPPORTED the shell level required was not found. > > > > +**/ > > > > +EFI_STATUS > > > > +EFIAPI > > > > +SerialPortTerminalLibConstructor ( > > > > + IN EFI_HANDLE ImageHandle, > > > > + IN EFI_SYSTEM_TABLE *SystemTable > > > > + ) > > > > +{ > > > > + mSerialDevicePath.Uart.BaudRate =3D > > PcdGet64(PcdSerialTerminalBaudRate); > > > > + mSerialDevicePath.Uart.DataBits =3D > > + PcdGet8(PcdSerialTerminalDataBits); > > > > + mSerialDevicePath.Uart.Parity =3D PcdGet8(PcdSerialTerminalParity)= ; > > > > + mSerialDevicePath.Uart.StopBits =3D > > + PcdGet8(PcdSerialTerminalStopBits); > > > > + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor] [%d, %d, > > + %d, > > %d]\n", > > > > + mSerialDevicePath.Uart.BaudRate, > > > > + mSerialDevicePath.Uart.DataBits, > > > > + mSerialDevicePath.Uart.Parity, > > > > + mSerialDevicePath.Uart.StopBits)); > > > > + > > > > + AddSerialTerminal(); > > > > + > > > > + return EFI_SUCCESS; > > > > +} > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.h > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.h > > new file mode 100644 > > index 0000000000..bfa73cca7d > > --- /dev/null > > +++ > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.h > > @@ -0,0 +1,34 @@ > > +/** @file > > > > + Header file for NULL named library for for Serial Port Terminal > > + Redirection > > library. > > > > + > > > > + Copyright (c) 2020, Intel Corporation. All rights reserved.
> > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > + > > > > +**/ > > > > + > > > > +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_ > > > > +#define _SERIAL_PORT_TERMINAL_LIB_H_ > > > > + > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > + > > > > +// > > > > +// Below is the platform console device path > > > > +// > > > > +typedef struct { > > > > + VENDOR_DEVICE_PATH Guid; > > > > + UART_DEVICE_PATH Uart; > > > > + VENDOR_DEVICE_PATH TerminalType; > > > > + EFI_DEVICE_PATH_PROTOCOL End; > > > > +} SERIAL_DEVICE_PATH; > > > > + > > > > +#define gEndEntire \ > > > > + { \ > > > > + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, { > > END_DEVICE_PATH_LENGTH, 0 } \ > > > > + } > > > > + > > > > +#endif > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.inf > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.inf > > new file mode 100644 > > index 0000000000..2667ec6d19 > > --- /dev/null > > +++ > > b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPo > > rtTe > > rminalLib.inf > > @@ -0,0 +1,40 @@ > > +## @file > > > > +# Component information file for Serial Port Terminal Redirection > > +Library > > > > +# > > > > +# INTEL CONFIDENTIAL > > > > +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> > > > +# > > > > +# SPDX-License-Identifier: BSD-2-Clause-Patent > > > > +# > > > > +## > > > > +[Defines] > > > > + INF_VERSION =3D 0x00010006 > > > > + BASE_NAME =3D SerialPortTerminalLib > > > > + FILE_GUID =3D E12BFA46-95F2-4ADC-9774-7E38DE787= 41E > > > > + MODULE_TYPE =3D UEFI_DRIVER > > > > + VERSION_STRING =3D 1.2 > > > > + LIBRARY_CLASS =3D NULL|UEFI_DRIVER DXE_DRIVER > > DXE_RUNTIME_DRIVER > > > > + CONSTRUCTOR =3D SerialPortTerminalLibConstructor > > > > + > > > > +[Packages] > > > > + MdePkg/MdePkg.dec > > > > + MdeModulePkg/MdeModulePkg.dec > > > > + BoardModulePkg/BoardModulePkg.dec > > > > + MinPlatformPkg/MinPlatformPkg.dec > > > > + > > > > +[Sources] > > > > + SerialPortTerminalLib.c > > > > + SerialPortTerminalLib.h > > > > + > > > > +[LibraryClasses] > > > > + DevicePathLib > > > > + DebugLib > > > > + UefiDriverEntryPoint > > > > + UefiBootManagerLib > > > > + UefiLib > > > > + > > > > +[Pcd] > > > > + gEfiMdePkgTokenSpaceGuid.PcdSerialTerminalBaudRate > > > > + gEfiMdePkgTokenSpaceGuid.PcdSerialTerminalDataBits > > > > + gEfiMdePkgTokenSpaceGuid.PcdSerialTerminalParity > > > > + gEfiMdePkgTokenSpaceGuid.PcdSerialTerminalStopBits > > > > -- > > 2.24.0.windows.2