Skip to content

Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.

C

soc-args, device README: generate modem_ipa_fw_at from the ipa_gsi reservation, and document every soc_* argument with its device-tree source and the POCO's value -- a porting checklist; note what stays hardcoded (the IPA-4.11 SRAM layout and programming values) and that a same-IPA-version phone needs none of it changed

shimoku74a5b45d07cd92
diff --git a/devices/poco-x5-pro/README.md b/devices/poco-x5-pro/README.md
index 6f5ffcb..1533b34 100644
--- a/devices/poco-x5-pro/README.md
+++ b/devices/poco-x5-pro/README.md
@@ -49,3 +49,32 @@ line automatically (`SOC_ARGS=` to point elsewhere). The memory addresses (`soc_
`soc_mpss_mem`, `soc_imem`) come from the phone's reserved-memory nodes; add them by hand for now.
For this phone every generated value equals the built-in default, so `soc.args` changes nothing here
and is kept only as the worked example.
+
+### Every soc_* argument
+
+What `tools/soc-args.py` reads from a phone's device tree, and where each comes from. The POCO
+X5 Pro's values (the kernel defaults) are shown; another phone's are generated into its `soc.args`.
+
+| Argument | Device-tree source | POCO value |
+|---|---|---|
+| `soc_ipa_base` | `qcom,ipa` reg `ipa-base` + 0x40000 (the registers) | `0x1e40000` |
+| `soc_gsi_base` | `qcom,ipa` reg `gsi-base` | `0x1e04000` |
+| `soc_ipcc` | `qcom,ipcc` reg | `0x408000` |
+| `soc_aoss` | the AOSS QMP mailbox reg | `0xc300000` |
+| `soc_rsc` | `qcom,rpmh-rsc` reg drv-2 (the apps DRV) | `0x18220000` |
+| `soc_apps_smmu` | `apps-smmu` reg | `0x15000000` |
+| `soc_smem` | the reserved-memory `qcom,smem` points at | `0x80900000` |
+| `soc_cmd_db` | reserved-memory `cmd_db` | `0x80860000` |
+| `soc_mpss_mem` | reserved-memory `mpss` (the modem's image) | `0x8b800000` |
+| `modem_ipa_fw_at` | reserved-memory `ipa_gsi` (where the IPA firmware loads) | `0x8b710000` |
+| `soc_imem` | `qcom,msm-imem`, rounded down to its 2 MB block | `0x14600000` |
+| `soc_ipa_stream` | `ipa_smmu_ap` iommus stream | `0x480` |
+| `soc_ipa_stream_uc` | `ipa_smmu_uc` iommus stream | `0x482` |
+| `soc_pas_mpss` | `qcom,mss` `qcom,pas-id` | `0x4` |
+| `soc_pas_ipa` | `qcom,ipa_fws` `qcom,pas-id` | `0xf` |
+| `soc_ipa_fw` | `qcom,ipa_fws` `qcom,firmware-name` | `yupik_ipa_fws` |
+
+Still hardcoded (IPA-version specific, not per-phone within one IPA version): the SRAM region
+layout and the SMEM filter-table item (`ipa_4_11_mem_part`), and the Qtime/resource-group values
+the IPA is programmed with. A phone on the same IPA (4.11) needs none of these changed; a different
+IPA version is a larger port.
diff --git a/devices/poco-x5-pro/soc.args b/devices/poco-x5-pro/soc.args
index f914842..caa0b6b 100644
--- a/devices/poco-x5-pro/soc.args
+++ b/devices/poco-x5-pro/soc.args
@@ -6,6 +6,7 @@ soc_rsc=0x18220000
soc_apps_smmu=0x15000000
soc_cmd_db=0x80860000
soc_mpss_mem=0x8b800000
+modem_ipa_fw_at=0x8b710000
soc_smem=0x80900000
soc_imem=0x14600000
soc_ipa_stream=0x480
diff --git a/tools/soc-args.py b/tools/soc-args.py
index aaea0a2..51da9cb 100755
--- a/tools/soc-args.py
+++ b/tools/soc-args.py
@@ -101,6 +101,7 @@ def main():
reserved('cmd_db', 'soc_cmd_db')
reserved('mpss', 'soc_mpss_mem')
+ reserved('ipa_gsi', 'modem_ipa_fw_at') # where the IPA's firmware is loaded (the ipa_gsi reservation)
_, smem = find(nodes, 'qcom,smem')
if smem and 'memory-region' in smem:
target = by_phandle.get(u32(smem['memory-region']))