Boundaries and prerequisites for stage 2b

The 3DS application CPU is ARM11/ARMv6K with VFP, not the Cortex-A57 ARMv8-A AArch32 default in src/common/cpu/arm/. That backend's existing user-mode API still uses a single flat mem/mem_size range. Mapping a sparse 3DS address space into that ABI would make holes accessible and would bypass process permissions, aliases and device callbacks.

Remaining requirements beyond the initial native bootstrap pipeline:

  1. The initial ARM11 integer profile is implemented. Complete VFPv2 (including a short-vector first source in the first bank and enabled exceptions), missing ARMv6K instructions and alignment-mode validation. Current ordinary unaligned transfers model unaligned support enabled/alignment checking disabled, not every ARM11 CP15 configuration.
  2. The separate checked-memory ABI and CTR adapter implement integer and bounded scalar ARM11 VFP transfers. ARM11 checked exclusives now have serialized bus-owned reservations, including alias/ABA invalidation. Concurrent scheduling and broader monitor validation remain pending. General vector transfers, A57 checked exclusives and checked Thumb table branches remain unsupported. Never pass an A64 CPU* or an NX module to an A32 block.
  3. Module ABI 1 supports exhaustive tiny images and bounded conservative CFG discovery/chunking for larger images. Its full-geometry pointer tables permit NULL slots; the ABI and CPU layouts are unchanged. Improve computed-target coverage beyond the current pointer heuristics and 128-word PC-relative ADD window. Add validated resume/cache and scheduling. Blocks that the static discovery misses compile at run time through the ARM JIT.
  4. Keep all CTR code under src/3ds/, with only common dependencies. Extract reusable host FS/tree operations from NX into common rather than linking the NX kernel/services/Maxwell runtime into CTR. Keep 3DS archive IDs, permissions, title identity and saves in the CTR adapter. Architecture tests enforce the runtime boundary.

The page controller is now connected through an opt-in SnxArmCheckedCPU callback ABI, while the original CPU block/state ABI is deliberately unchanged. The adapter is not linked to the legacy execution runner. The A32 runner in src/common/cpu/arm/exec.c compiles blocks while a program runs and is not used by this pipeline. The offline compiler (src/3ds/aot/compiler.c, part of the driver) has its own ARM11/checked codegen options; shared A57 emission and CPU ABI defaults remain unchanged.

The tick domain remains 268,111,856 Hz, with 4,481,136 base ticks per frame, as in Azahar. The game's code runs natively, so a New 3DS's 804 MHz clock and L2 cache have nothing to change: ptm:sysm's ConfigureNew3DSCPU takes them on a New 3DS (said once), and the tick counter keeps its rate, as on the console. On an Old 3DS, or with a bit it does not know, the command stops. Threads on cores 2 and 3 share the one serialized scheduler with the others. Interrupts are delivered at the scheduler's deadlines (vblank, DSP frames, timers), paced by the host clock rather than by guest cycles. There is no ARM9 emulation or boot ROM. Synthetic CIAs and the supplied SuperTux startup execute natively, not complete games/retail titles.


Made from docs/platforms/3ds/README.md at 69237645142c. GPL-3.0-or-later.