From nobody Tue Feb 10 04:15:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65817+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65817+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1601577448; cv=none; d=zohomail.com; s=zohoarc; b=kCGDxuElIBHbDympIREqM3l8O6MBgKAuIqdmtlpcatCV+t6eUjSkmW75V4lvH5LzZDQJx73CYwqbCXL7diaZBESsWWwcLfOBM4Gkjd9bs1dE4lLpWhYpLVI7iumH24dDiJOGEQd8yO3LbnPo1uQMYH11WW/BwdjW+/Jbn/Kwy5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601577448; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Px7NqNUBPhLSwlkmm5diHzSnQT/8asx+IwbuifFh6CY=; b=nAlzeppYV79BUaLhqa/1GBcdK/9H4NHN/N2QVde9YO3vy0xmFwxHiiqsUd0dc0XjO+kyDDtF7CP/Qb6BsHXsG1cgmUmfG7UDJ5ek8+pm2oOzGPDTLOgUOTeQ/5bvpbTek70dIBsNZl5T8z/ipH3Gyl8JGkcFUuiKX5iz+C1ZO2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65817+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601577448844647.7436676994662; Thu, 1 Oct 2020 11:37:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Y8wcYY1788612xrDMzZHLMb7; Thu, 01 Oct 2020 11:37:26 -0700 X-Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.1023.1601577445034815565 for ; Thu, 01 Oct 2020 11:37:25 -0700 X-Received: by mail-wm1-f66.google.com with SMTP id w2so3933406wmi.1 for ; Thu, 01 Oct 2020 11:37:24 -0700 (PDT) X-Gm-Message-State: HG1AwicYPdLkqCVN61PTDw7cx1787277AA= X-Google-Smtp-Source: ABdhPJyMxXKs3XL5hOOwcMB+K3MASQIN/KPrZir9d1M2o5SRQuoJanYVT7h3+RZTnNofCwGUfqso3g== X-Received: by 2002:a1c:4909:: with SMTP id w9mr1421066wma.133.1601577443183; Thu, 01 Oct 2020 11:37:23 -0700 (PDT) X-Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id a3sm964671wmb.46.2020.10.01.11.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 11:37:22 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH 5/5] MdePkg/BaseLib: ensure ARM LongJump never returns 0 Date: Thu, 1 Oct 2020 19:37:12 +0100 Message-Id: <20201001183712.1738-6-leif@nuviainc.com> In-Reply-To: <20201001183712.1738-1-leif@nuviainc.com> References: <20201001183712.1738-1-leif@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601577446; bh=4ku34u3WJ0An5UwLprQCcrXJeTtqf1zLq04VF0Aa0do=; h=Cc:Date:From:Reply-To:Subject:To; b=rCWzEdD/7fYWZBv4w3+DDUoNPmO42uYIBzlImYyFCv/4Be709FY/IeK7f7EcpPN93B2 OlSzrxMSoZhrX/3DWLg84EE2GNDq6OJsG59C2Jl2p15tWma+hNKfeJuk/Ma1I5TkML1PT FfUPRQKe0SFhGbKY4FnGtY/mg/+EqLrnByk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The ARM implementation of of InternalLongJump always returned the value Value - but it is not supposed to ever return 0. Add the test to prevent that, and return 1 if Value is 0 - as is already present in AArch64. Signed-off-by: Leif Lindholm --- MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S | 2 ++ MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S b/MdePkg/Library/= BaseLib/Arm/SetJumpLongJump.S index 407df5f41ac5..d1a31b69cf26 100644 --- a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S +++ b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S @@ -60,6 +60,8 @@ ASM_PFX(SetJump): ASM_PFX(InternalLongJump): ldmia r0, {r3-r12,r14} mov r13, r3 + cmp r1, #0 + moveq r1, #1 mov r0, r1 bx lr =20 diff --git a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm b/MdePkg/Librar= y/BaseLib/Arm/SetJumpLongJump.asm index 3a45f045460a..603143c27050 100644 --- a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm +++ b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm @@ -60,6 +60,8 @@ SetJump InternalLongJump LDM R0, {R3-R12,R14} MOV R13, R3 + CMP R1, #0 + MOVEQ R1, #1 MOV R0, R1 BX LR =20 --=20 2.20.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 (#65817): https://edk2.groups.io/g/devel/message/65817 Mute This Topic: https://groups.io/mt/77247145/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-