#
✕ nick:integralpilot
#asahi-dev · 2025-12-07 11:43
integralpilothuh https://github.com/AsahiLinux/m1n1/blob/main/tools/apple_regs.json has no [3, 4, 15, 14, 6]?
#asahi-dev · 2025-12-07 11:34
integralpilottrying to fix it up now
#asahi-dev · 2025-12-07 11:34
integralpilotjust did some more debugging and now turns out S3_4_C15_C14_6 is also a problem for m1n1 hypervising XNU on M3
#asahi-dev · 2025-12-07 10:36
integralpilotoooh that would actually be quite handy, thanks for the idea! i'll try and see if i can get it to do that
#asahi-dev · 2025-12-07 10:34
integralpilotdisassemble_at in the M1N1 hypervisor python REPL has been annoying me because sometimes i accidentally use a virtual address and then the entire thing crashes and i lose m debugging state. locally i've made a change that if you use a higher half address it warns "are you sure this might be a virtual address by mistake?". its quite helpful for me but would others like this / should i submit it as a PR?
#asahi-dev · 2025-12-07 04:51
integralpilotooooh, thank you!
#asahi-dev · 2025-12-07 04:43
integralpiloti think that corresponds to s3_5_c15_c4_0 if i'm doing my maths right?
#asahi-dev · 2025-12-07 04:43
integralpilotnickchan: AFSR1_EL2 is 0x317d2a
#asahi-dev · 2025-12-03 07:25
integralpilotthank you so much nickchan for your help! i'll try that on the weekend :)
#asahi-dev · 2025-11-29 12:17
integralpilotalso does anyone know what ESR_EL1 = 0xfe000020, it's implementation-defined so means some kind of apple-specific exception
#asahi-dev · 2025-11-29 12:13
integralpilotSP_EL1 is a higher-half address that isn't mapped by the hypervisor to any physical address
#asahi-dev · 2025-11-29 12:10
integralpilothmmm after some further digging i'm a bit more confused
#asahi-dev · 2025-11-29 11:37
integralpilotcurrently looking into fleh_dispatch64_common more closely rn. fleh = first level exception handler, iirc?
#asahi-dev · 2025-11-29 11:36
integralpilotit was near the LR so i suspected it was involved, but looks like some form of lookup table that the code that causes the issue gets data from
#asahi-dev · 2025-11-29 11:33
integralpiloti think the "sel instruction" is actually in a data section after disassembling further sorry, so it might not be an instruction at all
#asahi-dev · 2025-11-29 11:29
integralpilotand this is the kernel variant for an M3 chipset
#asahi-dev · 2025-11-29 11:28
integralpilotthe instruction is sel z0.d, p8, z8.d, z21.d
#asahi-dev · 2025-11-29 11:27
integralpilotwait actually i think it's SME, not SVE sorry, i might be getting my instructions mixed up
#asahi-dev · 2025-11-29 11:24
integralpiloti thought all M-series chips didn't support SVE though??
#asahi-dev · 2025-11-29 11:22
integralpilotit's around a SVE instruction so my gut feeling is that m1n1 isn't setting the SVE registers right
#asahi-dev · 2025-11-29 11:22
integralpilotLR points to some code within com.apple.kernel:fleh_dispatch64_common
#asahi-dev · 2025-11-29 11:15
integralpiloti'll check the code at LR, might give some clues
#asahi-dev · 2025-11-29 11:14
integralpilotit looks to me like the kernel did something bad, which casued a sync exception to be triggered (given the +0x200 offset) causing it to jump to a handler table or smth XNU hasn't set up yet, and then the UDF (0x0) causes it to have an exception and thus jump back there infinetly?
#asahi-dev · 2025-11-29 11:12
integralpilotit's not a NPD or anything, it's a higher half address i.e. fffffe001461a200 (though varies with KASLR i think)
#asahi-dev · 2025-11-29 11:11
integralpilot(it being XNU after being loaded)
#asahi-dev · 2025-11-29 11:11
integralpilotat the point it hangs, the PC/ELR is pointing to memory that is just all 0s
#asahi-dev · 2025-11-29 11:10
integralpiloti've been doing some debugging under the hypervisor to see what's going wrong
#asahi-dev · 2025-11-29 10:57
integralpilotnope, trying chainload results in the normal apple logo appearing and a hang with no virtual serial output as well
#asahi-dev · 2025-11-29 09:25
integralpilotas in with chainload.py rather than run_guest.py, i'll try it, thanks
#asahi-dev · 2025-11-29 09:20
integralpilotwhich is why chaos_princess suggested i try physical uart now, but i'm unsure how to a) get it send early logs to physical uart, b) see those logs
#asahi-dev · 2025-11-29 09:19
integralpiloti was using virtual uart yesterday and it was hanging before it sent any logs there
#asahi-dev · 2025-11-29 09:19
integralpilotit's hanging way before it can output anything to framebuffer i think but i'll try -v in bootargs
#asahi-dev · 2025-11-29 09:11
integralpilothow can i get it to send early logs over the uart and see them?
#asahi-dev · 2025-11-29 09:10
integralpilotdid https://pastebin.com/v7AsfDSA and we progress to rainbow apple now, hanging it the same place
#asahi-dev · 2025-11-29 09:08
integralpilotthank you for all your help!
#asahi-dev · 2025-11-29 09:08
integralpilotit's fine, i didn't notice it either!
#asahi-dev · 2025-11-29 09:07
integralpilotsorry pressed enter too soon!
#asahi-dev · 2025-11-29 09:07
integralpilotit
#asahi-dev · 2025-11-29 09:04
integralpilotsorry, m1n1/hv/__init__.py, rather, which run_guest.py causes to be run
#asahi-dev · 2025-11-29 09:03
integralpilotrun_guest.py was never programmed to have the communication be going over IODEV 0 / UART
#asahi-dev · 2025-11-29 09:01
integralpilotwhich obviously doesn't exist
#asahi-dev · 2025-11-29 09:01
integralpilotso it tries ATC-3_USB (with the -3 being inserted after ATC and before _USB)
#asahi-dev · 2025-11-29 09:00
integralpilotresulting in -3
#asahi-dev · 2025-11-29 09:00
integralpilotto calculate the ATC number to use, the python code does self.iodev - IODEV.USB0 (3)
#asahi-dev · 2025-11-29 09:00
integralpilotcause it's the UART right
#asahi-dev · 2025-11-29 09:00
integralpilotself.iodev is 0
#asahi-dev · 2025-11-29 08:59
integralpiloti just found out why
#asahi-dev · 2025-11-29 08:59
integralpilotoh my god
#asahi-dev · 2025-11-29 08:43
integralpiloti'm still looking into why it tries to disable ATC3_USB now, i think i've got a theory but i'm checking it now
#asahi-dev · 2025-11-29 08:43
integralpilotoh, interesting! thank you so much for helping me with everything and letting me know how things work, it's starting to make a lot more sense

plus ›