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.web12.11064.1601455878306562887 for ; Wed, 30 Sep 2020 01:51:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=TsNB0wJ1; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0542154863=daniel.schaefer@hpe.com) Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08U8m2nq012127; Wed, 30 Sep 2020 08:51:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=pps0720; bh=gFPswabwnwBZ2+x6d594wwRCA9KuprWGTEjLx5ZJcUE=; b=TsNB0wJ1d1gbmk55FaxK8Bd33GSn9vM6yl5tndFackBBFjf9RBN6ZxP32hQ2VpFYWRXp 9nvX4ZWi5bWBoKcS4Im1E4o0si90wgceU4AQhfAiV6uv6HM7HGbJJRuHq9yhhpYEWVM1 C1frXrs8sJE+gTv5BzDyg4X9T5AS1tE9SIxG6ehDCPbyJ+cmHUkBxxg9Fq1vcdk8qotd 5h/YQaZ7ikfRMg18PLNp3Yxd5E7xc5x4l3KbFqVqssljP04bG+NQ7gXPMW4sMglKWJg+ oDhFuz5Ke+uBashXfS3YQK7SqWfnNMpx2TTxnieK4v+pA+H2cHmBXLgZ1HRhxteBUZIQ 1Q== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 33v2sg16yu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2020 08:51:17 +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 g4t3425.houston.hpe.com (Postfix) with ESMTPS id EBD83AA; Wed, 30 Sep 2020 08:51:16 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Sep 2020 08:50:25 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (15.241.52.11) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 30 Sep 2020 08:50:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FsiMAfqWErONAoV7jZnYcLQIlji9OWN/NSGrZE7MgtJXWlxdBAa5mfaa3n0IbawyXlchdrn/PEqjwQSKJG7FfBbuLypMz3MNAkIrDZ0PqDeawwZcAHP53J3AUlQJVWPBzQ+e2k71ezgx17pOyhZja82xzJNvhP6YK9SLlp5/l3KB6/DXSNsNZpIy9wTCDgSqhr+Lx5zCBCSaj2soqucsfC0VrTRZo4gXPdeq4bFY8n0vwQGhqTuBLi7aMDnhS5jFj6+o9ec1PyIDGwqKx+PkLuVidEaUXCZk4BhwgCZe2Xx3esjtbWiXfgAbRLVyH6RfGHU8FiyLMXxe0hmWA8HOZg== 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=gFPswabwnwBZ2+x6d594wwRCA9KuprWGTEjLx5ZJcUE=; b=BeoAIojSFzRnhGDe0Kz7PkXf2Xe/8BQDfyoYJmMfKIP9NSyNd8Rs6I+ThUfVepcXD89qOqNKeDy+293vDM3yZeyf0k0+Iku3SJTBSO9vzXQxis/DLulb/y0SbRRcKC+z5YnrQQAYG/5ZST/SinQiP/2hrIVti4UVclh+qAhl4EXZlzByiDtmWzbKrdnEcVdjWIwhsdnarkAnGYFx0YWVBFqKetR/DXSlnp2ftOE2FnqdxoiHtroSzxB7Ud+63D74mMNLXCR5CoJX5Ipu1u/RyvaoDRT9wpt8sydyjOa5WhcZ6C1IOU7QMGzFlYattEDDPI/GrsKILxpjLRQn6UAdzQ== 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 Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0858.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22; Wed, 30 Sep 2020 08:50:24 +0000 Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::11b0:1862:f48c:d2a9]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::11b0:1862:f48c:d2a9%9]) with mapi id 15.20.3433.035; Wed, 30 Sep 2020 08:50:24 +0000 From: "Daniel Schaefer" To: CC: Daniel Schaefer , Abner Chang , Leif Lindholm Subject: [PATCH 0/1] Silicon/SiFive: Handle case of NULL FirmwareContext Date: Wed, 30 Sep 2020 16:50:04 +0800 Message-ID: <20200930085005.27148-1-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.28.0 X-Originating-IP: [15.211.146.34] X-ClientProxiedBy: SG2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:54::16) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from x360-nix.wireless.hpe.com (15.211.146.34) by SG2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Wed, 30 Sep 2020 08:50:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ca7c141e-ccf7-43cf-9333-08d8651dde9f X-MS-TrafficTypeDiagnostic: DF4PR8401MB0858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5DBd9M8Q189Jw3oTL+EGicvUFRXimgbfp/xtFc8kjdKoVbtDEExXYVO5D2zLoCh5+nFF8WTisVCtMB7QNnDUekfqZ1uPnVyAZtRTPtqX4sHDV75Ti/gB011IrziDGNfTDEh4+W7Eb3TnQSQ3kyjZJNRmKEJqJHqqQh7B8vat+O2vzlajD0xKyhPlyufZvN+WcW/O6zTb9T6zJFEaGF+Nrw+4CJFDGFIYRxB7mXBFA6zXSGTDcnZqd5oh05/FfxzgmQzKzua0rf835iqSCkQ8Lkoa+3yEzDvHK/sc4iWJey5KT1XRtotfS4TUxA2vvM3keYsYOluYNJ7oMRzt2LYUE7CY7PbU3mDa9MNxLdrKLG+I2J6p3JiqYuA62nIrEs5+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(6029001)(366004)(39860400002)(376002)(396003)(346002)(136003)(6486002)(4326008)(316002)(2906002)(8676002)(86362001)(8936002)(4744005)(6666004)(54906003)(478600001)(44832011)(16526019)(5660300002)(186003)(26005)(1076003)(52116002)(83380400001)(66946007)(36756003)(7696005)(19627235002)(6916009)(2616005)(66556008)(66476007)(956004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: jAALfUJCQDi/427rviRPToaCqqKaPkBWZ1QJLHvcZqJ6knrAIeyiZp3oVwcf2U28fBDOnELDUjN+wfPXKiWGjLvnyccYO7lypJaWVfWUK9K9oF9aw50Kwze548nmdsnqDyv0+XZcxTCGuY9lfMy20U+P9PHF6q1mr6GBR/sW5xrM5uYlhcKNc6V43wXVjDSuKJlS5uKJrJFtL43dlttHJauE3aaPDMJ/CmKzS43cNAjo3Z62NBnrmCj/GNza9TEipDlIddzUGkTe7UTdjXt1PUmAaCToaHNC2iTOKLmuVRnJGL5FHmKbqMtJTZDIBTimDm57b03qZ6Ry8hxXsWkuCulEVX1FTQeng83EPfmBSp28PyoI5TCCpKiWJ/ZyhzZGdo5qLid3/KEHZfBy5ZQolkmFehAMgg64EUnIPyOWdovc6pyoTPEs83+KF0CDWkmqrgdc5576MY0RjiYm2FqkwyZZ+Gz2yJPYhPwmGZIhOPRAcdwA5fZcZoBIAR/1Aan4laUpFBlnbavh9kSfjo/xDrJrC1I39sBThBf6F0bYvhei820SzJzl5c44DDp5pqRx50iO7SN5t/avPK00t4kFMHAtCGem6VaogPLa207ns4zn01YvQSAGk/0wfNfvIiDZWO9dz2ABpy/Ms29RoL9I8A== X-MS-Exchange-CrossTenant-Network-Message-Id: ca7c141e-ccf7-43cf-9333-08d8651dde9f X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2020 08:50:24.0460 (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: K9TtxNq63YV+5eeKwzGjyd4EEPYpNLUawaUunZPQcsMZOOBliYPRGBcGGaGrmega4HsviTZRl3ogMxQfYkBNcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0858 X-OriginatorOrg: hpe.com X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-30_05:2020-09-29,2020-09-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 suspectscore=4 adultscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009300070 Content-Transfer-Encoding: 8bit Content-Type: text/plain This is a replacement patch of Abner's with title ProcessorPkg/RiscVEdk2SbiLib: Error handling for locating firmware context I realized that the error handling wasn't bad but unnecessary. Those funtions can never return an error, since the SBI call they use also doesn't. Tested by booting to UEFI Shell. No new error message logged or ASSERT triggered. Cc: Abner Chang Cc: Leif Lindholm Daniel Schaefer (1): Silicon/SiFive: Handle case of NULL FirmwareContext .../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(-) -- 2.28.0