aboutsummaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/riscv-runtime.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-26riscv: dmi: Add SMBIOS/DMI supportHaibo Xu1-0/+13
Enable the dmi driver for riscv which would allow access the SMBIOS info through some userspace file(/sys/firmware/dmi/*). The change was based on that of arm64 and has been verified by dmidecode tool. Signed-off-by: Haibo Xu <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
2024-02-02efi: runtime: Fix potential overflow of soft-reserved region sizeAndrew Bresticker1-1/+1
md_size will have been narrowed if we have >= 4GB worth of pages in a soft-reserved region. Signed-off-by: Andrew Bresticker <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
2023-08-21efi/riscv: Move EFI runtime call setup/teardown helpers out of lineArd Biesheuvel1-2/+13
Only the arch_efi_call_virt() macro that some architectures override needs to be a macro, given that it is variadic and encapsulates calls via function pointers that have different prototypes. The associated setup and teardown code are not special in this regard, and don't need to be instantiated at each call site. So turn them into ordinary C functions and move them out of line. Cc: Paul Walmsley <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Albert Ou <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
2022-10-21efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0Ard Biesheuvel1-1/+1
The generic EFI stub can be instructed to avoid SetVirtualAddressMap(), and simply run with the firmware's 1:1 mapping. In this case, it populates the virtual address fields of the runtime regions in the memory map with the physical address of each region, so that the mapping code has to be none the wiser. Only if SetVirtualAddressMap() fails, the virtual addresses are wiped and the kernel code knows that the regions cannot be mapped. However, wiping amounts to setting it to zero, and if a runtime region happens to live at physical address 0, its valid 1:1 mapped virtual address could be mistaken for a wiped field, resulting on loss of access to the EFI services at runtime. So let's only assume that VA == 0 means 'no runtime services' if the region in question does not live at PA 0x0. Signed-off-by: Ard Biesheuvel <[email protected]>
2020-10-02RISC-V: Add EFI runtime servicesAtish Patra1-0/+143
This patch adds EFI runtime service support for RISC-V. Signed-off-by: Atish Patra <[email protected]> [ardb: - Remove the page check] Signed-off-by: Ard Biesheuvel <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>