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

boot-args catalogue: metal_watch and ca_metallib (inject.c), regenerated

shimoku74b9f6d49b9904
diff --git a/configs/boot-args.lst b/configs/boot-args.lst
index 3147932..8e92eee 100644
--- a/configs/boot-args.lst
+++ b/configs/boot-args.lst
@@ -62,6 +62,7 @@ bt k
bt_again k
buttons k
buttons_steps k
+ca_metallib u
ca_vbl u
caenv u
cam kl
@@ -150,6 +151,7 @@ loader_return_after kl
machine_name k
membench k
metal ku
+metal_watch u
mic k
mic_adc k
mic_input k
diff --git a/configs/symbols.tsv b/configs/symbols.tsv
index 3b981c3..09b76e5 100644
--- a/configs/symbols.tsv
+++ b/configs/symbols.tsv
@@ -57,6 +57,7 @@ BT arg bt User space k hakios.bt.c
BT_AGAIN arg bt_again User space k hakios.bt.c the second look this many seconds later (0: no second look; 30)
BUTTONS arg buttons Touch and buttons k hakios.buttons.c
BUTTONS_STEPS arg buttons_steps Touch and buttons k hakios.buttons.c
+CA_METALLIB arg ca_metallib User space u inject.c
CA_VBL arg ca_vbl User space u inject.c CoreAnimation's frame clock from the display driver's refresh notifications
CAENV arg caenv User space u inject.c,inject_sb.c CoreAnimation's switches here as in the window server (inject.c), set before QuartzCore reads them
CAM_AFTER arg cam_after Cameras k hakios.camera.c
@@ -136,6 +137,7 @@ HAPTIC_EFFECT arg haptic_effect Haptics and torch k hakios.haptic.c
MACHINE_NAME arg machine_name CPU, memory and boot k GenericARMPE.cpp
MEMBENCH arg membench CPU, memory and boot k hakios.cpufreq.c
METAL arg metal GPU and display ku HakiosMetal.m,MiniIOMobileFramebuffer.cpp only the program metal_test (userland/src/metal_test.m): the safe level, for seeing what Metal does with the device
+METAL_WATCH arg metal_watch User space u inject.c
MIC_ADC arg mic_adc Audio and battery k hakios.mic.c
MIC_INPUT arg mic_input Audio and battery k hakios.mic.c
MIC_MAIN arg mic_main Audio and battery k hakios.mic.c
diff --git a/docs/boot-args.md b/docs/boot-args.md
index ba4e1b6..6092d6f 100644
--- a/docs/boot-args.md
+++ b/docs/boot-args.md
@@ -2,7 +2,7 @@
Made by `tools/boot-args.py --markdown`; CI fails if it is out of date with the source (`tools/boot-args.py --check`).
-Every argument that the kernel, the loader or user space of this port reads, and which file reads it. **328 arguments**: 276 read by the kernel, 14 by the loader, 48 by user space (one is read in more than one place).
+Every argument that the kernel, the loader or user space of this port reads, and which file reads it. **330 arguments**: 276 read by the kernel, 14 by the loader, 50 by user space (one is read in more than one place).
This is a catalogue of what exists and who reads it, not a manual. What an argument means is in the head of the file that reads it. The stable switches have a symbol in the configuration (`tools/hakios-config.py help SYMBOL`, `docs/configs.md`); the rest are the knobs of bring-up (a driver's steps, pauses, traces, test modes) and can change with the driver. Any of them can be given in a configuration with `CONFIG_BOOTARGS="name=value ..."`, which checks that each name is in this list.
@@ -395,13 +395,14 @@ Layers: **K** the kernel, **L** the loader, **U** user space (through `sysctl ke
| `ufs` | L | `loader.c` | `CONFIG_UFS` | |
| `ufs_probe` | L | `loader.c` | `CONFIG_UFS_PROBE` | |
-## User space (16)
+## User space (18)
| Argument | Layer | Read by | Configuration | Set by |
|---|---|---|---|---|
| `autounlock` | U | `inject_sb.c` | `CONFIG_AUTOUNLOCK` | |
| `bt` | K | `hakios.bt.c` | `CONFIG_BT` | |
| `bt_again` | K | `hakios.bt.c` | `CONFIG_BT_AGAIN` | |
+| `ca_metallib` | U | `inject.c` | `CONFIG_CA_METALLIB` | |
| `ca_vbl` | U | `inject.c` | `CONFIG_CA_VBL` | |
| `caenv` | U | `inject.c`, `inject_sb.c` | `CONFIG_CAENV` | |
| `cc_fade` | U | `inject_sb.c` | `CONFIG_CC_FADE` | |
@@ -410,6 +411,7 @@ Layers: **K** the kernel, **L** the loader, **U** user space (through `sysctl ke
| `glno` | U | `inject.c` | `CONFIG_GLNO` | |
| `glsb3` | U | `inject.c` | `CONFIG_GLSB3` | |
| `glyes` | U | `inject.c` | `CONFIG_GLYES` | |
+| `metal_watch` | U | `inject.c` | `CONFIG_METAL_WATCH` | |
| `root_apfs` | U | `init.c` | `CONFIG_ROOT_APFS` | |
| `sb_delay` | U | `inject_sb.c` | | xl (XL_SB_DELAY) |
| `switcher_wallpaper` | U | `inject_sb.c` | `CONFIG_SWITCHER_WALLPAPER` | |