From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.507.1624402263086595442 for ; Tue, 22 Jun 2021 15:51:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=GUaVL2w9; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: guo.dong@intel.com) IronPort-SDR: ShsupD78iBRWs1ueT+9g0j8+PDq/Twg+68Zr1jpQoXgWiUX2GLlLGZxRdFAAGn8hB3YL+wbv/y WnD1ey9sq8Zw== X-IronPort-AV: E=McAfee;i="6200,9189,10023"; a="228714711" X-IronPort-AV: E=Sophos;i="5.83,292,1616482800"; d="scan'208";a="228714711" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 15:51:00 -0700 IronPort-SDR: 84NRNTXeQKBS+EGRt0YSGRAGDhz6BMSb8CPGX0CTOC667FRy4DOldXhkc4udq/CJ2hbarUo19W pqes8aQJgtWA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,292,1616482800"; d="scan'208";a="417539146" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 22 Jun 2021 15:51:00 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2242.4; Tue, 22 Jun 2021 15:51:00 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2242.4 via Frontend Transport; Tue, 22 Jun 2021 15:51:00 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Tue, 22 Jun 2021 15:50:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJDv1s8AdQpbIdZZFDROn/RfXToKYMqPdCkIjjkdKQZM/oKlCmQjaWOWNdiF6UJI48H29G+Idy3/H7w3Zbm7v6MvvUhb6uKd7V0diWystqpLm5h5Mm0aFHpociqjezG5O8lSdKELOU3r/G3+kvVRLSaXMM0ZhVa/sbrZPUngzMgKCe5T8ZxAIAkc7u6YOsLoNt3pkYGF3YVQS5hxYQnZEnnwvmvTuyBOLkG8dCQ3kNtU+VZiDid6BP3YFcol5HYw6BrdBsjoZGrdPzeYKN3SiKmWml2gTku0GmvLFp0IEqiqxbiPyqnTeBqMyIq1d6LdPzxmR1JmgwL5wYkg9bHEPw== 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=puFawTEeP58+J8TKTA3s8cR5w6MhNz6cTg3ouAXeCu0=; b=GzdgqX6mX7+Nn0JW1j5VFFRlOXg+gjM1OuZx0IZmL/w64QluV5fYAqndkuDgJFXsNOs/GWSiC3lHBCoT3NJTyCWQf4/oVqpHgTxquowA1uaBTk28w10GD0REK9j/M+60nCu6Dz7i6XxnshjqkPDL9Ph/hpas0Cfj5ts+jR+ueEeoPqiGoSQas1XcCyE3JN6qjqAndzPEUKDy0Ipc2C6TuW9ATawxr4wOo+zGzGt1FjUKiqy0dmNtJJLM5z9vSYYozGHNbN2+hYSkQ/bwiL4x1sySXb0RSjVI6VGBHA+b/ykc6vZyTr0rKtuReu8nOUuwKuSLOQwRaAqncXLf9dFFZg== 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=puFawTEeP58+J8TKTA3s8cR5w6MhNz6cTg3ouAXeCu0=; b=GUaVL2w9bs5OsnE7OuDARJkOB3HoTujLFeouEluMbDidez0fsEB57aZ7FNcCzhd/OPMuJZu2jpJd9g1F7e9WyMClIZ6lXH/fWSrZ+Zwh94GEEXems/MYwkxWIC+b7M8i5Oy5d4krR38q4TnF+HaaQ7PQEQwv2DGxVj5a5yqU9QE= Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by BYAPR11MB3445.namprd11.prod.outlook.com (2603:10b6:a03:77::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.23; Tue, 22 Jun 2021 22:50:58 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::247b:262c:b8da:710b]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::247b:262c:b8da:710b%7]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 22:50:58 +0000 From: "Guo Dong" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "You, Benjamin" Subject: Re: [PATCH 06/12] UefiPayloadPkg: Get and enter DxeCore for Universal Payload Thread-Topic: [PATCH 06/12] UefiPayloadPkg: Get and enter DxeCore for Universal Payload Thread-Index: AQHXZeuUxE7Rdxb540umGCl4QR7N+6sgpkOQ Date: Tue, 22 Jun 2021 22:50:58 +0000 Message-ID: References: <20210620154702.2681-1-zhiguang.liu@intel.com> <20210620154702.2681-7-zhiguang.liu@intel.com> In-Reply-To: <20210620154702.2681-7-zhiguang.liu@intel.com> 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: [68.104.146.79] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 94d301f3-5bf4-42e5-9d2a-08d935d033a9 x-ms-traffictypediagnostic: BYAPR11MB3445: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rn02UtMtiIatKsS0Y/gl+XYCQe1JcikmDlcXtvCU7mSetoDyPh10pwBoljIdSjkKnoO4C4Nshzxv4zkZUYhdMnlYV91T+yEOX2XvQ3neVOFV4hi3HF9Q0+T6IDXkrJN73vr6qHQ6qw7pxcG0Ul+bWsQ/KlpiRDzqwbmb4oTz0M6+XwlyUFHg9xv9WJJ/2QjSRxX6yBUrCcSIUt6lOVBaPv00DepcU6nCfP6YZAx9HMmaLrpUzBOTL5PfmPIjvh3JJaQ3QyrMiWp6a4rfgOkUY9235V3RaH90Yj5TVDoSlDd3ybl3IxlFKab0Pr0izjDgFbI4qKphajfgIXotMtIp9FJ4SmvJdER7GDkEREZtECrxNIQlJtjWWoK0pyPJB2e6PTZg5MRze8+5AC8+s65vyAbn1Iezt/drrnZe3K9zAZKuCXI4HBsdeNeGVkX1JRM3ZLixyQVfWa9DlRzAXSBmkHrsC9yf5h+FXUo+0tsHPpgiropEevL6DqLRnB1v0P01LQJUIOjfmDutKbdBKnl6OXPl12g5djIf8S9ZU6UUeUFqNPdfE6GVae/iR1j6Ki93b8AOSbsEZXdrD1d7XDTgaOQ19Ocq1btuPREZoN6DQfc= 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:(366004)(396003)(136003)(39860400002)(376002)(346002)(26005)(186003)(107886003)(66946007)(2906002)(76116006)(9686003)(53546011)(71200400001)(4326008)(19627235002)(86362001)(478600001)(33656002)(66476007)(6506007)(7696005)(122000001)(38100700002)(64756008)(66556008)(52536014)(55016002)(66446008)(83380400001)(8936002)(110136005)(54906003)(8676002)(316002)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yQSLPdrNgluAJXS/0R+j8n8IC6TfLNb8fNjejptNUlM2i434p7852vFf3/Hp?= =?us-ascii?Q?j0MgEdmaTlzDXwJrXCS+9KIFvOXfbypbthSiwwhkJ+tgojMKi4H8xyb4tQ+0?= =?us-ascii?Q?khigcFKWj2oCn2r+5XuRAZgm22LnMUslLwrhHIUxcEcnaspdoRxdVfHVMraq?= =?us-ascii?Q?PVfbuzh81dfFl98GKdtQXzmLnRRZPgWe6fl5h5zDXrx6LDwr3n8oICooYuqB?= =?us-ascii?Q?ASvhKX+v3UxYERroY7hfQd+KB2yDFkg/dYaAyWU4pbr+0KYKoFjIwi9Jf9FB?= =?us-ascii?Q?KspsvQB75Ne5CmsT2uIjBDKCi5TiSrkcizq2KuaiiEPFBNSbOl6xDFG0MNgU?= =?us-ascii?Q?Xi2rR1ZJ0s2XsqLb2ZYdmNemGWH/QPaunMbcoWvnEL+ROvXVdOArjf4geMe9?= =?us-ascii?Q?4OpzXAYpBFe8dFdiiLf3CNoBkR14YMGX/efbpf6h9nQ4/YXT5DsWaRqcYipf?= =?us-ascii?Q?uHN6QcLXM3bttHoxJ8PVluIksoc3UME2OtGrHpt521/NR8aNONCg8WEk8mr8?= =?us-ascii?Q?8V9/OcEVMd0Ilrt3Y+vesuM6BswSZOZ5ODn3MuN1nxiCb+2FrEgAvRlDZmdk?= =?us-ascii?Q?FAfllbcWKV1VXJ611kBlbD4wreH71wfrBPLw2eMGSQpjcBrZpNb21ywxE+Fy?= =?us-ascii?Q?o7jnGxKjvXkSaO+nNTVLeteP6/atmBHaBdW1fHARg+R063wN0QqDdCPT7JyB?= =?us-ascii?Q?+3F2VXMjlMwiFnf9I/VRly/KlBF6SYenmK08mYeooHplW3DNmdUXIstzttZy?= =?us-ascii?Q?Y97bN3pIgFLLLLcfAkTbQAcm3jd+7/z1CWsqhMaRZki864Trip34Bux9YfMx?= =?us-ascii?Q?56yrX+slNxN8UH6qu67IIpVzutO5XRDN20G+nCANz+wp5lgurnVfzVpfRZTW?= =?us-ascii?Q?ZTtkjjIFmTPV0bbWj/foy2KYE7kJFMqFjZ/Hj4/f1qSBzjMrKEibowxVXxcZ?= =?us-ascii?Q?h5cWhFJHN8M0hYlTL6OQG1G55gQKZZqu8QuYa4L5Rl7QY7WuJ99XifPF2FDs?= =?us-ascii?Q?zd4Bo/YUYSFKDGxcOXQEbtVd1/9MetdG8TrgzQXLsvwqtrQF/Qvuj22cYGTl?= =?us-ascii?Q?yOBdP9QUgDu/FcRiUiQ/PS5KWYImNggd3CSHw9QEN4QWebXI4MSgSMeHeFSq?= =?us-ascii?Q?+qLCcCvlDi3fIfjHNMzyhWbYTKJTbucQVkHb/h/7Z+0lPx3dy0rBj5DrXegv?= =?us-ascii?Q?xkXeMF+twDW6+tPVK/C1G5k4I6yRSKYfjVUwoH16lBMAwgmH5pZWjf678Fou?= =?us-ascii?Q?DrytyTI7zqiaS+PBZan5afHPS4ozB0v4zaXCH6QRi9W8udh+8TRCnwKlGCnL?= =?us-ascii?Q?PZh6ToSJLYo7Heb/HekrwUbU?= 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: 94d301f3-5bf4-42e5-9d2a-08d935d033a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jun 2021 22:50:58.4330 (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: HM4vYYoPYiJifMthNd3e0+8bvYab0PgoZfVDsDHv/GsM0L7U8EmFzyc+Z0PjySrgMNfLkdLnvnadfP+lPTSRgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3445 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 > Sent: Sunday, June 20, 2021 8:47 AM > To: devel@edk2.groups.io > Cc: Ma, Maurice ; Dong, Guo > ; You, Benjamin > Subject: [PATCH 06/12] UefiPayloadPkg: Get and enter DxeCore for Universa= l > Payload >=20 > From gUniversalPayloadExtraDataGuid Guid Hob, get the Dxe FV information, > and get the Dxe Core from the FV. > Also, make sure if there are muliple FV hob, the FV hob pointing to this = FV > will be the first in the hob list. >=20 > Cc: Maurice Ma > Cc: Guo Dong > Cc: Benjamin You > Signed-off-by: Zhiguang Liu > --- > UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 47 > +++++++++++++++++++++++++++++++++++++++++++++++ > UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 17 > +++++++++++++++++ > UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 44 > ++++++++++++++++++++++++++++++++++++++++++-- > UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 + > UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c | 4 ++-- > 5 files changed, 109 insertions(+), 4 deletions(-) >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > index de9dbb0b0e..f5d70c59f8 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > @@ -305,3 +305,50 @@ LoadDxeCore ( >=20 >=20 > return EFI_SUCCESS; >=20 > } >=20 > + >=20 > +/** >=20 > + Find DXE core from FV and build DXE core HOBs. >=20 > + >=20 > + @param[in] DxeFv The FV where to find the DXE core. >=20 > + @param[out] DxeCoreEntryPoint DXE core entry point >=20 > + >=20 > + @retval EFI_SUCCESS If it completed successfully. >=20 > + @retval EFI_NOT_FOUND If it failed to load DXE FV. >=20 > +**/ >=20 > +EFI_STATUS >=20 > +UniversalLoadDxeCore ( >=20 > + IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv, >=20 > + OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint >=20 > + ) >=20 > +{ >=20 > + EFI_STATUS Status; >=20 > + EFI_FFS_FILE_HEADER *FileHeader; >=20 > + VOID *PeCoffImage; >=20 > + EFI_PHYSICAL_ADDRESS ImageAddress; >=20 > + UINT64 ImageSize; >=20 > + >=20 > + // >=20 > + // Find DXE core file from DXE FV >=20 > + // >=20 > + Status =3D FvFindFile (DxeFv, EFI_FV_FILETYPE_DXE_CORE, &FileHeader); >=20 > + if (EFI_ERROR (Status)) { >=20 > + return Status; >=20 > + } >=20 > + >=20 > + Status =3D FileFindSection (FileHeader, EFI_SECTION_PE32, (VOID > **)&PeCoffImage); >=20 > + if (EFI_ERROR (Status)) { >=20 > + return Status; >=20 > + } >=20 > + >=20 > + // >=20 > + // Get DXE core info >=20 > + // >=20 > + Status =3D LoadPeCoffImage (PeCoffImage, &ImageAddress, &ImageSize, > DxeCoreEntryPoint); >=20 > + if (EFI_ERROR (Status)) { >=20 > + return Status; >=20 > + } >=20 > + >=20 > + BuildModuleHob (&FileHeader->Name, ImageAddress, > EFI_SIZE_TO_PAGES ((UINT32) ImageSize) * EFI_PAGE_SIZE, > *DxeCoreEntryPoint); >=20 > + >=20 > + return EFI_SUCCESS; >=20 > +} >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > index e9c3ec3073..35098f5141 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > @@ -33,6 +33,8 @@ > #include >=20 > #include >=20 > #include >=20 > +#include >=20 > +#include >=20 >=20 >=20 > #define LEGACY_8259_MASK_REGISTER_MASTER 0x21 >=20 > #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1 >=20 > @@ -117,6 +119,21 @@ LoadDxeCore ( > OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint >=20 > ); >=20 >=20 >=20 > +/** >=20 > + Find DXE core from FV and build DXE core HOBs. >=20 > + >=20 > + @param[in] DxeFv The FV where to find the DXE core. >=20 > + @param[out] DxeCoreEntryPoint DXE core entry point >=20 > + >=20 > + @retval EFI_SUCCESS If it completed successfully. >=20 > + @retval EFI_NOT_FOUND If it failed to load DXE FV. >=20 > +**/ >=20 > +EFI_STATUS >=20 > +UniversalLoadDxeCore ( >=20 > + IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv, >=20 > + OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint >=20 > + ); >=20 > + >=20 > /** >=20 > Transfers control to DxeCore. >=20 >=20 >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c > b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c > index 66e87bcb9b..9d59454486 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c > @@ -179,7 +179,8 @@ FindAnotherHighestBelow4GResourceDescriptor ( > **/ >=20 > EFI_STATUS >=20 > BuildHobs ( >=20 > - IN UINTN BootloaderParameter >=20 > + IN UINTN BootloaderParameter, >=20 > + OUT EFI_FIRMWARE_VOLUME_HEADER **DxeFv >=20 > ) >=20 > { >=20 > EFI_PEI_HOB_POINTERS Hob; >=20 > @@ -190,6 +191,10 @@ BuildHobs ( > EFI_PHYSICAL_ADDRESS MemoryTop; >=20 > EFI_HOB_RESOURCE_DESCRIPTOR *PhitResourceHob; >=20 > EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob; >=20 > + UNIVERSAL_PAYLOAD_EXTRA_DATA *ExtraData; >=20 > + UINT8 *GuidHob; >=20 > + EFI_HOB_FIRMWARE_VOLUME *FvHob; >=20 > + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; >=20 >=20 >=20 > Hob.Raw =3D (UINT8 *) BootloaderParameter; >=20 > MinimalNeededSize =3D FixedPcdGet32 (PcdSystemMemoryUefiRegionSize); >=20 > @@ -254,6 +259,10 @@ BuildHobs ( > // From now on, mHobList will point to the new Hob range. >=20 > // >=20 >=20 >=20 > + // >=20 > + // Create an empty FvHob for the DXE FV that contains DXE core. >=20 > + // >=20 > + BuildFvHob ((EFI_PHYSICAL_ADDRESS) 0, 0); >=20 > // >=20 > // Since payload created new Hob, move all hobs except PHIT from boot > loader hob list. >=20 > // >=20 > @@ -265,6 +274,29 @@ BuildHobs ( > Hob.Raw =3D GET_NEXT_HOB (Hob); >=20 > } >=20 >=20 >=20 > + // >=20 > + // Get DXE FV location >=20 > + // >=20 > + GuidHob =3D GetFirstGuidHob(&gUniversalPayloadExtraDataGuid); >=20 > + ASSERT (GuidHob !=3D NULL); >=20 > + GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) > GET_GUID_HOB_DATA (GuidHob); >=20 > + ASSERT (sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) <=3D > GET_GUID_HOB_DATA_SIZE (GuidHob)); >=20 > + ASSERT (GenericHeader->Length <=3D GET_GUID_HOB_DATA_SIZE > (GuidHob)); >=20 > + ASSERT (GenericHeader->Length >=3D (sizeof > (UNIVERSAL_PAYLOAD_EXTRA_DATA) + sizeof > (UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY))); >=20 > + ExtraData =3D (UNIVERSAL_PAYLOAD_EXTRA_DATA *) > GET_GUID_HOB_DATA (GuidHob); >=20 > + ASSERT (ExtraData->Count =3D=3D 1); >=20 > + ASSERT (AsciiStrCmp (ExtraData->Entry[0].Identifier, "uefi_fv") =3D=3D= 0); >=20 > + >=20 > + *DxeFv =3D (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) ExtraData- > >Entry[0].Base; >=20 > + ASSERT ((*DxeFv)->FvLength =3D=3D ExtraData->Entry[0].Size); >=20 > + >=20 > + // >=20 > + // Update DXE FV information to first fv hob in the hob list, which >=20 > + // is the empty FvHob created before. >=20 > + // >=20 > + FvHob =3D GetFirstHob (EFI_HOB_TYPE_FV); >=20 > + FvHob->BaseAddress =3D (EFI_PHYSICAL_ADDRESS) (UINTN) *DxeFv; >=20 > + FvHob->Length =3D (*DxeFv)->FvLength; >=20 > return EFI_SUCCESS; >=20 > } >=20 >=20 >=20 > @@ -280,10 +312,13 @@ _ModuleEntryPoint ( > ) >=20 > { >=20 > EFI_STATUS Status; >=20 > + PHYSICAL_ADDRESS DxeCoreEntryPoint; >=20 > EFI_HOB_HANDOFF_INFO_TABLE *HandoffHobTable; >=20 > EFI_PEI_HOB_POINTERS Hob; >=20 > + EFI_FIRMWARE_VOLUME_HEADER *DxeFv; >=20 >=20 >=20 > mHobList =3D (VOID *) BootloaderParameter; >=20 > + DxeFv =3D NULL; >=20 > // Call constructor for all libraries >=20 > ProcessLibraryConstructorList (); >=20 >=20 >=20 > @@ -294,7 +329,11 @@ _ModuleEntryPoint ( > InitializeFloatingPointUnits (); >=20 >=20 >=20 > // Build HOB based on information from Bootloader >=20 > - Status =3D BuildHobs (BootloaderParameter); >=20 > + Status =3D BuildHobs (BootloaderParameter, &DxeFv); >=20 > + ASSERT_EFI_ERROR (Status); >=20 > + >=20 > + Status =3D UniversalLoadDxeCore (DxeFv, &DxeCoreEntryPoint); >=20 > + ASSERT_EFI_ERROR (Status); >=20 >=20 >=20 > // >=20 > // Mask off all legacy 8259 interrupt sources >=20 > @@ -304,6 +343,7 @@ _ModuleEntryPoint ( >=20 >=20 > HandoffHobTable =3D (EFI_HOB_HANDOFF_INFO_TABLE *) > GetFirstHob(EFI_HOB_TYPE_HANDOFF); >=20 > Hob.HandoffInformationTable =3D HandoffHobTable; >=20 > + HandOffToDxeCore (DxeCoreEntryPoint, Hob); >=20 >=20 >=20 > // Should not get here >=20 > CpuDeadLoop (); >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf > b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf > index 58ff87d969..77cd25aafd 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf > +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf > @@ -62,6 +62,7 @@ > gEfiSmbiosTableGuid >=20 > gEfiAcpiTableGuid >=20 > gUefiSerialPortInfoGuid >=20 > + gUniversalPayloadExtraDataGuid >=20 >=20 >=20 > [FeaturePcd.IA32] >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## > CONSUMES >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c > b/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c > index 73ea30e7a2..dec87ee1ef 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c > @@ -66,8 +66,8 @@ HandOffToDxeCore ( > // >=20 > // Get the address and size of the GHCB pages >=20 > // >=20 > - GhcbBase =3D (VOID *) PcdGet64 (PcdGhcbBase); >=20 > - GhcbSize =3D PcdGet64 (PcdGhcbSize); >=20 > + GhcbBase =3D 0; >=20 > + GhcbSize =3D 0; >=20 >=20 >=20 > PageTables =3D 0; >=20 > if (FeaturePcdGet (PcdDxeIplBuildPageTables)) { >=20 > -- > 2.16.2.windows.1