Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10734020rwr; Fri, 12 May 2023 12:08:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VD1cHeSyhZqAEO82MMU3kBeoGIhrc38YRavE5R8E7L0OlAqt+S8jhSMF/YMA0HjYVz+2i X-Received: by 2002:a05:6a20:7fa5:b0:f0:eb30:d49e with SMTP id d37-20020a056a207fa500b000f0eb30d49emr33471590pzj.39.1683918518643; Fri, 12 May 2023 12:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683918518; cv=none; d=google.com; s=arc-20160816; b=f8ZRTYW85qN1e3NL8HoLU7Zkp2/bNXI5DOp+qk141A+T5pT6bcIaPvpupkfwryB6yT +ITLlbAIUv5Rkrt5PlaZt6aIsTmuz8UoeOhPLm0Cp8kLBsVbYdSqtI4a6hNCSwoBzopL leuMs80jxG2DhtluN5C0gj0sr/YtN5yLJdvAqNLBBuYoWGVSRN2NBmT3F01UIOx4CHio cT4WCUS5VSJYe7wHjgvCa0grJf2lzRg2WzE/VWDI0qfGG7yrkUn3GfGlpSW7D0R30Nra DOcgHQFV4fN1Crja9Vpx8/gy0qOSGjPVIh3wsdeY1AMOf8NHmuv6yDTnwesB7KdFUW4S ojlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=/koMj+9kCWnn+HpYnU02beKNw32OHAll5JRoBttwWow=; b=yhnDLRpmorktv5SI041o9rxU9ZJT5OL49hxeebHpz1vHlFTxn3d3XymK7+JTMTScg9 OCC1rGmQcC9Rr2NxeOdUe73tuAN9PQWySKLFOOlAI9ukEyJQaB42kphv3r47YV5RzAlz NZTpdOajKTG02H9rimlLcTyYbaCs5PJIBXHc4X/Bj1Iavo+wTZI+T9kTJjKk6bcQBLOG +DeF1ufmV1gauLhEuuCZCyaW732sufKzlmDlxIQ/V5b7ByN2s4CCwcBNFeeyGLqArKrZ KDu1NrzfaJsJ58hYRJSr3KUJFdxI1ky7k0+fRw9Q+UFmFxwn/kD9IRvn5ESN/gyNMzAO Weug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=UIhGNBCT; 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 e18-20020a056a0000d200b0064729e5a04dsi9837168pfj.388.2023.05.12.12.08.24; Fri, 12 May 2023 12:08:38 -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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=UIhGNBCT; 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 S239016AbjELSlZ (ORCPT + 99 others); Fri, 12 May 2023 14:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238514AbjELSlW (ORCPT ); Fri, 12 May 2023 14:41:22 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A60BEC for ; Fri, 12 May 2023 11:41:21 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-24ded4b33d7so7104099a91.3 for ; Fri, 12 May 2023 11:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1683916880; x=1686508880; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=/koMj+9kCWnn+HpYnU02beKNw32OHAll5JRoBttwWow=; b=UIhGNBCTmqrch9vZbwJdVHFCubylnX3lcJyBGWavwa7JY8D/CttT9kGCDbOafsAU5t vRGkZetPBOTBep0hAclU+TvrJrsGAcm/cmzfx87RHZxbSOm/1zOHCe1nI8Z1CWv1Ps9D D952EwlqaD3t3yacv+04O0gQbGqwleDPiwJAfoDvrdUT6jNeoX47UMmTa5Nhrxp9KLTu JlBCktj76+eSbrUIG9171EIYm1HesTFO1GehE0SGP7Zz4cud4wCc0eSKdVsUSQ1gmH6f qpkn9CtmJbzw5p3uYmUZ0UnZpWrgxx2rYRHTfZBYjywgnOZqECdRQJFMHKa48i7ms19Q y94g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683916880; x=1686508880; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/koMj+9kCWnn+HpYnU02beKNw32OHAll5JRoBttwWow=; b=JKm2A/4plMiMu9xMtg4BNydT3AYfSXcO251i168B6UNfXTRFVG3xOlIkS9RtML56sY jkgwbhs2vshNPY3CnjZ7rrR5m0aj7F9+plawwaj+N6IbTe6Dc6pHmvoaV/dNYd2+ecOG 198NanzEswVUO5Y1NPOEBVDamnx0j/Yli9YAXy8ow9dPCAyPV0zcW/IeVRbH2L67dkn3 rBXsHeoNoPLf14OEMT44VA/eIwXbPYcgS+8Wfha+wqEpY4JiIXcDUxNGN9LjHJsF36dh 8Skj7sWm1psRjJWDKauYneiSNHXDGc7smmHOJ3YXGBpyvwBMar+NJ7/DoJQkAG7csGqm VPdw== X-Gm-Message-State: AC+VfDxBJ/oFiTn1hKjV6/N/H4+2znaD2jvFo0yCgvEo4JlPwVX/qw8P ziuv8uq9R0roB+RopZxFzxPtSQ== X-Received: by 2002:a17:90a:ea90:b0:24d:ee3f:b682 with SMTP id h16-20020a17090aea9000b0024dee3fb682mr24863163pjz.35.1683916880378; Fri, 12 May 2023 11:41:20 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id c3-20020a17090a020300b00250c1392ed3sm6500634pjc.55.2023.05.12.11.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 11:41:19 -0700 (PDT) Date: Fri, 12 May 2023 11:41:19 -0700 (PDT) X-Google-Original-Date: Fri, 12 May 2023 11:40:58 PDT (-0700) Subject: Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE In-Reply-To: <87ttwi91g0.fsf@igel.home> CC: alex@ghiti.fr, alexghiti@rivosinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, Paul Walmsley , aou@eecs.berkeley.edu, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org From: Palmer Dabbelt To: schwab@linux-m68k.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED 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 Thu, 11 May 2023 11:18:23 PDT (-0700), schwab@linux-m68k.org wrote: > 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 > . Sorry I missed this earlier, there's been some other reports of boot failures on rc1 showing up but those were all a lot more vague. Just setting CONFIG_RELOCATABLE=y doesn't manifest a boot failure on QEMU on my end and I don't have an UNmatched floating around. Alex says he's going to look into it (and IIRC he has my Unmatched...).