diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-05-11 11:30:15 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-19 09:19:42 +0530 |
commit | 63b0f5f71a4d6bf8539a8cbfa27228dc76e7d71a (patch) | |
tree | abbcdde88ebf1a646ef71829799718aa01a2fb3b /lib/utils/fdt | |
parent | 3a8fc8135714e39bef99cbf2a4b31e6f2f19a929 (diff) |
include: sbi: Use scratch pointer as parmeter in HART feature APIs
It makes more sense to have scratch pointer as parameter in
HART feature APIs because:
1. We already have scratch pointer at places where these APIs
are used.
2. This is consistent with lot of other APIs in sbi_hart.h
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/utils/fdt')
-rw-r--r-- | lib/utils/fdt/fdt_fixup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c index e69ba1d..6b11b41 100644 --- a/lib/utils/fdt/fdt_fixup.c +++ b/lib/utils/fdt/fdt_fixup.c @@ -183,10 +183,11 @@ int fdt_reserved_memory_fixup(void *fdt) return err; } - if (!sbi_hart_has_feature(current_hartid(), SBI_HART_HAS_PMP)) { - /* update the DT with firmware start & size even if PMP is not + if (!sbi_hart_has_feature(scratch, SBI_HART_HAS_PMP)) { + /* + * Update the DT with firmware start & size even if PMP is not * supported. This makes sure that supervisor OS is always - * aware of wheren OpenSBI resident memory area. + * aware of OpenSBI resident memory area. */ addr = scratch->fw_start & ~(scratch->fw_size - 1UL); size = (1UL << log2roundup(scratch->fw_size)); |