cs_native4k_prepare reads the whole signed range of a file with 16K page hashes before its signature is published. For the 3 GB dyld shared cache that happens in launchd at every boot, and the cached 16 KiB reads filled the page cache: on the TB128FU free memory went from 3.4 GB to 170 MB in the 42 s before the first daemon started, and those daemons then started under memory pressure. Read 1 MiB per vn_rdwr and use IO_NOCACHE for files above 32 MiB (executables are faulted in right after their signature is added and stay cached). Export the time spent in the reads and in the hashing and the bytes read (cs_native4k_read_ticks, cs_native4k_hash_ticks, cs_native4k_bytes) so a board can show what the boot pays. TB128FU: free memory stays at 3.3 GB through the stall and the first frame moved from 96 s to 86 s. The counters show 3141 MiB in 53 files, 28.9 s in the reads and 11.0 s hashing: the stall itself is bound by the storage driver, so larger reads alone do not shorten it.
English | 简体中文
UniXNU
🎉 News: The native Metal GPU driver is now fully working on the Xiaomi Pad 6S Pro (sheng). The render server composites the system UI through the Adreno 740, and listed processes get their own Metal devices. See the Adreno 740 driver documentation.
An independent project to run iOS and macOS on non-Apple ARM64 hardware through UEFI.
Documentation
The documentation is at unixnu.com. It covers the boot chain, the build driver, device porting, driver development, the 4 KiB XNU page patches, boot arguments and per-device notes.
Repositories
| Repository | Contents |
|---|---|
| UniXNU | Build driver, UEFI boot manager, module submodules and patches |
| UniXNU-sheng | Device repository for the Xiaomi Pad 6S Pro |
| uefi-sheng | UEFI firmware port for the Xiaomi Pad 6S Pro |
Drivers and kits are independent public repositories under the UniXNU organization, included as submodules. Clone with --recurse-submodules, or run git submodule update --init --recursive.
Device repositories use the same layout as this repository. Their modules override modules with the same name, and their package/ becomes a kit in the build tree.
Contributing
Read CONTRIBUTING.md for the repository scope, the development workflow, the commit format and the documentation rules.
Private blobs
Do not add Apple IPSW files, kernelcaches, disk images, trust caches, Data seeds or vendor firmware to this repository. Keep them in a local cache or external storage.
License
BSD-2-Clause-Patent. See LICENSE.