From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.15721.1633021574979124173 for ; Thu, 30 Sep 2021 10:06:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=y8Uww2ey; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: maurice.ma@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="225279990" X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="225279990" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2021 10:06:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="438927715" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga003.jf.intel.com with ESMTP; 30 Sep 2021 10:06:13 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 30 Sep 2021 10:06:13 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 30 Sep 2021 10:06:13 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 30 Sep 2021 10:06:13 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 30 Sep 2021 10:06:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jDeIU/Wzkd/KtHmUIrUxoJCa+HXMYNry8pmXD8fDsZRhOZYCGvHpn0o5b3Z7UBdvixRghsU/PBDqXiV+rPO4ZY6C2eRnU7G9fLE56tAQolIOqx++e8baCk1EwAvmHIwP+nZPfBOZqZ/HsENb6Uuo5FfFeotBwIgl1U0FcUrHVlkVRONVuaPc3db6B7vBpyitMVH8hDCq9ZDnf+U1OmKWdJ9qpLa3IRD+FvJKvs1N+mDP3gMopks/8nsiokOPf/ilB2v65fOkyAsKxv59oZ8JPmWosi6oo91mdmBHTXnCrczm961g3biLYnKL2zNuUbYN6kiIMozAl7QXQXGAet4J3A== 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; bh=nz9Mhd1JhdTlCuI6obfYK5gD3uJC43QTSQv/Vzlorjs=; b=FJMZCrgpTMxLZk8nmUjAjMT7XOQh5OZDpeUK4oBbGTYzL8zheG/fBC11zNWuV4wDRgPTQDb0hLlqKRABAeLwOc8oKeYcMvpgszk5WMsVfTZJI0LopCyyUl+UjST1pk3TX4roLn6prZJBagErGldMZLE5l6tm3Ro1vBS7dA7Vx0V/v2yJ1qmRr9uPJrXDdk9B7Fc+f4L786gJr3R5jPJXGT95ZJkqCsxSApPJXwoP71pT+sUyfbZndDU6I6wI8n7GOEWdCNyXf6C45W5cAnMqefvYZtpQUWapg01EpY7Dk6Zjzpq+ogbc/MU5okCzEQyQCVLvLML5I1RhP+UIVyiN8Q== 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=nz9Mhd1JhdTlCuI6obfYK5gD3uJC43QTSQv/Vzlorjs=; b=y8Uww2ey+jcHyJ0CKsPo1a91o6aFxIJw/hT4Z2rxQT/2X6vvkK8J+fTKBrs4NQ+gcqhQqA9vJ209IpWWxguMqO4EPUGgw3ON41XW5HMXAWYoyU5PHvbnMB+VGCKRz80rpPfX7GMPcUt6OKDXCyr4zSSZBqnpw/8dfRjHdTvORHQ= Received: from PH0PR11MB4951.namprd11.prod.outlook.com (2603:10b6:510:43::5) by PH0PR11MB4952.namprd11.prod.outlook.com (2603:10b6:510:40::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.13; Thu, 30 Sep 2021 17:06:06 +0000 Received: from PH0PR11MB4951.namprd11.prod.outlook.com ([fe80::58cd:3e24:745c:e221]) by PH0PR11MB4951.namprd11.prod.outlook.com ([fe80::58cd:3e24:745c:e221%9]) with mapi id 15.20.4415.029; Thu, 30 Sep 2021 17:06:06 +0000 From: "Ma, Maurice" To: "devel@edk2.groups.io" , "Ma, Maurice" CC: "Ni, Ray" , "Dong, Guo" , "You, Benjamin" Subject: Re: [edk2-devel] [PATCH 1/1] UefiPayloadPkg: Add PCI root bridge info hob support for SBL Thread-Topic: [edk2-devel] [PATCH 1/1] UefiPayloadPkg: Add PCI root bridge info hob support for SBL Thread-Index: AQHXthyTq+am5apJyUuqG6FP/nFhX6u8zldw Date: Thu, 30 Sep 2021 17:06:06 +0000 Message-ID: References: <16A9A81A14316DB1.3292@groups.io> In-Reply-To: <16A9A81A14316DB1.3292@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8e2db612-efe4-4af5-aa50-08d98434978f x-ms-traffictypediagnostic: PH0PR11MB4952: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8sKBrTFq/+GvA/iZnqLu0TM9+adlW1iBsWWEu6M6Rou7iKfLCDRHAVpIb1UmSRDOgfC8Asf5gC+y34SAmxTMj5MGO/ONB1uQHZ/SZRRiO/0emkeBaxhEef0q2If0B1ihZSTcmOnv0CFvxycpNxvK698udAn0HYYij1UaMyVOZAbTwfHskgvEVxOjfyadI859eN6llM0d7U+fAm2QA3KvlVb7T4fSWAMbL6mPkjxIoCMyJ37BFaGHLC6urcXFjTMzCCnAuS1uY37QIyEz7R0IEgkx0ma9xXUn6bSDq/drQHCbOcRKd1lbz3dNQZlBkwwIo4WGd4Ux96dDMS+x3LbisJv/1jBwh7pAzkfnN3QOQZ8NfRBLYaqilYHeTilFzNWxdz5U7NkBpy3/Ym82wa+Z7MrtAxAnpv/TEnU8kc+V9seQpTdHC6W35fxQNVqkxWLMYBSr8LdwM4sMnTW0ZBTMPs8yoQxAw1dbUjWkQc9UBMBMCHYFhaoCvXCYLY/ggxjuCzxUTxv2gmxORnqeu3GiFMKy119MAlc6tQxAtFIWW61OYZNrRtFX2/g+pjr1PyXStQq57CZ2U8MfSsQW9yTkBeRjgj75AtIWt+HFE5Goq4yF/lFXRd7NTX6jN1R5Qrbud0uc5p8yVJ7PalpDq/2kyEUoyJ5LFaQ0Tg95SRLOdz2Yy2E8CQIeoRIGNwm4PzLnj7Xjk34Kh7QgniOMhnP1vONomHAecT6PkkuxZXM/e6Q6PWTh76Vvp8ZL0Bc2L1LqGVBqPGnHbH79sy5wrAr1WM95PPK+svS9gnlqE3HFnIwFhQh3zB6qA+WK+XLEbcBmKUwO/IMofA32eqFtxP7EHQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB4951.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(107886003)(33656002)(86362001)(2906002)(8936002)(26005)(9686003)(71200400001)(83380400001)(66476007)(66446008)(66556008)(966005)(64756008)(55016002)(5660300002)(54906003)(122000001)(316002)(38100700002)(110136005)(8676002)(52536014)(53546011)(6506007)(38070700005)(66946007)(508600001)(76116006)(4326008)(7696005)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?E0PbViqSQ5ApVA/EY1P6zblcVm69xVNPoZUvCY+HRxLo0WJVf/0m7pCdC7bz?= =?us-ascii?Q?R4X7H/T/rjOIcb8+1Rk+4SgFPbfu6adhPYEbfiI6LCuWuBVlqyKYcFEki30g?= =?us-ascii?Q?ewND/bVdnA5MFLI+ruJMPI0LNDhXpzWX8hQkv5SNLnblywQsBqY3TuCCDyTw?= =?us-ascii?Q?bRWs24mmd6RwdxNijTrGy9wnFS1C2FuU1DQu9NRNCAyPjep+5R91jeIijwJw?= =?us-ascii?Q?UhhNB76YVHA/uk5sKLWhj7ssqdiP5/3bH3l5KAhJh5Sj9Z6ZerrpAG9KK/MT?= =?us-ascii?Q?u75GC05UXcUg+RzXcmwUBbMNyN/XiWa1hQhUb2iCnThpk3RJdU1S2e/YI8cf?= =?us-ascii?Q?minpIvMwobryOOXPfRadbo6nUkqoi7oTrEXBuyPPWtUpHbh/1vKKHX/iYX40?= =?us-ascii?Q?G1FuqJMU/jt8Uwb7l//5RvmFceqvFputtm952ejAQoG4i+Von6tgONQb7Hcd?= =?us-ascii?Q?AWHaNggn5yiF2+M5AAOi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: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4951.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e2db612-efe4-4af5-aa50-08d98434978f X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2021 17:06:06.4481 (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: ztcpsX6Mt+a1T3nWz7R61OngiMINh9FdK5g3KP3ec27woTxbKqqqtIVbYEbMgrq5EDLidRG0pNmpJBIh66h0pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4952 Return-Path: maurice.ma@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry for the duplicated msg. Please ignore the duplicated one. Thanks, -Maurice > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ma, > Maurice > Sent: Thursday, September 30, 2021 9:59 > To: devel@edk2.groups.io > Cc: Ma, Maurice ; Ni, Ray ; Dong, > Guo ; You, Benjamin > Subject: [edk2-devel] [PATCH 1/1] UefiPayloadPkg: Add PCI root bridge inf= o > hob support for SBL >=20 > Current UefiPayloadPkg can suport PCI root bridge info HOB provided by > bootloader. For UniversalPayload, bootloader can directly provide this HO= B > for payload consumption. However, for legacy UEFI payload, it is required= to > migrate the HOB information from bootloader HOB space to UEFI payload > HOB space. This patch added the missing part for the bootloader ParseLib = in > order to support both legacy and universal UEFI payload. >=20 > This patch was tested on Slim Bootloader with latest UEFI payload, and it > worked as expected. >=20 > Cc: Ray Ni > Cc: Guo Dong > Cc: Benjamin You > Signed-off-by: Maurice Ma > --- > UefiPayloadPkg/Include/Library/BlParseLib.h | 14 ++++++ > .../Library/CbParseLib/CbParseLib.c | 16 +++++++ > .../Library/SblParseLib/SblParseLib.c | 47 ++++++++++++++++++- > .../Library/SblParseLib/SblParseLib.inf | 1 + > .../UefiPayloadEntry/UefiPayloadEntry.c | 8 ++++ > 5 files changed, 84 insertions(+), 2 deletions(-) >=20 > diff --git a/UefiPayloadPkg/Include/Library/BlParseLib.h > b/UefiPayloadPkg/Include/Library/BlParseLib.h > index 1244190d4e87..49eac3124818 100644 > --- a/UefiPayloadPkg/Include/Library/BlParseLib.h > +++ b/UefiPayloadPkg/Include/Library/BlParseLib.h > @@ -116,4 +116,18 @@ ParseGfxDeviceInfo ( > OUT EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *GfxDeviceInfo ); +/**+ > Parse and handle the misc info provided by bootloader++ @retval > RETURN_SUCCESS The misc information was parsed successfully.+ > @retval RETURN_NOT_FOUND Could not find required misc info.+ > @retval RETURN_OUT_OF_RESOURCES Insufficant memory > space.++**/+RETURN_STATUS+EFIAPI+ParseMiscInfo (+ VOID+ );+ > #endifdiff --git a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c > b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c > index 4f90687e407e..f81aa0f301d8 100644 > --- a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c > +++ b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c > @@ -560,3 +560,19 @@ ParseGfxDeviceInfo ( > return RETURN_NOT_FOUND; } +/**+ Parse and handle the misc info > provided by bootloader++ @retval RETURN_SUCCESS The misc > information was parsed successfully.+ @retval RETURN_NOT_FOUND > Could not find required misc info.+ @retval RETURN_OUT_OF_RESOURCES > Insufficant memory space.++**/+RETURN_STATUS+EFIAPI+ParseMiscInfo > (+ VOID+ )+{+ return RETURN_SUCCESS;+}diff --git > a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c > b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c > index 7214fd87d20c..ccdcbfc07db9 100644 > --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c > +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c > @@ -1,7 +1,7 @@ > /** @file This library will parse the Slim Bootloader to get required > information. - Copyright (c) 2014 - 2019, Intel Corporation. All rights > reserved.
+ Copyright (c) 2014 - 2021, Intel Corporation. All rights > reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -15,7 > +15,7 @@ > #include #include #include > -+#include > /** This function retrieves the parameter base address from boot > loader.@@ -221,3 +221,46 @@ ParseGfxDeviceInfo ( > return RETURN_SUCCESS; } +/**+ Parse and handle the misc info provide= d > by bootloader++ @retval RETURN_SUCCESS The misc information wa= s > parsed successfully.+ @retval RETURN_NOT_FOUND Could not find > required misc info.+ @retval RETURN_OUT_OF_RESOURCES Insufficant > memory space.++**/+RETURN_STATUS+EFIAPI+ParseMiscInfo (+ > VOID+ )+{+ RETURN_STATUS Status;+ > UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *BlRootBridgesHob;+ > UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PldRootBridgesHob;++ > Status =3D RETURN_NOT_FOUND;+ BlRootBridgesHob =3D > (UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *) GetGuidHobDataFromSbl (+ > &gUniversalPayloadPciRootBridgeInfoGuid+ );+ if > (BlRootBridgesHob !=3D NULL) {+ //+ // Migrate bootloader root brid= ge info > hob from bootloader to payload.+ //+ PldRootBridgesHob =3D BuildGui= dHob > (+ &gUniversalPayloadPciRootBridgeIn= foGuid,+ > BlRootBridgesHob->Header.Length+ );+ = ASSERT > (PldRootBridgesHob !=3D NULL);+ if (PldRootBridgesHob !=3D NULL) {+ > CopyMem (PldRootBridgesHob, BlRootBridgesHob, BlRootBridgesHob- > >Header.Length);+ DEBUG ((DEBUG_INFO, "Create PCI root bridge info > guid hob\n"));+ Status =3D RETURN_SUCCESS;+ } else {+ Status= =3D > RETURN_OUT_OF_RESOURCES;+ }+ }++ return Status;+}+diff --git > a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf > b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf > index 665a5a8adcef..535cca58a63c 100644 > --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf > +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf > @@ -41,6 +41,7 @@ > gLoaderMemoryMapInfoGuid gEfiGraphicsInfoHobGuid > gEfiGraphicsDeviceInfoHobGuid+ gUniversalPayloadPciRootBridgeInfoGuid > [Pcd] gUefiPayloadPkgTokenSpaceGuid.PcdBootloaderParameterdiff --git > a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > index f2ac3d2c6925..5a1e5786687a 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > @@ -321,6 +321,14 @@ BuildHobFromBl ( > return Status; } + //+ // Parse the misc info provided by bootlo= ader+ //+ > Status =3D ParseMiscInfo ();+ if (EFI_ERROR (Status)) {+ DEBUG > ((DEBUG_WARN, "Error when parsing misc info, Status =3D %r\n", Status));+= }+ > // // Parse platform specific information. //-- > 2.29.2.windows.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#81353): https://edk2.groups.io/g/devel/message/81353 > Mute This Topic: https://groups.io/mt/85978857/1773972 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [maurice.ma@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20