summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBin Meng <[email protected]>2023-02-23 18:40:09 +0800
committerAnup Patel <[email protected]>2023-02-27 10:04:03 +0530
commit99d09b601eb3809a4cc2aa409da34bc4fe32f67f (patch)
tree8d614f25b7f5240c03518318d4f41019aaff8a80 /lib
parent745aaecc64dcae0cfb7e40702a173100af94d582 (diff)
include: fdt/fdt_helper: Change fdt_get_address() to return root.next_arg1
In sbi_domain_finalize(), when locating the coldboot hart's domain, the coldboot hart's scratch->arg1 will be overwritten by the domain configuration. However scratch->arg1 holds the FDT address of the coldboot hart, and is still being accessed by fdt_get_address() in later boot process. scratch->arg1 could then contain completely garbage and lead to a crash. To fix this, we change fdt_get_address() to return root domain's next_arg1 as the FDT pointer. Resolves: https://github.com/riscv-software-src/opensbi/issues/281 Fixes: b1678af210dc ("lib: sbi: Add initial domain support") Reported-by: Marouene Boubakri <[email protected]> Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions