gemstonedevteam opened a new pull request, #20183:
URL: https://github.com/apache/nuttx/pull/20183
Five commits: the `drivers/rptun` resource-table sizing change, the AM67
rptun
lowerhalf, the RAT sliding window, an nxstyle fix to a file this PR touches,
and
documentation.
### Summary
* Adds the rptun lowerhalf connecting the R5F to Linux remoteproc over
NAVSS
`mailbox0_cluster3` (R5F TX on FIFO 0 → Linux GIC SPI 109; Linux TX on
FIFO 1 → VIM IRQ 116).
* The mailbox ISR is a strict top half: drain the FIFO, W1C the status,
EOI.
OpenAMP delivery is deferred to HPWORK, because the rpmsg rx stack takes
mutexes and allocates, neither of which is legal in interrupt context.
* The resource table publishes two vdevs (rpmsg and virtio-net) with all
vring
device addresses `FW_RSC_ADDR_ANY`: Linux remoteproc allocates each vring
from the R5F DMA pool and writes the chosen address back before releasing
the core; fixed addresses outside the pool are rejected.
* `drivers/rptun`: `rptun_do_start()` installed the resource table with a
hardcoded `sizeof(struct rptun_rsc_s)`, truncating extended tables that
carry more than the single rpmsg vdev. An optional `get_rsc_size()` op is
added with an `RPTUN_GET_RSC_SIZE` macro that falls back to the old
value,
so drivers using the standard table are unaffected.
* The RAT sliding window addresses a 32-bit R5F against a 64-bit peer:
J722S
maps DDR beyond the first 2 GB at `0x8_8000_0000`, outside the R5F's
addressable space, while Linux freely posts virtio buffers there. Region 0
is dedicated as a 16 MB window at `0xFE000000`, re-aimed per access, with
the window range MPU-mapped Non-cacheable.
* MPU: two Non-cacheable regions cover the shared IPC memory. The R5F is
not
hardware-coherent with the A53; with cacheable mappings NuttX reads stale
`DRIVER_OK`/vring state and the handshake hangs.
### Impact
* Is new feature added? **YES** — rptun/rpmsg IPC for AM67.
* Impact on user? **NO** — the `drivers/rptun` change is an optional op
with a
fallback to the previous behaviour; existing rptun drivers are
unaffected.
* Impact on build? **NO**.
* Impact on hardware? **YES** — arch/arm/am67 and board t3-gem-o1.
* Impact on documentation? **YES** — provided in this PR.
* Impact on security? **NO**.
* Impact on compatibility? **NO** — `RPTUN_GET_RSC_SIZE` falls back to
`sizeof(struct rptun_rsc_s)` when a driver does not implement it.
* Anything else? Per rule 1.7.9, the `drivers/rptun` sizing change and the
AM67
lowerhalf are bundled deliberately: the lowerhalf's extended two-vdev
table
is truncated without it, so neither is functional alone. This is not a
breaking change. Depends on PRs 3–7.
### Testing
```
Build Host(s): Pardus GNU/Linux 25 (Debian 13 base), x86_64, host gcc 14
Toolchain: arm-none-eabi-gcc 14.2.1 20241119 (15:14.2.rel1-1)
Target: arm / TI AM67 (J722S) Cortex-R5F, board t3-gem-o1:nsh
nuttx-apps: 5a7ab4200
Loaded on the main-domain R5F by Linux remoteproc; console on UART-MAIN1.
```
Testing logs before change: no IPC support on this arch.
The version string in the logs is from the tested build; the commits were
GPG-signed afterwards, which rewrites hashes. The code is unchanged.
Testing logs after change:
```
make distclean && ./tools/configure.sh t3-gem-o1:nsh && make -j
-> nuttx ELF 587972 bytes, 0 compiler warnings
Console:
nsh> ls /dev/rptun
/dev/rptun:
r5f
nsh>
nsh> ls /dev/rptun
/dev/rptun:
r5f
nsh>
Test plan result:
console_alive PASS prompt responsive
version PASS NuttX version 0.0.0 488ed91bec Sep 10 2026
13:49:52 t3-gem-o1:nsh
procfs PASS procfs readable
tasks PASS 3 task lines
rptun_node PASS /dev/rptun: r5f
linux_remoteproc PASS remoteproc3 running, fw=j722s-main-r5f0_0-fw,
vdevs=virtio1,virtio2
linux_rpmsg_channels PASS 2 channel(s): virtio1.rpmsg_ctrl.0.0
virtio1.rpmsg_ns.53.53
PASS=7
make distclean && ./tools/configure.sh t3-gem-o1:nsh && make -j
-> nuttx ELF 587972 bytes, 0 compiler warnings
Console:
nsh> ls /dev/rptun
/dev/rptun:
r5f
nsh>
nsh> ls /dev/rptun
/dev/rptun:
r5f
nsh>
Test plan result:
console_alive PASS prompt responsive
version PASS NuttX version 0.0.0 488ed91bec Sep 10 2026
13:49:52 t3-gem-o1:nsh
procfs PASS procfs readable
tasks PASS 3 task lines
rptun_node PASS /dev/rptun: r5f
linux_remoteproc PASS remoteproc3 running, fw=j722s-main-r5f0_0-fw,
vdevs=virtio1,virtio2
linux_rpmsg_channels PASS 2 channel(s): virtio1.rpmsg_ctrl.0.0
virtio1.rpmsg_ns.53.53
PASS=7
```
### PR verification Self-Check
* [x] This PR introduces only one functional change.
* [x] I have updated all required description fields above.
* [x] My PR adheres to Contributing Guidelines and Documentation.
* [ ] My PR is still work in progress (not ready for review).
* [x] My PR is ready for review and can be safely merged into a codebase.
--
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]