From dd9439fbace2196c24d90b9274a6014418d5b413 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Tue, 17 Mar 2020 07:59:48 -0700 Subject: 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 Reviewed-by: Anup Patel --- include/sbi_utils/fdt/fdt_helper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/sbi_utils') diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 67251f8f..d3b065a6 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -9,6 +9,18 @@ #ifndef __FDT_HELPER_H__ #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 * -- cgit v1.3.1