This allows booting a kernel with the firmware cpio and a cpio
containing matching modules. The modules initramfs can be prepared from
the kernel source directory with:
`make dir-pkg && usr/gen_initramfs.sh -o initramfs_mod.cpio -u squash -g squash ./tar-install/lib/`
The modules are available in /modules/$(uname -r) and the initramfs can
handle modules in the same way as the vendor firmware to make them
available for itself and the main OS.
Signed-off-by: Janne Grunau <j@jannau.net>
This add supports for concatenated (compressed) cpio archives and relies
on the kernel to decompress the initramfs.
Signed-off-by: Janne Grunau <j@jannau.net>
Nightly is messing around with alloc_error_handler and they can't seem
to make up their mind about it, breaking our CI. Just switch to stable
rust with the usual backdoor to enable unstable features (same as the
kernel does).
Signed-off-by: Hector Martin <marcan@marcan.st>
This definitely isn't going to work yet, but it's better than ending up
in the secondary loop if it ever works.
Signed-off-by: Hector Martin <marcan@marcan.st>
This lets us eliminate HV timer ticks on secondary CPUs, which should
significantly improve the scalability of this whole thing.
(We leave them at 1Hz just in case, since that much won't hurt)
Signed-off-by: Hector Martin <marcan@marcan.st>
This will be useful for CI and similar use cases, to distinguish
different machines. Also fix spurious NUL-termination of the descriptor
strings while I'm here.
Signed-off-by: Hector Martin <marcan@marcan.st>
Extra pstates only for J416c, drop the second pstate field sets (still
no idea what that does), fix a mask.
Signed-off-by: Hector Martin <marcan@marcan.st>
Put the WFI mode back how macOS expects it on boot, since it won't set
it itself. Then, also trap attempts by macOS to disable FIQs. This
happens in the sleep/core off path. It is not sufficient to make all
that work properly, but it's a start.
Signed-off-by: Hector Martin <marcan@marcan.st>
I already screwed something up in cpufreq, and it makes it difficult to
understand what happened if it happens in stage1 before the proxy runs,
and difficult to undo in stage2.
Let's move all this stuff to kboot, since it isn't necessary until then
(and this will also avoid doing unnecessary init for macOS under the
HV). If we need it in proxy scripts, we can add proxy commands for this
later.
Signed-off-by: Hector Martin <marcan@marcan.st>
I don't think that field ever did anything and Apple don't set it on
newer macOS/SoCs. Also expand DESIRED1 to T602x width.
Signed-off-by: Hector Martin <marcan@marcan.st>
Nobody can figure out where this code came from and it's broken for
devices where OSLog is actually implemented these days... let's drop it
and see if anything complains.
Signed-off-by: Hector Martin <marcan@marcan.st>
These are supposed to be after the kernel, so we'd have to move them
for the guest to be able to access them. It seems things work if we just
delete those segments.
Signed-off-by: Asahi Lina <lina@asahilina.net>
We're not using it in the end because we fixed this in Linux, but I went
through the trouble of writing the function so we might as well leave it
lying around.
Signed-off-by: Hector Martin <marcan@marcan.st>