mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 09:48:16 +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
524 B
C
23 lines
524 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
|
*
|
|
* From arch/x86/lib/asm-offsets.c
|
|
*
|
|
* This program is used to generate definitions needed by
|
|
* assembly language modules.
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <linux/kbuild.h>
|
|
|
|
int main(void)
|
|
{
|
|
DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart));
|
|
DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr));
|
|
#ifndef CONFIG_XIP
|
|
DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts));
|
|
#endif
|
|
|
|
return 0;
|
|
}
|