[PATCH 1/2] riscv: efi: Map runtime MMIO with device attributes
Ard Biesheuvel
ardb at kernel.org
Sat Nov 21 10:15:42 PST 2026
On Sat, 21 Nov 2026, at 15:48, Han Gao wrote:
> On Sat, 21 Nov 2026 13:42:20 +0100 "Ard Biesheuvel" <ardb at kernel.org> wrote:
>
>>
>>
>> On Sat, 21 Nov 2026, at 11:38, Han Gao via B4 Relay wrote:
>> > From: Han Gao <gaohan at iscas.ac.cn>
>> >
>> > 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 at iscas.ac.cn>
>> > ---
>> > arch/riscv/kernel/efi.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>>
>> Acked-by: Ard Biesheuvel <ardb at kernel.org>
>>
>> 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
More information about the linux-riscv
mailing list