[PATCH v1] RISC-V: mark hibernation as nonportable

Palmer Dabbelt palmer at rivosinc.com
Wed May 31 08:03:31 PDT 2023


On Fri, 26 May 2023 11:59:08 +0100, Conor Dooley wrote:
> Hibernation support depends on firmware marking its reserved/PMP
> protected regions as not accessible from Linux.
> The latest versions of the de-facto SBI implementation (OpenSBI) do
> not do this, having dropped the no-map property to enable 1 GiB huge
> page mappings by the kernel.
> This was exposed by commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages
> for the linear mapping"), which made the first 2 MiB of DRAM (where SBI
> typically resides) accessible by the kernel.
> Attempting to hibernate with either OpenSBI, or other implementations
> following its lead, will lead to a kernel panic ([1], [2]) as the
> hibernation process will attempt to save/restore any mapped regions,
> including the PMP protected regions in use by the SBI implementation.
> 
> [...]

Applied, thanks!

[1/1] RISC-V: mark hibernation as nonportable
      https://git.kernel.org/palmer/c/ed309ce52218

Best regards,
-- 
Palmer Dabbelt <palmer at rivosinc.com>




More information about the linux-riscv mailing list