From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web12.28166.1598775280247897743 for ; Sun, 30 Aug 2020 01:14:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ijVo9KaY; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0511ce1a86=abner.chang@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07U83dTW028887; Sun, 30 Aug 2020 08:14: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=JyPSwABvRQtLQSApY4b/xflSRcYTZM9TBSGG2mWv96I=; b=ijVo9KaYn72LbVM4jq+P3BsO6edN/0uzzskmSwh86GvFTDWBJwto/UX/+/lQzSheeoVK CXSAOeD6GGTjhfmMn9K6yLwnk4HqzRxU8/vKvqze23F+KhD7IH36b9Ir7rs+J1jkSdYi SYx8Q8/q4bclRSh8ztt2z5u0JL5uYeIAJIDuI0YXZ6BrWysV4vSP51DL2EfC9lJqAkaO oIgLg7vGqFj8dAt9tjRqMxewFT+XbBuWkRxeM9g2z/lT5di1WrLBHsfcjwKKq12QMcZ+ c73bzo056FIvhElF2lVUtJYd9Wz41PHQ2lvKr4Qekqt/pL3qq3q9NVDgdjbqxQtqefX7 iA== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0a-002e3701.pphosted.com with ESMTP id 337djkwqmy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Aug 2020 08:14:39 +0000 Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (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 71FCF66; Sun, 30 Aug 2020 08:14:38 +0000 (UTC) Received: from G4W9331.americas.hpqcorp.net (16.208.32.117) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 30 Aug 2020 08:14:38 +0000 Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G4W9331.americas.hpqcorp.net (2002:10d0:2075::10d0:2075) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 30 Aug 2020 08:14:38 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (15.241.52.12) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 30 Aug 2020 08:14:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VtqVisRhIGWtX+9ELj1q7cf4kYUWUGNXMQyuFl498BQW3H/n2MtoqXPSWjr2MZShm/nxgy7PzqxrDRH77VmKW0ol/3KzqrBxYr0KZLbgkZba1zzn4BppyPFbIX0qhV8f5kWtEs1H93sPcWKbMKtWy/SnBNhanVgLBng6LIxKV5VyuzdHLPfWjuNvdiIBcsojIk5q3yjWewZfzKEfvC5gTTAZ7tJpwwAXvSzz5FHQCeJ1PBvxmoxv7yYjcFbtRpkS4Fyhi+pNHAv4DXvaVw3k9Tql0vWDgp1tSSEdJBl0VPqTgQFg/mZTMc9oKBhPs3lER5GOatK309GoSnZpobU9Dg== 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=ibE+ya1JLv81IurnhsJuLk6jVEFSsZrxtrYdQ//cD6k=; b=TZVaoU8ixUKofPzsi4tWiU9cjjezwQKGULxIHll3XjqYR6mINDeQEfEwfHaeDV7dHu6A3/2CgJTWzSTpbezWEynykK0X0k3d8Q/Q+Wej2GAwjy8/nkAp8uLvhMpurpEvRIY90su+X+ZgCIeAwkOyz0vHOdXJsSw4WNfHWc35++W0PFFcGydLxt4KfeZwBGc25UvxrqKkB1NpiBI8we3TQ5Fd6bqPMwdrZgcypNEjP38mpIPHPbs+y+Q4G7pgtFWL6eft/P24Co39bsw0WWA/YtmS5khUruEE4kY8r4mG2+p88AsI1b/P7GjeHFIMm3rA9tElLt45H9eoF/mh4XOhEA== 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 CS1PR8401MB1095.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7510::9) 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 08:14:36 +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 08:14:36 +0000 From: "Abner Chang" To: Leif Lindholm , "devel@edk2.groups.io" CC: "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: AQHWfgoXjRooG2fCtkG2qqsIniuoWalQTStA Date: Sun, 30 Aug 2020 08:14:36 +0000 Message-ID: References: <20200829134118.19610-1-leif@nuviainc.com> In-Reply-To: <20200829134118.19610-1-leif@nuviainc.com> 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: 26c16b21-e0b3-4297-785d-08d84cbcbbdf x-ms-traffictypediagnostic: CS1PR8401MB1095: 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: cdRHh1yk6qzEJXKV0no1yv09nkgnJFhpwbKjFoOGnb9sZSnA/ahHadfA6FAcuxRQKZvsEOp3svtRW94Rtz6GcLBVexNRHQQOrPI3lsUNeJ6vAz3yCVgDVNC1fiStsPUA/D8oqrWFB4hykDLxYKrF5excDJp7B/sqM71nhoc0S+Alwbi8U8Oc90LVQkfqv7lYTSBaauyeq+5cRgxnDnbRQ81ZOcZ4YKsY7fkUVhQGNqe6+Sz6bQB2yS4fUa4AdJ4tp+uwPL8yrmgmG8a4hYSxdyCMes9l17/Y8atMXBnkv78KtDyn65ah3MbKyVA1ZbNhVJ2WOwGsqp5R9+5dziJfMaqr/s751k0giNeEzgHeGiT8/kY3uwDvcIoC2rKZUVGK 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(2906002)(9686003)(55016002)(110136005)(5660300002)(54906003)(8676002)(71200400001)(8936002)(52536014)(33656002)(76116006)(66476007)(64756008)(26005)(66446008)(53546011)(186003)(478600001)(86362001)(316002)(19627235002)(66556008)(6506007)(7696005)(4326008)(83380400001)(66946007)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: d88BHDO5p6SKty6gXrfbYA3+0NbvyKmRC0GuIsy9o36w6cxrag1OWSO7h2UciMi9r86V0Jts6zaJJu+ZHNLxJ7o7EKRryJKM3kL3lO9YiDCkTm8cG52cIEk+obB9j5LS0yTDVUa/qTLOxWs+YEgZ7dRKT6nndoSAk+1hl3xg4ubWCoK6RfoqfTBRTFYU2cwrGrXcMn8gTzpopCKxQL60+vFVQEl4N2ZU3vWIhD1FEAKPtRwClxUnjj2ERLYzUkvAk3hApCeps0zmJ1JicEyUQYkIa+YuvpaCQyHtCfEWM41wgXi0I/qhUIAnZ+4c6okfDf/4v1huSk+LOPfWIg+0sJpfZJq959ChrnApNZzvyAYesmlEJzHMob20VLFra/5Ka6NPT7OTZwq6tPQ2d9LXXr52BbOvw2JClLkQyEe5tiX+NJ7a21u2MN+/TX8VLMlPyBVypCbVm32adX5CabKgG2eBZ/wwLcsrUdnyie/ri+TTdeTe4RlMkw0wPueVzu5iyP2bvb/oRjt2pr6WH+tf/yvuKn8h9A+iJwQE4yUz2/EFRPlORpw+mkFMm74ti2f4IGXuKXlTqRu6NQjbyOAYiChwP93+ZLpYcyy2X8D2VzUuL3TYfgvPRaAXjCn8c75S9+M68hiAowHsA9WmFF/WDg== X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 26c16b21-e0b3-4297-785d-08d84cbcbbdf X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2020 08:14:36.1662 (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: c6IPp+rUIs3BVa6r6sqJk47dMmJIY6IyWDzDjugTKYJtv9gwm3BVRpzRHs+v6n6My49b2azIPDIhqBitUZmy1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1095 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-29_15:2020-08-28,2020-08-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008300064 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: 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 >=20 > 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. >=20 > Fixes a build error of both u540 and u500 with gcc 8.3. >=20 > 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(-) >=20 > 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; >=20 > DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); >=20 > @@ -63,7 +64,8 @@ CreateU54E51CoreProcessorSpecificDataHob ( > return EFI_INVALID_PARAMETER; > } >=20 > - 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 atta= ched to the end of Status =3D SbiGetFirmwareContext (&FirmwareContext). Is = my editor problem? > + (Status); Please add error condition check for the Status. Return EFI_INVALID_PARAMET= ERS 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. Thanks for this. Abner > 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)); > -- > 2.20.1