#
#asahi-dev · 2026-07-23 22:08
yukaI will soon re-do my dcuart / device-tree branches without the assumption that the samsung serial is broken
#asahi-dev · 2026-07-23 22:07
yukaadded typedefs for the function pointer signatures
#asahi-dev · 2026-07-23 22:04
enverbalalickeyboard also works...
#asahi-dev · 2026-07-23 22:02
chaos_princesspossible but cursed and probably not worth it
#asahi-dev · 2026-07-23 22:02
yukamaybe it's possible with macros, I wouldn't know how
#asahi-dev · 2026-07-23 22:01
yukaThe problem with a macro is stuff still needs to happen after the user-specified code (shutdown the tps, shutdown the bus)
#asahi-dev · 2026-07-23 22:01
yukare typedefs of course
#asahi-dev · 2026-07-23 22:00
chaos_princessok, i am going to complain about style straight away: 1. please never function pointer w/o a typedef. 2. Can we make it similar to linux kernel style _foreach macros?
#asahi-dev · 2026-07-23 21:59
yukayay for net -50 loc
#asahi-dev · 2026-07-23 21:59
yukafirst go at foreach_hpm: https://github.com/AsahiLinux/m1n1/pull/636
#asahi-dev · 2026-07-23 21:57
JamesCalligeros[m]Which…. Did not have the new dcp driver in it
#asahi-dev · 2026-07-23 21:57
JamesCalligeros[m]It was because the Image.gz was from the last kernel build i did before moving to efi image builds :p
#asahi-dev · 2026-07-23 21:57
JamesCalligeros[m]I think i spent 3 days last week trying to figure out why run_linux_guest wasnt working
#asahi-dev · 2026-07-23 21:56
j`eyenverbalalic: right of passage
#asahi-dev · 2026-07-23 21:56
enverbalalicthe moment i realized that made me want to run head first into a wall
#asahi-dev · 2026-07-23 21:55
chaos_princesswelcome to the club :P (also done similar mistakes before)
#asahi-dev · 2026-07-23 21:55
yukagood that it's working now :)
#asahi-dev · 2026-07-23 21:55
yukaoh no
#asahi-dev · 2026-07-23 21:54
enverbalalicmy proxyclient linux.py has been referencing that Image.gz file for the last 25 days...
#asahi-dev · 2026-07-23 21:54
enverbalalicyuka... dc uart, earlycon and console works on 6041... i figured out what i have been doing wrong... it's too embarrassing to even write here... when i first cloned asahi kernel and compiled it, for some reason i copied over linux/arch/arm64/boot/Image.gz to linux/Image.gz
#asahi-dev · 2026-07-23 21:53
chaos_princesss/matters/is useful/
#asahi-dev · 2026-07-23 21:53
chaos_princessnot in a way that matters
#asahi-dev · 2026-07-23 21:52
yukalike, do they expose SPRR inside VMs at all
#asahi-dev · 2026-07-23 21:51
yukasince the VM environment (that I know of) looks more like raw boot mode
#asahi-dev · 2026-07-23 21:50
yukais the question if the non-vm xnu kernels can run inside NV (or a macOS VM at all)?
#asahi-dev · 2026-07-23 21:49
chaos_princessthinking of it, NV has literally the same problem as sptm emulation, just steal code from them
#asahi-dev · 2026-07-23 20:34
svensecure kernel is gonna be extra fun. i think i could even prototype all this on an M3 by just pretending it doesn't have GXF/SPRR before trying bring up on M4 or M5
#asahi-dev · 2026-07-23 20:31
chaos_princessand the above cursed discussion is on how to do it
#asahi-dev · 2026-07-23 20:30
chaos_princessthe whole thing is that we can't but we are going to do it anyway
#asahi-dev · 2026-07-23 20:30
jmax[m]Makes sense. Didn't know we could run SPTM in raw object mode. Thanks for the explanations!
#asahi-dev · 2026-07-23 20:26
chaos_princess*run in
#asahi-dev · 2026-07-23 20:26
chaos_princesswe will not be doing any fancy memory remapping, beyond trapping whatever the currently active tracer needs, and stealing a bit of memory for m1n1 to run it
#asahi-dev · 2026-07-23 20:26
svenstill need to mull this over a bit more but this is starting to sound like feasible plan
#asahi-dev · 2026-07-23 20:25
chaos_princessdarts are also managed by sptm, but also, who cares it is all memory accesses from el1 anyway
#asahi-dev · 2026-07-23 20:25
svenSPTM will still do all the mapping, we'll just translate them to something the CPU understands in raw boot mode
#asahi-dev · 2026-07-23 20:25
chaos_princessand sptm will be doing the mapping, just indirectly, as m1n1 will trap it's attempts to modify page tables and do whatever m1n1 needs to do
#asahi-dev · 2026-07-23 20:25
jmax[m]Ah! And darts are managed directly by XNU (via mmio based driving and configuration of the darts) and not by SPTM?
#asahi-dev · 2026-07-23 20:24
chaos_princessnot via cpu page tables
#asahi-dev · 2026-07-23 20:24
chaos_princessdevice pages are mapped via darts
#asahi-dev · 2026-07-23 20:23
jmax[m]CPU level page table mappings (since we can intercept CPU EL2 faults) how do we use this approach for device mappings (like GPU) when we can't trap device faults gracefully? I assume XNU uses SPTM to map both CPU pages and Device pages. Hopefully my question is not complete nonsense lol
#asahi-dev · 2026-07-23 20:23
jmax[m]This may be a dumb question (I'm only understanding like 10% of what is being discussed here about sprr shadow pages). Is this to allow for running XNU under m1n1 in raw object mode? And this effort is to make it so we can teach m1n1 which page tables XNU needs so that m1n1 can map them for XNU (instead of SPTM doing it)? And we do that through brute force by mapping the tables only when XNU traps when trying to access them? If this handles
#asahi-dev · 2026-07-23 20:14
sventhough... what would GL0 do? i don't think it even wants anything like JIT
#asahi-dev · 2026-07-23 20:12
svenGL0 is probably another story though i guess
#asahi-dev · 2026-07-23 20:12
sventhen adjusting the commpage (or some other place) should be enough to at least prevent EL0 from accessing anything fancy
#asahi-dev · 2026-07-23 20:12
svenmacos vms have the same userspace as bare-metal macos, don't they?
#asahi-dev · 2026-07-23 20:03
sventhis is all gonna be so very cursed. i think i love it :D
#asahi-dev · 2026-07-23 19:58
svenmaybe commpage is enough because that's where it gets the values from
#asahi-dev · 2026-07-23 19:58
svenyeah, maybe
#asahi-dev · 2026-07-23 19:58
chaos_princesswe are breaking SIP anyway
#asahi-dev · 2026-07-23 19:57
chaos_princessok, but like, it is in libsystem.B.dylib or whatever, can't we just patch the on-disk copy

plus ›