mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
firmware: Split RO/RX and RW sections
Split the RO/RX and RW sections so that they can have independent pmp entries with required permissions. The split size is ensured to be a power-of-2 as required by pmp. _fw_rw_offset symbol marks the beginning of the data section. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
a990309fa3
commit
fefa548803
@@ -42,6 +42,14 @@
|
|||||||
|
|
||||||
. = ALIGN(0x1000); /* Ensure next section is page aligned */
|
. = ALIGN(0x1000); /* Ensure next section is page aligned */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PMP regions must be to be power-of-2. RO/RW will have separate
|
||||||
|
* regions, so ensure that the split is power-of-2.
|
||||||
|
*/
|
||||||
|
. = ALIGN(1 << LOG2CEIL(SIZEOF(.rodata) + SIZEOF(.text)));
|
||||||
|
|
||||||
|
PROVIDE(_fw_rw_offset = (. - _fw_start));
|
||||||
|
|
||||||
/* Beginning of the read-write data sections */
|
/* Beginning of the read-write data sections */
|
||||||
|
|
||||||
.data :
|
.data :
|
||||||
|
Reference in New Issue
Block a user