lib: sbi: Fix how to check whether the domain contains fw_region

Because firmware is split into rw/rx segments, it cannot be recorded
by a root_fw_region. This problem is solved by adding a flag
fw_region_inited to sbi_domain.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W
2023-03-16 20:11:11 +08:00
committed by Anup Patel
parent ed88a63b90
commit 73ab11dfb0
3 changed files with 12 additions and 21 deletions

View File

@@ -358,6 +358,7 @@ static int __fdt_parse_domain(void *fdt, int domain_offset, void *opaque)
return SBI_EINVAL;
memcpy(&regions[val32++], reg, sizeof(*reg));
}
dom->fw_region_inited = root.fw_region_inited;
/* Read "boot-hart" DT property */
val32 = -1U;