PoC: Trap when executing from ROM in app mode

Only allow executing from ROM when in one of the following execution
contexts:
- Firmware mode
- IRQ_SYSCALL_LO
- IRQ_SYSCALL_HI

Co-authored-by: Daniel Jobson <jobson@tillitis.se>
This commit is contained in:
Mikael Ågren 2024-12-11 11:49:41 +01:00
parent b53666e497
commit e4d19e83ce
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
4 changed files with 48 additions and 11 deletions

View file

@ -144,11 +144,11 @@ module application_fpga (
reg irq30_cs;
reg irq30_we;
(* keep *)reg irq30_eoi;
reg irq30_eoi;
reg irq31_cs;
reg irq31_we;
(* keep *)reg irq31_eoi;
reg irq31_eoi;
reg tk1_cs;
reg tk1_we;
@ -367,6 +367,9 @@ module application_fpga (
.gpio3(app_gpio3),
.gpio4(app_gpio4),
.access_level_hi (irq31_eoi),
.access_level_med(irq30_eoi),
.cs(tk1_cs),
.we(tk1_we),
.address(tk1_address),