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.30904.1598792380317086269 for ; Sun, 30 Aug 2020 05:59:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@hpe.com header.s=pps0720 header.b=biTiKJCW; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0511ce1a86=abner.chang@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07UCw34t010787; Sun, 30 Aug 2020 12:59:39 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=6gTKZ/JoK9cwFm09O99Civ26cr1Dfrmw8fMDB0WNVl8=; b=biTiKJCWLR72I9RmvXygBBFdPFuuszLtIF1KXlNvrwO2z4YoBaoDUqyJUxr5vROJpBYl JZALMK9LGygmb9vdK+CH+J9EXmUdO1YJJ/p0rD81pi7/g28Xt5ALtZmFzCiIhRE9yPSs X63rc7cLsBfiAPJWEAv9pVaUHBuiUpmqcjKXWNMRdBBPHbcPJ1KzcepFWJaGRqE0gfGk vJGqAc/xybwHGMr8X9ymJh3xl+Eg0iq6Q0HIA3PK22W9Erig9c/WL6bzBA9E3clSMr8P cfD1KXgGnJHiLZFYxje1kjDN4njGK+m6Wpt083o+tgjF6NABbh4SN0/7pcfmi0WGUyQI Uw== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com with ESMTP id 337e4v6q1h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Aug 2020 12:59:39 +0000 Received: from G4W10205.americas.hpqcorp.net (g4w10205.houston.hpecorp.net [16.207.82.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id 6E52084; Sun, 30 Aug 2020 12:59:08 +0000 (UTC) Received: from G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) by G4W10205.americas.hpqcorp.net (2002:10cf:520f::10cf:520f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 30 Aug 2020 12:59:07 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (15.241.52.13) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 30 Aug 2020 12:59:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V9RTespAwVAjCoZvMo1QE3cruIUQJvI52aT/uMINNZjowOqZO+8T9Rr6INxvOU7q5mDFvmVWGmt0tXYrWNq6jDQsOdWqwmrbN64CjgO29D9lig/zEcD0n/PBaRaU/3aQnhQUTDz+MlWYeG/yh21VfmxqZmGv7citL/qw+wg3386cWRVUx647Kviv2w3Ef96+y4v0jHslnAfzssbnWZxFgUtiWNeDHYjo1I+VuGDBRxPUSeeekh0F639lN+ydXww5js8KjnhpxUGLUrxSlJEK7A3DiRB6xKmp9ZoTUditf3SbxVCmH+VH+ol5USyEdOeKGDCkl+PT9UGDtBSGfcr6kg== 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=LRygv2MgjkQVrDuCFrQ8no9wqtXvoWOdIkdYjx2RegE=; b=G2cMPDgIelo+RyPe8jM40PRP4mub9eCywe12gdtHlquOj8Sa8pinteZkPuG1Fnfcn6+ukgmoXWggijn5dJ+wXj7r599pJiRXVPGK1EjP0XROloYiUK+uWqBmqlobT48QYK4nzYQW008JVidA9HbJqyXmGtFQZzlbgHBt4HkiYv9r2HVhNdOHCQjmK6+oQAjOIl26JkMHW/E5N9FN7slO+KrJQjpt9PyF6dJJeh8prK1OOigu267mRtg9j/mYO47P+qbP90vG9sL+Zngc/izoIoHhWvvo7RNlHtsIU6HeSKgmpD+Q8v5E1BWFzC0XohOeDXlBw3GLTDIetqmcg4e0+g== 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 CS1PR8401MB1093.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7513::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19; Sun, 30 Aug 2020 12:59:06 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4ed:e814:836b:f074]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4ed:e814:836b:f074%10]) with mapi id 15.20.3326.025; Sun, 30 Aug 2020 12:59:06 +0000 From: "Abner Chang" To: Leif Lindholm CC: "devel@edk2.groups.io" , "Chen, Gilbert" , "Schaefer, Daniel" Subject: Re: [PATCH edk2-platforms 1/1] Silicon/SiFive: fix RELEASE builds of U54 PeiCoreInfoHobLib Thread-Topic: [PATCH edk2-platforms 1/1] Silicon/SiFive: fix RELEASE builds of U54 PeiCoreInfoHobLib Thread-Index: AQHWfgoXjRooG2fCtkG2qqsIniuoWalQTStAgAA5ugCAABdTYA== Date: Sun, 30 Aug 2020 12:59:06 +0000 Message-ID: References: <20200829134118.19610-1-leif@nuviainc.com> <20200830113414.GA20124@vanye> In-Reply-To: <20200830113414.GA20124@vanye> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; 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: a4e07f1a-4b6a-4bc4-6711-08d84ce47aa8 x-ms-traffictypediagnostic: CS1PR8401MB1093: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c28QqOoWFDzYEr4G74xSJx5POtjiQFYrhaZNUyVN1x7oC+tq+47gOOmJM0e8HV8mq3lRNHpReRH39yzKQFjwRx/byyKye0IaWuuy6yoKxeoR1yFS1TZ61L8EjYxdp40ESDJnXZjBq5/yvTIGbsPiBoCO2pMhinNXwq7wNM/xEKSIRcgYJGOcA1Zeef1632d+7v0SFv8R6IyauCYLBY24amSIQHTohzebR1ELwQRdIrpMSAr3/oXtHDpsbN7Z8QC2owBmGmfFaJ0XMfWOy13x5hCByLmtJRXXYYDp/idxmsE+eGx5fr4iVPLUT+YzIhb5dFg0lmoPLAWibOuwV2t10EwylpTcnlc/idKdldvIz0YM+ddMWeDBNr5AQKibkImTDvJIZCMmUm5pd32996IdDcDlxjstq2uL26ZJye9o2AqUdH7J8rqa2nR2cQPJdKevuPFF7x8izYYgdXqky7PAjw== 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)(396003)(136003)(366004)(346002)(376002)(39860400002)(83380400001)(966005)(6916009)(55016002)(9686003)(66556008)(64756008)(66946007)(478600001)(66476007)(316002)(52536014)(5660300002)(2906002)(71200400001)(8676002)(66446008)(54906003)(19627235002)(4326008)(6506007)(53546011)(8936002)(86362001)(186003)(7696005)(76116006)(26005)(33656002)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: xZp/xIlw8WYabgwSh83oCzgs26iMbrsJKK+hjwqt76ZR91TfeDuz/YtYCOPQLFbOKUsMS3Qot1alvwT4uciHTNHO4+yig5XPr1QSFJpqHEsbGKRIrkM7YCWT0zmnFJ3VXc8h9hBziLgh4UT1fICx8qGNtPQCUhtk/7LKmN0YBVvNgHIe07SI8g94V5xirJuaAb+IXwZi3VqaKGGEfCAD/RPsnjEcuVhtQk8v/Iw3WMg6UwkmnqlqROmknm8ilM85SxG37GCHsA8iI49j/vds7gDyxUjrLxoClOXCb9GHqUR+NyQNcL0O+OAeW1+ZxayWkprA2+X3wPjLX76vWxTGCcWETyBDRrpFId5Uum0oJ6lhiXLrLvsfRjWmBS1tXlny6svZcLbG+kr6OedM40voAFrqmQHmg4DfjG9eUvt78zLVJsDmGk46rmHl/gyHqn5VbqlJUoe8npu/FFBCmCNKRCEt5DSXy1nvqxQaTdEUIhvOcGGHL4o5WYLuv0xjpSOfCmrfRRT2z9HhcuAWauFMv+t7VTMzogj7RiDNN+zH7FBcnQ3EBkWR+YqBeF+sN7GHnzRtziGB+gY/ufU+nmet5BEs300VmeX8jGM2tQrF4ECq4PWbq3I+fw3NtGeAmePRbNIKCjrPc45JMK/7OqAVVA== X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: a4e07f1a-4b6a-4bc4-6711-08d84ce47aa8 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2020 12:59:06.5147 (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: DibvHcKHjlygr+c6nKhbXGUvg50mqHw3PP/iJ9Y72ATMimevRZov8b8/wvYr9P4tArze7iZtL2Tn9poC1TRuww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1093 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-08-30_05:2020-08-28,2020-08-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008300105 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Leif Lindholm [mailto:leif@nuviainc.com] > Sent: Sunday, August 30, 2020 7:34 PM > To: Chang, Abner (HPS SW/FW Technologist) > Cc: devel@edk2.groups.io; Chen, Gilbert ; Schaefer, > Daniel > Subject: Re: [PATCH edk2-platforms 1/1] Silicon/SiFive: fix RELEASE build= s of > U54 PeiCoreInfoHobLib >=20 > On Sun, Aug 30, 2020 at 08:14:36 +0000, Chang, Abner (HPS SW/FW > Technologist) wrote: > > > -----Original Message----- > > > From: Leif Lindholm [mailto:leif@nuviainc.com] > > > Sent: Saturday, August 29, 2020 9:41 PM > > > To: devel@edk2.groups.io > > > Cc: Chang, Abner (HPS SW/FW Technologist) ; > > > Chen, Gilbert ; Schaefer, Daniel > > > > > > Subject: [PATCH edk2-platforms 1/1] Silicon/SiFive: fix RELEASE > > > builds of U54 PeiCoreInfoHobLib > > > > > > In function CreateU54E51CoreProcessorSpecificDataHob(), the > > > FirmwareContext variable gets initialized an ASSERT_EFI_ERROR macro, > > > meaning the initialization gets folded out for RELEASE builds. Use a > > > temporary variable for the ASSERT instead. > > > > > > Fixes a build error of both u540 and u500 with gcc 8.3. > > > > > > Cc: Abner Chang > > > Cc: Gilbert Chen > > > Cc: Daniel Schaefer > > > Signed-off-by: Leif Lindholm > > > --- > > > Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git > > > a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > > b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > > index 6ddae632fd17..edeabf028ff8 100644 > > > --- a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > > +++ b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > > @@ -56,6 +56,7 @@ 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__)); > > > > > > @@ -63,7 +64,8 @@ CreateU54E51CoreProcessorSpecificDataHob ( > > > return EFI_INVALID_PARAMETER; > > > } > > > > > > - ASSERT_EFI_ERROR (SbiGetFirmwareContext (&FirmwareContext)); > > > + Status =3D SbiGetFirmwareContext (&FirmwareContext); > > > ASSERT_EFI_ERROR > > ASSERT_EFI_ERROR() should start at the new line. I see this macro just > > attached to the end of Status =3D SbiGetFirmwareContext > > (&FirmwareContext). Is my editor problem? >=20 > INVALID URI REMOVED > 3A__edk2.groups.io_g_devel_message_64794&d=3DDwIBAg&c=3DC5b8zRQO1mi > GmBeVZ2LFWg&r=3D_SN6FZBN4Vgi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=3D > UkdQYKg5exPcuGmzwjtBQvaRGX5SPNiaP9ko8nTDWgQ&s=3Dr0p7ssf1Q8Y2070 > L71hNFsILUzkHznlm5k8mpyVeV9k&e=3D > It's your editor. Ok. >=20 > > > + (Status); > > Please add error condition check for the Status. Return > > EFI_INVALID_PARAMETERS to caller, and also update the function header > > for the case of @retval is EFI_INVALID_PARAMETER. Just realized that > > we use @return in the function header instead of @retval. >=20 > I agree this looks like a better way of handling the failure, but I'll le= ave that to > you. This patch simply stops the current handling from breaking RELEASE > builds. Sure! Reviewed-by: Abner Chang >=20 > Regards, >=20 > Leif >=20 > > > > Thanks for this. > > Abner > > > > > DEBUG ((DEBUG_INFO, " Firmware Context is at 0x%x.\n", > > > FirmwareContext)); > > > FirmwareContextHartSpecific =3D FirmwareContext->HartSpecific[Hart= Id]; > > > DEBUG ((DEBUG_INFO, " Firmware Context Hart specific is at 0x%x= .\n", > > > FirmwareContextHartSpecific)); > > > -- > > > 2.20.1 > >