Re: [PATCH 1/2] riscv: efi: Map runtime MMIO with device attributes
From: Ard Biesheuvel
Date: Sat Nov 21 2026 - 13:16:14 EST
On Sat, 21 Nov 2026, at 15:48, Han Gao wrote:
> On Sat, 21 Nov 2026 13:42:20 +0100 "Ard Biesheuvel" <ardb@xxxxxxxxxx> wrote:
>
>>
>>
>> On Sat, 21 Nov 2026, at 11:38, Han Gao via B4 Relay wrote:
>> > From: Han Gao <gaohan@xxxxxxxxxxx>
>> >
>> > EFI_MEMORY_MAPPED_IO regions are mapped with PAGE_KERNEL, so device
>> > registers end up mapped as normal memory.
>> >
>> > On Milk-V Pioneer, GetTime() reads the clock controller registers and
>> > faults:
>> >
>> > Oops - load access fault [#1]
>> > Workqueue: efi_runtime efi_call_rts
>> > status: 0000000200000120 badaddr: 0000007030012000 cause: 0000000000000005
>> >
>> > Use PAGE_KERNEL_IO for these regions.
>> >
>> > Fixes: b91540d52a08 ("RISC-V: Add EFI runtime services")
>> > Signed-off-by: Han Gao <gaohan@xxxxxxxxxxx>
>> > ---
>> > arch/riscv/kernel/efi.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>>
>> Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
>>
>> I can take this as a fix via the EFI tree if you like.
>
> Yes, please take it through the EFI tree. Thanks!
>
OK, I've queued up patch #1