From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.57133.1675699310262797645 for ; Mon, 06 Feb 2023 08:01:50 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=caJMGY1L; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: andrei.warkentin@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675699310; x=1707235310; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=61NaFSmDEjnm90pYamoqHI5/Mk7b1PZEEq5SbhJEPqM=; b=caJMGY1Lv7KT0Ba8Ou02SC/lH7Q70CCCWHD/TIolqO3CaNYDJzdbtYlE 81NtGMhR404kB3JzB3XD/MAdMNKXQ6qsVcPjWim3kbYNK24OQFuK9dA37 pDpwDgbu2/bOf/WvZLIFH7nyleRrhfysCtChoXLCVCsgZU+2mXSHocbfg xtmQfCE6adr4KbxsWxH1BrLTcaCi9dKj75apuS5VkXPrzoeCW3dYWh8fV cYj1wW0HLapqMuLkW4ZI8Lf9rPDfcmzSKTIWMTLp6EcPqQkW1CX+2Abqv p2OsTAOReuiOfip4A197ZLvZgnCXTkJu2qcpPoVD1NZbwHgKSIQB/7VAd g==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="317248409" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="317248409" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 08:01:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="755282167" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="755282167" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 06 Feb 2023 08:01:35 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 6 Feb 2023 08:01:35 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 6 Feb 2023 08:01:35 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 6 Feb 2023 08:01:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TlWfKrvZeUNlEFErhwBCjODJiyv6qk/22UZoVdrMvZ3mJja2ThjnDZCKUgd5Sh4QIXgmSB2obXOBVHEQ5I4hK06x6m78/D3AhIWE76Ibu/jSec9Ko4And/N3sBpPc2GRAwQLpn6F2zB1kZiS17+LWFpkcJLMzB5a3N9/iBQklGmvcOrYYSWhfLGWkzAvvAwX2Qm1cjoW3UZwRUTY0iQS45MFLCc904UB7TL75CZrPKNba9u+6ZjQH8jVyknxyOdJ7uzK+Q3kverOirDCnHXTbx14isauANrBKXqzRp4zWZlfNJ4K754Nmi6YDTlzPH9jA637/oyGyOjfVZ/gZOM8Wg== 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=WqgommGj+yOFKyyPMPOkJ/m4ybvz/OMk2ivpjrSX/OE=; b=mWEYM6tVgttbFtHhq2zEHub0Pp3IqAc62fx6/qP56OzIUaVnN+SYZMiuADe0NFAOcvywGDSPGNheLXNygxr/GRO1nWGDwQ2tmPGiZrnwwzPnBzHyAFfCS8ubp2bJnWeiI9aDqmj/qUmS+vNw3gu2cPX1c9vBBO87YjqRkoWWZYXMqoUlQ93CL46ldB+8MWzJ1G+Z+ksZaEWaSkSplZPXO0wPk4OuczvySx2Zjv+LbOXeAb5zdgOVU45nLRJRJNeKybPDK/afYBI5NhArk8Ibrf3K0myYpZ7N6DEj8FVDLZRDuHrIUdUV0nH8BO0oNxbIw9FvAHKJl5uLXo9a3op8nw== 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 PH8PR11MB6856.namprd11.prod.outlook.com (2603:10b6:510:22b::7) by CH3PR11MB7938.namprd11.prod.outlook.com (2603:10b6:610:12f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 16:01:33 +0000 Received: from PH8PR11MB6856.namprd11.prod.outlook.com ([fe80::9dba:633a:320c:87b]) by PH8PR11MB6856.namprd11.prod.outlook.com ([fe80::9dba:633a:320c:87b%5]) with mapi id 15.20.6064.032; Mon, 6 Feb 2023 16:01:33 +0000 From: "Andrei Warkentin" To: "devel@edk2.groups.io" , "sunilvl@ventanamicro.com" CC: Ard Biesheuvel , "Yao, Jiewen" , "Justen, Jordan L" , "Gerd Hoffmann" , Abner Chang Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 14/20] OvmfPkg/RiscVVirt: Add PrePiHobListPointerLib library Thread-Topic: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 14/20] OvmfPkg/RiscVVirt: Add PrePiHobListPointerLib library Thread-Index: AQHZM01wwA+e8zC3Gk+F+Quv2MeyFK7CIfHg Date: Mon, 6 Feb 2023 16:01:32 +0000 Message-ID: References: <20230128191807.2080547-1-sunilvl@ventanamicro.com> <20230128191807.2080547-15-sunilvl@ventanamicro.com> In-Reply-To: <20230128191807.2080547-15-sunilvl@ventanamicro.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH8PR11MB6856:EE_|CH3PR11MB7938:EE_ x-ms-office365-filtering-correlation-id: b8f582a7-9991-4301-2296-08db085b6ace x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: omxZEsDP+iFiQJNeUETiMm8Z01oY7PWiyfSZ5u8M9E+JU3f5ioQfQRKSHBjnQDPr6RnyJURKDhXRlbL4rhaevaPOUJfvevgSNdUc/3rocRWqXaqHj582Bc3+LyDEo4wxHUHEoKRv+k5ghHC6vk1HAPrqDpV5PSGnWxWStBF8MRSwGeBZWbm2BhSGuXJdcP1PWzWIuTvNoolYHXtHBnKG9yJvtQZ7kpvYszo6SfTJOr/ztIgUDwZlPETaq5ieMYzMhzYz0KeRvypmfTVvfNQE691j6Uq5MMFh3KGOfF9xfWXulcmhHvJvO+ALUlTrxhC6yAbR1YBv4unlV5rHznyYnDEGv1OUthnO1wKFcQ1yPBLIvH2hEG1GAyDmxf0Qr7J2zG7eSCRsvc85+PHWSw4fpUoY20QyY/nVL716n60JhV2HcG7uxsp1b15jvCgorXXN2E+eCuJ/KecJ6iZMNLm9IBVkn1cvB6wrypb8pkGzyce6Fspu80qGZfRByqwEE6K0QJ86qzB51srrsCR/Ek7D6FvewqRjZLreKlpivRX2UFhlC5YohkUmyq2rVQXXFDC/wA9Bljy6xQ10GKzkPLuPX3LNX6KGMOx3tffokIpV8ivB+FLi9LBv9L5Ykiqk25GdzVjz5pAgjqCqsP+XyChQ0eh+rTcAK6dakodh8E3hdC5L58WImmwx4tdALmQ03Bb8s5EMtAnMF6uzh71xJEjvg/uuOgCHOW/MprZ84W1vpqKzfZS4HleUP1cngkLme5WA61s3Gjgx/w7vI92CHEAePA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB6856.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(6029001)(366004)(346002)(136003)(39860400002)(396003)(376002)(451199018)(66899018)(478600001)(52536014)(33656002)(86362001)(8936002)(41300700001)(66556008)(66446008)(64756008)(76116006)(66476007)(8676002)(66946007)(5660300002)(4326008)(2906002)(82960400001)(38100700002)(38070700005)(122000001)(316002)(7696005)(71200400001)(966005)(53546011)(54906003)(55016003)(110136005)(6506007)(186003)(9686003)(26005)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?21MlpWI1PLVLNNeNj64w30yGGKsNPAwqGaHJofjPrhsu2jkCM8JgryZhJvqe?= =?us-ascii?Q?oprHjNIJgHrKpspjgBYlgjVt32i6uGwyCrsmxz58mNSsl0D4SMSs0teytVGE?= =?us-ascii?Q?3stX++r4uyEf+Umow6i1RzliSp3PQZ+AS6sL0l9XQFfG+b9pOvuJgIjng75i?= =?us-ascii?Q?PVy9tI01BWeTsbvpeMAm3Y6Q6Laic4zdS/IcYTTQxuY6C3gDN4QrPDlL2Cx2?= =?us-ascii?Q?9fh+KIrrperTRFdLTRr2cWEcvRjz38I0m9rH3nXndW//X7G/GDivD24MYjAP?= =?us-ascii?Q?Qjr2QIbKtbNSJGwcx9XJ4ODwGGzON3n/8qFSAIJs+NVvXxeLdPDnacwocDiB?= =?us-ascii?Q?RXhYqkd+WZ/W/IXm3kd2gegmUNueptldnt5+cA2/r/2i0nPaQ5pG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5HPPjPwssGd7vzailVCREvFMNYSNzsm?= =?us-ascii?Q?h1wKxQ7X40M6ZA4yjyyjEsHQXbVYT1maocgXNgZvPyf9YHxvR3InzWuV5MSb?= =?us-ascii?Q?dA2iTXvWw1Lyf4cAlNaM6YqE5lzP/ZrKo20BgAzKa9liqEEm0iKRooACtAU8?= =?us-ascii?Q?nw/PYysnF6pUekLjm0LLzxxp4zb9mrxeGUGKnwM6i2BdnBIxORZLET4HIvdr?= =?us-ascii?Q?sga4I+49hf8f35rPL3DQhefdhyx19CuORXZ8xu0ywebDNz9X88q7fZwKKnNJ?= =?us-ascii?Q?dGTgILPTTvzKxqf3RefOgqQHFaMT7vwHwhUlpTYWZC6QSNls0qNFTqgz8wfw?= =?us-ascii?Q?Wg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB6856.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8f582a7-9991-4301-2296-08db085b6ace X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2023 16:01:32.9528 (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: I+GG/zvXGKjVdLu9/SOSCsB2JFRzgNH+6E6AbEOmtLBOPdmNNDi654K9SrDEA6ffXOP87r2DMTFULXbNENEtLXPGu30aZs+r7wbi8txQQW0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7938 Return-Path: andrei.warkentin@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Andrei Warkentin -----Original Message----- From: devel@edk2.groups.io On Behalf Of Sunil V L Sent: Saturday, January 28, 2023 1:18 PM To: devel@edk2.groups.io Cc: Ard Biesheuvel ; Yao, Jiewen ; Justen, Jordan L ; Gerd Hoffmann ; Abner Chang Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 14/20] OvmfPkg= /RiscVVirt: Add PrePiHobListPointerLib library Add the PrePiHobListPointerLib required for RISC-V Qemu Virt machine since = it follows PEIless design. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Sunil V L Acked-by: Abner Chang --- OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.in= f | 23 +++++++ OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointer.c = | 65 ++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListP= ointerLib.inf b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobLi= stPointerLib.inf new file mode 100644 index 000000000000..c539682e8d0b --- /dev/null +++ b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPoint +++ erLib.inf @@ -0,0 +1,23 @@ +#/** @file +# +# Copyright (c) 2021, Intel Corporation. All rights reserved.
# =20 +SPDX-License-Identifier: BSD-2-Clause-Patent # #**/ + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D PrePiHobListPointerLib + FILE_GUID =3D E3FAFC60-758C-471B-A333-FE704A4C11B4 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PrePiHobListPointerLib + +[Sources.RISCV64] + PrePiHobListPointer.c + +[Packages] + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + UefiCpuPkg/UefiCpuPkg.dec diff --git a/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListP= ointer.c b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPoi= nter.c new file mode 100644 index 000000000000..a58b7aae6bee --- /dev/null +++ b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPoint +++ er.c @@ -0,0 +1,65 @@ +/** @file +* +* Copyright (c) 2021, Intel Corporation. All rights reserved.
+* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include +#include +#include +#include +#include + +/** + Returns the pointer to the HOB list. + + This function returns the pointer to first HOB in the list. + + @return The pointer to the HOB list. + +**/ +VOID * +EFIAPI +PrePeiGetHobList ( + VOID + ) +{ + EFI_RISCV_FIRMWARE_CONTEXT *FirmwareContext; + + FirmwareContext =3D NULL; + GetFirmwareContextPointer (&FirmwareContext); + + if (FirmwareContext =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + return NULL; + } + + return (VOID *)FirmwareContext->PrePiHobList; } + +/** + Updates the pointer to the HOB list. + + @param HobList Hob list pointer to store + +**/ +EFI_STATUS +EFIAPI +PrePeiSetHobList ( + IN VOID *HobList + ) +{ + EFI_RISCV_FIRMWARE_CONTEXT *FirmwareContext; + + FirmwareContext =3D NULL; + GetFirmwareContextPointer (&FirmwareContext); + + if (FirmwareContext =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + return EFI_NOT_READY; + } + + FirmwareContext->PrePiHobList =3D HobList; + return EFI_SUCCESS; +} -- 2.38.0