mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-07 13:44:29 +00:00
d4ea649f17
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>
23 lines
609 B
C
23 lines
609 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2002
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
*
|
|
* Copyright (C) 2017 Andes Technology Corporation
|
|
* Rick Chen, Andes Technology Corporation <rick@andestech.com>
|
|
*/
|
|
|
|
#ifndef _U_BOOT_RISCV_H_
|
|
#define _U_BOOT_RISCV_H_ 1
|
|
|
|
/* cpu/.../cpu.c */
|
|
int cleanup_before_linux(void);
|
|
|
|
/* board/.../... */
|
|
int board_init(void);
|
|
void board_quiesce_devices(void);
|
|
int riscv_board_reserved_mem_fixup(void *fdt);
|
|
int riscv_fdt_copy_resv_mem_node(const void *src_fdt, void *dest_fdt);
|
|
|
|
#endif /* _U_BOOT_RISCV_H_ */
|