Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp178175ioo; Fri, 20 May 2022 17:51:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzY37v7lQ6xMQKiRsjRQlodFwHKE8x1Fv5AKXWHIKqetFsp3s8HyTfe5eHa8jiSccbxJBp X-Received: by 2002:a17:907:7d93:b0:6fe:21d9:4230 with SMTP id oz19-20020a1709077d9300b006fe21d94230mr11103550ejc.42.1653094304543; Fri, 20 May 2022 17:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653094304; cv=none; d=google.com; s=arc-20160816; b=rYfDAhhuRFozCi+wzAEQiwFitENtey5s6mZ3DU7JtieSStu8YcdwPjJYmGZzeL8GjT i7xh462rINI+KxlKeZaqO2wRylbGtoK1YTx2mrBOT/5cDGB3taYTvT6v5h4rtZK49AOg /qTOPQe/s0c0+YkloR1Wl13rJ3L+BIiUJ1ZlUNznOt8+Z7QXSCwJH+6woB1m625can9n LiPqtQhK2H1Nlt4/jAwLZvlUogqxHg71orRpiahtw2+/vDmEDTsuZnzeLnESWZiXpsH0 LPe4B6KJ+FmM/2szrlvKwcB5X1Px6IhIIZBtor+xqRRw5ilx02NSJy4RYS27SV9yijFw z00g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject :dkim-signature; bh=U/MW6rSbN5zBgusIBhKQzePh9cnp8uaNotWlLIHTUsY=; b=baoxwkPQ7Ctz2NSmXM+NBrTpsd3ANaxpmxaRX88HgQK4Hg1E9uOefMUYQ9XDLBee1R 4C1PcVBXzz8i5hIRb0daRM/J1PgC2V+cEWM82Tzjt4pWSp+LQv1BsIF+0kMvkzwLVMBC kqSTQDpy/hRVKWY1pQ1yo4GLEe2wFs0PkmUuv8KiXC7GlUu9jV6B20srmhoy2No5UKR4 h2BB4uqBig0pJRwrLo/7NOuww4WXa19k1w235mpri8oC6VCKWoZsRgDJOSmt5mNtYcEr UrOBiPGtWcRle3ziGhdw65bA1WYQCQFMC045+EM3FtmOWU4uUTWjDeHvqScvoxLWYyJO xv6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=JQyzbPvO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga22-20020a1709070c1600b006feb6e5da98si2392141ejc.625.2022.05.20.17.51.18; Fri, 20 May 2022 17:51:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=JQyzbPvO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351118AbiETPp7 (ORCPT + 99 others); Fri, 20 May 2022 11:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351066AbiETPpl (ORCPT ); Fri, 20 May 2022 11:45:41 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 783D0179973 for ; Fri, 20 May 2022 08:45:28 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id i1so7684310plg.7 for ; Fri, 20 May 2022 08:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:cc:from:to; bh=U/MW6rSbN5zBgusIBhKQzePh9cnp8uaNotWlLIHTUsY=; b=JQyzbPvORX1IKsTlWc0qkUHSKntueefkGU8dfB3thfUfkSYRjG91vooo6vChrw9Bf7 9Z5XY/rjVuwzsrlkQA5pcgEYx+QnJKtt5nmCn9DhLAdeLEqucw8pOG8J12o96ngdNp5g itgIArPjfmV3PmE0JpQd4a+cAR95KxK2BRwn0m7OypbO/75j+MGw0tQDgXO551FebRyN 04wS/DqNscTUoNHtWgoitV/Yu0wzpeaqdS7LdRbwE65wXveDL69cHyxRiC2N2xewmWjM UTbLdEVcVlOT/o6zIiNUwcdDEW8akpNDod5tvoD9ZEXINE7/RJScDiChs8rEREGK9MC4 rYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=U/MW6rSbN5zBgusIBhKQzePh9cnp8uaNotWlLIHTUsY=; b=fk5p4QXQIVTN/dVlSavsfl2Ch7V0ciR7csY6PDF46V/qbH2HPOqstWNmXz8oco/2jw +Q3BAiZcST14WyLgS/7+7U7i+OrmjOIuIf31tYWTVm4u1kVnWFEDElFHPr5xCJ8UQb85 7WxG+tXuUQzki4kkSio9xp1Hu1HExDcFNAX1UN/0k3UJc9VjBx2CcO6p+Y2sUvrvKaDN /x2nxveFIM/T5V4XCVC4jFeIRLrAnYAUY4bSNNTupqiIa/RBwCnRKsp+LehzYrdrLRcD xDlnR3oLx7Nvhcs9hG3i4sZWYdhLiRoggBytCJgihJRNdmbrJskaf/eBYHIEiA4hrGK/ LrTA== X-Gm-Message-State: AOAM530IWl3vObearNcDF/9XKbxNW/62Lz0SkWNbo2nrqL88tDNq4Afb IEf5Lgb5l0DlgPVmNpgSQWpY0g== X-Received: by 2002:a17:902:7788:b0:15e:ec55:2cfd with SMTP id o8-20020a170902778800b0015eec552cfdmr10405450pll.113.1653061527803; Fri, 20 May 2022 08:45:27 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a4f0b00b001df78f27c10sm2091006pjh.42.2022.05.20.08.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 08:45:27 -0700 (PDT) Subject: [PATCH v1 4/5] RISC-V: purgatory: Use XLEN-length loads to support rv32 Date: Fri, 20 May 2022 08:44:30 -0700 Message-Id: <20220520154430.18593-5-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220520154430.18593-1-palmer@rivosinc.com> References: <20220520154430.18593-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, robh+dt@kernel.org, frowand.list@gmail.com, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, liaochang1@huawei.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux@rivosinc.com, Palmer Dabbelt From: Palmer Dabbelt To: lizhengyu3@huawei.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt This uses an explicit "ld" to load up target address, which dosn't work on rv32. Convert it to a REG_L macro, like everywhere else. Signed-off-by: Palmer Dabbelt --- arch/riscv/purgatory/entry.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/riscv/purgatory/entry.S b/arch/riscv/purgatory/entry.S index 0194f4554130..71c50fef051c 100644 --- a/arch/riscv/purgatory/entry.S +++ b/arch/riscv/purgatory/entry.S @@ -8,6 +8,8 @@ * */ +#include + .macro size, sym:req .size \sym, . - \sym .endm @@ -26,7 +28,7 @@ purgatory_start: /* Start new image. */ mv a0, s0 mv a1, s1 - ld a2, riscv_kernel_entry + REG_L a2, riscv_kernel_entry jr a2 size purgatory_start @@ -41,7 +43,7 @@ size purgatory_start .globl riscv_kernel_entry riscv_kernel_entry: - .quad 0 + REG_ASM 0 size riscv_kernel_entry .end -- 2.34.1