Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
K Kernel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • RiscOS
  • Sources
  • Kernel
  • Merge requests
  • !55

Merged
Created Jul 05, 2021 by Jeffrey Lee@jleeDeveloper

Implement OS_AbortTrap

  • Overview 12
  • Commits 17
  • Changes 73

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)

Edited Jul 06, 2021 by Jeffrey Lee
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: AbortTrap