The SDK's system tick is the game reading the counter register itself (MRS CNTPCT_EL0 or CNTVCT_EL0), which a game
that times its work closely does often. Its stub makes no outcall: it reads the host's virtual counter after an ISB,
as Linux's vDSO reads it, makes it nanoseconds with a 64.64 factor of the host's frequency (Eden's WriteCntpctHandler
scales it the same way), takes away the guest clock's start (or reads where a pause stopped the clock), and makes
19.2 MHz ticks as guest_ticks does (runtime/clock.c). So that these reads and svcGetSystemTick, which still goes
through an outcall, never go back against each other, guest time under NCE follows the host's counter too
(clock_from_counter), from where it was when NCE started, in the stub's arithmetic.
Limits:
plat_ns (SDL's clock). They drift apart by the kernel's rounding of the
counter's frequency, which was not measured; what puts guest time beside plat_ns (g_t0_ns) sees that drift..nce of version 2 has pools sized for the outcall, so it is refused
and the game has to be recompiled.Made from docs/platforms/nx/nce.md at 69237645142c. GPL-3.0-or-later.