From a5b1810f12c356c7f26b45316e97dd568c9bc42a Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Mon, 30 Jan 2023 11:05:01 +0800 Subject: exclude opensbi memory range in device tree This patch explicitly excludes the memory range of the OpenSBI in the built-in device tree. When booting EFI, the efi loader has to know about that zone before loading the device tree for Linux, otherwise it tries to access 0x40000000, leading to an access violation. Signed-off-by: Felix Moessbauer --- arch/riscv/dts/starfive_evb.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/riscv/dts/starfive_evb.dts b/arch/riscv/dts/starfive_evb.dts index 67c0a7bceb..42ee2a5f54 100644 --- a/arch/riscv/dts/starfive_evb.dts +++ b/arch/riscv/dts/starfive_evb.dts @@ -27,12 +27,22 @@ starfive,boot-hart-id = <1>; }; - memory@80000000 { device_type = "memory"; reg = <0x0 0x40000000 0x1 0x0>; }; + reserved-memory { + #size-cells = <2>; + #address-cells = <2>; + ranges; + + opensbi { + reg = <0x00 0x40000000 0x00 0x80000>; + no-map; + }; + }; + soc { }; }; -- cgit v1.2.3