#
✕ nick:nickchan
#asahi-re · 2025-12-14 03:52
nickchanhttps://github.com/apple-oss-distributions/xnu/blob/43a90889846e00bfb5cf1d255cdc0a701a1e05a4/osfmk/arm64/machine_routines.c#L2324 a newer xnu version changed secret names into encodings
#asahi-re · 2025-12-14 03:52
nickchanfound encodings
#asahi-re · 2025-12-14 03:43
nickchan<https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/osfmk/arm64/machine_routines.c#L2333> and most of those regs are probably 1:1 mapping to arm ones so yeah go find them
#asahi-re · 2025-12-14 03:43
nickchanAGTCNTVCTSS_EL0, ACNTVCT_EL0, AGTCNTP_CTL_EL0 exists at least
#asahi-re · 2025-12-14 03:41
nickchanthere's more than AGTCNTRDIR_EL{1,2,12}
#asahi-re · 2025-12-14 03:40
nickchanthis is real
#asahi-re · 2025-12-14 03:40
nickchan<https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/osfmk/arm64/machine_routines.c#L2579>
#asahi-re · 2025-12-14 03:39
nickchanif so the register probably stands for "Apple Generic Timer Counter Redirection" or something like that
#asahi-re · 2025-12-14 03:39
nickchanOkay I recommend checking if there's a whole class of custom sysreg that behave similarly to the ones stated in the Arm docs
#asahi-re · 2025-12-14 03:36
nickchanhttps://developer.arm.com/documentation/ddi0488/c/ch09s03s01 AArch64 Generic Timer register summary
#asahi-re · 2025-12-14 03:34
nickchanhttps://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18-release-notes apple only expose 1 GHz to apps compiled with new enough SDKs... but guest & host kernel probably would appericate it if the counter didn't change in their EL
#asahi-re · 2025-12-14 03:31
nickchanApple...GT...Counter...RDIR
#asahi-re · 2025-12-14 03:31
nickchananyways back to the naming A can be taken as "Apple" and "CNT" can be taken as counter
#asahi-re · 2025-12-14 03:29
nickchanjannau: maybe check cntfrq_el0 from EL0?
#asahi-re · 2025-12-09 12:34
nickchanbut maybe that's not relvant now given the messages in #asahi-dev
#asahi-re · 2025-12-09 12:31
nickchanintegralpilot: it's a 16 byte struct so the return value would be spread across x0 and x1
#asahi-re · 2025-12-08 13:26
nickchan(i do not know the exact version used here)
#asahi-re · 2025-12-08 13:23
nickchani wonder if the same version even works in hypervisor for m1/m2
#asahi-re · 2025-12-08 13:12
nickchanhttps://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/osfmk/vm/vm_kern_xnu.h#L68 there should be something in kmr_return if the pointer is null
#asahi-re · 2025-12-08 13:11
nickchan integralpilot: kmem_alloc_guard_internal returns a struct with result code and pointer
#asahi-re · 2025-12-08 09:56
nickchanfrom your description it seems like it starts printing out logs already
#asahi-re · 2025-12-08 09:55
nickchanintegralpilot: btw what's the panic string when initializing iokit
#asahi-re · 2025-11-14 13:38
nickchanhttps://github.com/torvalds/linux/blob/e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c/drivers/nvme/host/apple.c#L1111
#asahi-re · 2025-11-14 13:37
nickchangraphine27: merely never enable them in the first place
#asahi-re · 2025-11-13 01:24
nickchan(compatible according to sven anyways)
#asahi-re · 2025-11-13 01:23
nickchanhad also tried to disable quirks on t6000 but that makes rtkit crash
#asahi-re · 2025-11-13 01:22
nickchanafter disable quirks the t8103 nvme behaves in a compatible way to t8015 nvme
#asahi-re · 2025-11-13 01:22
nickchanas for external pcie over tbt no idea
#asahi-re · 2025-11-13 01:22
nickchangraphine27: i think quirks can only be disabled in t8103
#asahi-re · 2025-11-01 06:15
nickchans/tend of/tend to/
#asahi-re · 2025-11-01 06:15
nickchanthe ones that get development builds are the ones that 3rd party kexts tend of interface with directly like iokit families
#asahi-re · 2025-11-01 06:14
nickchanmost of the "interesting" kexts for the purpose of this channel only has release builds
#asahi-re · 2025-11-01 06:13
nickchaninternally all the kexts are development builds too but in the KDK only core XNU and a few kexts are development
#asahi-re · 2025-11-01 06:13
nickchani am pretty sure the development xnu builds *are* the same as what apple uses internally, but
#asahi-re · 2025-07-18 11:12
nickchanand since you mentioned pongoOS I should assume you are on the older SoCs in which case the ID is the uint8 id1 property in the struct
#asahi-re · 2025-07-18 11:11
nickchanpmgr_adt_power_enable() pmgr_adt_power_disable() and the clock-gates property on a device node is the id property in the pmgr device struct
#asahi-re · 2025-07-18 11:10
nickchangraphine: if you come back and read the logs then about that question it should all be handled by m1n1's src/pmgr.c already
#asahi-re · 2025-04-24 12:31
nickchanone to set where to eret into after the cpu comes out of reset and one that locks down the kernel (this one is just going to be implemented as no op)
#asahi-re · 2025-04-24 12:30
nickchanand a7-a9 has el3 but since the monitor has a grand total of two smc can just implement in m1n1
#asahi-re · 2025-04-24 12:30
nickchanthis is on a10x. a11 has more APRR stuff to care about but a10 already have the basics, don't think that would be a problem
#asahi-re · 2025-04-24 12:16
nickchannow it is possible to call any m1n1 functions
#asahi-re · 2025-04-24 12:16
nickchan1. set pan, spsel 2. save gpr to kernel stack 3. save ttbr0_el1 tcr_el1 mair_el1 to kernel stack 4. recover m1n1's ttbr0 5. recover m1n1's mair 6. barrier instructions 7. branch into m1n1 8. set sp to m1n1's stack
#asahi-re · 2025-04-24 12:15
nickchanand to reenter m1n1 context from kernel's vbar in high addr it goes like this:
#asahi-re · 2025-04-24 12:14
nickchansandwiched
#asahi-re · 2025-04-24 12:14
nickchanso the m1n1 stack remain usable (m1n1 is sandwidthed between xnu and top of kernel data so xnu's init pagetables will have m1n1 mapped)
#asahi-re · 2025-04-24 12:13
nickchanthis one is kind of hacked around by writing magic values to x2 and patching how the kernel setup its stack after a cpu reset
#asahi-re · 2025-04-24 12:12
nickchandue to lack of wfi retention the cpu actually comes out of reset a lot and this one is tricking because unlike during bootup the kernel is *already* patched with undefined instructions
#asahi-re · 2025-04-24 12:11
nickchani think this is a meltdown mitigation?
#asahi-re · 2025-04-24 12:10
nickchananother problem is that when xnu is switching into EL0 xnu unmaps basically all of kernel memory by increasing t1sz in tcr, this is unacceptable for tracing, though just skipping the t1sz modifcation is enough
#asahi-re · 2025-04-24 12:10
nickchannote some nop only patches like kernel lockdown patches are still applied on boot

plus ›