From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.5502.1601606590831113806 for ; Thu, 01 Oct 2020 19:43:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=k0F3E0Y3; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0544a79508=abner.chang@hpe.com) Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0922SJlv028665; Fri, 2 Oct 2020 02:43:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=pkTcP5C01o7jUiXgJ0dhA2zu2kcmC6XQnFcyL/4huL0=; b=k0F3E0Y3T0+Jn6UhZMKnTcOSXj/6vctOX5GddsJXIcTObrsuS7sbv3siXWKkW0iIHIym DA6IjreXj3/Xk6P3yOO1nw36Z3+Aj4DZPDlOvX+cdRXMBVt3S3BcJUBCVr0YEuTIg7kv U8W/1+m+QLNCgG/uj0kn2DEX5D004XnEqy8Cw9S5FBKLw4jo8gEWB9QsJbHiJmcG5Vpd iYDObJ8WAei+rKtMZ/ofBjr21xzZlDloEx6nHqGQFlda6qzWsQ/YGCYdkMdYvI6cjNZi +5KZsIEBu53qvYhGW+IFTquFcDDsAjR5p+vhII3ffL1a1cMD/gtcs7hNBNyiZpi5SM86 Nw== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 33wbdvfvka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Oct 2020 02:43:09 +0000 Received: from G4W9120.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.210.21.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 6C0A882; Fri, 2 Oct 2020 02:43:08 +0000 (UTC) Received: from G1W8107.americas.hpqcorp.net (2002:10c1:483b::10c1:483b) by G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Oct 2020 02:40:58 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.11) by G1W8107.americas.hpqcorp.net (16.193.72.59) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 2 Oct 2020 02:40:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JtxdtytljInq+a26pXDD6bAxCakA6JeuvbxIdADuXKoMP6/YCZYw/8NcnuWVEBAgWDEwDhjw3odd6+RS0/n5dxr5xT3CMv5rdmm/F6KGyKgnR1D5UwotD0qiTv44qsKY1cnd0s9HOHMBlYk9WaMBQJrNHIB2MHm8j7557gEOHLJ5WrFq78/wwtbvxDZyLZLeizs7KQh9kkwvEKoW/UvLbu2V8lKJjbRTXTURDEMkBo0nx0IeFHgxkleTyRA0vfDkfRKVkNtcovmJblFUKJSiL52z8TlKTqz7VmRRKUGCHuPJ4jqUrYfkBd7MEBeTB/dnChQl2cviJ1qo7Z3kVsZS1w== 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=G4VdmqUWdjg4CdgRzX652dpLNRh9nEoUjpPvG6wq8KQ=; b=NYdbi/IqoUnnvoWHvb3w/viT5eZf6H7aaryq9g/Brbr196UKQVLnJT4/PbXVyumpOlPTthcsvIIbIs93ihy4zv0miuLtA9Tdkt4EQPdVoRfgv8V06H84QrbyyT4GsOtp/MLXtD5wlnkyaoWASmjtWSHrrjDp3PVOrvonvpUscn3Oj95i7SZsOGrzXv9L0/9Bhkg4jKD5tFRjtn/pT8QNoh0moOI0SePWFc1U/5Qn3oOsDidfnU/OhDmYCwQQrprvQ+E13bv+jCo/wEnmoC9r5gizxtc2aLEyGWISVAO328RCOfEuOxs2UIyv3byG78HTA9tC1yqRCPvC25CLp2lPyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0406.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Fri, 2 Oct 2020 02:40:56 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::d111:132b:4b87:a9ea]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::d111:132b:4b87:a9ea%3]) with mapi id 15.20.3433.038; Fri, 2 Oct 2020 02:40:56 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "Chang, Abner (HPS SW/FW Technologist)" , "Schaefer, Daniel" CC: Leif Lindholm Subject: Re: [edk2-devel] [PATCH 1/1] Silicon/SiFive: Handle case of NULL FirmwareContext Thread-Topic: [edk2-devel] [PATCH 1/1] Silicon/SiFive: Handle case of NULL FirmwareContext Thread-Index: AQHWlwa+QU/ZGXhS2EOxW50w3CNdS6mBLxwwgAJo49A= Date: Fri, 2 Oct 2020 02:40:56 +0000 Message-ID: References: <20200930085005.27148-1-daniel.schaefer@hpe.com> <20200930085005.27148-2-daniel.schaefer@hpe.com> <1639933E5766B4C0.8589@groups.io> In-Reply-To: <1639933E5766B4C0.8589@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; x-originating-ip: [1.34.113.40] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 175d6cd4-524e-4251-2633-08d8667c970c x-ms-traffictypediagnostic: CS1PR8401MB0406: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1079; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UjVsDTBCY4hZGZtl/fVypt0waDFsb/lSv6pWTB7XwzLCi9Kh1Chhtx7JPcbhb8j1pMKb7anqAR7XCw8aLoEmTCRAiGLks/DJdVPKS9QAKcjrGQBv2PyGDh4eRDW6NhG0v4o3JfflSXQC9Fo2YY3kWuoaRm4+bDkKpMtgarS8oKd1h77KgWGbkJWfOZJeuoUxDaRnxvGBQCDxlH/uM+3/GgwGe3wJ3++cSqHX5/8z9MVTpcU3tjopCxGhg+0CjsmTLIoKKD2DqmuEs1EJybT4lIYoJHI3sSkQ7jwJqstkXFSBRMAF41vNY07BfdeHuPUj1ybBLpnvDpKja2rJFfqRjsROXyfX5RNiuylwgJfm7Qifjpilc9bVjmvhLNYz8054KYuKPtKTw6j/L3Inv4FHZuP+oEciAJhd+zImWGCdeIRthEfh0RJO08nvE+xQoeLxP93o6JPDne23DtB6DNgB3g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(6029001)(346002)(366004)(39860400002)(136003)(376002)(396003)(30864003)(7696005)(4326008)(6506007)(26005)(478600001)(8936002)(71200400001)(5660300002)(2906002)(316002)(9686003)(110136005)(186003)(53546011)(86362001)(33656002)(8676002)(52536014)(66446008)(64756008)(66556008)(83380400001)(76116006)(6636002)(66946007)(966005)(19627235002)(66476007)(55016002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 2/2s8radHy6ZaYoBVwJbPZvLTEPAgv9CKulnSR3EhSCJXwg6nU6TLEH81BeSbq60Agh8zuwITgEVWk1VPfCUjtW39H2Kp/ELjX3Enc/cWgucfQGr+Uo7R3UmhKU7AwwqSzHZUPwwYnJGu3HpD9zO8qwwBMyWj7HN3YlXzzOKub6xXRD4BTx8KnsD2np1gDFt7W/XzYyTCorQnGhCbspvRNcdfeXSVTpvej5zoAKcdVld+D3GnPsqmnHfpY+wR+K/T2KqKdrZfuGxGFFOrhFDwJFzbb22KVgGiiJDKeC6xV+eFkHulfvuPUyp4/0VL+EtWe2GL5irqs0k1R7FnSYNz22EUg+Q/E2OXIKLawYac2J3vfkNNVTdPKFXsAnTwudnDz68Ty9lycECMnoA/t2ejNJPmz100iJ8BsXoeFXG9PxbIJNbDKuwu/Z5FONAKFRIo6tDRkqV7sMDMD0urehuuXfzXlM86lvXfnMUViPV1TGNaAjdqbk22blza+7DDOshKVIgKLFUoMjonJWg6dI2xmxs1flA27E6GeYkLhcJuJYtcOmUuB7zL1TOYyG1glMlOHWSuyxstp/6uVFMSKgIXEuibnlGzk9BhwxSObRTLNPoQ6bX7gstE//tLeQsBlNSTMRpdiLdMNz9EjSdLLyeMg== X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 175d6cd4-524e-4251-2633-08d8667c970c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2020 02:40:56.7169 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uuFNwXOtPHtr5BgNA40E8UIEMdKHhCOyg39ym3e59wdv/Xd3F7hOO6QN3CivF6HzWymtWLvAokaFDwxHrW9dWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0406 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-01_10:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 adultscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010020016 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Merged to edk2-platforms. > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Abner Chang > Sent: Wednesday, September 30, 2020 9:37 PM > To: Schaefer, Daniel ; devel@edk2.groups.io > Cc: Leif Lindholm > Subject: Re: [edk2-devel] [PATCH 1/1] Silicon/SiFive: Handle case of NUL= L > FirmwareContext >=20 > Reviewed-by: Abner Chang >=20 > > -----Original Message----- > > From: Schaefer, Daniel > > Sent: Wednesday, September 30, 2020 4:50 PM > > To: devel@edk2.groups.io > > Cc: Schaefer, Daniel ; Chang, Abner (HPS > > SW/FW Technologist) ; Leif Lindholm > > > > Subject: [PATCH 1/1] Silicon/SiFive: Handle case of NULL > > FirmwareContext > > > > Abort creating the SMBIOS HOBs if there's no firmware context to get > > the information from. > > Turn SbiLib functions for getting mscratch into VOID since they can > > never practically fail. > > > > Signed-off-by: Daniel Schaefer > > Cc: Abner Chang > > Cc: Leif Lindholm > > --- > > .../Include/Library/RiscVEdk2SbiLib.h | 12 ++--- > > .../PlatformPkg/Universal/Sec/SecMain.c | 11 +++-- > > .../Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c | 46 +++++++-----------= - > > .../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 13 ++++-- > > 4 files changed, 36 insertions(+), 46 deletions(-) > > > > diff --git > > a/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h > > b/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h > > index 558841a970ce..f81ea06b05b0 100644 > > --- a/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h > > +++ b/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h > > @@ -514,9 +514,8 @@ SbiVendorCall ( > > access the firmware context. @param[out] ScratchSpace Th= e scratch > > space pointer.- @retval EFI_SUCCESS The operation succee= ds. **/- > > EFI_STATUS+VOID EFIAPI SbiGetMscratch ( OUT SBI_SCRATCH > > **ScratchSpace@@ -527,9 +526,8 @@ SbiGetMscratch ( > > @param[in] HartId The hart id. @param[out] Scratc= hSpace > The > > scratch space pointer.- @retval EFI_SUCCESS The operatio= n > succeeds. > > **/-EFI_STATUS+VOID EFIAPI SbiGetMscratchHartid ( IN UINTN > > HartId,@@ -540,9 +538,8 @@ SbiGetMscratchHartid ( > > Get firmware context of the calling hart. @param[out] FirmwareCo= ntext > > The firmware context pointer.- @retval EFI_SUCCESS The o= peration > > succeeds. **/-EFI_STATUS+VOID EFIAPI SbiGetFirmwareContext ( OUT > > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT **FirmwareContext@@ -552,9 > > +549,8 @@ SbiGetFirmwareContext ( > > Set firmware context of the calling hart. @param[in] FirmwareCon= text > > The firmware context pointer.- @retval EFI_SUCCESS The o= peration > > succeeds. **/-EFI_STATUS+VOID EFIAPI SbiSetFirmwareContext ( IN > > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContextdiff --git > > a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c > b/Platform/RISC- > > V/PlatformPkg/Universal/Sec/SecMain.c > > index 877777bfa1ab..fa9ecd789a57 100644 > > --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c > > +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c > > @@ -415,7 +415,10 @@ EFI_STATUS EFIAPI TemporaryRamDone ( > > return EFI_SUCCESS; } -/** Handles SBI calls of EDK2's SBI FW > > extension+/**+ Handles SBI calls of EDK2's SBI FW extension.++ The > > extension+return > > value is the error code returned by the SBI call. @param[in] ExtId= The > > extension ID of the FW extension. @param[in] FuncId The calle= d > > function ID.@@ -424,7 +427,7 @@ EFI_STATUS EFIAPI TemporaryRamDone > ( > > @param[out] OutTrap Trap info for trapping further, see OpenSB= I code. > > Is ignored if return value is not SBI_ETRAP. - @retval 0 = If the > handler > > succeeds.+ @retval SBI_OK If the handler succeeds. @retva= l > > SBI_ENOTSUPP If there's no function with the given ID. @retval > > SBI_ETRAP If the called SBI functions wants to trap further. **= /@@ - > 436,7 > > +439,7 @@ STATIC int SbiEcallFirmwareHandler ( > > OUT struct sbi_trap_info *OutTrap ) {- int Ret =3D 0;+ int Ret = = =3D SBI_OK; > > switch (FuncId) { case SBI_EXT_FW_MSCRATCH_FUNC:@@ -447,6 +450,8 > > @@ STATIC int SbiEcallFirmwareHandler ( > > break; default: Ret =3D SBI_ENOTSUPP;+ DEBUG ((D= EBUG_ERROR, > > "%a: Called SBI firmware ecall with invalid function ID\n", > __FUNCTION__));+ > > ASSERT (FALSE); }; return Ret;diff --git a/Silicon/RISC- > > V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c > > b/Silicon/RISC- > > V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c > > index 0df505d2675b..9bbeaaec3f7a 100644 > > --- > > a/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib. > > c > > +++ b/Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2Sbi > > +++ Li > > +++ b.c > > @@ -801,9 +801,8 @@ SbiVendorCall ( > > access the firmware context. @param[out] ScratchSpace Th= e scratch > > space pointer.- @retval EFI_SUCCESS The operation succee= ds. **/- > > EFI_STATUS+VOID EFIAPI SbiGetMscratch ( OUT SBI_SCRATCH > > **ScratchSpace@@ -811,11 +810,10 @@ SbiGetMscratch ( > > { SbiRet Ret =3D SbiCall (SBI_EDK2_FW_EXT, > SBI_EXT_FW_MSCRATCH_FUNC, > > 0); - if (!Ret.Error) {- *ScratchSpace =3D (SBI_SCRATCH *)Ret.Valu= e;- }+ // > > Our ecall handler never returns an error, only when the func id is > > invalid+ ASSERT (Ret.Error =3D=3D SBI_OK); - return EFI_SUCCESS;+ > > *ScratchSpace =3D (SBI_SCRATCH *)Ret.Value; } /**@@ -823,9 +821,8 @@ > SbiGetMscratch ( > > @param[in] HartId The hart id. @param[out] Scratc= hSpace > The > > scratch space pointer.- @retval EFI_SUCCESS The operatio= n > succeeds. > > **/-EFI_STATUS+VOID EFIAPI SbiGetMscratchHartid ( IN UINTN > > HartId,@@ -839,11 +836,10 @@ SbiGetMscratchHartid ( > > HartId ); - if (!Ret.Error) {- = *ScratchSpace =3D > (SBI_SCRATCH > > *)Ret.Value;- }+ // Our ecall handler never returns an error, only > > when the func id is invalid+ ASSERT (Ret.Error =3D=3D SBI_OK); - ret= urn > > EFI_SUCCESS;+ *ScratchSpace =3D (SBI_SCRATCH *)Ret.Value; } /**@@ > > -852,7 +848,7 @@ SbiGetMscratchHartid ( > > @param[out] FirmwareContext The firmware context pointer. > @retval > > EFI_SUCCESS The operation succeeds. **/-EFI_STATUS+VOID E= FIAPI > > SbiGetFirmwareContext ( OUT > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT > > **FirmwareContext@@ -860,24 +856,18 @@ SbiGetFirmwareContext ( > > { SBI_SCRATCH *ScratchSpace; SBI_PLATFORM *SbiPlatform;- SbiRet > Ret > > =3D SbiCall (SBI_EDK2_FW_EXT, SBI_EXT_FW_MSCRATCH_FUNC, 0); - if > > (!Ret.Error) {- ScratchSpace =3D (SBI_SCRATCH *)Ret.Value;- SbiP= latform =3D > > (SBI_PLATFORM *)sbi_platform_ptr(ScratchSpace);- *FirmwareContext = =3D > > (EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *)SbiPlatform- > > >firmware_context;- }-- return EFI_SUCCESS;+ > > SbiGetMscratch(&ScratchSpace);+ SbiPlatform =3D (SBI_PLATFORM > > *)sbi_platform_ptr(ScratchSpace);+ *FirmwareContext =3D > > (EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *)SbiPlatform- > > >firmware_context; } /** Set firmware context of the calling hart. > > @param[in] FirmwareContext The firmware context pointer.- @retv= al > > EFI_SUCCESS The operation succeeds. **/-EFI_STATUS+VOID E= FIAPI > > SbiSetFirmwareContext ( IN EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT > > *FirmwareContext@@ -885,13 +875,9 @@ SbiSetFirmwareContext ( > > { SBI_SCRATCH *ScratchSpace; SBI_PLATFORM *SbiPlatform;- SbiRet > Ret > > =3D SbiCall (SBI_EDK2_FW_EXT, SBI_EXT_FW_MSCRATCH_FUNC, 0); - if > > (!Ret.Error) {- ScratchSpace =3D (SBI_SCRATCH *)Ret.Value;- SbiP= latform =3D > > (SBI_PLATFORM *)sbi_platform_ptr (ScratchSpace);- SbiPlatform- > > >firmware_context =3D (UINTN)FirmwareContext;- }+ > > SbiGetMscratch(&ScratchSpace); - return EFI_SUCCESS;+ SbiPlatform = =3D > > (SBI_PLATFORM *)sbi_platform_ptr (ScratchSpace);+ SbiPlatform- > > >firmware_context =3D (UINTN)FirmwareContext; }diff --git > > a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > index edeabf028ff8..88f36cbbe299 100644 > > --- a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > +++ b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > @@ -38,7 +38,7 @@ > > @return EFI_SUCCESS The PEIM initialized successfully. > > EFI_UNSUPPORTED HART is ignored by platform.-+ EFI_NOT_FOUND > > Processor specific data hob is not available. **/ EFI_STATUS EFIAPI@@ > > -56,7 > > +56,6 @@ CreateU54E51CoreProcessorSpecificDataHob ( > > RISC_V_PROCESSOR_SPECIFIC_HOB_DATA ProcessorSpecDataHob; > > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext; > > EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC > > *FirmwareContextHartSpecific;- EFI_STATUS Status; DEBUG > > ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); @@ -64,9 +63,14 @@ > > CreateU54E51CoreProcessorSpecificDataHob ( > > return EFI_INVALID_PARAMETER; } - Status =3D SbiGetFirmwareCon= text > > (&FirmwareContext);- ASSERT_EFI_ERROR (Status);+ > > SbiGetFirmwareContext (&FirmwareContext);+ ASSERT > > (FirmwareContext !=3D NULL);+ if (FirmwareContext =3D=3D NULL) {+ = DEBUG > > ((DEBUG_ERROR, "Failed to get the pointer of > > EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT of hart %d\n", HartId));+ > return > > EFI_NOT_FOUND;+ } DEBUG ((DEBUG_INFO, " Firmware Context is at > > 0x%x.\n", FirmwareContext));+ FirmwareContextHartSpecific =3D > > FirmwareContext->HartSpecific[HartId]; DEBUG ((DEBUG_INFO, " > > Firmware Context Hart specific is at 0x%x.\n", > > FirmwareContextHartSpecific)); if (FirmwareContextHartSpecific =3D=3D > > NULL) {@@ -102,7 +106,6 @@ > CreateU54E51CoreProcessorSpecificDataHob ( > > ProcessorSpecDataHob.ProcessorSpecificData.SupervisorModeXlen = =3D > > RegisterLen64; } - DebugPrintHartSpecificInfo (&ProcessorSpecDataH= ob); > > //-- > > 2.28.0 >=20 >=20 >=20 >=20 >=20