Skip to content
Commit 5e002e8d authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Carles Cufí
Browse files

riscv: linker: align end of ROM area to a "page" boundary for QEMU



QEMU does its dynamic instruction translation in 4096-byte-sized chunks.
Therefore it doesn't vet PMP access for each instruction prefetch but
for the whole "page" at once. If the end of the ROM area lands in the
middle of such a page with a corresponding PMP entry then any instruction
access within that page will fault even if it is located in the PMP
mapped portion.

To work around this QEMU peculiarity, we simply align the end of the ROM
area to a page boundary.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent ec9c2ec2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment