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

Wi-Fi: the radio's firmware says "unified ready" over WMI

vcvkk2938d9081690
diff --git a/prebuilt/SHA256SUMS b/prebuilt/SHA256SUMS
index 3d0df26..9309033 100644
--- a/prebuilt/SHA256SUMS
+++ b/prebuilt/SHA256SUMS
@@ -1,6 +1,6 @@
-Built 2026-10-13 18:51 from this tree.
+Built 2026-10-13 19:05 from this tree.
-fdf7275d96b6b717c33d8532fa61cc70a617a8e98e10c6508d64be6105c850b5 prebuilt/mach.development.bcm2837
+0638037a3ef004965c0f674a642d45c85a72782287ff472af1bcb188ddf78a8b prebuilt/mach.development.bcm2837
1332a598d2dec00a1d8e930044e4f00a12ad44c6e5e50eecf4b7fe7fae803bf2 prebuilt/loader.efi
d2a35a4a1d6658ffb3696914f727661b52c9333de8a3af8a31642b8023ce03ac prebuilt/userland/child
1a413befd511384052e1962c1394adce20f718e1f2657ce63ab09828ebc4bd1b prebuilt/userland/cpu_test
diff --git a/prebuilt/mach.development.bcm2837 b/prebuilt/mach.development.bcm2837
index 2801b8e..cc5675c 100755
Binary files a/prebuilt/mach.development.bcm2837 and b/prebuilt/mach.development.bcm2837 differ
diff --git a/xnu/files/bsd/dev/redwood_lx.c b/xnu/files/bsd/dev/redwood_lx.c
index 7d069f1..4796579 100644
--- a/xnu/files/bsd/dev/redwood_lx.c
+++ b/xnu/files/bsd/dev/redwood_lx.c
@@ -22,6 +22,7 @@
#include <mach/vm_param.h>
#include <pexpert/pexpert.h>
#include <sys/errno.h>
+#include <sys/random.h>
#include <sys/redwood_input.h>
#include <sys/redwood_lx.h>
#include <sys/systm.h>
@@ -190,6 +191,12 @@ lx_os_wakeup(const void *address)
/* ---- the rest of the machine ------------------------------------------------------------------------- */
+void
+lx_os_random(void *buffer, unsigned long size)
+{
+ read_random(buffer, (u_int)size);
+}
+
unsigned
lx_os_option(const char *name)
{
diff --git a/xnu/files/bsd/dev/redwood_wifi.c b/xnu/files/bsd/dev/redwood_wifi.c
index 43719ad..92e2d64 100644
--- a/xnu/files/bsd/dev/redwood_wifi.c
+++ b/xnu/files/bsd/dev/redwood_wifi.c
@@ -3131,6 +3131,16 @@ static void radio_space_faults(void);
* firmware's first message is in a buffer of copy engine 2: HTC's "ready" (2 credits of 2176
* bytes, 5 endpoints). The SMMU records no fault. No interrupt is involved: the rings are
* looked at every millisecond.
+ *
+ * With htc.c and wmi.c built as well (the same day): 29 ms after the bus is started HTC has the
+ * firmware's "ready" and asks for the WMI service -- the first thing sent over a copy engine;
+ * it is given endpoint 1, up on copy engine 3 and down on 2 --, the firmware announces the
+ * radio over WMI ("service ready", in three events, within 60 ms), takes the driver's
+ * configuration and says "unified ready" 270 ms after the bus was started. Of the radio it
+ * says: one, of two chains, for 2.4 and 5 GHz (2312..2732 and 4900..7125 MHz, and capabilities
+ * for 6 GHz); the rules of the regulatory domain it starts in (CN: 2402..2482, 5170..5330,
+ * 5735..5835 MHz); and no address of its own (all zeros: the tree's "use-nv-mac" has Android
+ * give it one). Then the driver is taken down in order, mode "off" included.
*/
static bool
step_driver(uint32_t how)
diff --git a/xnu/files/bsd/sys/redwood_lx.h b/xnu/files/bsd/sys/redwood_lx.h
index 4a700c4..b6d8798 100644
--- a/xnu/files/bsd/sys/redwood_lx.h
+++ b/xnu/files/bsd/sys/redwood_lx.h
@@ -45,6 +45,7 @@ int lx_os_sleep(const void *address, unsigned long long nanoseconds);
void lx_os_wakeup(const void *address); /* everyone asleep on it */
/* ---- the rest of the machine ---- */
+void lx_os_random(void *buffer, unsigned long size); /* bytes nobody can guess */
/* a number given to the kernel when it was started ("wifi_lx=2"); 0 if it was not */
unsigned lx_os_option(const char *name);
/* a file the driver asks for by the name Linux has for it, in place: 0, or an errno (ENOENT) */