This set of changes:
- Implements the OS_AbortTrap abort trapping mechanism, compatible with RISC OS Select's implementation. All ARM, FPA, and VFP/NEON load/store instructions are supported.
- Extends the AbortTrap API to add support for requesting handlers to map in memory with explicit permissions; this is used to ensure correct operation of some instructions (e.g. LDREX/STREX), and also allows prefetch aborts to invoke AbortTrap.
- Implements "Abortable DA" support, compatible with RISC OS Select's implementation
- Updates OS_Memory 24 to flag abortable DAs as being abortable (as per RISC OS Select)
- When long descriptor page tables are in use, RISC OS access privilege 1 (user read+execute, privileged read+write+exec) memory will now be mapped as "user none, privileged read+write+exec", and the abort trap mechanism will be used to provide emulation of user mode read access. Previously AP1 memory was mapped as "user read+write+exec, privileged read+write+exec", since that was the closest mode available directly with the long descriptor format. Note that there's no support for user execute support, so some compatibility issues may result from this change.
- Fixes OS_ReadSysInfo 7 to track both prefetch & data aborts (only data aborts were being tracked)
- Fixes lazy task swapping to work correctly with instructions which cross page boundaries (Thumb-2, Jazelle)
- Updates OS_PlatformFeatures 34 to report the presence of a few useful abort processing CP15 registers
- Updates the kernel build system to allow C code to easily be used (the AbortTrap implementation is 99% C)
Assorted AbortTrap test programs are in Dev/AbortTrap.
Tested on Pi 1-4, OMAP3, Iyonix, physical StrongARM RiscPC (pre-revision T), and emulated RiscPC & ARM610 (RPCEmu; however some tests will fail, due to what looks to be MMU emulation bugs)