Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1011997ybz; Thu, 16 Apr 2020 00:48:53 -0700 (PDT) X-Google-Smtp-Source: APiQypIFP80Zzyb7c4QHS7opr+67VlxLZ58Tehw3mGk+A2QzgpPBGzajY8OZsfqZbffkL5pnGMm+ X-Received: by 2002:aa7:c610:: with SMTP id h16mr24520314edq.323.1587023333637; Thu, 16 Apr 2020 00:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587023333; cv=none; d=google.com; s=arc-20160816; b=E377SzesFh7MOyM2bHt0Yy3dunXwTu9K0kcfVa69yCG5qu01lyotGT/ADSWxo1Q64G TOUbhSTs6P3zJCL7vl20SLs/nxhfWS6IVQ50ooFDOEwwpcsvIibdN6b7mNI6glrfHu9Y dqfkC3P1y1mIJqqycOx/GPbL442sjS5NrvSb03dQzXzJmu1bFErSiwJt9kumoSEiyx7Z 8wsPYTeTpSsqWwkvZCxRDubFnLNbshiBfMyc3n8Tl4Yqj/qAVy+3cuzKIT580jjocQIo 4jW3ynNM+SK32+4Qknc9MKSThl5DEc3FiaRjaxYQ8StdsvFHDBdH5AaB7Qt45iaZODLA stQg== 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=UwysS21lGwcOk9sdt+bD5rkRiZn/Dl2cmSHq9rD8tBU=; b=TjP0mcJKuh9p3VVbYn8O2eI1Fu5yXI5MUd134y8oUQbsQfe2m2Zu1CVL4SZzP3VPvI 9/ywlxGwxou5NbJhB2ZXvd91Vlm40UsOLXfUrNkSs6s51gFxhQ+3Hydy1rQjKktTLRe/ ncTxAi2tFG+kUDJ+BjYc9dq142RVtAKufadiaqx/sNtBMWJrMY344YD1FcdT0fP7wIlI dbcsu9mCb5ZCOYgEu1VCcyvJqLGmt62/mkZdKCe7UHthT0r3j+AgbNNztEMxKbMxpv/j rX+R1M0iUxVJBsFezfAQYgoRKtU89brbC1UGlxjeDmWSwS+0GEQv4jHSYFah6jDkY2xl xo1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SefdfvWw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si11261964ejk.126.2020.04.16.00.48.28; Thu, 16 Apr 2020 00:48:53 -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=@kernel.org header.s=default header.b=SefdfvWw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439600AbgDPHpG (ORCPT + 99 others); Thu, 16 Apr 2020 03:45:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439413AbgDPHpB (ORCPT ); Thu, 16 Apr 2020 03:45:01 -0400 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5269E21569; Thu, 16 Apr 2020 07:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587023100; bh=hE1B/GqPyAwbhU6GurhlP98Cp3yFkzngF+v28Ae6CuY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SefdfvWwUvkpCeZp632BCeHzCD1E+eBxMDa0onCAH2Tli/pzkNVZABj0lO3n08pjY VmCQN2x6QO95MKY5BUqMKZ4c1AH4K5buh1gDeCK6qDQM8rcrHaQo2cDaCTUluNRYae GB4jKKXt3Dw279ToHWFpWHh8k1UkuKegrxexBgm4= Received: by mail-io1-f50.google.com with SMTP id i19so20000090ioh.12; Thu, 16 Apr 2020 00:45:00 -0700 (PDT) X-Gm-Message-State: AGi0PuYu8mYXck4Ea3/DjMk8hO07aHjn5WbDUDaJ3YgJauMCilQIJTDe TdlvP9q/q7LALh98Db9sgWl2GFYjxoosntD85TE= X-Received: by 2002:a02:3341:: with SMTP id k1mr20976288jak.74.1587023099650; Thu, 16 Apr 2020 00:44:59 -0700 (PDT) MIME-Version: 1.0 References: <20200415195422.19866-1-atish.patra@wdc.com> In-Reply-To: <20200415195422.19866-1-atish.patra@wdc.com> From: Ard Biesheuvel Date: Thu, 16 Apr 2020 09:44:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v3 PATCH 0/5] Add UEFI support for RISC-V To: Atish Patra Cc: Linux Kernel Mailing List , Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , linux-efi , linux-riscv@lists.infradead.org, Linux ARM , Masahiro Yamada , Palmer Dabbelt , Russell King , Will Deacon 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 (+ Arvind) On Wed, 15 Apr 2020 at 21:54, 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_v3 > > The patches have been verified on Qemu using bootefi command in U-Boot. > > Changes from v2->v3: > 1. Rebased on top of latest efi patches. > 2. Improved handle_kernel_image(). > > 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 (5): > efi: Move arm-stub to a common file > include: pe.h: Add RISC-V related PE definition > 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. > I had some comments regarding patch #5, but the other ones look fine. Given that there are two series in flight now that touch the same code, I am going to merge the patches #1 and #2 of this series into efi/next. Once the remaining changes are good to go, I can take them as well, but I'll need one of the RISC-V maintainers to ack them first. > arch/arm/Kconfig | 2 +- > arch/arm64/Kconfig | 2 +- > 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 | 4 +- > drivers/firmware/efi/libstub/Makefile | 19 ++- > .../efi/libstub/{arm-stub.c => efi-stub.c} | 0 > drivers/firmware/efi/libstub/riscv-stub.c | 111 ++++++++++++++++++ > include/linux/pe.h | 3 + > 20 files changed, 421 insertions(+), 12 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 > rename drivers/firmware/efi/libstub/{arm-stub.c => efi-stub.c} (100%) > create mode 100644 drivers/firmware/efi/libstub/riscv-stub.c > > -- > 2.24.0 >