From nobody Wed May 15 13:44:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108821+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108821+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1695111446; cv=none; d=zohomail.com; s=zohoarc; b=kwIC/do4oZmT2wKAUojUr62dU28ML2pD1Ds6qKgsIshFulmbVrE35IZpK4agatgi0K1MltJxE9+3ajV3M4fEdc0/bBX32TEfy1A+t7PuWkAo2yqhMGuYgJKqJHThaWgUeqhAK2LBuEsbWtgXttIhyteHpRWsgl4xOnhT4lpIAiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695111446; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=yyVvhsZZ87xGBalXDEYGHFPHz1ha6LdNU1PUg/BOs9c=; b=eWVbwS4C7Dzd+YhXF9zt4EwrEYIF6EB9fM61Q/V5/7TPUy6L8IwniFz44YRdWYOeSr2yBGIBkSUrTnozEJq+udAT/kk4Xxenjf/l57RNF/bo69ha0VyQmXE1y4d/qw6z1fxTG8glT2LyW1hMgNIYUHxxPYY1wnXV3KTuxsy42M4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108821+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1695111446456649.2434886009033; Tue, 19 Sep 2023 01:17:26 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=9kP3uU06C3qNBCjfyX40nYki9KABXngqcEWBRhj0ZPE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1695111446; v=1; b=asufV4iJBMN9GTsG1EcFrCNhr3SV97tZiYLe9Leu8F98vKCxjjhp1ohqOA9vCvf706enrQlS EgCorfL4pQmOK5+SKFdK5/EXi+RpKe59UrPw1B/oexvsEKaJzwXQkitt5DG1VP/Qdj1Ky2jvb3X /sZPt3q6yEftQ5JSzOhXWfYY= X-Received: by 127.0.0.2 with SMTP id tJ23YY1788612xseKTvJYAiM; Tue, 19 Sep 2023 01:17:26 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.3199.1695111444809770719 for ; Tue, 19 Sep 2023 01:17:25 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="377193317" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="377193317" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 01:17:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="919774161" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="919774161" X-Received: from awarkent-desk.amr.corp.intel.com ([10.212.118.183]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 01:17:06 -0700 From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: Andrei Warkentin , Yong Li , Sunil V L , Tuan Phan , Daniel Schaefer Subject: [edk2-devel] [PATCH v2 1/1] RISCV: Fix InternalLongJump to return correct value Date: Tue, 19 Sep 2023 03:16:59 -0500 Message-Id: <20230919081659.27086-2-andrei.warkentin@intel.com> In-Reply-To: <20230919081659.27086-1-andrei.warkentin@intel.com> References: <20230919081659.27086-1-andrei.warkentin@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,andrei.warkentin@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: nC7X1TvUpy0TA7O2QCdijsKxx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1695111447506100005 Content-Type: text/plain; charset="utf-8" InternalLongJump was not returning the 2nd parameter passed to LongJmp (Value) as the return value from SetJmp. Seen with code compiled with -Os, where an LongJmp (Buffer, -1) somehow translated to SetJmp returning 0... Cc: Yong Li Cc: Sunil V L Cc: Tuan Phan Cc: Daniel Schaefer Signed-off-by: Andrei Warkentin Reviewed-by: Sunil V L --- MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S b/MdePkg= /Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S index 34486eabba4c..e97a7d0727b8 100644 --- a/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S +++ b/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S @@ -3,6 +3,7 @@ // Set/Long jump for RISC-V // // Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
+// Copyright (c) 2023, Intel Corporation. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -47,9 +48,5 @@ InternalLongJump: REG_L s10, 11*SZREG(a0) REG_L s11, 12*SZREG(a0) REG_L sp, 13*SZREG(a0) - - add a0, s0, 0 - add a1, s1, 0 - add a2, s2, 0 - add a3, s3, 0 + mv a0, a1 ret --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108821): https://edk2.groups.io/g/devel/message/108821 Mute This Topic: https://groups.io/mt/101452205/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-