Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1157220ybl; Wed, 21 Aug 2019 11:00:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzL6ceS8tqPprwLwD6nHMwoyYlpoy7LiZqnz1GapvmGGtGVLdbSU0FTBNTguOnbI0HUyiv0 X-Received: by 2002:a17:90a:aa98:: with SMTP id l24mr1210284pjq.64.1566410429036; Wed, 21 Aug 2019 11:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566410429; cv=none; d=google.com; s=arc-20160816; b=sFmOYwnI+FbMtNdJ4/V5Kg8SiwiA6dnPIiYJMCHkmzXS2+hiHauFSGaOsU1SrwlqCr g8g8VViJKyv0+DJyys0u2sBJVY+CvFVeLLnpePENLRZAP0T48OwPxo6EY5kTAjyFmIkk FE/hwaEJN6s/+1tEZo33l92iSL7/vffWRDWUH9zvKlM75Pf7UliIJqhPOcwDwPa2gS9p tu1W/iISykP8UKE8UNpte9AIJBUuqLFUZ1ckggJyJtSqUDJqboPwFKi6zXe9BMyf4qoH T53JgxQ6qetONFm8KIG3gUAp9l49PzVVuVA1RpF0Ku3ghNKNje4r2CRvmsXE0XBF+p26 9LIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=GFAV8pilcC1llj60Idd3qdxSrJ9XJ4F1Bsi8o/Z7L3Y=; b=ln9LB8RqIikmO4vJm5EzflhC6hsbnuCeFBjHgKDsCwvg1xnQYVHd2F4F1wJWXGsxdr 2B+lp6R3tukcZlgaByu1VFjbRwah7pT/PWkEBUbjz/TSK1ML4E3MAoY21ggxeZ6JR2eY /pBk5Pg44eOsT1VdYIE4tL7AKnC4dgDAeMfFu+sDDP2S7OvTEGTUzyhjweRFdCLwgNJL YBu2CFxtxSJ+6W78tY50uTeydv4lvR1brSZzXyjtcyLCL1DfevgquNMUVID9Isdf+nfp 5ljXAsZjnOEpPeLnIE5Hv7wmVOplYjZYdmJbX2+/ndAAGIU57eLZjz1ddedWwhZMcBk6 UkgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=MibkJfl7; 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 e3si16117078pfi.148.2019.08.21.11.00.11; Wed, 21 Aug 2019 11:00:29 -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; dkim=pass header.i=@sifive.com header.s=google header.b=MibkJfl7; 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 S1729488AbfHURyr (ORCPT + 99 others); Wed, 21 Aug 2019 13:54:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38295 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726252AbfHURyr (ORCPT ); Wed, 21 Aug 2019 13:54:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id o70so1915307pfg.5 for ; Wed, 21 Aug 2019 10:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GFAV8pilcC1llj60Idd3qdxSrJ9XJ4F1Bsi8o/Z7L3Y=; b=MibkJfl7NKH/Ky1f2m047yCyVn5HDj4h6BknsBFQMSfENX5y0PQ1W2NTQ79Rop+fDk gnrHmhmIEMZizhSk2NF/hIQ/HpvS/o5x2Nbx/X1esXKSnNTeFbO+j+uJtqljh4W5syWV zYCuAvwFSC1KrO2UM9p5N40NAGb1ptPkpwdf5lhOhSbkXDgnaxDdfrz3VGEb6cS+CUgM gX40QJmY1GD41LsOkBft2oDXHTnDcW8yl4srOLdUWZytc4t1Se/aA0FieLoQ25xCJ+1S afVz7Gsmink0LcorkG1DT2UEyiSP7dzs6QYHk0RM36cmpaXaCUd5adGSbzNoby5UChKH jcYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GFAV8pilcC1llj60Idd3qdxSrJ9XJ4F1Bsi8o/Z7L3Y=; b=baRhlr49DuBTvPx3KrZfj9NEYRWRaHVQKeEPTEcoYACO57sz6B14JggCzD38DzPEFb s82twVltXSsMtcCL+mhmRBMB8PoMfzP+mAniLX6V7y1q9rC2DCLOGPgBtfVKkkXAFN0X FHGXsBXPFBt+rP1CEhDr0Ax2xScJIoyLxU60BspHBrWlpCjJowpQ8tMsBmDL8QjUzSle HyxWqbN+bJTZqn4PuITG+vmdTTADSLCAz3PFgeEOL5QjPxeJoyYenvxxR2VCMv0T2RxT 2AAKGU8CEorNQwlXi4QTMR22cUlwrVC9hkNif2ZhTGx7Eg+YK5gKbPa8uBtn32/YU7tt Lb7g== X-Gm-Message-State: APjAAAWhTjbglQuUpgwoYWmDe0XF9AksKqZR6s82tmS8/oYhyYK92Xy1 rNuzHtnXjgs3dlh6mSyHQGMZKDi/C7I= X-Received: by 2002:aa7:9d07:: with SMTP id k7mr36355208pfp.94.1566410086221; Wed, 21 Aug 2019 10:54:46 -0700 (PDT) Received: from [10.17.0.244] ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id e26sm26762008pfd.14.2019.08.21.10.54.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Aug 2019 10:54:45 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH 15/15] riscv: disable the EFI PECOFF header for M-mode From: Troy Benjegerdes In-Reply-To: <4f1677e24a5fcdfd2fda714cdd66f4dbe7817284.camel@wdc.com> Date: Wed, 21 Aug 2019 10:54:44 -0700 Cc: "hch@lst.de" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" , Damien Le Moal , "linux-kernel@vger.kernel.org" , "palmer@sifive.com" Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190813154747.24256-1-hch@lst.de> <20190813154747.24256-16-hch@lst.de> <3BF39A0F-558D-40E0-880D-27829486F9F0@sifive.com> <4f1677e24a5fcdfd2fda714cdd66f4dbe7817284.camel@wdc.com> To: Atish Patra X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Aug 21, 2019, at 10:31 AM, Atish Patra wrote: >=20 > On Tue, 2019-08-20 at 21:14 -0700, Troy Benjegerdes wrote: >>> On Aug 13, 2019, at 8:47 AM, Christoph Hellwig wrote: >>>=20 >>> No point in bloating the kernel image with a bootloader header if >>> we run bare metal. >>=20 >> I would say the same for S-mode. EFI booting should be an option, not >> a requirement.=20 >=20 > EFI booting is never a requirement on any board. When EFI stub will be > added for kernel, it will be enabled with CONFIG_EFI_STUB only.=20 >=20 > The current additional header is only 64 bytes and also required for > booti in U-boot. So it shouldn't disabled for S-mode. >=20 > Disabling it for M-Mode Linux is okay because of memory constraint and > M-Mode linux won't use U-boot anyways. >=20 >> I have M-mode U-boot working with bootelf to start BBL, >> and at some point, I=E2=80=99m hoping we can have a M-mode linux = kernel be >> the SBI provider for S-mode kernels,=20 >=20 > Why do you want bloat a M-Mode software with Linux just for SBI > implementation? >=20 > Using Linux as a last stage boot loader i.e. LinuxBoot may make sense > though. >=20 Boot time, and ease of development, and simplified system management. Having M-mode linux as a supervisor/boot kernel can get us to responding to HTTPS/SSH/etc requests within seconds of power-on, while the = =E2=80=98boot=E2=80=99 kernel can be loading guest S-mode kernels from things like NVME flash drives that are going to be a lot more code and development to support = in U-boot or any other non-linux dedicated boot loader. There=E2=80=99s also a very strong security argument, as Linux is going = to get the largest and broadest security review, and will likely get software = updates a lot faster than dedicated boot firmwares will. Another reason would be sharing the same kernel binary (elf file) for = both M-mode, and S-mode, and using the device tree passed to each to specify which mode it should be running it. There are probably a bunch of = gotchas with this idea, and even so I suspect someone will decide to go ahead = and just do it eventually because it could make testing, validation, and = security updates a lot easier from an operational/deployment point of view. Linuxbios convinced me that if you want to do a really large cluster, you can build, manage, and run such a thing with fewer people and engineering cost than if you have all these extra layers of boot = firmware that require some company to have firmware engineers and lots of extra system testing on the firmware.=