diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2020-03-17 17:59:48 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-03-18 08:13:53 +0300 |
commit | dd9439fbace2196c24d90b9274a6014418d5b413 (patch) | |
tree | f9790a6e607dc4cba56b2b3730db62eb6b27c7e6 /include/sbi_utils | |
parent | 1071f0566359e1b8612b31a6953e6328cb5ff9be (diff) | |
download | opensbi-dd9439fbace2196c24d90b9274a6014418d5b413.tar.xz |
lib: utils: Add a fdt_cpu_fixup() helper
Add a helper routine to updates the "status" property of a CPU node
in the device tree to "disabled" if that hart is in disabled state.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi_utils')
-rw-r--r-- | include/sbi_utils/fdt/fdt_helper.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 67251f8..d3b065a 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -10,6 +10,18 @@ #define __FDT_HELPER_H__ /** + * Fix up the CPU node in the device tree + * + * This routine updates the "status" property of a CPU node in the device tree + * to "disabled" if that hart is in disabled state in OpenSBI. + * + * It is recommended that platform codes call this helper in their final_init() + * + * @param fdt: device tree blob + */ +void fdt_cpu_fixup(void *fdt); + +/** * Fix up the PLIC node in the device tree * * This routine updates the "interrupt-extended" property of the PLIC node in |