Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp369444ybz; Tue, 21 Apr 2020 10:34:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJtmGn6MdyH3/4x0tFMqV9QCJ7ktLnftiX0B3Re3Cb92dby/yoxMhE8lDa0AbmMuw1GS/WF X-Received: by 2002:a17:906:7f0c:: with SMTP id d12mr21953181ejr.40.1587490456410; Tue, 21 Apr 2020 10:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587490456; cv=none; d=google.com; s=arc-20160816; b=XYLFp7pRaHS1Fooor+h75EfWXTv03rO4fMgmvTMHV+//1/GAoZs4exTOJchA+znGBZ JWJIssGSniAKV1HBtTP+8HnNEoylDv+L75TuKw+D4xjXVVleFLedT440w3sVsRKMA8vV c/2FUk39gZlA1Ir7RIZM/kWkV1pQVUEmh5Jzki7MMbphSVuXFFpYNWHZ/4xJCAp256kk h4j8BQh5eAPwL10JCbCksJj4X7Xq/FPB/jLiFchwhQrWcw7MMFbyfuknMTx2zRFKW1bY EGtLxn1cJrFUCJzb1UE9sK4HMor/YTCXkk2X3WnNYYMO8d3udZa6UVamzfz0cUN0l9rh Cq4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TqOZ+NIxx7CWkAc2Z7tIWcdMGQ0rKBuiSDleHFlId2w=; b=vbwvc/eOmwF6XKRW0IAOYsssu5eYT1NkB+tndRngDLuXrH9vJ3z95JD9W6HcR3Jhba 8P++AOHe7y2WwgZmwkYUUagNoRhtk7r5jD3l6/7gmr6Cqe+Cef+0CRZc5IgUwkgbTSV2 wjshT75CrezOVEjAVNgal2BofzHkd/0JF3ZoHWGWwNMbyrcekkhGOZRd8eEfVG8jsCfR xAw3hLRyUnGMvA3jhC5sRiqYNj+dv8kkrOPweULFNzXPqUHhJu6s55DDVYYVXLooBwd7 pd5HGDR3Du5RHt/IRcR9whxq4RC4AOuIe9tlMVF9Ewm/0mA3ofr6gq9tOqlLlLMv/esJ vZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b="g9fSM/1m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si2138455edc.351.2020.04.21.10.33.52; Tue, 21 Apr 2020 10:34:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b="g9fSM/1m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbgDURaJ (ORCPT + 99 others); Tue, 21 Apr 2020 13:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726628AbgDURaI (ORCPT ); Tue, 21 Apr 2020 13:30:08 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C98E1C0610D6 for ; Tue, 21 Apr 2020 10:30:07 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id f13so17347695wrm.13 for ; Tue, 21 Apr 2020 10:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TqOZ+NIxx7CWkAc2Z7tIWcdMGQ0rKBuiSDleHFlId2w=; b=g9fSM/1mOQ8JhLXjvEAT44BjKSCUS05HYGGctXhqW0SL/vlyMFcaFjr7QjobHlV5g7 t1lv6BTJzwmxXK0MeqbycCPy1qDf6jW3MvwiZdm6Ax+YnsOwi752gyD7RrdCigNe85Q3 XT/7Bak1Vio3Vj0UA73N0ze5mbj60iDMf/38CTtK4bR4GJyHWWWgaKSb2PYH/FaoAPaN puKtbXD0U7DMTOzqdmBPFJMRDOJ76At8MSAJH9ISkeq68N+UPIzpLNiU/6m5BUOOwFaW FVe5v0qaaDqzbZOKoZDzQKit6MPiOhfy0axa97GmsqyJTYsQQzq8okwvRUmuXhuoLtF1 fILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TqOZ+NIxx7CWkAc2Z7tIWcdMGQ0rKBuiSDleHFlId2w=; b=A+KPCej/xoeBfxjt34DjnfjRONDKuU+7zyC7Q96SXT1spkLDcA+99tJ9N/R4G4jpSf qAIX1zmwr9YIetOsCuhnlzns8isT4bPsJBT5E1eriJvOirPhssbhybPtxEJ7c+aTdGyP 4u91nyMffPAoRTCEtfhbTtnq1JFApZYgNJRB2fDqYzoyfUi/PPZmiIRStFwmsIh4nkAv 3b6S0vdRgiOf7vOlw5LY2W++j8IywrWAx73OIuATtVSCOFla//kLdTHoHznzmpuh58I6 fRL8/gZ5A9eUCQ2YZy1COX2NWU/MpaXiyvMSdlC27wTFJ4s7dmDMNDChfYYZscEtAo5C asnQ== X-Gm-Message-State: AGi0PuYtUa6fhXaOysUP4R5F6udBdCv45BcyovO8wnQifF9dfFstpQDP WI/MyqPFpesybU6jCXr8OcoXZdMRy1qazmeG6rSw X-Received: by 2002:adf:ab5c:: with SMTP id r28mr21585012wrc.384.1587490206521; Tue, 21 Apr 2020 10:30:06 -0700 (PDT) MIME-Version: 1.0 References: <20200421033336.9663-1-atish.patra@wdc.com> In-Reply-To: From: Atish Patra Date: Tue, 21 Apr 2020 10:29:55 -0700 Message-ID: Subject: Re: [v4 PATCH 0/3] Add UEFI support for RISC-V To: Ard Biesheuvel , Palmer Dabbelt Cc: Atish Patra , Linux Kernel Mailing List , linux-efi , linux-riscv , Masahiro Yamada , Heinrich Schuchardt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 21, 2020 at 12:24 AM Ard Biesheuvel wrote: > > On Tue, 21 Apr 2020 at 05:34, Atish Patra wrote: > > > > This series adds UEFI support for RISC-V. Currently, only boot time > > services have been added. Runtime services will be added in a separate > > series. This series depends on some core EFI patches > > present in current in efi-next and following other patches. > > > > U-Boot: Adds the boot hartid under chosen node. > > https://lists.denx.de/pipermail/u-boot/2020-April/405726.html > > > > Linux kernel: 5.7-rc1 > > > > OpenSBI: master > > > > Patch 1 just moves arm-stub code to a generic code so that it can be used > > across different architecture. > > > > Patch 3 adds fixmap bindings so that CONFIG_EFI can be compiled and we do not > > have create separate config to enable boot time services. > > As runtime services are not enabled at this time, full generic early ioremap > > support is also not added in this series. > > > > Patch 4 and 5 adds the PE/COFF header and EFI stub code support for RISC-V > > respectively. > > > > The patches can also be found in following git repo. > > > > https://github.com/atishp04/linux/tree/wip_uefi_riscv_v4 > > > > The patches have been verified on Qemu using bootefi command in U-Boot. > > > > Changes from v3->v4: > > 1. Rebased on top of efi-next. > > 2. Dropped patch 1 & 2 from this series as it is already queued in efi-next. > > Changes from v2->v3: > > 3. Improved handle_kernel_image() for RISC-V. > > > > Thanks Atish. This looks nice and simple now. > > I will need an ack from the RISC-V maintainers on these, and it is up > to them to consider whether the changes to core kconfigs and makefiles > are likely to cause trouble or not. If so, I am happy to work out a > way to merge this via a shared stable branch. > @Palmer Dabbelt : Can you take a look at the series whenever you have some free cycles ? We would like to merge the series sooner than later. > > > > Changes from v1->v2: > > 1. Rebased on 5.7-rc1. > > 2. Fixed minor typos and removed redundant macros/comments. > > > > Changes from previous version: > > 1. Renamed to the generic efi stub macro. > > 2. Address all redundant comments. > > 3. Supported EFI kernel image with normal booti command. > > 4. Removed runtime service related macro defines. > > > > Atish Patra (3): > > RISC-V: Define fixmap bindings for generic early ioremap support > > RISC-V: Add PE/COFF header for EFI stub > > RISC-V: Add EFI stub support. > > > > arch/riscv/Kconfig | 21 +++++ > > arch/riscv/Makefile | 1 + > > arch/riscv/configs/defconfig | 1 + > > arch/riscv/include/asm/Kbuild | 1 + > > arch/riscv/include/asm/efi.h | 44 +++++++++ > > arch/riscv/include/asm/fixmap.h | 18 ++++ > > arch/riscv/include/asm/io.h | 1 + > > arch/riscv/include/asm/sections.h | 13 +++ > > arch/riscv/kernel/Makefile | 4 + > > arch/riscv/kernel/efi-header.S | 99 ++++++++++++++++++++ > > arch/riscv/kernel/head.S | 16 ++++ > > arch/riscv/kernel/image-vars.h | 53 +++++++++++ > > arch/riscv/kernel/vmlinux.lds.S | 20 +++- > > drivers/firmware/efi/Kconfig | 2 +- > > drivers/firmware/efi/libstub/Makefile | 10 ++ > > drivers/firmware/efi/libstub/riscv-stub.c | 106 ++++++++++++++++++++++ > > 16 files changed, 407 insertions(+), 3 deletions(-) > > create mode 100644 arch/riscv/include/asm/efi.h > > create mode 100644 arch/riscv/include/asm/sections.h > > create mode 100644 arch/riscv/kernel/efi-header.S > > create mode 100644 arch/riscv/kernel/image-vars.h > > create mode 100644 drivers/firmware/efi/libstub/riscv-stub.c > > > > -- > > 2.24.0 > > -- Regards, Atish