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>
This commit is contained in:
Bin Meng
2020-03-17 07:59:48 -07:00
committed by Anup Patel
parent 1071f05663
commit dd9439fbac
2 changed files with 38 additions and 0 deletions

View File

@@ -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
*