435 lines
26 KiB
Markdown
435 lines
26 KiB
Markdown
# Cellular data experiments on platina
|
||
|
||
Status on **2026-11-17**: SDM660 IPA v2.6L BAM QMAP cellular data transport is
|
||
implemented in candidate kernel recipe **7.2.12-r25** (`0044-net-ipa-implement-sdm660-v2-6l-bam-transport.patch` + DT interconnects/SMMU in `0042` & ANOC2 IRQ polarity in `0045`). Interface-bound public IPv4 ICMP, idle single-packet UDP DNS, TCP DNS, and TCP+TLS HTTPS are verified on China Unicom LTE (`46001`, APN `3gnet`), alongside multi-wraparound packet delivery and disconnect/reconnect cycles. See the [2026-11-17 IPA v2.6L BAM section](#ipa-v26l-bam-transport-qualification-2026-11-17) below; historical **2026-11-12/13** AT/PPP and r23/r24 findings are preserved chronologically.
|
||
|
||
## What was verified on the phone
|
||
|
||
| Layer | Observed result |
|
||
|---|---|
|
||
| Modem control | QMI DMS, NAS and UIM respond over `qrtr://0`; USIM is ready |
|
||
| Radio | NAS reports China Unicom / LTE, registered, PS attached during tests; registration also times out in some attempts |
|
||
| Software transport | The unused modem GLINK `DS` channel responds to AT commands through `rpmsg_chrdev` |
|
||
| Firmware capabilities | `AT+CGDATA=?` advertises PPP; this does not establish a data call |
|
||
| Actual PPP call | With GLINK DTR/RTS signals set and registration complete, `ATD*99#` returns `CONNECT`; LCP and IPCP exchange packets in both directions |
|
||
| IPv4 | Multiple calls obtained an IPv4 address on `ppp0` |
|
||
| SIM subscription | The user confirmed this SIM can use mobile data under Android |
|
||
| Public data | Interface-bound ICMP to `1.1.1.1`/`223.5.5.5` and DNS queries to `223.5.5.5` received no replies |
|
||
| Packet integrity | Captured outgoing DNS frames passed PPP FCS, IPv4-header and UDP-checksum verification; their source matched IPCP |
|
||
| Compression | Disabling address/control, protocol and VJ compression did not restore DNS replies |
|
||
| Authentication | A diagnostic call with `unicom` credentials completed CHAP-MD5 authentication; DNS still timed out and a subsequent LCP echo reply arrived |
|
||
| PDP activation | `AT+CGACT=1,1` succeeded for `3gnet`; `CGCONTRDP` returned the APN, an IPv4 address and DNS `221.11.1.67`/`221.11.1.68`. Dialing PPP after this separate activation ended with `NO CARRIER` during IPCP |
|
||
| Alternative APN | A diagnostic `wonet` PPP call obtained IPv4 and passed CHAP; three queries to operator DNS `221.11.1.67` still timed out |
|
||
| Proven Internet uplink | A PPP-bound TCP SYN reached the authorized Tokyo server; its sequence number matched the phone's outgoing PPP frame exactly. The server transmitted SYN-ACKs, but no IP frame returned through PPP |
|
||
| Firmware stability | Kernel logs record repeated MPSS fatal errors at `ipa_util.c:1089`, asserting `ipa_util.imm_cmd.clients[cmd_handle].init_done`; remoteproc automatically restarts the modem, and ath10k also recovers |
|
||
| CGDATA alternative | `AT+CGDATA="PPP",1` returned `ERROR`, including after LTE registration |
|
||
|
||
Clearing both GLINK signals before dialing also returned `ERROR`. The current
|
||
RPMsg flow-control ioctl changes DTR and RTS together. Their interaction with
|
||
bulk data needs further qualification. A `CONNECT` speed string is a modem
|
||
response, **not a measured throughput**.
|
||
|
||
A separate diagnostic accepted `AT&D0` and cleared both signals after IPCP.
|
||
It did not restore downlink: the modem hit the same IPA assertion about
|
||
60 milliseconds after clearing the signals. This is not an operational
|
||
flow-control workaround. These diagnostic AT settings were volatile; no
|
||
profile-save command was sent, and the modem restarted after the assertion.
|
||
|
||
ModemManager was temporarily stopped during direct AT/PPP experiments and
|
||
restarted afterwards. At the start of investigation, Wi-Fi was disconnected
|
||
and the modem reported `shutting-down`; previously reported steady-state
|
||
network results must not be assumed to describe the current session.
|
||
|
||
The firmware assertions and missing downlink make modem-side IPA
|
||
initialization a concrete dependency to investigate. They do not prove that
|
||
implementing a particular QMI message alone will fix it. Do not repeatedly
|
||
redial this experiment as an
|
||
automatic failover service: the observed modem restart also affects Wi-Fi.
|
||
USB SSH and the battery guard remained available during these tests.
|
||
|
||
In the correlated TCP test, the phone sent sequence `2844831695` through
|
||
PPP at monotonic time `17402.104`. The Tokyo capture received the same
|
||
sequence after carrier NAT and sent SYN-ACK sequence `797834871`, ACK
|
||
`2844831696`. The modem's IPA assertion occurred at `17414.509`, about
|
||
12.4 seconds after the first SYN. Active PPP shutdown began at `17437.118`.
|
||
Thus this assertion preceded local teardown; it cannot be attributed solely
|
||
to closing the bridge. Server SSH was listening and its existing firewall
|
||
allowed this port; no firewall rule was changed. This establishes an
|
||
Internet uplink and a missing PPP downlink, not a completed TCP connection.
|
||
|
||
## Run the experimental software path
|
||
|
||
`scripts/phone-cellular-rpmsg.py` is packaged as
|
||
`/usr/local/sbin/platina-cellular-rpmsg` in newly generated runtime overlays.
|
||
It is opt-in and has no automatically enabled OpenRC service.
|
||
The updated helper was also installed on the test phone on 2026-11-12;
|
||
its SHA-256 matched the local source and its AT-only smoke test returned
|
||
`OK`. No automatic PPP service was installed.
|
||
|
||
Dependencies are `python3`, `ppp-daemon`, matching kernel `slhc`, `ppp_generic`,
|
||
`ppp_async` and CRC modules, and the existing `platina-cellular` battery gate.
|
||
On this installation, rebuilding the module dependency index with `depmod -a`
|
||
resolved missing `slhc_*` symbols when loading `ppp_generic`. This was an index
|
||
problem; no incompatible module was forced into the kernel.
|
||
|
||
The default command sends only `AT`; `--query` reads SIM, radio and PDP state:
|
||
|
||
```sh
|
||
sudo platina-cellular-rpmsg
|
||
sudo platina-cellular-rpmsg --query
|
||
```
|
||
|
||
The following foreground experiment checks the battery, temporarily stops a
|
||
running ModemManager, requests QMI online mode and restores the manager's
|
||
initial service state on exit:
|
||
|
||
```sh
|
||
sudo platina-cellular-rpmsg --connect --apn 3gnet \
|
||
--dial-method atd --glink-signals 1 \
|
||
--registration-timeout 180 --duration 90 \
|
||
--verify-target 223.5.5.5 --verify-kind dns
|
||
```
|
||
|
||
The helper refuses already bound channels and existing PPP interfaces. It
|
||
uses an exclusive session lock, restores the channel override and closes
|
||
the temporary endpoint on exit. During PPP shutdown it continues forwarding
|
||
the termination handshake before closing the transport.
|
||
GLINK may remove and re-announce the channel while closing it. The helper
|
||
supports only the modem's `DS`, `DATA1`, `DATA2`, `DATA3`, `DATA4` and `DATA11`
|
||
names; only `DS` has been verified as an AT transport here.
|
||
|
||
`--connect` configures PDP context 1 for the specified APN and IPv4. It changes
|
||
the modem's AT echo/error settings. It does not set a default route or DNS.
|
||
`--verify-target` adds an exact temporary host route, binds its probe to the
|
||
PPP device, and removes that route after testing. It never falls back to a
|
||
Wi-Fi or USB probe. `--verify-kind dns` sends a DNS query for `example.com` to
|
||
the specified public resolver; `ping` uses four ICMP packets. A failed probe
|
||
returns nonzero even if IPCP assigned an address. A successful test closes
|
||
the experimental call on exit; continuous operation needs separate qualification.
|
||
|
||
The result's `ppp_frames.tx` and `ppp_frames.rx` count FCS-validated PPP
|
||
frames by protocol, IPv4 bytes, corrupt frames and oversized frames. These
|
||
counters distinguish LCP/IPCP/CHAP replies from actual received IP packets;
|
||
they do not retain payloads. In the `wonet` diagnostic, TX contained three
|
||
IPv4 frames (171 bytes) and RX contained only LCP/CHAP/IPCP, with zero bad
|
||
FCS frames. Those counts alone demonstrate valid frames entering the local
|
||
RPMsg send path. The separate sequence-correlated server capture establishes
|
||
Internet uplink delivery. A carrier-side or modem-side downlink capture is
|
||
still needed to locate the loss of replies.
|
||
|
||
The foreground duration starts after dial/registration. Opening a GLINK
|
||
endpoint and requesting a remote RX intent can also wait inside the kernel;
|
||
`--timeout` bounds AT response polling, not every kernel operation.
|
||
|
||
Local evidence from this investigation is retained outside the source
|
||
release under `reports/cellular-20261112/`: correlated phone/server TCP logs,
|
||
the alternative-APN DNS result, firmware assertions and regression logs.
|
||
|
||
## IPA v2.6L kernel findings
|
||
|
||
The original experimental `0043` patch is a scaffold, not an implemented
|
||
data transport. It skips BAM, endpoint initialization, memory and route-table
|
||
setup. Its TX path frees packets while reporting successful transmission.
|
||
Creating `rmnet_ipa0`, exposing endpoint numbers or surviving a short idle
|
||
test does not qualify this implementation.
|
||
|
||
The new `0044` guard rejects this hardware with `-EOPNOTSUPP` before mapping
|
||
registers, and fixes both false-success TX branches. The candidate recipe
|
||
and lock file are **7.2.12-r24**. This is an explicit unsupported-transport
|
||
guard, not a BAM driver. The earlier GCC check of three affected objects used
|
||
an isolated **7.2.3-sdm660+** source copy. That historical result does not
|
||
qualify the candidate against the phone's **7.2.12-sdm660** kernel. The current
|
||
r23 build uses the locked archive, all recipe patches, Alpine Clang 22.1.3,
|
||
and the phone's exact configuration, including non-permissive KCFI. The
|
||
configuration SHA256 is
|
||
`7f816caaea4cb3889b57e564c28a2384c7ddcc4ec21cd7f38473e06c643c23ad`.
|
||
The r23 full Image/modules build and sequential finalization completed successfully,
|
||
confirmed on 2026-11-13 (Asia/Tokyo). Both regenerated panel DTBs contain the
|
||
corrected IPA/BAM resources and AP SMMU stream `0x19c0`. The latest diagnostic
|
||
also passed normal modpost against the completed symbol table, with split BTF
|
||
omitted. Finalization evidence is retained in
|
||
`reports/cellular-20261112/build-r23-final.log`. No r23 kernel has been flashed
|
||
or qualified for boot. The finalized diagnostic was
|
||
subsequently loaded, sampled and unloaded normally on 2026-11-13; its log is
|
||
`reports/cellular-20261112/probe-live-final-r23.log`.
|
||
|
||
| Final artifact | SHA256 |
|
||
|---|---|
|
||
| `Image.gz` | `41facfb07f2d8d573d322e45f82c0b7b47790b78a77cbeba313085954be1e4ad` |
|
||
| `sdm660-xiaomi-platina.dtb` | `6ae7d0d10fc99a60d8c51ef60805eb55113b616e1a44800288ddf664f043df74` |
|
||
| `sdm660-xiaomi-platina-boe.dtb` | `4d82fcd7bcef5c7a4ab98d168994ff4e3ec438a0e0e1b3acb87c5802cb4223f2` |
|
||
| `platina_ipa_v2_probe.ko` | `1dbc19916a0adf96f7751020d419c5554e84ceb411d8dd23a11c3211c8a0def7` |
|
||
|
||
The user-space hardware activation check also rejects a v2.6 shim, its RMNET
|
||
children, a bare driver binding, or an interface name without backing hardware.
|
||
A future implemented v2 backend must expose `modem/datapath_ready=1` before
|
||
this integration permits activation. Even that marker does not prove public
|
||
connectivity. The independent PPP experiment does not use this NM hardware gate.
|
||
|
||
The Xiaomi `platina-o-oss` sources, commit
|
||
`0bb2780bccb9c7e05f0edf5db8860e779179b5f9`, establish these concrete differences:
|
||
|
||
| Item | Original hardware/source definition |
|
||
|---|---|
|
||
| Hardware generation | `IPA_HW_v2_6L` (`qcom,ipa-hw-ver = <6>`) |
|
||
| Raw IPA resource | `0x14780000`, size `0x4effc` |
|
||
| BAM resource | `0x14784000`, size `0x26934`; **not shared SRAM** |
|
||
| IPA register offset | `IPA_REG_BASE_OFST_v2_6L = 0x40000` from the raw IPA base |
|
||
| SRAM direct access | v2 direct-access offsets and memory partitioning; not the v3.1 register table |
|
||
| AP command producer | Endpoint **3** |
|
||
| AP LAN/WAN producer | Endpoint **4** |
|
||
| AP LAN consumer | Endpoint **2** |
|
||
| AP WAN consumer | Endpoint **5** |
|
||
| Q6 LAN producer / command producer | Endpoints **6 / 7** |
|
||
| Q6 LAN consumer / WAN consumer | Endpoints **8 / 9** |
|
||
| SMMU | AP context stream ID `0x19c0`; separate WLAN/uC contexts |
|
||
|
||
These differ from the GSI-style endpoint assignments copied into `0043`.
|
||
Correctly implementing BAM requires v2 register definitions and resource
|
||
ownership, verified DMA/IOMMU mappings, descriptor/completion handling, RX
|
||
replenishment, immediate commands and memory/table initialization, modem QMI
|
||
initialization, and restart/power cleanup. Do not enable the old DT node and
|
||
simply substitute a BAM IRQ for GSI.
|
||
|
||
The r23 source description corrects the IPA register aperture to
|
||
`0x147c0000`, labels the complete `0x14784000` BAM range as BAM, and uses
|
||
the original SPS driver's level-high BAM interrupt. It removes the GSI
|
||
loader property and declares the original AP stream `0x19c0` on ANOC2 SMMU.
|
||
The guard remains in place; these corrections do not implement BAM DMA or
|
||
its buffer mappings. The running phone uses strict IOMMU translation with
|
||
unassigned-stream bypass disabled, so an unmapped physical-address DMA
|
||
fallback is not an acceptable transport implementation. An existing DTB-list
|
||
hunk in patch `0040` was also corrected to match the locked source's tabs and
|
||
surrounding context.
|
||
|
||
The Android initialization dependencies and opt-in read-only register
|
||
diagnostic are documented in
|
||
[`project/cellular/ipa-v2`](../project/cellular/ipa-v2/README.md). A key
|
||
transport distinction is `SPS_IOVEC_FLAG_IMME` (`0x0100`), with the opcode
|
||
in the descriptor's size field. Mainline BAM's `DMA_PREP_CMD` sets ordinary
|
||
BAM command bit `0x0800` and cannot substitute for this IPA descriptor.
|
||
|
||
### Read-only hardware verification, 2026-11-12
|
||
|
||
The opt-in diagnostic loaded through normal module checks on the current
|
||
7.2.12 phone and was unloaded after each snapshot. It retained KCFI and did
|
||
not use forced loading. The early diagnostic build preceded the full kernel
|
||
symbol table, so modpost emitted unresolved-symbol warnings. All 28 required
|
||
symbols were separately checked against the running kernel's actual exports;
|
||
This export check applied to the earlier live-tested binary. The finalized
|
||
diagnostic subsequently passed normal modpost and was loaded, sampled and
|
||
unloaded on the phone on 2026-11-13.
|
||
The diagnostic omitted split BTF so it did not depend on a rebuilt kernel's
|
||
BTF type IDs.
|
||
|
||
| Register/state | Observed value | Interpretation |
|
||
|---|---|---|
|
||
| IPA hardware version | `0x20060001` | Hardware registers are readable at the corrected aperture |
|
||
| IPA version | `0x01030300` | Raw version register, separate from the hardware version |
|
||
| IPA configuration | `0x10` | IPA enable bit 0 is clear at the snapshot |
|
||
| SRAM size / restricted bytes | `8192 / 0` | Matches the original v2.6L layout's 8 KiB end offset |
|
||
| IPA / BAM pipe counts | `20 / 20` | Available pipe counts, not active-pipe bitmaps |
|
||
| BAM revision | `0x00674427` | BAM revision field is `0x27` |
|
||
| BAM EE0 pipe attributes | `0x8009f83f` | EE0 is enabled and owns AP pipes 2 through 5 |
|
||
| AP LAN RX / command TX / TX / WAN RX | control and offsets all `0` | These four BAM pipes are not enabled |
|
||
|
||
The first snapshot exposed an additional clock-ordering error in the
|
||
diagnostic: this kernel's RPM provider returns success without recording a
|
||
rate change while unprepared. The corrected diagnostic follows the vendor's
|
||
prepare-before-set sequence. Its second snapshot reported a 75 MHz vote and
|
||
75 MHz cached request, then restored the original cached request and zero
|
||
prepare/enable counts. Those values are requests, not measured frequencies.
|
||
|
||
Neither snapshot reset IPA/BAM, acknowledged IRQs, submitted DMA or sent QMI.
|
||
No new firmware assertion appeared during the snapshots; USB, routes,
|
||
ModemManager and battery guard retained their prior state. Loading the
|
||
external module set the kernel's normal out-of-tree taint bit (`4096`), which
|
||
remains until reboot even after unloading. The complete logs and JSON are in
|
||
`reports/cellular-20261112/probe-live-r23.log` and
|
||
`probe-live-clock-r23.log`.
|
||
|
||
These observations establish an accessible but uninitialized AP transport.
|
||
They support implementing the real BAM command and data paths; they do not
|
||
prove that missing initialization is the sole cause of PPP downlink loss.
|
||
|
||
### Strict DMA mapping and r24 DT qualification, 2026-11-13
|
||
|
||
The opt-in DMA mapping module created a separate test platform device through
|
||
an OF overlay, attached AP stream `0x19c0` to the strict default DMA domain,
|
||
and allocated three coherent pages. For each page it compared the actual CPU
|
||
backing pages from `dma_get_sgtable()` with `iommu_iova_to_phys()` at both ends.
|
||
All comparisons passed. This tested translation setup, with no hardware DMA
|
||
or IPA/BAM MMIO. The result explicitly reported `mapping_verified=true` and
|
||
`hardware_dma_verified=false`. The overlay, allocations and device were
|
||
removed afterward. The old-DT experiment also emitted context-IRQ and
|
||
device-link warnings; mapping success did not excuse those warnings.
|
||
|
||
The ANOC2 context fault SPIs 374–378 were incorrectly described as level-low.
|
||
The GIC rejected that trigger type, and SMMU setup continued without the
|
||
requested context fault handler. Candidate patch `0045` changes these five
|
||
entries to level-high. Both panel DTBs were rebuilt and the standard panel
|
||
DTB was temporarily RAM-booted with the existing release kernel and ramdisk.
|
||
The IPA device joined IOMMU group 1 and its context fault handler registered
|
||
successfully, without the earlier trigger/request errors.
|
||
|
||
| r24 DT artifact | SHA256 |
|
||
|---|---|
|
||
| `sdm660-xiaomi-platina.dtb` | `f36404a07e0cadba7bf1d41edfa3b8e9b9acfe65f7de15f364a77427952e2a25` |
|
||
| `sdm660-xiaomi-platina-boe.dtb` | `4a95727fd071ed7f68c501447b8a082074d78426d8ae08035759e31f51baf15f` |
|
||
|
||
This qualifies the DT change on the existing kernel. It does not qualify a
|
||
new r24 kernel Image or APK: the complete Image/modules build remains the
|
||
r23 build above. No boot partition was flashed.
|
||
|
||
### BAM command experiment: descriptor consumed, SRAM DMA unverified
|
||
|
||
Stopping a running modem during the first experiment was followed by an
|
||
unexpected reboot; the available record cannot identify its exact cause.
|
||
Subsequent tests used an opt-in `platina.ipa_bringup=1` RAM boot instead.
|
||
The DSP service held MSS offline from startup, while ADSP/CDSP ran normally,
|
||
and RMTFS served files without its modem start/stop option. This avoided
|
||
repeating a live modem stop.
|
||
|
||
A second reboot was localized by logging each MMIO read. Reads of AP/USB
|
||
pipe controls returned zero, but the last recorded operation was the read
|
||
of Q6 DECOMP pipe 11 at BAM offset `0x1e000`. Its bit was present in
|
||
`PIPE_ATTR_EE0`; this attribute alone therefore cannot authorize an AP read
|
||
of every advertised pipe while MSS is offline. The diagnostic now restricts
|
||
inspection to the vendor's AP/USB endpoints 0–5, requires IPA initially
|
||
disabled and MSS locked offline, and never resets global BAM or touches
|
||
Q6/WLAN pipe registers. This checks the AP/USB scope, not all hardware pipes.
|
||
The revised read-only inspection passed and unloaded normally.
|
||
|
||
The command test prepares one translated descriptor and a 16-byte
|
||
`DMA_SHARED_MEM` read at SRAM offset `0x1ff0`, with the DMA target initialized
|
||
to the inverse of the CPU SRAM sample. IPA enable precedes 32-bit CPU SRAM
|
||
access, and BCR uses the pinned vendor value `0x001fff7f`. Actual observations:
|
||
|
||
| Check | Result |
|
||
|---|---|
|
||
| Strict page mapping comparisons | Passed |
|
||
| AP/USB idle inspection and command-pipe register checks | Passed |
|
||
| BAM descriptor offset | Advanced to 8 bytes |
|
||
| BAM pipe/global status | `0x2c / 0`, including EOT without reported BAM errors |
|
||
| CPU SRAM before/after | Stable |
|
||
| DMA target after EOT | Still the initial inverse pattern |
|
||
| Low IOVA comparison, below 1 GiB | Same failure, including a further 1-second data wait |
|
||
| Command endpoint control | `0`, no delay/suspend bits set |
|
||
|
||
These observations qualify BAM descriptor consumption only. They do not
|
||
prove IPA command execution or SRAM-to-system DMA. The latest diagnostic
|
||
reports `bam_eot_seen=true`, `command_completed=false`,
|
||
`sram_bytes_match=false`, `result=-5`, and `datapath_ready=false`.
|
||
EOT without the expected bytes retains the module, driver, clock and DMA
|
||
mappings until reboot; neither forced unloading nor modem startup is an
|
||
acceptable cleanup for that state. The retained-resource path was exercised
|
||
and followed by a normal reboot into the original persistent image.
|
||
|
||
The temporary DSP/RMTFS files were restored from hash-checked backups.
|
||
ModemManager, RMTFS, modem startup, USB SSH, Mesh connectivity and battery
|
||
guard were checked after recovery. Hardware diagnostics remain opt-in and
|
||
the production v2 transport guard remains enabled. Kernel module builds
|
||
passed normal modpost with matching Clang/KCFI. The final source also restores
|
||
the device DMA masks on normal cleanup and checks BAM errors during the
|
||
post-EOT data wait; that final cleanup revision is compile-checked, not
|
||
live-qualified. The 191-test regression suite
|
||
passed with one skip; project/public-index checks still have their existing
|
||
tracked-path/private-pattern failures and are not reported as passing.
|
||
Wi-Fi scanning works after recovery, but the saved hotspot was absent from
|
||
the scan results and reconnect timed out; automatic connection remains set.
|
||
|
||
Evidence is retained outside the public source tree in
|
||
`reports/cellular-20261112/`: `dma-test-live-path-fix.log`,
|
||
`ram-boot-r24-live.log`, `bam-inspect-reboot-pstore.log`,
|
||
`bam-ap-inspect-live.log`, `bam-command-bytes-live.log`,
|
||
`bam-command-low-iova-live.log`, and `final-device-recovery.log`.
|
||
The next hardware milestone is actual command-engine execution and DMA
|
||
writeback. Memory/table initialization, WAN RX/TX, modem QMI initialization,
|
||
RMNET/MAP delivery and restart recovery remain incomplete.
|
||
|
||
The subsequent source-only investigation adds explicit observations of BAM
|
||
control, configuration bits, descriptor summing threshold and the cached
|
||
core-clock request. The Android comparison is recorded in
|
||
[`INITIALIZATION.md`](../project/cellular/ipa-v2/INITIALIZATION.md), including
|
||
the v2.6L-specific configuration branch and IPA's explicit threshold of 16.
|
||
These added reads have not been compiled or live-tested. USB SSH stopped
|
||
responding during the follow-up connectivity check, and neither the direct
|
||
nor phone-proxied build connection was available. No new module was loaded
|
||
and no service or boot change was made in that follow-up; prior recovery
|
||
checks above describe the last verified state, not a new health check.
|
||
|
||
QMI configures the modem and its bearers. A WDS start-network response alone
|
||
does not provide an IP packet transport. The software experiment above uses
|
||
GLINK/PPP for payloads and QMI for modem control.
|
||
|
||
Primary references in the pinned Xiaomi source are
|
||
`arch/arm/boot/dts/qcom/sdm660.dtsi`,
|
||
`drivers/platform/msm/ipa/ipa_v2/ipa_reg.h`, `ipa.c` and `ipa_utils.c`.
|
||
The running kernel's `drivers/rpmsg/rpmsg_char.c`, `rpmsg_ctrl.c` and
|
||
`qcom_glink_native.c`, plus `include/uapi/linux/rpmsg.h`, define the RPMsg
|
||
binding, receive-intent and signal APIs used by this experiment.
|
||
|
||
## IPA v2.6L BAM transport qualification, 2026-11-17
|
||
|
||
Candidate recipe **7.2.12-r25** replaces the `r24` unsupported-transport guard
|
||
with an implemented SDM660 IPA v2.6L BAM transport (`ipa_v2_bam.c`) derived from
|
||
Xiaomi `platina-o-oss` (`0bb2780bccb9c7e05f0edf5db8860e779179b5f9`):
|
||
|
||
- **Device tree & clock/bus votes (`0042`, `0045`)**: IPA registers at
|
||
`0x147c0000`, BAM at `0x14784000`, level-high BAM IRQ (SPI 432), ANOC2 SMMU
|
||
stream `0x19c0` with level-high context fault IRQs, core clock (`RPM_SMD_IPA_CLK`,
|
||
75 MHz), and `a2noc`/`gnoc` interconnect bandwidth votes (`memory` and `config`).
|
||
- **AP/Modem ownership & XPU boundaries**: AP never asserts global IPA or BAM
|
||
SW resets while MSS (`4080000.remoteproc`) is running and never accesses
|
||
Q6/restricted IPA MMIO apertures (`0x2000..0x4fff`). Pipe 3 (`CMD_PROD`) drives
|
||
128-byte-aligned DDR/SRAM routing, header, and filter table initialization via
|
||
`BAM_DESC_FLAG_IMME` immediate commands before starting the QMI service `0x31`
|
||
handshake with MSS.
|
||
- **Filter polarity (`IPA_V2_FILTER`)**: On IPA v2.6L (`ipa_reg.h`), bit 0 of
|
||
`0x0048` (`IPA_V2_FILTER`) is `FILTER_DIS` (`0` enables filtering, `1`
|
||
disables it). Writing `0` ensures modem UL filter entries route QMAP traffic
|
||
to Q6 LAN consumer pipe 8 rather than falling back to AP pipe 2.
|
||
- **Idle UL aggregation flush (`ep[8]`)**: Q6 configures `ep[8]` (`Q6_LAN_CONS`)
|
||
with HW aggregation (`aggr = 0x1907f1`, `AGGR_SW_EOF_ACTIVE = 0`). After TX
|
||
ring completion leaves no pending TX slots, a workqueue waits for `ep[8]` to
|
||
exit suspend (`ENDP_INIT_CTRL(8)` bit 0 clear) and submits `IPA_REGISTER_WRITE`
|
||
(`opcode = 12`) on pipe 3 (`CMD_PROD`) to pulse `BIT(22)` (`AGGR_FORCE_CLOSE`)
|
||
on `IPA_ENDP_INIT_AGGR(8)` (`0x0340`), flushing isolated single UDP/SYN
|
||
packets immediately.
|
||
- **Single-frame QMAP RX & ring indexing**: Pipe 5 (`APPS_WAN_CONS`) uses
|
||
`IPA_BYPASS_AGGR` (`0`) to match `rmnet_ipa.c` non-deaggregated mode and
|
||
mainline `rmnet`'s default `qmapmux0.0` format, with exact 1:1 repost descriptor
|
||
buffer indexing in both `LAN_CONS` and `WAN_CONS`.
|
||
|
||
### Live verification on China Unicom 4G LTE (`46001`, APN `3gnet`)
|
||
|
||
Tested on the phone over `qmapmux0.0` (strict `SO_BINDTODEVICE` / `-I qmapmux0.0`):
|
||
|
||
- **Isolated single-packet UDP DNS from idle** (2.5 s sleep before each query,
|
||
confirming `ep[8]` wake and flush): `221.11.1.67` (`36.3 ms`), `223.5.5.5`
|
||
(`70.4 ms`), `119.29.29.29` (`63.6 ms`), all `rcode=0` with 3 answers on the
|
||
first packet.
|
||
- **TCP DNS & TCP+TLS HTTPS**: TCP DNS to `223.5.5.5:53` connected in `68.4 ms`
|
||
(`total 126.5 ms`, `rcode=0`); three HTTPS `GET /` requests to `www.baidu.com`
|
||
connected in `38.7–45.6 ms` and returned `HTTP/1.1 200 OK` (`18160` bytes each).
|
||
- **Sustained RX wraparound**: 100-packet ICMP ping (`-i 0.1 -c 100 223.5.5.5`)
|
||
completed with `100/100` received (`0%` loss, `min/avg/max = 34.5/35.5/52.2 ms`),
|
||
`lan_rx = 0`, and increasing TX/RX counters on both `rmnet_ipa0` and `qmapmux0.0`.
|
||
- **Disconnect/reconnect & coexistence**: Three consecutive
|
||
`platina-cellular --down` / `--up` cycles reassigned fresh IPv4 leases, passed
|
||
ICMP + idle single-packet UDP DNS, emitted zero MPSS/SMMU/IPA errors in
|
||
`dmesg`, and kept USB NCM SSH (`usb0`), EasyTier (`tun0`), `ath10k_snoc`
|
||
(`wlan0`), and `platina-battery-guard` operational. Route priority follows
|
||
Wi-Fi (`metric 600`) > `platina-cellular` (`ipv4.route-metric 700`) >
|
||
`platina-usb` (`route-metric=2000`), ensuring unbound traffic uses 4G LTE
|
||
rather than USB host sharing when Wi-Fi is disconnected.
|
||
|
||
## Completion criteria
|
||
|
||
Keep cellular Internet status unverified until an interface-bound public
|
||
DNS or TCP exchange succeeds, repeated calls recover reliably, and a
|
||
sustained test confirms actual IP receive counters increase. Only then add
|
||
an automatic service, route priority, DNS policy and EasyTier failover tests.
|
||
SIM-ready, LTE registration, IPCP and PPP control-byte counters are separate
|
||
milestones and cannot substitute for that final packet-delivery test.
|