riscv: Provide a mechanism to fix DT for reserved memory
authorAtish Patra <atish.patra@wdc.com>
Tue, 21 Apr 2020 18:15:01 +0000 (11:15 -0700)
committerAndes <uboot@andestech.com>
Thu, 23 Apr 2020 02:14:16 +0000 (10:14 +0800)
commitd4ea649f179a69edd2cf2dd96efb9337205eb015
tree42bd3450a19f02aafa85e7c4fff2d3fdadcc903c
parentf614753c4b91bc3b56809773aeb17da10f1231a5
riscv: Provide a mechanism to fix DT for reserved memory

In RISC-V, M-mode software can reserve physical memory regions
by setting appropriate physical memory protection (PMP) csr. As the
PMP csr are accessible only in M-mode, S-mode U-Boot can not read
this configuration directly. However, M-mode software can pass this
information via reserved-memory node in device tree so that S-mode
software can access this information.

This patch provides a framework to copy to the reserved-memory node
from one DT to another. This will be used to update the DT used by
U-Boot and the DT passed to the next stage OS.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/cpu/start.S
arch/riscv/include/asm/global_data.h
arch/riscv/include/asm/u-boot-riscv.h
arch/riscv/lib/Makefile
arch/riscv/lib/asm-offsets.c
arch/riscv/lib/fdt_fixup.c [new file with mode: 0644]