mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils: Allow FDT domain iteration functions to fail
We extend fdt_iterate_each_domain() and fdt_iterate_each_memregion() functions to allow underlying iteration function to fail. This will help us catch more domain misconfiguration issues at boot time. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -21,10 +21,12 @@ struct sbi_domain;
|
||||
* @param fdt device tree blob
|
||||
* @param opaque private pointer for each iteration
|
||||
* @param fn callback function for each iteration
|
||||
*
|
||||
* @return 0 on success and negative error code on failure
|
||||
*/
|
||||
void fdt_iterate_each_domain(void *fdt, void *opaque,
|
||||
void (*fn)(void *fdt, int domain_offset,
|
||||
void *opaque));
|
||||
int fdt_iterate_each_domain(void *fdt, void *opaque,
|
||||
int (*fn)(void *fdt, int domain_offset,
|
||||
void *opaque));
|
||||
|
||||
/**
|
||||
* Iterate over each memregion of a domain in device tree
|
||||
@@ -33,11 +35,13 @@ void fdt_iterate_each_domain(void *fdt, void *opaque,
|
||||
* @param domain_offset domain DT node offset
|
||||
* @param opaque private pointer for each iteration
|
||||
* @param fn callback function for each iteration
|
||||
*
|
||||
* @return 0 on success and negative error code on failure
|
||||
*/
|
||||
void fdt_iterate_each_memregion(void *fdt, int domain_offset, void *opaque,
|
||||
void (*fn)(void *fdt, int domain_offset,
|
||||
int region_offset, u32 region_access,
|
||||
void *opaque));
|
||||
int fdt_iterate_each_memregion(void *fdt, int domain_offset, void *opaque,
|
||||
int (*fn)(void *fdt, int domain_offset,
|
||||
int region_offset, u32 region_access,
|
||||
void *opaque));
|
||||
|
||||
/**
|
||||
* Fix up the domain configuration in the device tree
|
||||
|
Reference in New Issue
Block a user