From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.431.1652374591652231177 for ; Thu, 12 May 2022 09:56:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Ly5W5VJ1; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652374591; x=1683910591; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=AKVEBrbkdlc6nffTHJLnoLIKxV88YttPdHBYad48adE=; b=Ly5W5VJ1nQa2vUCSwunY7pzj3iXZ3SG+lGlFTrEvQhVsrs8CnS97ZZRz 8G2Q7BoV06slQ+kIbBXWr69JDTHDj9TEznkeA7MX4hqmu6AMSI70U4Dcb /EyIUcIJcnc/rAztvU9FbpMx+s5SxK5utMP+sFYSznXqCrRKeGvkBy8uQ GYUh7CU66Oa7vhihT2gI8qasXdkEjh2VUSz8+NgVd7U5uXkgSVnNOwDQ/ Kg75Fp+S/mQZUjWyUp8AM2j654mUMMxsVI42pHei+P/GJQ1sS7nqUD0Hq xcKAPZexXudW52K9yZcxQVuQHyez8wXNec4hFVCEjPx82ZbS5MWntFdvG A==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="268894696" X-IronPort-AV: E=Sophos;i="5.91,220,1647327600"; d="scan'208";a="268894696" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 09:45:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,220,1647327600"; d="scan'208";a="711992848" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 12 May 2022 09:45:32 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 12 May 2022 09:45:32 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 12 May 2022 09:45:32 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 12 May 2022 09:45:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HQ6G2YEiEdbmVuzNg5zWxKeTcsgaiyBqgmTY1WMXjLTJQnqfRww4vD99/OBAbLGGz7ufN8hJ9jgVoKIN5c693peIIVqy80Q/xG2SFJASSct7qLX6xt/fb/wCEeJfRu3hac0eC4EcV5ALlNUB+kXsP0xF85IBrlGZlLD+5oZTj0hiMQr/ydYKu7sef9/g/Hfsy8wfL4urN4XBlgw0vUuJtRTfqyubgzpINBIxWgCYF9dXOI3mQ67HtyLfZFFvk8UVzL/VCSCgBDX/n8UJ0r+/VcsRMPqgo4pCKSE4WCoXU2ePIMkvValt7pfiWf3Dz5OFws4JngN/E55PnoG0mUtm0w== 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=qqXPNb+eOxir0ZYoQ9ULzbjvF1exu2na0ExNQL9yoWI=; b=P2b5DoTl4bOluaFD/fu0lnvOpXhLQ/CJ2GjMVSVdJSOieZLM2coo4ijzU8CyJPpme1bYPWN1bN7mIH7Nmf/yrnIKqUVBITYWMFsrlrv4Wj3luIWB4gjm6tJk7sqDAYxf+yAyIBlnd/9QHAVXLZTizKgNvgSO/4XtFmGuclrSKvKqZohFlEwDO+Q57wIEVzdCGDBV23Vp6gD9RA5mkJMTmJzFFuh9rtfQfOQgv0AzWq1iitYpd3qoW9ImuIH3tzhlV93BqdzMjievC9zUvsUfHqEs1HWqMz20JAy2GqPev1D6+25jrl6CXvjWH6M2ajYbdDtYqdrmu2K4Xczq2b8zVg== 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 Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by DM6PR11MB4516.namprd11.prod.outlook.com (2603:10b6:5:2a5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 16:45:23 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::cdf7:2641:1ae1:6197]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::cdf7:2641:1ae1:6197%7]) with mapi id 15.20.5227.023; Thu, 12 May 2022 16:45:23 +0000 From: "Guo Dong" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Ni, Ray" , Maurice Ma , "You, Benjamin" , "Rhodes, Sean" Subject: Re: [PATCH v2 3/3] UefiPayloadPkg: Connect all root bridge in PlatformBootManagerBeforeConsole Thread-Topic: [PATCH v2 3/3] UefiPayloadPkg: Connect all root bridge in PlatformBootManagerBeforeConsole Thread-Index: AQHYZe7OROTwkvI6q0+42j5P6uHfya0bc3TQ Date: Thu, 12 May 2022 16:45:23 +0000 Message-ID: References: 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.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: def0ffdb-3939-400c-6624-08da3436cf2d x-ms-traffictypediagnostic: DM6PR11MB4516:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SOUbKkoKjmkUMSqDEuTNA539Vp/iwqkgmEIiZbLEuRCFI975dUFOaD5+AyuoND4NkfJ4lH68by/SCKLZktaa9KcbHBfI6A7QCxJ9QICwIkPQgmVpKSYzQ92d0kJZjw6WeAIW+PXDBhh9Wp0y8/lcgzlORUvaJQZecMM6v/bwlaKNQ/wm6eKNhFLS+6eFcH+6w2TR2MReKJiae4zfYE6BdXgWHjhZMpaGQoPrlmyvHeUL8sy5HCmHPhZeub8WY51ykFyIVXgtq2F2+Rwkb4yIMwl9nfw8hBHx8d+avQ3jlT/Gpv1xLpLD2vHqxv+TlFOdUZiPL4utLHsy1B9qciO+7L8tKO7klnGJQgmb6d3UACo3yNxKbmAAjQK+1tJEGQ9GtkgQGNdHDiUodjj9jGEMXTCuuwvSKPhDfDkEO8vikw+0bsp1DPv0o+gnub7eOIuAc5FlLIOc7qwpzWkItjQoQPUM7L3xQVFl3HrpGN53XAiHmvP2KoRj2vi62YUOgiVfeuLRnehNDV13+c8EtNkbICSVg2hUbPgDMcKr98pOjRWePfDbGxqxmX2ZH3eS8AwmM8/pOf1kiBbVw3Jtpjv2fBl7C3WeSMa/EgyI0bjxqu7F9GNn+/AOvxnRMFTzp15/wM+XLTee7LuzxApi9O6KfpFwh4a0XHTP1ZLbc+n1XX1Xwk8lt5oEiaEnVoYdOKDH64OmCx14vNk8mu2h72DU596vkVRIYQVXGrv8Px+qXoE= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(33656002)(6506007)(53546011)(9686003)(7696005)(55016003)(5660300002)(2906002)(8936002)(52536014)(508600001)(82960400001)(38070700005)(54906003)(86362001)(66476007)(64756008)(66946007)(76116006)(66446008)(66556008)(19627235002)(8676002)(4326008)(110136005)(316002)(83380400001)(122000001)(71200400001)(38100700002)(186003)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dK/UTJF6X/KvUFyYTtJMTWb97hP+htz5DfRpMJvm3PWajadipTM/a/p43c4e?= =?us-ascii?Q?VibIYGmvZOFXuozUPnYH+18aa/APiuRWeNEMNmiHlAPPWukKwHmYPyNWI0w9?= =?us-ascii?Q?dc4uHGGQEakCQoiV1hvTaSVXQIq/PlndDwsH3pwThTvNmJOtpWxi78vJyPUE?= =?us-ascii?Q?vpbbBz0hbe8tedLN+MUxoy11ZDdCwHZRu6/r1w6Ie6qR8PzY0pz1mSVlS1EB?= =?us-ascii?Q?EjF7f2gTDSP1pftel9hlRHnJrpwDX758PaFjcxXX9CVhQEHCJLZijxzVYCLH?= =?us-ascii?Q?eycw6NrwORIQSMm9OYhkOFsaPh85HHwPuntJPYotn0zi2MaWU2b86sQvBTOz?= =?us-ascii?Q?fWOSJOXyT7Cu8bOmsOAugLAefAoQPpkxiDVxz8I8hXZ8LqQsuHh4gZW9AxVW?= =?us-ascii?Q?A1eymvBvcPtlAe5VUGnLW42eVAZhtvjhzBeDWFT68/JpeIaR78F8vAw3ue8y?= =?us-ascii?Q?n/xW0Fsn7sJO1dz6gWOwoxJ3R1sp9eZLnECpouha5vL1d47L2QYDzk+kgrFe?= =?us-ascii?Q?0Rt0X/wSfRvz69dJBixl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?us-ascii?Q?T7lpuqJURFtVxLZAByJCiKPYxuxMUgSZoqx9dwvemDxMzAvj0J1qM+KAbkxz?= =?us-ascii?Q?hrMTDbAKWPSehZu/oiITL9niY8Eaw0JiipSCyv0rYeJqFADU+XmUk5BsuLpd?= =?us-ascii?Q?kjWIlRZIkXejEMzsRql1Y2yNOGQoC6g3zhCSZ9seZnlOl0AwJHQgDyAO+Bs6?= =?us-ascii?Q?E3wzDwdp/T8nsrLMe8bRch1dhP4l7yZ4zDuixIxSCxpToWDZrHnt4ARBhDzy?= =?us-ascii?Q?eBS0m48F2ClD7wRRBdxRFzCLfpzXe+Dzob48SM0BnLEmz2W+6bukP3tcCcQZ?= =?us-ascii?Q?7R5+RlrjyPkQxIO3H/7x/GBIIWHNQkJxW9+D6pBlHsPSXJAgE/L+ENBTKOmw?= x-ms-exchange-antispam-messagedata-1: Q6bKypVOLDln5Q== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: def0ffdb-3939-400c-6624-08da3436cf2d X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 16:45:23.4927 (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: g6lSzWhj/wktKDWnbxhin75zZM6gRfAvv4cC/NyEoM/6JCW85LOvLB93pHMer+WkZ8fDqIpD6LbnBJrm6DU2WQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4516 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guo Dong -----Original Message----- From: Liu, Zhiguang =20 Sent: Thursday, May 12, 2022 3:55 AM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Maurice Ma = ; You, Benjamin ; Rhodes, Sea= n Subject: [PATCH v2 3/3] UefiPayloadPkg: Connect all root bridge in Platform= BootManagerBeforeConsole Some ConIn or ConOut device may not in the first root bridge, so connect al= l root bridge before detect ConIn and ConOut device. Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Cc: Sean Rhodes Signed-off-by: Zhiguang Liu --- .../PlatformBootManagerLib.inf | 1 + .../PlatformBootManagerLib/PlatformConsole.c | 49 ++++++------------- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf index acf2880d22..9f58c460cd 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerL +++ ib.inf @@ -61,6 +61,7 @@ gEfiSmmAccess2ProtocolGuid gUniversalPayloadPlatformBootManagerOverrid= eProtocolGuid gEfiSerialIoProtocolGuid+ gEfiPciRootBridgeIoProtocolGuid = [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOutdiff --git a/UefiPa= yloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c b/UefiPayloadPkg/= Library/PlatformBootManagerLib/PlatformConsole.c index 5aece6636f..e92d12e991 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c @@ -38,9 +38,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0 \ } -#define gPciRootBridge \- PNPID_DEVICE_PATH_NODE(0x0A03)- #d= efine gPnp16550ComPort \ PNPID_DEVICE_PATH_NODE(0x0501) @@ -64,19 +61,6 @= @ ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode =3D gPnpPs2Keyboard; ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode =3D gPnp16550ComPort; VEN= DOR_DEVICE_PATH gTerminalTypeDeviceNode =3D gPcAnsiTerminal; -//-// P= redefined platform root bridge-//-PLATFORM_ROOT_BRIDGE_DEVICE_PATH gPlatfo= rmRootBridge0 =3D {- gPciRootBridge,- gEndEntire-};--EFI_DEVICE_PATH_PROT= OCOL *gPlatformRootBridges[] =3D {- (EFI_DEVICE_PATH_PROTOCOL *)&gPlatfor= mRootBridge0,- NULL-};- BOOLEAN mDetectDisplayOnly; /**@@ -447,32 +431,2= 4 @@ DetectAndPreparePlatformPciDevicePaths ( } /**- The function will connect root bridge+ The function will connect= one root bridge - @return EFI_SUCCESS Connect RootBridge successful= ly.+ @param[in] Handle - The root bridge handle+ @param[in] Instanc= e - The instance of the root bridge++ @return EFI_SUCCESS Connect R= ootBridge successfully. **/ EFI_STATUS-ConnectRootBridge (- VOID+EFIAPI+C= onnectOneRootBridge (+ IN EFI_HANDLE Handle,+ IN VOID *Instance = ) { EFI_STATUS Status;- EFI_HANDLE RootHandle; - //- // Make all th= e PCI_IO protocols on PCI Seg 0 show up- //- Status =3D gBS->LocateDevice= Path (- &gEfiDevicePathProtocolGuid,- &gP= latformRootBridges[0],- &RootHandle- );- = if (EFI_ERROR (Status)) {- return Status;- }-- Status =3D gBS->Connec= tController (RootHandle, NULL, NULL, FALSE);+ Status =3D gBS->ConnectContr= oller (Handle, NULL, NULL, FALSE); if (EFI_ERROR (Status)) { return S= tatus; }@@ -491,7 +467,10 @@ PlatformConsoleInit ( VOID ) {- ConnectRootBridge ();+ VisitAllInstancesOfProtocol (+ &= gEfiPciRootBridgeIoProtocolGuid,+ ConnectOneRootBridge+ ); // //= Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOu= t--=20 2.32.0.windows.2