lib: sbi: Add separate entries for firmware RX and RW regions
authorHimanshu Chauhan <hchauhan@ventanamicro.com>
Thu, 19 Jan 2023 15:18:26 +0000 (20:48 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 23 Jan 2023 05:04:18 +0000 (10:34 +0530)
commit230278dcf127e2a336d54748f03b5bc280656498
tree95db6bef5866bc39f515704a48d155d2b27eae45
parentb666760bfafda75b6d31d6f9f01bcc60bc673aa4
lib: sbi: Add separate entries for firmware RX and RW regions

Add two entries for firmware in the root domain:

1. TEXT: fw_start to _fw_rw_offset with RX permissions
2. DATA: _fw_rw_offset to fw_size with RW permissions

These permissions are still not enforced from M-mode but lay
the ground work for enforcing them for M-mode. SU-mode don't
have any access to these regions.

Sample output:
 Domain0 Region01  : 0x0000000080000000-0x000000008001ffff M: (R,X) S/U: ()
 Domain0 Region02  : 0x0000000080020000-0x000000008003ffff M: (R,W) S/U: ()

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_domain.c