santhosh-c-c opened a new pull request, #22246:
URL: https://github.com/apache/nuttx/pull/22246
## Summary
Runs one SMP kernel on all CPUs of TC3x and TC4x. Today CPU0 releases the
other cores to separate images, with CONFIG_SMP they run this image and join
the kernel as idle tasks.
```
CPU0 CPU1 .. CPUn
---- ------------
reset, clocks, .data/.bss held in boot halt
nx_start()
up_initialize()
grant the other CPUs access
(TC4x: IR, DSPR, DLMU, SFR, STM)
route + enable one IPI per CPU
up_cpu_start(n) -------------------> __start_secondary
CSA pool, interrupt stack and
idle stack in its own DSPR
own watchdog off
tricore_cpu_boot()
join as the idle task of CPU n
```
- one GPSR per CPU pair is the inter-CPU interrupt
- the CPU of an interrupt is kept in SRC TOS
- CSA frames are per CPU; frames that end up on another CPU go back to their
owner at each context switch
- the TriCore data cache is not coherent, so with SMP it stays bypassed,
kernel data is in the DLMU, stacks and heap in the DSPR
- barriers map to dsync, spinlocks to cmpswap.w
Fixes to the existing port, also without SMP:
- the TC4x STM counts at 500 MHz, not 100 MHz (NuttX time ran 5x fast)
- only CPU0 disables the system watchdog (CPU1+ writing it reset the chip)
## Dependency
- #21958 (and #21805 under it)
- #22047 (generic SMP fixes and BMP)
## Impact
- New option TRICORE_SMP_CSA_COUNT.
- SMP needs the GNU toolchain (the secondary entry is in the GNU startup) a
non-GNU SMP build stops with an #error.
- Builds without SMP are unchanged apart from the two fixes above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]