From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 79B90780091 for ; Thu, 21 Sep 2023 04:59:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=KwylwfiNCGtCbvfVh2mLZVE7XGlQ7687eXpe2M3fUgw=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1695272354; v=1; b=HtbZMZTCyyCryKj4Ah6Dqctd1/JT1LNqQLhr1jA4dONeyBivWdESrMwOc5FGoigQMBJmVNdM V5qjZi7gCsomYsBc/cyU7a/zaIlwxz/Ci4FWisQ5TPJp8vRymWdwPGRLQbJCvzVci1IQDHiAxJN h0S7d/vHHPojgE5BcqjnAvyA= X-Received: by 127.0.0.2 with SMTP id qfPnYY7687511xIzK92fRBj8; Wed, 20 Sep 2023 21:59:14 -0700 X-Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web10.9242.1695272353261538131 for ; Wed, 20 Sep 2023 21:59:13 -0700 X-Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-690bf8fdd1aso438672b3a.2 for ; Wed, 20 Sep 2023 21:59:13 -0700 (PDT) X-Gm-Message-State: f1gA27bI45WHcsYLoJ8wykvgx7686176AA= X-Google-Smtp-Source: AGHT+IEKKgEBGfDzMbOpFfsLoo6UXD4giAeR7v9anXlKjLZn4Hzhn8+QoKFwgjY5NQN4SkU+dMaVUA== X-Received: by 2002:a05:6a20:1595:b0:134:a4e2:4ac8 with SMTP id h21-20020a056a20159500b00134a4e24ac8mr5841754pzj.39.1695272352551; Wed, 20 Sep 2023 21:59:12 -0700 (PDT) X-Received: from sunil-laptop ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id g16-20020a1709029f9000b001bf095dfb79sm373479plq.235.2023.09.20.21.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 21:59:11 -0700 (PDT) Date: Thu, 21 Sep 2023 10:29:06 +0530 From: "Sunil V L" To: Andrei Warkentin Cc: devel@edk2.groups.io, Yong Li , Tuan Phan , Daniel Schaefer Subject: Re: [edk2-devel] [PATCH v2 1/1] RISCV: Fix InternalLongJump to return correct value Message-ID: References: <20230919081659.27086-1-andrei.warkentin@intel.com> <20230919081659.27086-2-andrei.warkentin@intel.com> MIME-Version: 1.0 In-Reply-To: <20230919081659.27086-2-andrei.warkentin@intel.com> 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,sunilvl@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=HtbZMZTC; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Tue, Sep 19, 2023 at 03:16:59AM -0500, Andrei Warkentin wrote: > 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 > --- Merged as #4851. Thanks, Sunil > 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 rights 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 > -- > 2.34.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108934): https://edk2.groups.io/g/devel/message/108934 Mute This Topic: https://groups.io/mt/101452205/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-