lib: utils: Update reserved memory fdt node even if PMP is not present
authorAtish Patra <atish.patra@wdc.com>
Sat, 9 May 2020 23:47:26 +0000 (16:47 -0700)
committerAnup Patel <anup@brainfault.org>
Sun, 10 May 2020 04:30:02 +0000 (10:00 +0530)
commit79d0fadb0681acbba55bb6b4afcd3c2e6f725928
tree3d8d4c832ba0c69e726e6d5e429e2f87874872b6
parent13ca20d8df3b402d12e5701c651a53409db167d8
lib: utils: Update reserved memory fdt node even if PMP is not present

As per RISC-V ISA, pmp is not mandatory. Currently, we only add reserved
memory node in DT only if PMP is present. That allows supervisor to access
the memory where OpenSBI continue to exist without realizing it for non-pmp
based platforms. It may result in corrupting OpenSBI. That's why OpenSBI
should at least let the supervisor know where it continue to exist.
This a best effort service provided by OpenSBI expecting that supervisor
software is not buggy and properly sets up its memory after parsing the
reserved-memory device tree node.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
lib/utils/fdt/fdt_fixup.c