Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9222517rwr; Thu, 11 May 2023 11:39:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jab73t5danPLAOJvVDc0GR1EfHPMBUsR1Fm7hXHc0gG3ilpz0OM+qHR8XTtYniJ7naVLi X-Received: by 2002:a17:902:e751:b0:1ab:b120:8efe with SMTP id p17-20020a170902e75100b001abb1208efemr25712460plf.22.1683830358975; Thu, 11 May 2023 11:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683830358; cv=none; d=google.com; s=arc-20160816; b=h22dz4MUcpynnriXUWFeNxFqcVsF8T0/VG9ojNkwWeo9JoTtbrm21OfiMsqaZFy3Ub qlYOpj4nox7pbv9pvFAm2gDA+wonFfBic9Xo9Qoj0eyS3x0NQtOCaoCHndr6KmrDtgE6 crbUIwvNeCXBBofOqzTfTsqZQUktC2CEnXhQVVujbJ3nm4cn25zHQN+gzlFM0bk4Pp5P yEVXZStPlpBii+jlHjKfb4ALdriTCFp5zNtW0B+Ej6kH2qV6sow1K5MgPxdyCIOJfiGp szqms+OY/AicLewJv6s26+X4QW1aT/oXu0c6Rs9Vdaa8SYvgRflM6GvsAQVW4VmmQqJo O3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from; bh=hHscMqhDt1IBhKGX5UlPtneY5pzdt0VJ8ZLYOQiZM/0=; b=MpEU15w12VfyQamQ2Zt46lgw2oSjolfMCIWHei5mMd5+iBqPBKqrJKoitDqk2j/PPr QQ59r7Nirxd2kw7ByHHFChcBH/pu+0WLXN38jIlj0BvDztIuMXdvn9JRwLWqZFyKuGry na2qRtJHsrkyc5E459cqOmU+QztVZLMwwAlrtPVbOHYI0Pe+ziqTJPusMIzmNhyp3Nm6 9URvPLuwoP/SsYMLr+CxBcleOmVawFFRvelKfEYNN20eNCD9P3RHjI8KzG72Ggjqr0uZ 9xYtQPSLyN9IYgsK2k9cWQRG/DJROrlYX0TGPWUr5k0MOW65nUxajdwxflW27CdrYVpC ocAA== ARC-Authentication-Results: i=1; mx.google.com; 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 f3-20020a170902ce8300b001adc1c27d2bsi3033670plg.368.2023.05.11.11.39.06; Thu, 11 May 2023 11:39:18 -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; 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 S238961AbjEKS2J (ORCPT + 99 others); Thu, 11 May 2023 14:28:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238620AbjEKS2H (ORCPT ); Thu, 11 May 2023 14:28:07 -0400 X-Greylist: delayed 571 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 11 May 2023 11:28:04 PDT Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14B27729A for ; Thu, 11 May 2023 11:28:03 -0700 (PDT) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4QHKrx3P72z1s95F; Thu, 11 May 2023 20:18:25 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4QHKrw5kCfz1qqlb; Thu, 11 May 2023 20:18:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id IerpHNoGBzfN; Thu, 11 May 2023 20:18:23 +0200 (CEST) X-Auth-Info: i/Xv+IcJhW0kfDb3RFbFK0/YgUTT+UjCzPxmdmooeKeqEWINPY1r+0B4+hi7eI4b Received: from igel.home (aftr-62-216-205-189.dynamic.mnet-online.de [62.216.205.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 11 May 2023 20:18:23 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 21B822C1D1B; Thu, 11 May 2023 20:18:23 +0200 (CEST) From: Andreas Schwab To: Alexandre Ghiti Cc: Alexandre Ghiti , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE In-Reply-To: <4adb27d2-325d-3ce0-23b1-ec69a973b4bf@ghiti.fr> (Alexandre Ghiti's message of "Tue, 9 May 2023 21:55:53 +0200") References: <20230215143626.453491-1-alexghiti@rivosinc.com> <20230215143626.453491-2-alexghiti@rivosinc.com> <87wn1h5nne.fsf@igel.home> <4adb27d2-325d-3ce0-23b1-ec69a973b4bf@ghiti.fr> X-Yow: BELA LUGOSI is my co-pilot.. Date: Thu, 11 May 2023 20:18:23 +0200 Message-ID: <87ttwi91g0.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Mai 09 2023, Alexandre Ghiti wrote: > On 5/9/23 21:07, Andreas Schwab wrote: >> That does not work with UEFI booting: >> >> Loading Linux 6.4.0-rc1-1.g668187d-default ... >> Loading initial ramdisk ... >> Unhandled exception: Instruction access fault >> EPC: ffffffff80016d56 RA: 000000008020334e TVAL: 0000007f80016d56 >> EPC: ffffffff002d1d56 RA: 00000000004be34e reloc adjusted >> Unhandled exception: Load access fault >> EPC: 00000000fff462d4 RA: 00000000fff462d0 TVAL: ffffffff80016d56 >> EPC: 00000000802012d4 RA: 00000000802012d0 reloc adjusted >> >> Code: c825 8e0d 05b3 40b4 d0ef 0636 7493 ffe4 (d783 0004) >> UEFI image [0x00000000fe65e000:0x00000000fe6e3fff] '/efi\boot\bootriscv64.efi' >> UEFI image [0x00000000daa82000:0x00000000dcc2afff] >> > > I need more details please, as I have a UEFI bootflow and it works great > (KASLR is based on a relocatable kernel and works fine in UEFI too). It also crashes without UEFI. Disabling CONFIG_RELOCATABLE fixes that. This was tested on the HiFive Unmatched board. The kernel image I tested is available from . The same kernel with CONFIG_RELOCATABLE disabled is available from . -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."