mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
add an "endcap" to the kernel region
This works around https://github.com/SpinalHDL/VexRiscv/issues/296
This commit is contained in:
parent
3417046e7b
commit
b275660a71
2 changed files with 26 additions and 0 deletions
|
|
@ -25,6 +25,8 @@ SECTIONS
|
||||||
KEEP(*(.trap.rust));
|
KEEP(*(.trap.rust));
|
||||||
|
|
||||||
*(.text .text.*);
|
*(.text .text.*);
|
||||||
|
|
||||||
|
KEEP(*(.endcap));
|
||||||
} > REGION_TEXT
|
} > REGION_TEXT
|
||||||
|
|
||||||
.rodata : ALIGN(4)
|
.rodata : ALIGN(4)
|
||||||
|
|
|
||||||
|
|
@ -251,3 +251,27 @@ _xous_syscall_return_result:
|
||||||
flush_mmu:
|
flush_mmu:
|
||||||
sfence.vma
|
sfence.vma
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
/*
|
||||||
|
Endcap of valid RISC-V code, to ensure speculative reads
|
||||||
|
past the end of the .text section to not trigger an illegal
|
||||||
|
instuction opcode. This cap is equal to the width of a cache line,
|
||||||
|
using the 2-byte RV32C encoding.
|
||||||
|
*/
|
||||||
|
.section .endcap, "ax"
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue