Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp493062ybl; Wed, 21 Aug 2019 00:33:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXpxCZyDYnFPnVcTIOD6eI0a41VddpW97PImOhuzOpTBx5CEHQ3p2P/+D4yZlF0GpzdgGL X-Received: by 2002:a17:90a:de01:: with SMTP id m1mr3975444pjv.43.1566372808212; Wed, 21 Aug 2019 00:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566372808; cv=none; d=google.com; s=arc-20160816; b=b5UWkaea4PGQsQ7WsKkA6gI+35U2xFwUCx+TPKJ8dTPKyQCl6eRYcBXROyRnXsTAZd zadbmMK/Y8WhheE2jO5CmtQTwHC+rh+mf7MSfxRbIuwN5f/GHYpPv/kcyQQYCf0hI0Vb nKnXMA11EvSoJvI6Gc3jPKKxtrL3XCbtNJJL9y7DNAmcVxkiOoF3Qz83Z4pSXN23eEpA He68wcPi0L35KcbEP/KpJG3a/P8lwkK4SCj4jB7gcQzp4nYUOxsnVAMmwgq8eN5q2uBa qw0KK3M36ESJwUpBtzxj/DspqGfFsQXIhbzqDq91bgOy2XhubK8jEgeWr8plYoRhmPff NcRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=rO73RAXiJGMeCQFf4PZKUzm7tgW1+1bOE+OGOUERwj0=; b=sOhJw1Y0OWekyiSY8yoIm7/3vdS3x6JgfnHl8tZNYblJY54Xfx1pHn+C6ezl/Uuz0w ZL/iu04dN7Lq6TKwhN+pgdDzSukmX6lNAeQqaOxu1uGgSNu0zDjnrlUlkyn1KkASu5ay BjT0QSf+IhgtV6wLOI7IX0lLhVvknluFYLDaNFAsMLdGz+jfSakDMXodpE7zJiDBTDSw 3/EILicJBNgtU0f4w4FS29Y2rMcaY+pGFyRsouwG4H1wz+1wqryge0KGqs5/iP4eEl5A LAMDcWBK6NPOfurFuDEQXWj2WzU9xVRtSW/VSpv2B90gAgmUBmRTVYSxnLy28nOyocbz viUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si1748841pjp.32.2019.08.21.00.33.13; Wed, 21 Aug 2019 00:33:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727949AbfHUHMI (ORCPT + 99 others); Wed, 21 Aug 2019 03:12:08 -0400 Received: from verein.lst.de ([213.95.11.211]:35293 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfHUHMH (ORCPT ); Wed, 21 Aug 2019 03:12:07 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id D162968C7B; Wed, 21 Aug 2019 09:12:04 +0200 (CEST) Date: Wed, 21 Aug 2019 09:12:04 +0200 From: Christoph Hellwig To: Troy Benjegerdes Cc: Christoph Hellwig , Palmer Dabbelt , Paul Walmsley , Damien Le Moal , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/15] riscv: disable the EFI PECOFF header for M-mode Message-ID: <20190821071204.GA25836@lst.de> References: <20190813154747.24256-1-hch@lst.de> <20190813154747.24256-16-hch@lst.de> <3BF39A0F-558D-40E0-880D-27829486F9F0@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3BF39A0F-558D-40E0-880D-27829486F9F0@sifive.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 09:14:41PM -0700, Troy Benjegerdes wrote: > > > > On Aug 13, 2019, at 8:47 AM, Christoph Hellwig wrote: > > > > No point in bloating the kernel image with a bootloader header if > > we run bare metal. > > I would say the same for S-mode. EFI booting should be an option, not > a requirement. I have M-mode U-boot working with bootelf to start BBL, > and at some point, I’m hoping we can have a M-mode linux kernel be > the SBI provider for S-mode kernels, which seem most logical to me > to start using the vmlinux elf binaries using something like kexec() Strictly speaking we could just add another option for the header so that you could also disable it for S-mode. But then again the header is not very harmful, as you don't have to use it. It just eats up a little more kernel space. And as that aspace is very tight for my M-mode target (the Kendryte KD210) and it is totally pointless for M-mode I just remove it there. The idea of using M-mode Linux as the SBI sounds cool.