Re: [RFC PATCH v2 00/11] Add UEFI support for RISC-V

From: Ard Biesheuvel
Date: Tue Jul 07 2020 - 02:41:41 EST


On Mon, 6 Jul 2020 at 20:26, Atish Patra <atish.patra@xxxxxxx> wrote:
>
> This series adds UEFI support for RISC-V.
>
> Linux kernel: 5.8-rc4
> U-Boot: master
> OpenSBI: master
>
> Patch 1-6 are preparatory patches that fixes some of the geric efi and riscv issues.
>
> Patch 7-9 adds the efi stub support for RISC-V which was reviewed few months back.
> https://www.spinics.net/lists/linux-efi/msg19144.html
>
> Patch 10 just renames arm-init code so that it can be used across different
> architectures. Patch 11 adds the runtime services for RISC-V.
>
> The patches can also be found in following git repo.
> https://github.com/atishp04/linux/tree/uefi_riscv_5.9_v2
>
> The patches have been verified on Qemu using bootefi command in U-Boot for both
> RV32 and RV64.
>
> For RV32, maximum allocated memory should be 1G as RISC-V kernel can not map
> beyond 1G of physical memory for RV32.
>
> EDK2 can boot quite far into Linux with current series. Currently, we are seeing
> some traps from drivers (spi/network). At first glance, they don't seem to be
> caused by efi. I thought it is better to get some early feedback on the series
> while EDK2 issue is being debugged.
>
> That's why uefi runtime services are not actually well tested in RISC-V.
> Any suggestions to test the efi run time services are appreciated.
>
> Changes from v1->v2:
> 1. Removed patch 1 as it is already taken into efi-tree.
> 2. Fixed compilation issues with patch 9.
> 3. Moved few function prototype declaration to header file to keep kbuild happy.
>
> Changes from previous version:
> 1. Added full ioremap support.
> 2. Added efi runtime services support.
> 3. Fixes mm issues
>

Hi Atish,

This all looks reasonable to me, so I think we can merge this once you
can confirm that the runtime services actually work.

Could you explain how you are dealing with the memory map? Are memory
nodes in DT ignored entirely as they should be? What about memory
reservations?

In any case, I will take the first patch as a fix, so it should turn
up in mainline in 1~2 weeks.

Thanks,
Ard.