OpenSBI - fw_rw_region NAPOT enforcing

9 views
Skip to first unread message

David Garcia

unread,
12:19 PM (10 hours ago) 12:19 PM
to RISC-V SW Dev
I'm experimenting with OpenSBI using different FW_TEXT_START values, for some values OpenSBI implementation complains the FW RW region offset is not a power of two (sbi_domain.c -> sbi_domain_init implementation).

After looking through SBI spec and RISC-V ISA spec, I can't find anything specific enforcing a NAPOT base address for the FW RW region.

Can someone please help understand why is this being enforced in the OpenSBI implementation?

Thanks!

Tommy Murphy

unread,
3:31 PM (6 hours ago) 3:31 PM
to David Garcia, RISC-V SW Dev
Might this, and the linked PR, be of any relevance? 



David Garcia

unread,
6:42 PM (3 hours ago) 6:42 PM
to RISC-V SW Dev, tommy_...@hotmail.com
Its similar issue but not quite the same, the check I'm referring to is right before the one mentioned in the PR.


if (scratch->fw_rw_offset == 0 ||
    (scratch->fw_rw_offset & (scratch->fw_rw_offset - 1)) != 0) {
sbi_printf("%s: fw_rw_offset is not a power of 2 (0x%lx)\n",
   __func__, scratch->fw_rw_offset);
return SBI_EINVAL;
Reply all
Reply to author
Forward
0 new messages