OnePlus 6 (A6003), 8 GB RAM / 128 GB storage, arm64 only (no FEAT_PAuth) (dragon120820)
OnePlus 6 (A6003) / SDM845 / Cortex-A75+A55, arm64 only (no FEAT_PAuth). Skeleton record: every area is planned; inputs below are measured facts, not verified implementation.
Source record: porting.toml, be6d48abe8e9a4604980db220ae57e36f5f001d3.
This page is generated from the device record.
| Area | Status |
|---|---|
| Configuration | planned |
| Firmware and boot | device-verified |
| CPU and interrupts | planned |
| Memory and DMA | planned |
| Storage and root | planned |
| Display | planned |
| Input | planned |
| GPU | planned |
| Network | planned |
| Audio | planned |
| Power | planned |
| Image assembly | planned |
| Diagnostics | planned |
Configuration
planned
Components: ArmDTPlatform, ArmCpu, XnuPrelink, DarwinBoot.
Hardware and dependencies
- SoC: SDM845 (Qualcomm codename Napali) [MU]. No upstream UniXNU-sdm845-common exists; this SoC layer must be created [DOC].
- CPU: 4x Cortex-A75 (part 0x803, rev 12) + 4x Cortex-A55 (part 0x802, rev 13); MIDR_EL1(cpu0) = 0x00000000517f803c [LOCAL].
- CPU features: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp. No sha3/sha512/dcpop/sve, no FEAT_PAuth -> arm64 profile only [LOCAL].
- OS profile: ios-16.7.16-20H392 (supercedes the ipados-17.7.11-21H461 entry whose kernelcache_sha256 f18b4df865405f2a287b84977d7aca745e056d656d9fc9df1662970ce2969de7 no longer applies: no kernelcache pin is recorded for 20H392 yet). The profile lives in the UniXNU fork dragon120820/UniXNU as profiles/os/ios-16.7.16-20H392; slide -0x1000000 is kept because the kernel link address does not change with the userspace build [LOCAL].
- SKU: 8 GB RAM / 128 GB storage -> dram_size 0x200000000; do NOT inherit the 6 GB 0x180000000 value from bringup [LOCAL][PORT].
- DTS: dts/enchilada.dts does not exist in any candidate repository; it must be authored. Required ADT roots: /cpus /arm-io /defaults /options [DOC].
Configuration
- Pin the SDM845 SoC commit and record every board.toml override; no REQUIRED_ placeholder may remain before build.
Procedure
- Fill board.toml [board] [components] [kernel] [kernel.prelink] [firmware] [bootimg] [payload] [payload.adt] from the inputs above, then run scripts/package.sh --check --os ios-16.7.16-20H392.
Development findings
- Upstream registers all three enchilada repositories as format 1 legacy, so a format 2 device repository must be created rather than migrated in place.
- Format 2 key names differ from the skeleton draft: [device_tree] takes source/include_dirs (not path), [kernel] patch_series is a list of series files (a bare string is iterated character by character by scripts/unixnu/patches.py:12), and [package] unixnu plus [package.defconfig] are required by templates/package.sh and scripts/unixnu/config.py:154-159 [DOC]
- A board.toml that restates [kernel.prelink] roots or kernel replaces the 31 roots and the kernel path the OS profile supplies, because profiles.load() merges dicts per key; the skeleton therefore sets only slide and early_security_init [DOC]
- board.toml must carry schema_version = 2: scripts/unixnu/config.py:127 defaults to 1 and then loads a legacy board, which silently skips the whole device-tree and payload path [DOC]
- The package workflow under .github/ runs the device repository on a GitHub macOS runner because no local host has Xcode or compression_tool: the check mode passed in 1m42s and the check-deps mode passed after downloading the 4.7 GiB IPSW and decompressing its kernelcache [HOST]
- The kernel mode needs the workflow token, not just a macOS host: scripts/prepare-xnu-source.py restores 26 DriverKit headers through the anonymous GitHub contents API, which returned HTTP 403 rate limit exceeded on the fourth run, so the preflight step now exports GITHUB_TOKEN [HOST]
- profiles.load() merges dicts per key but replaces ordinary arrays, so board.toml must repeat the complete arch, SoC, OS and device lists: a two-entry patch_series dropped all 56 arm64 patches and 3 IPSW patches, and a one-entry config_fragments dropped arch:configs/common.config. The first kernel run failed on make_symbol_aliasing.sh looking for availability.pl inside the Xcode SDK, which patches/xnu/local-availability.patch exists to fix; the check now reports 60 patches instead of 0 [DOC]
- kernel.archives has the same replace-not-append rule and archive_plan() also rejects a selected component that no component: entry names: selecting RamBlock without adding it to archives failed the second kernel run with [kernel] archives needs component entries for: RamBlock, so board.toml now repeats the eight arch entries and appends component:RamBlock [SRC]
- The firmware stage does not need the 41 proprietary inputs published anywhere: Mu-Silicium and its Device-Binaries submodule are public repositories, and Device-Binaries HEAD equals the pinned 9f4dbfd7, so a CI job can clone exactly what upstream already serves. The workflow therefore gained a firmware mode that checks out Project-Silicium/Mu-Silicium at 8471e47f, applies the UniXNU payload patch in the checkout only, and runs unixnu build firmware [HOST]
- The firmware FD is not uploaded (the workflow publishes logs only), so the firmware step prints sha256sum of SILICIUM_UEFI.fd; without that the build has no recordable identity [HOST]
- mode=bootimg packs the built FD with BootShim, the device DTB and mkbootimg into boot.img, uploads it as an artifact (with boot.json recording image_sha256, fd_sha256, dtb_sha256), and never touches a device; the device-side fastboot boot remains a separately authorised step [HOST]; the B7 pin repair now runs in every build mode (bootimg needs it too) [HOST]
- SUPERSEDED (2026-11-07 14:16): an earlier patch dropped the ARM64 kernel header from the boot shim; that direction was wrong. The ABL inflates the gzip kernel package and requires an ARM64 Image header, so a headerless shim dead-loops in fastboot. Now fixed by mu-silicium-bootshim-image-header.patch: BootShim.S Image Size = FD_SIZE + (_Payload - _Head), keeping requires_kernel_header = true; header_version aligned to 1; community one-byte placeholder ramdisk added. Root cause and sources: evidence/device/20261107_bootimg/root_cause_pivot.md [HOST]
- mode=bootimg first success (run 42342820777, commit 3bc0509): boot.img 1196032 bytes sha256 6b68183c..., fd_sha256 53893e2f..., dtb_sha256 0371d596... (byte-identical to the local dtc build), ramdisk_bytes 0, header_version 0, hardware_tested false [HOST]
- A git -C DIR apply patch resolves the patch name inside DIR, so the firmware step must hand it an absolute path: the first firmware run died with cant open patch device/firmware/mu-silicium-unixnu-integration.patch after sha256sum had already hashed that same relative path from the workspace root [HOST]
- The firmware FDT is not the format 2 device tree: a control experiment booted the community edk2-msm 2301.1 boot-enchilada.img to a UEFI Shell on the same ABL, which proves fastboot boot, the gzip kernel shape, the trailing DTB and the v1 header all work, so the remaining difference is our FD. Mu ships Resources/DTBs/enchilada.dtb at 555398 bytes (the same size the community image appends), while dts/enchilada.dtb is a 2697-byte working draft that starves SEC/PlatformPei of the DRAM map and reserved-memory nodes; the bootimg step now passes Mu's tree as the firmware FDT and keeps ours for the UniXNU ADT [HOST]
- UNIXNU_PAYLOAD = "1" reaches the DSC through [firmware.defines], because firmware.py:38-39 forwards that table as build -D KEY=VALUE and a command-line -D overrides the DSC default; the workflow asserts board.toml carries the key so a firmware built without the payload cannot pass silently [SRC]
- The firmware and bootimg steps now pass --target RELEASE to unixnu build firmware: unixnu --target defaults to DEBUG (cli.py:46), and the DEBUG DXE ran out of page pool on the device after APRIORI index 31, so 14 drivers failed LoadImage with Out of Resources and the six architectural protocols never appeared. Both steps keep RELEASE so a boot.img is always packed from a firmware that can actually dispatch [HOST]
- mode=package now builds the boot manager instead of refusing the stage: the arm fetches the edk2 refer tree, initialises the three submodules package/build.sh demands, runs unixnu build package --target RELEASE and fails the job unless UniXNU.efi, UniXNUDxe.efi and UniXNURamDiskDxe.efi all exist [LOCAL]. This is layer 3 of the porting guide; without it the firmware volume drops from UEFI straight into whatever the shim payload carries, which is the architecture this port had been using.
- run 42855567340 (head 207ce94, mode=package, macos-26, 3m34s) built the boot manager for the first time: UniXNU.efi 86,528 B sha256 7e4c808e45b9d3095fefac3ff4a74ed916b45f77386b808a1c8e48632b, UniXNUDxe.efi 9,728 B sha256 f19bc7454db8389290a6774e10f61ef3de0b334ee22013f1628511e, UniXNURamDiskDxe.efi 7,168 B sha256 13ddc99455b1b154d06360ed313a5ddf619270d1e2b437e8, under out/enchilada/ipados-17.7.11-21H461/enchilada/package/Build/Out/AARCH64-RELEASE [HOST]. Before this run those three files existed nowhere, so porting guide layer 3 had no product at all.
- mode=payload now produces the official ADT and payload volume, which is what DarwinBoot needs and the community ADT builder never wrote: the arm runs unixnu build kernel then unixnu build payload with --unique-chip-id (board.toml sets [payload.adt] unique_chip_id = <required>, and payload.py:157 refuses to run without a seed) and uploads payload.img plus payload.json. Because board.toml is schema_version = 2, payload.py:191-196 routes ADT generation to the official devicetree.generate(), which is the only writer of the /chosen/memory-map RAMDisk/PackedRAMDisk/TrustCache placeholders and of /chosen/darwinboot-memory-size; DarwinBoot.c:658-680 returns EFI_COMPROMISED_DATA when an input it was handed has no placeholder, so layer 4 cannot start on the mkadt.py ADT this port has used so far. This mode is also the first real test of the 46-line board DTS: generate() demands one contiguous DRAM range, /cpus with timebase-frequency and a PSCI method, all of which currently live in UniXNU-sdm845-common/dts/sdm845.dtsi behind the board file's /include/ [LOCAL].
- The stock Silicium SEC discards the x0 the previous stage enters with and never builds gSiliciumEntryArgHobGuid, so UniXNURamDiskDxe (UniXNURamDiskDxe.c:215) finds no HOB, prints "UNIXNURAMDISK: no entry argument HOB" and returns without publishing the payload volume: the menu keeps showing the built-in configuration and reports no boot entry found even when a payload ramdisk is present. A probe boot with a 2 MiB FAT12 volume carrying EFI/UniXNU/unixnu.toml with a RAMDISK PROBE entry still drew the built-in menu, which rules out ramdisk size and load address and points at the missing handoff. The same fault is recorded for marble in docs/devices/marble-milacy.md; the fix follows hanzi123-bilp/uefi-fuxi (ModuleEntryPoint.S stores x0, Sec.c reserves the tree with BuildMemoryAllocationHob because DXE otherwise maps an image over it, then publishes the GUID HOB after PlatformPeim) [HOST]
- The OS layer is no longer iPadOS: [board] os_profile now names ios-16.7.16-20H392, a profile this port adds to the UniXNU fork because upstream ships three iPadOS profiles and one macOS profile and nothing for an iPhone. profiles.py:19-30 resolves --os against the directory names under profiles/os/ and hard-codes no prefix, so a new directory is the supported extension; the workflow gained unixnu_repository and unixnu_ref inputs (default dragon120820/UniXNU) because the Check out UniXNU step had upstream pinned. The profile pins xnu-8796.101.5 with commit aca3beaa3dfbd42498b42c5e5ce20a938e6554e5, which is the Darwin 22.6.0 kernel the handset actually runs, rather than the xnu-10063.141.1 the iPadOS profile names. It carries no [kernel.prelink] section on purpose: static prelink hashes the original kernelcache of this exact build and its prelinked-kext roots are unknown for 20H392, so writing a kernelcache_sha256 or a roots list here would fail with a qualification mismatch rather than do anything useful [LOCAL].
- The kernel stage moved to macos-15, and that alone did NOT fix the iig failure. macos-26 carries Xcode 26 and macos-15 carries Xcode 16.4 (runs 42875463977 and 42877902675), and both still failed DriverKit/OSObject.iig.cpp with the compiler error no member named kernelContent in IORPC, so the Xcode version is not the variable. The real one is SDKROOT: makedefs/MakeInc.cmd line 199 derives the tool as IIG := $(shell $(XCRUN) -sdk $(SDKROOT) -find iig), and both Xcode releases ship an iPhoneOS SDK whose iig generates DriverKit code assigning IORPC.kernelContent, a field xnu-8796 does not declare. scripts/build-xnu-4k-baseline.sh line 843 already reads the value from XNU_SDKROOT and defaults it to iphoneos, so configs/enchilada_defconfig now pins CONFIG_XNU_SDKROOT=macosx: the macOS SDK keeps the ABI this xnu was written against, and it is what the installhdrs step above and blacktop/darwin-xnu-build both use for their own iOS kernels. Keeping macos-15 for the kernel and payload is still right on its own merits, since it is the image the community CI uses.
- The kernel patch series no longer starts with the arch profile. profiles/arch/arm64/patches/xnu/series is written against xnu-10063: 12 of its own 56 patches reject on xnu-8796 (SPTM under osfmk/arm64/sptm/, the IOExclaveProxy personality, SystemOS mounting and the SystemOS cryptex view in kern_exec.c, the pgz alignment validation, the freezer condition syntax fix), and stacking the series on the community sweet-* block rejects 151 of those 184 patches because the two are two implementations of the same layer. Both orders were measured on clean trees and recorded in evidence/host/20261111_arch_patch_8796/patch_base_matrix.txt, together with the finding that the community series applies 182/184 on xnu-8796.141.3 (1b191cb58250d0705d8a51287127505aa4bc0789) and that the three official arch patches this tree still needs (local-availability, cxx-flag-dependencies, kernel-sdk-root) apply cleanly on top of it. The OS profile therefore owns the whole series, and this board keeps only the SoC, OS and device lists. CONFIG_XNU_MACHINE_CONFIG=SWEET is new in enchilada_defconfig because that block brings config/MASTER.arm64.sweet instead of the KDK closed per-SoC objects the BCM2837 machine config links against; the value reaches scripts/build-xnu-4k-baseline.sh as XNU_MACHINE_CONFIG.
- The XNU stage runs on macos-26 like every other mode again. It had been pinned to macos-15 because Xcode 26 leaves IORPC.kernelContent in the DriverKit implementation it generates, a field xnu-8796 lacks; patches/xnu/iokitcpp-kernel-content.patch now carries that field behind the #ifdef KERNEL guard 10063 uses, so the original reason is gone. Staying on Xcode 16.4 is not possible for the rest of the pipeline: its clang rejects flags the archive recipes pass unconditionally, e.g. -Wno-unnecessary-virtual-specifier, and run 42946585505 stopped in component-ArmDTPlatform on exactly that. Those recipes read the compile record that patches/xnu/0186-sweet-compile-records.patch makes 8796 emit with -MJ, which is how xnu-10063 writes it; without the flag a 8796 tree builds every object and writes no record at all, so build-arm-driver.py, build-libpthread-kernel.py and build-mockfs-fixture.py all died with FileNotFoundError on IOPlatformExpert.cpo.json (runs 42909069912 and 42910519244). [HOST]
- [LOCAL] [kernel.prelink] now names the built kernel so --skip-prelink can stage it. cli.py:173 calls kernel.prelink(ctx) after every `build kernel`, and prelink() reads spec['kernel'] (kernel.py:271) before it looks at --skip-prelink, so run 42954929695 died with KeyError 'kernel' the moment the kernel finished building. The iOS profile deliberately carries no [kernel.prelink] because static prelink hashes the ORIGINAL Apple kernelcache; this port keeps the community Mach-O kernel and has no 20H392 kernelcache, so the workflow passes --skip-prelink in both the kernel and payload modes and stage_native() copies the native executable to kernel.macho after checking MH_EXECUTE/ARM64 and recording its digest. The key added here is only the path to stage from.
- [LOCAL] [payload] kernel_args now carries the bring-up command line. Run 42957359561 built the payload volume successfully but wrote an empty args field into unixnu.toml, because payload.py:117 reads board.toml [payload] kernel_args and the key did not exist; an XNU started that way has no console (debug/serial), no 4 MiB log ring (sweetlog), no root volume (rd=ufsroot0) and no framebuffer offset (sweetfb_offy), i.e. it cannot be observed at all. The 26 entries are the values this handset was brought up with on the community kernel, and check_args() validates each against a name or name=value pattern with a 1000-byte cap (this line is 372). The ADT keeps an empty /chosen/memory-map and that is fine: DarwinBoot.c:663-678 only demands a RAMDisk placeholder when the boot request carries a ramdisk, and a TrustCache placeholder when a kernel.macho.trustcache file exists - this port ships neither.
- [LOCAL] mode=chain builds layers 1-4 of the porting guide in one job, because each link is only meaningful with the next present: kernel --skip-prelink stages kernel.macho, unixnu build payload packs kernel.macho + kernel.macho.adt + unixnu.toml into the FAT volume, unixnu build firmware compiles the FD with UNIXNU_PAYLOAD=1 so UniXNU.efi, UniXNUDxe.efi, UniXNURamDiskDxe.efi and DarwinBoot are inside it, and unixnu bootimg wraps shim+FD into a boot image whose ramdisk IS that payload volume - the ramdisk the FDT describes and UniXNURamDiskDxe publishes for UniXNU to read unixnu.toml from. [payload] size_mib drops 144 to 20 for the same reason: 144 MiB was sized for the community Route 2 payload whose linked kernel was about 120 MiB and shipped in system_b, while this payload holds a 16,056,816-byte kernel.macho plus a 14,432-byte ADT and has to fit the 21.21 MiB initrd window the live FDT reports. No partition is written: everything this mode produces is loaded by fastboot boot only.
- [LOCAL] The SEC entry-argument patch is now behind a workflow input (sec_entryarg, default yes) instead of being applied unconditionally, because it is the only change the pipeline makes to SEC and the same idea killed the community boot chain twice: v1 reset the phone straight into Android and v2 hung with a black screen and no USB enumeration. Both of those predate the official chain, and every build from 2026-11-07 23:52 onward carries the patch, which is exactly when the firmware stopped reaching a panel; the builds that did light the screen (the UEFI DXE console and the UniXNU menu) were made before it existed. A panel that never lights therefore has to be bisected with the patch out: without it UniXNURamDiskDxe finds no gSiliciumEntryArgHobGuid HOB and publishes no payload volume, so the menu falls back to its built-in configuration and reports no boot entry found - that is the expected result of the bisect step, not a second failure. Layer 1 and 2 of the porting guide (UEFI runs, UniXNU runs) are what the bisect is there to prove.
- [LOCAL] board.toml [payload] now sets panic_screen = true, which makes payload.py run scripts/patch-xnu-entry-probe.py --panic-screen on a copy of kernel.macho (see the note beside the key). Every attempt whose root compatible carries xiaomi,sweet dies before bsd_init mounts the store, and the sweetlog ring only exists in the root volume's last blocks, so those runs produced a blank panel and an unchanged ring - the bisection over the /arm-io children (dropping wdt/disp0, then intc/ufshc/ufs-phy, then substituting the community ADT whole) could not name a cause because there was no observable output at all. The panic screen draws panic() on the frame buffer, so the next attempt reports the faulting file and line without a CI round trip being the only instrument.
- [LOCAL] The Mu-Silicium checkout steps now run in mode=payload as well. panic_screen needs Mu-Silicium's FrameBufferSerialPortLib/Font.h to assemble scripts/xnu-panic-screen.c - the first attempt died with 'Panic screen requires Mu-Silicium FrameBufferSerialPortLib/Font.h; set --uefi PATH' even though the payload branch already passed --uefi, because the checkout itself was gated on firmware/bootimg/chain (run 43028302925, step 14).
- [LOCAL] The payload now also asks the entry probe for stage 3: after the MMU is on the frame buffer is not mapped, so a reboot five seconds later is the only signal that the CPU got through the MMU enable. Stage 1 (blue) and stage 2 (magenta) bands were both painted on the panel with the ADT that carries xiaomi,sweet, which proves the kernel entry code ran and narrows the failure to the interval between the MMU enable and the root mount.
- [LOCAL] panic_screen and stage 3 cannot both be installed: the probe reported the panic screen occupying 0xa1f bytes from 0xfffffff007404620 up to the end of the padding at 0xfffffff007404ff0, and run 43034417057 then failed to place the stage 3 cave. One instrument per run; stage 3 is the one that answers a yes/no question about the MMU.
- [DEVICE] Stage 3 answered the MMU question: with the payload that carries no panic screen, the handset reset on its own and kept cycling, so the CPU executes the instruction that turns the MMU on. Stage 4 now moves the same reset to just after the first call to PE_init_platform in _arm_init (commit e4c84af plus this one), which asks whether the device-tree platform expert starts and returns.
- XNU keeps 8 pages of bootstrap page tables unless ARM_LARGE_MEMORY is defined, and 8 pages covers 3 GiB (2 L1 plus 6 L2, one L2 per GiB per tree). owned_memory_size was 0x130000000 (4.75 GiB), which needs 5 L2 tables per tree, so create_bootstrap_mapping wrote the KVA table past bootstrap_pagetables. The kernel then faulted the first time it touched a kernel virtual address, which is why every entry-path band before the return to _arm_init appeared and nothing after it did. It is now 0x80000000 so both trees stay inside the array. [HOST]
- [HOST 2026-11-13] Disable the completed stage-4 reset experiment explicitly with entry_probe_reset_delay=0 for both local and CI payloads. Remote board blob 8c33215f6076433485651709a81b03c782ddf1b2 still enabled delay=5 and reset_after=_PE_init_platform despite a local comment-only change. Disassembly of payload kernel fade3e9178f8ab315cb8efad9ec710bbbb4d41327c739b2f82abf0517d5e73a6 confirms arm_init at 0xfffffff007a52f5c branches to 0xfffffff007404620: BL PE_init_platform returns to 0xfffffff007404624, waits 96000000 counter ticks and issues PSCI SYSTEM_RESET. Thus absent mark2 and recurring reset were the deliberate diagnostic path, not evidence of PE return failure or Apple register access. A separately retained candidate restores only the four-byte BL; it stopped the observed reset loop on 2026-11-13 but exposed a CPU topology assertion. Configuration correction does not claim a successful iOS boot.
- [HOST/DEVICE 2026-11-13] SWEET is compiled for NO_ECORE=1 and MAX_CPU_CLUSTERS=1, with HAS_CLUSTER=0. The actual payload topology parser maps cluster-type P to physical cluster index 1 and asserts against MAX_CPU_CLUSTER_PHY_ID=0 at machine_routines.c:1055. Hardware ADT previously exported four E and four P nodes. Set payload.adt.cpu_topology=smp in the generator to encode zero (the parser defaults to CLUSTER_TYPE_SMP), keeping all eight CPU reg affinities, cpus=8, PSCI, kernel assertions and the physical E/P DTS unchanged. A controlled candidate changes exactly eight bytes in ADT, preserving kernel SHA1616a6bcf16bb5d09eeffa493045dff767299413c6d8138c9024a1b6ffaada24. Generator regression verifies default hardware mode unchanged, SMP-only classification differences and invalid-policy rejection. True asymmetric scheduling remains unimplemented. Candidate SHA9046e0b06043a2cca4187475469ac5b6e8d7db18cfa25ec30878a3b1147f9054 was flashed only to system_b; the screen confirmed topology and CPU initialization completed, reaching arm_vm_init mark33 before a framebuffer page-table assertion.
- [HOST 2026-11-14] Add a kernel-only artifact containing the unchanged native kernel and its digest record, so only XNU compiles in macOS CI while ADT, payload and firmware continue to build locally. The low-globals framebuffer fix in fork patch0205 changes the VA anchor from VM_MIN_KERNEL_ADDRESS (L1 index2046, unallocated) to LOW_GLOBAL_BASE_ADDRESS (L1 index2047, initialized), retaining every table and empty-slot assertion. This is a pending device test, not a claim of completed VM initialization or iOS boot.
- [HOST/DEVICE 2026-11-14] Patch0205 reached mark20 on the device, then pe_init_fiq panicked at pe_fiq.c:89 because the actual Mach-O calls SecureDTLookupEntry for /arm-io/gic while hardware export names it intc. Late ArmCpu::mapGic in the same image needs /arm-io/intc and a u64 stride. Add only a register-view gic alias in board ADT configuration; retain the original intc with every property and phandle. SWEET createNubs excludes gic, so the alias has only name/reg and is not a second interrupt-controller provider. Local regression requires gic.reg equal intc.reg, verifies physical GICD/GICR windows and rejects all unrelated ADT/config/kernel changes. No interrupt address, kernel code or timer INTID is changed; runtime acceptance remains pending.
- [HOST/DEVICE 2026-11-14] The gic register view passed early lookup and reached VM bootstrap. Actual Mach-O d4a337c719b05060bf7d682e404dcc84fb86178cf599bd304166cabef0d32678 registers a fixed 128 GiB zones claim but creates a kernel_map spanning only 112 GiB; vm_map_locate_space fails at vm_kern.c:3645 independently of physical OwnedSize. CONFIG_XNU_SDKROOT=macosx lets MakeInc.cmd derive PLATFORM=MacOSX and MakeInc.def emit XNU_PLATFORM_MacOSX, despite the explicit iOS deployment target. Bind CONFIG_XNU_KERNEL_PLATFORM=iPhoneOS through the build script for BOTH installhdrs and kernel make; refresh header identity on platform changes and reject stale compile records before archives replay flags. This coherently selects upstream 8 GiB/24 GiB mobile zone limits without hex-editing only a claim, enlarging the VA or removing any allocator checks. SDK tool choice and ADT/owned memory are unchanged. Static GNU make plus clang preprocessing regressions pass; a fresh native-kernel build and device acceptance remain pending.
- [HOST 2026-11-14] Run43469154987 failed final linking with five unresolved signed-overflow minimal UBSan handlers after coherently selecting PLATFORM=iPhoneOS. MakeInc.def enables native minimal instrumentation for DEVELOPMENT/DEBUG, but the custom SWEET MASTER inherited MacOSX VM groups and omitted the matching ubsan_minimal token and CONFIG_UBSAN_MINIMAL option. Fork patch0206 adds the upstream iPhoneOS pairing only to VM_DEV/VM_DEBUG and its option mapping, retaining real san/memory/ubsan_minimal.c handlers, BRK exception dispatch and startup initialization. Configuration reachability regression selects minimal only for DEVELOPMENT/DEBUG, keeps RELEASE and KASAN unchanged, and confirms upstream source selection and handler presence. This is not a complete build or device validation. No sanitizer suppression, no-op runtime or root image change is introduced; fresh kernel-only CI must validate actual code and 24 GiB zones before local payload assembly.
- [HOST 2026-11-14] Run43475194711 compiled native ubsan_minimal.o and completed final linking and STRIP mach.development.sweet, resolving the previous five missing handlers, but the workflow failed before staging because this board still selected kernel.development.sweet. Upstream MakeInc.def uses KERNEL_FILE_NAME_PREFIX=mach for iPhoneOS and kernel only for MacOSX; SDKROOT does not override this selected platform rule. Change only the explicit kernel.prelink.kernel path to mach.development.sweet, retain the generic stage_native fail-closed file/header checks and the stable output kernel.macho, with no fallback to a potentially stale kernel-prefixed file. GNU make regression now derives both platform filenames and checks the board path, reproducing the old mismatch before the fix. Fresh kernel-only CI and actual Mach-O mobile-zones and sanitizer checks are still required; no device or root image change is claimed.
- [HOST/DEVICE 2026-11-14] The mobile-platform kernel c05af6326f67b264f77b8fcc66f723b11563a0bebebe7172ec3140761cd5f18c passed VM zones and reached bootstrap_thread, then OSMetaClass::postModLoad read the unmapped parent IOAESAccelerator::gMetaClass at 0xfffffff006ae52d0. The native-only image incorrectly included the prelink-only SoftwareAES adapter plus its recorded-address bindings. Deselect SoftwareAES, remove BOTH its component archive and ordinary binding script, and explicitly override CONFIG_XNU_NATIVE_AES=n so stale archives cannot be force-loaded through the arch default. Preserve all existing SWEET BearSSL CBC and HMAC DRBG code, source archives, sanitizer and security policy settings; do not replace the parent with a stub or fabricate a key. This is a narrow native-only candidate, not acceptance of the full crypto dispatch table, Apple keybag/SEP, duplicate CPU/platform providers or a complete prelink closure. The existing bootstrap-mode setting is deliberately unchanged in this step; its source-provider/sealing contract remains an explicit follow-up rather than switching it blindly and skipping its POST/seal requirement. New kernel compilation, unmapped absolute-import rejection and runtime crypto/consumer tests are required before device use. No device or root image change is made by this configuration edit.
- [HOST 2026-11-14] Complete the native-only crypto bootstrap candidate instead of merely removing the unmapped AES class: select source mode with the pinned real software corecrypto provider and normal POST/HMAC seal. Apply source-corecrypto14-bootstrap followed by SWEET patch0208 so exactly one EARLY_BOOT PRNG provider is selected; initialize the existing bootseed via early_random before the real provider consumes and erases it. Keep register_and_init_prng assertions, default-only fips_mode, failure panics and genuine algorithms; no stub, fake device key or selftest bypass. Production-source preprocessing and local replay regressions pass, but full linking, final seal, positive POST, deliberate HMAC-corruption rejection and device crypto-consumer tests remain required. This supersedes the earlier step that intentionally left prelinked mode unchanged; it does not establish Apple hardware UID/SEP or passcode protection.
- [HOST 2026-11-14] Pin profile-aware DarwinBoot d89356e: chosen selector608 for Darwin22, default1024 for other profiles, unchanged revision/version2. All initialization, DescribeWindow and ExitBootServices retries use matching tail offsets; keep Darwin22 flags and actual zero for the audited fallback while tracking real usable memory separately. Host production-C ASan/UBSan tests pass, including changing maps and two stale keys. First firmware build was rejected because a stale parent gitlink restored the old loader; parent7d0ab7f now pins the new source and firmware output still requires verification. Kernel patch0207 validates panic DT extents and mapping and reports absent/failed/ready accurately; 27 extracted-C cases pass, but no reserved RAM or persistent reader is invented. Kernel/firmware/device acceptance remains pending.
- [HOST 2026-11-14] Run43493996576 linked the final kernel but the normal seal rejected a missing source-provider bootstrap. Actual bootstrap compilation selected sweet_prng_startup despite source mode. The wrapper passes functional defines through CFLAGS_EXTRA, an interface absent in XNU8796 MakeInc.def but present in newer XNU. Profile patch0209 backports only that CFLAGS operand, retaining native sanitizer flags, per-object overrides, assembly flags, POST and fail-closed sealing. Ordered MakeInc.def replay and ten real GNU make/clang C/C++ compile-record cases reproduce the old ignored flags, verify source and companion defines, and retain the later prelinked -U override. These small fixtures are not full PRNG compilation or device proof. A fresh fixed-SHA kernel build must still verify actual provider selection, absolute imports, final HMAC and all runtime checks; no device or root write is made by this correction.
- [HOST 2026-11-14] Run43498265413 built successfully, but independent acceptance rejected the stripped native deliverable b05cf7dc for a final-text HMAC mismatch. The build sealed only mach.unstripped after make had already emitted mach; native staging correctly copied the latter without mutation. Seal both actual outputs independently after make, retaining normal static_if processing, real POST and integrity refusal. An exact final-shell-block regression using two explicitly synthetic copies of the rejected stripped artifact reproduces old stripped rejection and verifies each corrected output while preserving the original artifact. These fixtures are not CI unstripped provenance or runtime POST. A new fixed build must pass final deliverable HMAC and all dependency/runtime gates; no device writes were performed.
- [HOST/DEVICE 2026-11-14] Fixed run43501397244 delivered native04d074d0 with valid final HMAC, 24GiB zones, native UBSan and zero canonical absolute imports. Matched608 firmware and payload were written only to boot_b/system_b. This boot reports debug_log_init unsupported because no reserved panic RAM was declared, then faults in IODTGetICellCounts from IODTMapInterruptsSharing. Actual ADT intc has phandle1 but no AAPL,phandle; the actual IOKit lookup registers only AAPL,phandle plus interrupt cells, leaving ufshc interrupt-parent1 unresolved. Export a same-value LE AAPL,phandle alias while retaining all original properties, registers, gic alias and interrupt specifiers. Real-generator regression reproduces the empty old table and verifies the only new property on intc plus consistent reference resolution; conflicts and invalid handles are rejected. No kernel NULL workaround, interrupt removal or fake panic reservation is used. New candidate runtime acceptance, default POST evidence and roots/userland remain open.
- [HOST/DEVICE 2026-11-14] AAPL,phandle candidate311ba3b8 passed the prior IOKit null-parent stop and reached PE_init_iokit ok; it now panics at pthread_shims.c:626 for callback re-initialisation. Actual native04d074d0 has two EARLY_BOOT/SECOND slots pointing to distinct community and source-archive provider tables, both from pinned libpthread514.100.2. Preserve the ABI-matched SWEET built-in provider, its real registration and56-byte synchronization storage. Set the archive source switch explicitly off, select the validated SWEET/8796 built-in owner and remove only the libpthread archive recipe. The build refuses both owners, a missing built-in source, wrong machine/version and an offline root fixture lacking a real CPU/pthread owner; other machines retain the original archive path. Do not delete the callback singleton assertion, fake successful registration or disable pthread. Local actual-shell gate and configuration/preprocessing regressions are not a final kernel/startup-table or device validation. Fresh fixed kernel-only CI must show one real selected provider, then test pthread and workqueue consumers without reflashing userdata.
- [HOST/DEVICE 2026-11-14] Run43553880577 delivered nativea8f76982 with exactly one actual SWEET pthread startup and no archive provider. Sealed payloadb5881546 was written only to system_b; a fresh photo passed callback registration and reached SweetPlatformExpert registration, with no root or launchd evidence. Actual CPU nubs still describe ARM A55/A75 only, whereas the embedded SweetCPU IONameMatch is qcom,kryo385. The actual kperf path calls ml_wait_max_cpus with an uninterruptible wait before BSD root work; no captured PC yet proves this is the current wait. The SoC DTS now adds the upstream Linux v6.12 SDM845 Kryo385 compatible to all eight CPUs, retaining ARM fallbacks, affinity, SMP policy, clocks and PSCI. Actual generator and embedded-table regression reproduces zero old matches and eight candidate matches, with only eight compatible values changed. This is source/host validation only, not CPU_ON, IRQ/IPI or root acceptance; do not bypass the wait, fabricate CPU counts or use cpus1 as a fix.
- [DEVICE/HOST 2026-11-14] CPU-compatible payload074f5a87 was written only to system_b with the same nativea8f76982 and matched608 firmware. Fresh photo971e7c8b shows SweetCPU registration, CPU1 alive with SGI1 OK, CPU2 CPU_ON accepted, and BSD vfsinit; it does not prove all eight CPUs online. The new permission fault is mac_policy_register writing mac_policy_list.freehint in DATA_CONST after machine_lockdown. Actual binary independently confirms mac_policy_initmach then protection finalization then bsd_init and late SWEET AMFI registration. Profile patch0214 moves the existing two-policy wrapper into the normal static registration interval after load_security_extensions_function and before mac_late, removes the late BSD call, and panics on either registration error. Read-only protection, native table, extension loading, policy callbacks and permission semantics remain unchanged. Target-only ordered replay and seven extracted-production-function ASan/UBSan fixtures pass, including old late-call reproduction and both registration failure cases; complete kernel and device acceptance remain pending. Existing permissive Sandbox and rootfs platform-flag compatibility policies are not complete Apple AMFI/Sandbox security and remain separate open work.
- [DEVICE/HOST 2026-11-14] Native8b0defc7 with early static MAC registration reached root and launchd, then shared-cache mapping rejected its missing SF_RESTRICTED under CONFIG_CSR. The original Manifest-verified20H392 SystemOS APFS has44 cache files with no SF_RESTRICTED, and the prior HFS image preserves matching44 cache headers; neither evidence proves current writable userdata identity or full signatures. SWEET inherited the desktop CSR/FROM_DT/BaseSystemRoot selection despite an iPhoneOS target. Patch0216 removes those three coupled tokens to select XNU8796 native iOS root/preboot-mount cache checks, retaining FREAD, VREG, MAC, root ownership and conditional signature-range validation. It explicitly declares and selects CONFIG_ENFORCE_SIGNED_CODE, additionally requiring no-untrusted-helpers and process enforcement, rather than claiming the incomplete public iPhoneOS MASTER already emits this macro. Twelve real original-doconf cases, extracted-production cache rejection gates and real signing-helper/cs_init fixtures pass with sanitizers. Default directory policy is unchanged; do not fabricate inode flags, enable CSR exceptions, skip signatures or modify cache code to succeed. This changes other CSR-conditioned debug/dtrace/mapper behavior too, and existing permissive AMFI/Sandbox plus mutable HFS are not a complete Apple security model. Candidate deployment must reject weakening arguments and debug authorization, verify actual native branch/enforcement defaults, retain all prior ABI/crypto/UBSan/MAC protections and test real userland before any acceptance. No device or root rewrite is part of this source edit.
- [HOST 2026-11-14] Fixed kernel-only run43568447607 delivered native9a18f6e4 with actual native root/preboot/UID/MAC/cache-range rejection paths, initial system/process enforcement1, disabled weakening helpers, retained early MAC registration and all prior crypto/pthread/UBSan/allocator/import gates. Independent actual-Mach-O control-flow review confirms conditional signature coverage, anonymous/zero-fill exceptions and the remaining debug-plus-disable cs_init risk; this is not complete Apple trust or AMFI/Sandbox validation. Remove the inherited launchd_unsecure_cache=1 and unentitled_ios_sim_launch=1 arguments. Original20H392 community reverse-engineering identifies the first as a launchd_cache_loader signature/AMFI bypass, while Apple8796 sources identify the second as an OSX internal iOS spawn entitlement exception; the latter strings are absent from this actual iOS native binary. These are not harmless logging flags. Current-board argument regression rejects the historical input and15 unsafe cases. Keep the cache-loader detached-signature, trust-cache and AMFI service failures observable instead of bypassing them. No new kernel build is needed for this argument-only packaging change, but regenerate and independently verify the payload, ADT, final HMAC and exact command line before any authorized B-slot device test. No device operation or root change is claimed by this edit.
- [DEVICE/HOST 2026-11-14] The matched native9a18f6e4 and argument-clean payload29837d9a were independently accepted and flashed only to authorized system_b, then the new photograph showed pmap_ttne Attempt to demote L2 block at kernel_pmap and VAfffffff002604000. Actual Mach-O and fixed-object review confirm the manual early-framebuffer L2 descriptor0x6000009c000605 covers VAfffffff002000000 through fffffff004000000, but the enumerated permanent kernel-map reservation covers only the first32MiB at low globals. This establishes a reservation ownership defect, not the precise calling stack or cache success. Patch0217 extends existing region2 to two L2 blocks only in the SWEET16KiB build, retaining the mapping/empty-slot and new non-overlap bounds, the normal FIXED_PERMANENT/PROT_NONE path and every pmap panic. Six real before/after reservation-function builds with ASan/UBSan confirm the old entire32MiB hole, all2048 new16KiB pages covered, unchanged other build branches and rejection of an overlapping image bound. Host globals remain fixtures: complete XNU construction, actual VM map reservation and device results are still required. No extra device write or root change accompanies this source fix. Do not disable the demotion guard, blindly tear down the live console, or reinstate cache-signature bypass arguments.
Completion criteria
- All source pins resolve; every selected component has a record; status shows the intended overrides and patch order.
Current limits
- Matched Darwin22 firmware and source-sealed kernels reached root and launchd, not stable iOS. Native POST runtime and consumers, true persistent logs, all-CPU/IRQ acceptance, complete AMFI/Sandbox and UID/SEP/keybag equivalence remain unverified. Original APFS metadata and old HFS headers are not current writable-root or complete Apple signature proof.
Next action
- Build and independently inspect the0217 framebuffer-VA reservation candidate after the actual0216 kernel-map L2-block panic. Verify the complete alias window is permanently reserved through pmap_virtual_region and kmem_init before normal allocation, with all existing bounds and demotion panics intact. Recheck all seven native gates, actual argument-clean payload and unchanged ADT/608 firmware before a later authorized B-slot test. Do not reinstate either cache/spawn bypass argument. Preserve early MAC/RO, single pthread/source crypto, POST, UBSan and CPU/GIC/phandles. Diagnose real dyld-cache and launchd_cache_loader signature/trust/AMFI-service failures without fabricating flags, adding bypasses, rewriting the root or declaring complete Apple security. Continue all CPU, persistent-log, root/userland, touch/UI and peripheral issues.
Evidence
Collect evidence using the next action.
Firmware and boot
device-verified
Hardware and dependencies
- Candidate: Project-Silicium/Mu-Silicium commit 8471e47f5248ebbffc2e6196b683204163efe155; platform package Platforms/OnePlus/enchiladaPkg (10 files) [MU].
- DSC: PLATFORM_GUID F8A6C376-C5D3-4F61-B911-CE778BCB5DEB, USE_CUSTOM_DISPLAY_DRIVER=1, includes NapaliPkg/NapaliPkg.dsc.inc [MU].
- Memory: PcdSystemMemoryBase 0x80000000; PcdCPUCoresStackBase 0x9FF90000; primary stack 0x40000; FD 0x9FC00000 + 0x300000 [MU].
- Display PCD: 1080x2280x32; SMBIOS OnePlus/6/enchilada/A6003/17819 [MU].
- Enchilada builds ACPI, not DTB: enchilada.fdf includes INF RuleOverride = ACPITABLE enchilada/AcpiTables.inf, and the DtPlatformDxe plus FdtBlob lines are commented out [MU].
- Required Mu patches: Auth-Service.patch, Boot-Manager.patch, Timer.patch, Usb-Bus.patch. AsmMacroLib.patch must NOT be applied (it reverts an MdePkg fix) [PORT].
- RAW.inc references Binaries/enchilada/RawFiles/{SecParti.cfg,QcomChargerCfg.cfg,BATTERY.PROVISION}; the Binaries submodule is not present locally [MU].
- Mu ConfigurationMapLib.c sets ImageFVFlashed = 0x0 and its consumer is not in the source tree; neither Mu nor edk2 uses the ImageFv partition [MU].
Configuration
- Record the firmware defines: DEVICE_MODEL=enchilada, ENABLE_SECUREBOOT=0, MEMORY_PROTECTION=TRUE, SHIP_MODE=FALSE.
Procedure
- Build via DeviceBuild.py on a host with git (build_uefi.py runs submodule update plus four git apply steps).
Development findings
- Neither UEFI candidate contains any UniXNU, DarwinBoot or initrd integration; that work is entirely ours to add.
- The integration gap is four INF plus one library mapping, not a rewrite: enchilada.dsc [Components] appends only enchilada/AcpiTables.inf while SiliciumPkg.dsc.inc:379 already supplies SEC, the DXE core and the runtime services, and same-named sections merge under EDK II semantics [MU]
- FdtLib and HobLib need no board-level mapping: enchilada.dsc:28 includes NapaliPkg.dsc.inc, which includes QcomPkg.dsc.inc, which includes SiliciumPkg.dsc.inc, where :322 maps FdtLib and :184 maps HobLib. Only UniXNULib is absent from the whole Mu-Silicium tree [MU]
- Include/DXE.inc:42-45 already lists DiskIoDxe, PartitionDxe, Fat and EnglishDxe unconditionally, so only the four UniXNU INF are missing from the FV, and APRIORI.inc needs no change because UniXNURamDiskDxe declares [Depex] TRUE [MU]
- PcdDxe self-deadlock: PcdDxe links DxePcdLib whose depex is gEfiPcdProtocolGuid; BaseTools merges library depex into module depex (FfsInfStatement.py:132-163, ModuleAutoGen.py:559-602), so the as-built PcdDxe depex is PUSH gEfiPcdProtocolGuid END and the driver never dispatches. 29 PCD-dependent drivers then starve (VariableRuntimeDxe, RealTimeClock, ResetSystem, Metronome, CapsuleRuntimeDxe, UniXNUDxe), all architectural protocols go missing and DxeCore asserts at DxeMain.c(581). Observed on-device 2026-11-07: six 'Arch Protocol not present' lines and four 'discovered but not loaded' drivers [HOST]
- CORRECTION 2026-11-07: the PcdDxe self-deadlock was real and is fixed (as-built depex is now TRUE END, re-checked in the FV; the probe reports LocateProtocol(gEfiPcdProtocol)=Success iface=9B763350), but it was not what starved the runtime drivers. A DXE dispatcher probe records LoadImage failures = 14, every one of them Out of Resources, for VariableRuntimeDxe, EmbeddedMonotonicCounter, ResetSystemRuntimeDxe, RealTimeClock, CapsuleRuntimeDxe and nine more. Cause: the workflow built the DEBUG target (cli.py --target defaults to DEBUG, firmware.py:23 target='DEBUG'), whose PE images are several times larger than RELEASE, so the DXE page pool ran out after APRIORI index 31 and the six architectural protocols never appeared, which is what DxeCore reports at DxeMain.c(581). The community image boot-enchilada-2301.1 is a RELEASE build and starts for exactly that reason. Fix: build with --target RELEASE [HOST]
- Fix: mu-silicium-pcddxe-depex.patch overrides PcdLib with BasePcdLibNull for MdeModulePkg/Universal/PCD/Dxe/Pcd.inf in enchilada.dsc, the same override upstream OvmfPkgX64.dsc carries for the same module; applied on both firmware and bootimg CI runs [MU]
- The depex override alone did not fix the device: the fifth boot (2026-11-07 16:03, image sha256 0634f37d) reached the DXE self-check with the same six missing arch protocols, and the disassembly of that image shows PcdDxe's as-built depEX is now 'TRUE END' while VariableRuntimeDxe/MonotonicCounter/ResetSystem/RTC/Capsule still wait on gEfiPcdProtocolGuid. The community boot-enchilada-2301.1 image carries byte-identical depEX for the same six drivers and does boot, so the difference is not the depEX: either PcdDxe's entry point never completes or the PCD database section cannot be read at runtime [HOST]
- Diagnostic: mu-edk2-pcddxe-probe.patch adds four DEBUG prints on PcdDxe's entry path and in PcdDatabaseLoaderLoad's GetSectionFromFfs call, so the next serial capture says which of the two fails. It is wired through Resources/MuPatches/ and [firmware] patches and removed once answered [MU]
- UniXNURamDiskDxe published no payload volume because the SEC never handed over the device tree. grep -rni daee82e6 over Mu-Silicium returns nothing: Sec.c never calls BuildGuidDataHob, ModuleEntryPoint.S discards the x0 a Linux-style boot loader uses for the flattened device tree, and UniXNURamDiskDxe returns EFI_SUCCESS with no volume when GetFirstGuidHob misses, so the menu falls back to the built-in configuration [MU]
- SEC entry-argument fix, first attempt, crashed the device: firmware/mu-silicium-sec-entryarg.patch v1 stored x0 as the very first instruction of _ModuleEntryPoint, before PlatformAssemblyInitialize installs the exception vectors and before MainEntryPoint sets SP, and Sec.c read the tree header and reserved it with BuildMemoryAllocationHob before ProcessLibraryConstructorList ran. On 2026-11-07 23:32 the image carrying it (sha256 b72ee9bd) went from Booting OKAY to no USB enumeration at all, and the phone reset into the Android boot screen with no UEFI output; the same build without the patch (sha256 58cf21ae has it, bootimg9 does not) still reaches the menu. Isolated by flashing out/bootimg10/boot/boot.img, which has the patch and a one-byte ramdisk, and losing USB, against the earlier menu run [HOST]
- SEC entry-argument fix, second attempt: the patch now moves x0 into the callee-saved x19 at entry, writes it to gSecEntryArg0 only inside MainEntryPoint after the stack is live, and in Sec.c does a single BuildGuidDataHob after ProcessLibraryConstructorList, reading no memory and reserving nothing, so a junk value is rejected by the driver instead of killing the firmware. SiliciumPkg.dec and Sec.inf declare gSiliciumEntryArgHobGuid; the integration, PcdDxe and SEC patches apply cleanly in that order on 8471e47f [MU]
Completion criteria
- Firmware image builds, enters UniXNU, publishes the framebuffer and preserves the documented memory reservations.
Current limits
- Blocked on git (build_uefi.py requires it) and on a non-Windows host for edk2; bootloader lock state also unknown.
Next action
- Package the built firmware into a boot image (the package and bootimg stages are still unimplemented), then boot it once on the device; that last step needs its own authorisation.
Evidence
host: 2026-11-07: run 42380779873 succeeded, SILICIUM_UEFI.fd sha256 5bd55aa8..., packed into a 1,626,112 byte boot.img Command:python3 ./unixnu build firmware --device ../device --os 17 --uefi ../Mu-Silicium --target RELEASE. Revision:aaaff2dfbfde8969f10ee543da40f99c919e99b1.device: 2026-11-07 22:22: the UniXNU 0.1.0 boot menu appeared on the enchilada screen; no boot entry found because no payload volume exists; zero partition writes Command:fastboot boot out/bootimg9/boot/boot.img. Revision:2b9e37c84f9e4d94de311b70c3594216bfd01801.
CPU and interrupts
planned
Components: ArmCpu.
Hardware and dependencies
- 8 cores, all AArch64: cpu0-3 Cortex-A75, cpu4-7 Cortex-A55 [LOCAL].
- Timer interrupt id 19 (armcpu-timer-intid=19) [PORT].
- CPU frequency control uses OSM: MemoryMapLib OSM 0x17D20000 + 0xB0000; GOLD_SAW4_SRM 0x17830000, SILVER_SAW4_SRM 0x17840000 [MU].
- GIC: GICD 0x17A00000 + 0x10000, GICR 0x17A60000 + 0x100000 [MU].
- PSCI via SMC (psci_method = smc in the port board.toml) [PORT].
- Observed kernel args: cpus=8, armcpu-self-ipi=1, pcpu=0xf0, sheng-smp=1 [PORT].
Configuration
- Record the CPU register list 0,0x100,0x200,0x300,0x400,0x500,0x600,0x700 used by the ADT payload.
Procedure
- Bring up one CPU first, then the remaining cores, verifying timer and IPI on each.
Development findings
- Community bisect shows the CPU reaches past msr SCTLR_EL1 and its ISB compare loop, and pmap/VM init completes; the stall is later, in root mounting.
- The kernel reports CPU part 0x803 for cpu0-3 and 0x802 for cpu4-7, but cpuinfo_max_freq says 1766400 kHz for cpu0-3 and 2803200 kHz for cpu4-7. SDM845 is 4x A75 at 2.80 GHz and 4x A55 at 1.77 GHz, so the cluster assignment follows the clocks: 0x000-0x300 are the A55 (cluster type E) and 0x400-0x700 the A75 (type P) [LOCAL]
- timebase-frequency does not appear on /cpus in the live device tree; the only clock-frequency is 0x124F800 = 19200000 on /soc/timer, and the board DTS sets timebase-frequency to that value on /cpus [LOCAL]
Completion criteria
- Every enabled CPU reaches its entry checkpoint and timer/IPI handling works on each enabled CPU.
Current limits
- No device verification; the community evidence is from a different unit (serial 4eeb4492).
Next action
- Confirm the A75/A55 mask revision against the SoC layer once it exists.
Evidence
Collect evidence using the next action.
Memory and DMA
planned
Components: ArmDTPlatform, RamBlock, ArmSmmu4K.
Hardware and dependencies
- MemTotal 7,814,464 kB (7.45 GiB); CmaTotal 204,800 kB; dram_size must be 0x200000000 [LOCAL][PORT].
- Authoritative MMIO map: Mu MemoryMapLib.c, 66 entries, which carries lengths the device tree does not [MU].
- DDR layout: Kernel 0x80000000+0x600000, DBI Dump 0x80600000+0xD20000, Hypervisor 0x85700000+0x600000, AOP CMD DB 0x85FE0000+0x20000, SMEM 0x86000000+0x200000, QSEE 0x86200000+0x4900000, DXE Heap 0x97C00000+0x5730000, Display Reserved 0x9D400000+0x2400000, FV 0x9F800000+0x400000, FD 0x9FC00000+0x300000, SEC Heap 0x9FF00000+0x8C000, PageTables 0x9FF8D000+0x3000, UEFI Stack 0x9FF90000+0x40000, Log Buffer 0x9FFF7000+0x8000, Info Blk 0x9FFFF000+0x1000 [MU].
- Six of these were confirmed independently on this unit: Hypervisor 0x85700000, SMEM 0x86000000, QSEE end 0x8AB00000, Display Reserved 0x9D400000, Log Buffer 0x9FFF7000, AOP 0x0C300000 [LOCAL].
- SMMU: Apps SMMU 0x15000000 + 0xD0000; ARM_SMMU_V3 is disabled, so this is SMMUv2 [LOCAL][MU].
- sheng owned_memory_size 0x130000000 (4.75 GiB): 3 GiB ran out of memory 2 minutes into userland [PORT].
- CONFINFLICT: Mu maps pinctrl as TLMM_EAST/NORTH/SOUTH at 0x03500000/0x03900000/0x03D00000 (11 MiB total), but Linux DT binds pinctrl@3400000 with reg 0x03400000 + 0xC00000 (12 MiB). The missing low 1 MiB holds every GPIO register (150 GPIOs at 0x1000 stride end at 0x96000). Use 0x03400000 + 0x00C00000 [LOCAL][MU].
Configuration
- Record every handoff region and the cache policy each DMA engine is given.
Procedure
- Reconcile the 66 MemoryMapLib entries against the device tree reserved-memory nodes before flashing anything.
Development findings
- The TLMM discrepancy would send every GPIO access to unmapped memory, breaking touch pinmux, buttons, panel reset and backlight enable.
- TLMM is one 12 MiB window at 0x03400000, confirmed twice: /proc/iomem reports pinctrl_regs 03400000-03ffffff and the device tree gives reg <0x03400000 0x00C00000> [LOCAL]. The firmware memory map splits it into three 3 MiB windows starting at 0x03500000, which omits the first MiB, the block holding the control registers for GPIO 0..15 [MU][LOCAL]
- apps-smmu is compatible qcom,qsmmu-v500 with reg <0x15000000 0x80000 0x150c2000 0x20> and #iommu-cells = 2, i.e. a V500 generation controller; XNU has no qsmmu-v500 driver, so ArmSmmu4K cannot be reused as-is [LOCAL]
- The ufshc node in the live device tree has no iommus property and no stream id 0x100 appears anywhere in the tree, so the community kernel arguments native-ufs-smmu-stream/mask/size/adopt have no device tree backing on this handset [LOCAL]
Completion criteria
- All handoff regions are accounted for and each enabled DMA engine accesses its allocated range with the documented cache policy.
Current limits
- /proc/iomem is unreadable without root, so the TLMM base still lacks a direct device read.
Next action
- Adopt 0x03400000 + 0x00C00000 in the SoC layer and confirm with su when root is available.
Evidence
Collect evidence using the next action.
Storage and root
planned
Components: VerifiedRoot.
Hardware and dependencies
- UFS HC 0x01D84000 (node 1d84000.ufshc), UFS PHY 0x01D87000 (1d87000.ufsphy_mem), UFS ICE 0x01D90000 (1d90000.ufsice) [LOCAL].
- Mu maps the whole controller block as UFS REGS 0x01D80000 + 0x20000, which covers HC, PHY and ICE. This differs in meaning from ShengUfs (SM8550), whose PHY base is also 0x01d80000; never copy that constant [MU].
- ICE is compiled in on the Android kernel (CONFIG_SCSI_UFS_QCOM_ICE=y); the bypass or disable decision is still open [CFG].
- Kernel uses 4 KiB pages and VA_BITS=39 (CONFIG_ARM64_4K_PAGES=y, CONFIG_ARM64_VA_BITS=39) [CFG].
- SMMU for UFS: stream 0x100, mask 0xf, apps_smmu reg size 0x80000; firmware retains 0x800f0100 in bank 2 with translation off [PORT].
- Six normal LUNs 0-5 map to sda-sdf; three well-known LUNs 49456/49476/49488 also exist [LOCAL].
- Partition map: system_a sda13, userdata sda17, boot_a sde11, boot_b sde39, vendor_a sde16, dtbo_a sde18, vbmeta_a sde17, ImageFv sde72, modemst1 sdf2 [LOCAL].
- userdata: first_lba 0x186f40, last_lba 0x1d06ffa, lba_bytes 4096 -> 28,836,027 blocks = 118,112,366,592 B = 110.00 GiB [LOCAL][PORT].
- Write windows are derived from last_lba at runtime (NativeUfs.cpp:1289-1340, 1498-1532). For 128 GB: log [30,429,179, 30,437,370] 8192 blocks; export [30,363,643, 30,429,178] 65536 blocks; store last LBA 30,175,226 (reserve 1024 MiB) [PORT].
- The community driver reports write protection unconditionally (NativeUfs.cpp:1681) while still containing three code paths that write into userdata; native-data-writeback=1 sends Data writes without FUA [PORT].
Configuration
- Record the LUN geometry, the SHNGROOT manifest policy for OS and SystemOS, and the exact reserve value.
Procedure
- Probe capacity and read the same block repeatedly before any write; derive every window from the measured last_lba.
Development findings
- Community bisect on a sibling unit isolates the XNU stall to _vfs_mountroot: NativeUfs.cpp:1093 finds !gStoreGeometry.valid || !gHost.ready, so no root layout is published without a SHNGROOT manifest.
- The storage partitions are not all on the first LUN: boot_a, boot_b, dtbo_a, dtbo_b, vbmeta_a, vbmeta_b, vendor_a and vendor_b live on LUN 4 (sde), while sda carries only system, odm, userdata, persist and the small configuration partitions [LOCAL]
- The userdata geometry of the 8 GB / 128 GB SKU is first_lba 0x186f40, last_lba 0x1d06ffa at 4096 bytes, 28836027 blocks = 118112366592 bytes = 110.00 GiB, which matches the formatted ext4 size df reports; the community port records the 64 GB SKU values 0x186f40..0xe217fa, 50.41 GiB, and those must not be used here [LOCAL][PORT]
- ImageFv on LUN 4 is 2 MiB of zeros, checked block by block at 4096 bytes with no non-zero block, which agrees with the firmware configuration ImageFVFlashed = 0x0; the first round does not use that channel [LOCAL][MU]
Completion criteria
- Host: register, clock, link and SMMU facts match the board inventory.
- Reads: SCSI capacity, GPT and known blocks are correct; OS/SystemOS windows stay within userdata.
- Root: the configured volume mounts and launchd starts. Persistence: writes survive reboot within the allocated Data region.
Current limits
- GPT bytes and partition sizes unreadable without root; the 128 GB windows above are computed, not measured on this unit.
Next action
- Measure last_lba with sgdisk once root is available and re-check every window against the table in NEXT_TASKS.md T-008.
Evidence
Collect evidence using the next action.
Display
planned
Components: GopFramebuffer.
Hardware and dependencies
- MDP 0x0AE00000; DSI ctrl0 0x0AE94000; DSI PHY0 0x0AE94400; DSI PLL 0x0AE94A00; DP PLL 0x088EA000; four CSIPHY at 0x0AC65000/66000/67000/68000 [LOCAL].
- Mu maps MDSS as 0x0AE00000 + 0x134000, which covers the DSI blocks above [MU].
- Panel 1080x2280, density 420 dpi (override 300); single backlight panel0-backlight [LOCAL].
- Community identifies the panel as samsung,sofef00 at 60 Hz; this is a third-party claim not read from this unit's device tree [PORT].
- Framebuffer: stride 4320 bytes, BGRA8888, GOP base 0x9D400000; the firmware GOP is the only early framebuffer path [PORT][MU][LOCAL].
- BootVideo.h:31 hardcodes Video[1]=1 and NativeLegacyDisplay.cpp:611 takes the firmware framebuffer, so boot-progress=2 is the only on-screen progress channel [PORT].
- Known limitation: logical resolution is widened to 2048x2732 and on-screen text is about 4 px, effectively unreadable [PORT].
Configuration
- Record DSI lane count and panel timings once they can be read; all 23 dsi-display@N nodes exist but dtbo_idx=5 selects one unspecified variant.
Procedure
- Bring up the firmware framebuffer first; DSI and panel power are a later stage.
Development findings
- The official template's KTZ8866 backlight does not apply; this board exposes a single panel0-backlight node.
Completion criteria
- A known frame appears with correct geometry and colors, then userland presentation and backlight controls work.
Current limits
- Panel compatible, DSI lane count and timings unverified on this unit; modes and edid are empty as expected for DSI.
Next action
- Read the active dsi-display node and its panel timing once root access exists.
Evidence
Collect evidence using the next action.
Input
planned
Hardware and dependencies
- Touch controller: Synaptics RMI on I2C-3 at address 0x20; controller i2c@a90000 at 0x0A90000; DT node soc/i2c@a90000/synaptics-rmi-ts@20 [LOCAL].
- Part number is S3706B (GENI I2C), per the community build script build-enchilada-touch.py producing libEnchiladaTouch.a. The Android kernel enables CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI, i.e. it reuses the S3320 driver family, which does not make the part an S3320 [PORT][CFG].
- The official ShengNovatekTouch template does not apply; this is not a Novatek panel [DOC][LOCAL].
- Buttons: soc/gpio_keys [LOCAL].
- Fingerprint: both fpc_fpc1020 and goodix_fp exist in the tree, persist.vendor.oem.fp.version=3 [LOCAL].
- Eight input event nodes event0-event7 exist, but their names are unreadable [LOCAL].
Configuration
- Record the RMI function pages actually exposed by S3706B before writing a register map.
Procedure
- Bind I2C, read the product and firmware IDs, then map touch coordinates onto the 1080x2280 panel.
Development findings
- Assuming an S3320 register layout is unsafe: the same RMI family can expose different function page layouts per part number.
Completion criteria
- Touches map to the display, simultaneous contacts keep stable IDs, release events arrive, and buttons produce expected HID reports.
Current limits
- No device verification; the S3706B identification comes from a third-party build script.
Next action
- Read the touch product ID through the I2C bus once a driver can bind.
Evidence
Collect evidence using the next action.
GPU
planned
Hardware and dependencies
- GPU is Adreno 630 at 5000000.qcom,kgsl-3d0; KGSL 0x05000000, GPU SMMU 0x05040000, GMU 0x0506A000 [LOCAL].
- Upstream components.toml has no Adreno 630 entry; only Adreno 740 is supported [DOC].
- First round keeps the GPU off by project decision.
Configuration
- No configuration in the first round.
Procedure
- Not applicable until the GPU stage opens.
Development findings
- GPU acceleration requires a new component and is out of scope for the first round.
Completion criteria
- GPU submissions complete, mapping/fence handling is correct, a known image renders, and the selected Metal client presents it.
Current limits
- Deliberately out of scope for the first round.
Next action
- Record as not-applicable for the first round once the plan confirms GPU stays off.
Evidence
Collect evidence using the next action.
Network
planned
Hardware and dependencies
- Wi-Fi and Bluetooth are Qualcomm ICNSS with an integrated WCN3990-class part, not a PCIe card: ICNSS 0x18800000 (18800000.qcom,icnss), wlan0 driver symlinks to /sys/bus/platform/drivers/icnss, module qca_cld3_wlan.ko [LOCAL].
- /sys/bus/pci/devices is empty, confirming there is no discrete Wi-Fi card [LOCAL].
- Firmware region wlan_fw_region@0x8df00000; Bluetooth transport uses BTFM SLIM (CONFIG_BTFM_SLIM=y, CONFIG_BTFM_SLIM_WCN3990=y) [LOCAL][CFG].
- MSS 0x04080000 and IPA 0x01E00000 are present for modem/IPA paths [LOCAL].
- NFC is an NXP PN5xx on I2C-1 at 0x28, controller i2c@88c000 [LOCAL].
- The official Ath12kWifi and MhiBoot components target a different (PCIe/MHI) class of hardware [DOC].
Configuration
- Record the ICNSS firmware names and the BT transport selection.
Procedure
- Treat networking as out of scope until the platform and storage stages pass.
Development findings
- The upstream network component match is wrong for this board; an ICNSS-class component would be required.
Completion criteria
- Scanning, association, address configuration and sustained receive/transmit traffic pass with the selected firmware.
Current limits
- Out of scope for the first round; no component exists upstream.
Next action
- Defer until boot, storage and display are verified.
Evidence
Collect evidence using the next action.
Audio
planned
Hardware and dependencies
- LPASS 0x17300000; SLIMbus buses at 0x171C0000 and 0x17240000 [LOCAL].
- Codec: WCD934x (snd-soc-wcd934x.ko, wcd-core.ko, snd-soc-wcd-mbhc.ko); speaker amps WSA881x (snd-soc-wsa881x.ko) [LOCAL].
- Smart amp: Maxim MAX98927 on I2C-2 at 0x3A (max98927@3a) [LOCAL].
- Also loaded: snd-soc-wcd-spi.ko, wcd-dsp-glink.ko, swr-wcd-ctrl.ko, pinctrl-wcd.ko, snd-soc-sdm845.ko [LOCAL].
Configuration
- Record the codec, amp and SLIMbus topology if audio is ever brought up.
Procedure
- Not applicable until the earlier stages pass.
Development findings
- No upstream audio component matches WCD934x plus MAX98927.
Completion criteria
- Each declared route carries the selected audio format through playback or capture and handles start/stop correctly.
Current limits
- Out of scope for the first round.
Next action
- Defer.
Evidence
Collect evidence using the next action.
Power
planned
Hardware and dependencies
- SPMI 0x0C440000 (c440000.qcom,spmi); PMIC arbiter block 0x0C400000 + 0x2800000 [LOCAL][MU].
- PMICs: pm8998, pm8005 and pmi8998 are all present in the SPMI tree [LOCAL].
- Fuel gauge: TI BQ27541 on I2C-0 at 0x55; chargers smb1355 at 0x8 and 0xc; oneplus_fastchg at 0x26 [LOCAL].
- power_supply nodes: battery, bms, dc, main, pc_port, usb [LOCAL].
- Sample reading during capture: 59 percent, 3958 mV, 33.6 C, status charging, health good [LOCAL].
- Thermal: TSENS0 0x0C222000, TSENS1 0x0C223000; 72 thermal zones and 22 cooling devices exposed [LOCAL][MU].
- APPS RSC 0x179C0000 + 0x30000 and QMP AOP 0x0C300000 are the sleep/resume path [MU][LOCAL].
Configuration
- Record the regulator and charger topology before enabling any power management.
Procedure
- Defer until the platform and storage stages pass.
Development findings
- The official ShengPlatformPower inputs are board specific and must be re-derived from the PMIC inventory above.
Completion criteria
- Declared power controls and battery readings match observations; each claimed sleep/resume transition restores its dependent peripherals.
Current limits
- Out of scope for the first round.
Next action
- Defer.
Evidence
Collect evidence using the next action.
Image assembly
planned
Components: DarwinBoot, XnuPrelink.
Hardware and dependencies
- Boot image format measured on the stock OnePlus boot.img and on LineageOS 22.2: header_version 0, pagesize 4096, base 0x0, kernel_offset 0x8000, ramdisk_offset 0x1000000, tags_offset 0x100 [PORT].
- Superseded: boot_a on this unit parses as header_version = 1 (kernel 14770103 bytes at 0x8000, ramdisk 22254283 bytes at 0x01000000) and Android boots from that slot, so the handset loads v1. The format2 boot image still defaults to v0 because v0 is the conservative shape, not because v1 is rejected [LOCAL].
- initrd window reserved by the bootloader is 0x8454D000-0x856FEF79, about 18 MiB, reported by EnchiladaBootMemoryDxe [PORT].
- Four measured payload sizes: none gives a menu with a red no-boot-entry message; 16 MiB reaches the menu and exposes USB 05C6:F000; 32 MiB resets into EDL 9008 after 68 s; 192 MiB shows no USB for 118 s and returns to fastboot [PORT].
- The 120.0 MiB figure belongs to the community VerifiedRoot build, not to this port: the kernel this device runs is 17,326,832 bytes (out/xnu_uart2/x/kernel.development.sweet) and the ADT is 12,940 bytes, so the cannot-fit conclusion was drawn from a kernel size that is not ours [LOCAL].
- Route 2 therefore applies: flash the payload into system_b (2,998,927,360 B) and build a boot image with no ramdisk [PORT].
- kernel_args are 970 bytes against a 1000-byte limit and a 1024-byte DarwinBoot buffer, leaving 30 bytes [PORT].
- ABL refuses fastboot boot after the active slot fails to boot (Load Error) and each reset consumes a retry, so set_active must precede every attempt [PORT].
- The bundled fastboot in C:\platform-tools is a 32-bit binary and raises std::bad_alloc on an 8.74 GiB raw image; sparse chunks are required [PORT].
Configuration
- Record the boot image fields and the payload volume once Route 2 is confirmed on this unit.
Procedure
- Build the payload, write it to system_b, build a boot image with ramdisk none, then fastboot set_active before each boot attempt.
Development findings
- The 18 MiB initrd window, not the ABL image size limit, is what forbids carrying the payload in the ramdisk.
- The live device tree writes linux,initrd-start 0x841c9000 and linux,initrd-end 0x856fe8cb, a 0x15358cb = 21.21 MiB window that is byte-identical to the ramdisk_size field of the boot_a header, so 21.21 MiB is what this boot actually loaded and not a ceiling. The community figure of about 18 MiB is neither: it starts 3.52 MiB higher and ends 0x6ae lower than this range, and no measurement on this unit supports it as an upper bound [LOCAL]
- boot_a parses as header_version = 1 (kernel 14770103 bytes at 0x8000, ramdisk 22254283 bytes at 0x01000000, tags at 0x100, page size 4096), which contradicts the community note that this handset refuses v1 boot images: the live slot is v1 and Android boots from it [LOCAL]
- Layer 3 of the porting guide is the boot manager, and until now it had never been built: .github/workflows/package.yml answered mode=package with the package stage is not implemented and exit 1, so UniXNU.efi, UniXNUDxe.efi and UniXNURamDiskDxe.efi did not exist anywhere. The mode now fetches the edk2 refer tree, initialises the three submodules MdePkg submodule check in package/build.sh demands (MdePkg/Library/BaseFdtLib/libfdt, MdePkg/Library/MipiSysTLib/mipisyst, BaseTools/Source/C/BrotliCompress/brotli), runs unixnu build package --target RELEASE, and fails the job unless all three .efi products are on disk [LOCAL]. This matters beyond bookkeeping: without the boot manager the firmware volume drops straight from UEFI into whatever the shim payload carries, which is the architecture this port has been using.
- The IOKit C++ ABI in xnu-8796 has no kernelContent member in struct IORPC, while the iig that ships with Xcode 16.4 and Xcode 26 generates code that reads it and designates it. iokitcpp is on unconditionally (config/MASTER:510), so the 8796 DriverKit sources cannot compile at all. Runs 42875463977 (macos-26, Xcode 26) and 42877902675 (macos-15, Xcode 16.4) failed identically, so the SDK is not the variable: macosx and iphoneos both carry that iig. patches/xnu/iokitcpp-kernel-content.patch adds the fifth field to both copies of the header under the same KERNEL guard xnu-10063 uses, so user space keeps the four-field layout. Replaying the 182-patch community series on xnu-8796.141.3 and applying this board patch last is clean; the struct grows only for KERNEL builds [HOST].
Completion criteria
- Kernel and prelink succeed, payload contains all declared inputs, and the boot image matches the bootloader format and size limit.
Current limits
- No build host; bootloader lock state unknown, which may forbid fastboot entirely.
Next action
- Confirm system_b is free and its size matches 2,998,927,360 B before planning any write.
Evidence
Collect evidence using the next action.
Diagnostics
planned
Components: DarwinBoot.
Hardware and dependencies
- Diagnostic log lives in the last kLogReserveBlocks of userdata (8192 blocks = 32 MiB) with a 256 MiB export region below it (NativeUfs.cpp:1289-1292, 1498-1532) [PORT].
- For this 128 GB unit those regions are log [30,429,179, 30,437,370] and export [30,363,643, 30,429,178] [PORT].
- Boot progress reaches the screen only through boot-progress=2; DarwinBoot prints DARWINBOOT: lines and refuses with 'boot refused: <status>; firmware retained' [DOC].
- Community probe arguments already exist: entry_probe_reset_after, entry_probe_reset_in, entry_probe_reset_occurrence, panic_screen [PORT].
- Community bisect history records 22 numbered runs narrowing the stall to _vfs_mountroot; the _load_context no-reset result is a false positive because that function does not return on success [PORT].
Configuration
- Record each probe argument and the stage it targets.
Procedure
- One probe per boot; record the last confirmed stage and the log path before reflashing.
Development findings
- No SHLOG001 dump exists in any candidate repository, so there is currently no reproducible device log to compare against.
Completion criteria
- Each claimed milestone has a reproducible command, a matching source/image revision and an accessible result.
Current limits
- No device verification on this unit; all bisect evidence comes from a sibling device.
Next action
- Establish a local log capture path before the first boot attempt.
Evidence
Collect evidence using the next action.