#
…

2026-04-14

00:31nela has quit [Ping timeout: 480 seconds]
01:38croissant has quit [Quit: Leaving]
01:48croissant has joined #asahi-dev
02:25prike28388 has joined #asahi-dev
02:30hexdump02 has joined #asahi-dev
02:31prike2838 has quit [Ping timeout: 480 seconds]
02:31prike28388 is now known as prike2838
02:32hexdump0815 has quit [Ping timeout: 480 seconds]
02:37dataviruset has joined #asahi-dev
02:47pb17 has quit [Ping timeout: 480 seconds]
02:51pb17 has joined #asahi-dev
02:52tobhe_ has joined #asahi-dev
02:59hwpplayer1 has joined #asahi-dev
02:59hwpplayer1 is now known as Guest7227
02:59tobhe has quit [Ping timeout: 480 seconds]
03:00crabbedhaloablut has quit []
03:00crabbedhaloablut has joined #asahi-dev
03:01Guest7227 is now known as hwpplayer1
03:03wilfredor has quit [Ping timeout: 480 seconds]
03:10marvin24 has joined #asahi-dev
03:18hwpplayer1 has quit [Quit: hwpplayer1]
03:20nora has joined #asahi-dev
03:22nora_ has quit [Ping timeout: 480 seconds]
04:54dataviruset has quit [Ping timeout: 480 seconds]
05:03dataviruset has joined #asahi-dev
05:19enumerator has quit [Ping timeout: 480 seconds]
05:24john-cabaj has joined #asahi-dev
05:34john-cabaj has quit [Ping timeout: 480 seconds]
05:42Yushi has quit [Remote host closed the connection]
05:46pb17 has quit [Ping timeout: 480 seconds]
05:52pb17 has joined #asahi-dev
05:56gargantua has joined #asahi-dev
05:56Yushi has joined #asahi-dev
05:57Yushi has quit [Remote host closed the connection]
05:59Yushi has joined #asahi-dev
06:01Pokemod977362084712818 has quit []
06:06Pokemod977362084712818 has joined #asahi-dev
06:10Yushi has quit [Remote host closed the connection]
06:10Yushi has joined #asahi-dev
06:26enumerator has joined #asahi-dev
06:29voidah has quit [Ping timeout: 480 seconds]
06:36voidah has joined #asahi-dev
06:37john-cabaj has joined #asahi-dev
06:46voidah has quit [Ping timeout: 480 seconds]
06:46Yushi_ has joined #asahi-dev
06:49john-cabaj has quit [Ping timeout: 480 seconds]
06:51Yushi has quit [Ping timeout: 480 seconds]
06:54Yushi_ is now known as Yushi
06:55voidah has joined #asahi-dev
07:00pb17 has quit [Ping timeout: 480 seconds]
07:05ravikant_ has joined #asahi-dev
07:07gargantua has quit [Ping timeout: 480 seconds]
07:09multipla1234[m] has joined #asahi-dev
07:11pb17 has joined #asahi-dev
07:22Yushi has quit [Remote host closed the connection]
07:23Yushi has joined #asahi-dev
07:29___nick___ has joined #asahi-dev
08:04Cardpira| has joined #asahi-dev
08:07voidah has quit [Ping timeout: 480 seconds]
08:08Card has quit [Ping timeout: 480 seconds]
08:13Yushi has quit [Read error: Connection reset by peer]
08:17voidah has joined #asahi-dev
08:38voidah has quit [Ping timeout: 480 seconds]
08:41Yushi has joined #asahi-dev
08:47voidah has joined #asahi-dev
08:56voidah has quit [Ping timeout: 480 seconds]
09:06voidah has joined #asahi-dev
09:15voidah has quit [Ping timeout: 480 seconds]
09:21voidah has joined #asahi-dev
09:30voidah has quit [Ping timeout: 480 seconds]
09:33dataviruset has quit [Quit: dataviruset]
09:39voidah has joined #asahi-dev
09:48voidah has quit [Ping timeout: 480 seconds]
09:57voidah has joined #asahi-dev
10:06voidah has quit [Ping timeout: 480 seconds]
10:08gargantua has joined #asahi-dev
10:14voidah has joined #asahi-dev
10:20dataviruset has joined #asahi-dev
10:26voidah has quit [Remote host closed the connection]
10:27voidah has joined #asahi-dev
10:52voidah has quit [Ping timeout: 480 seconds]
10:58bennofs has quit [Quit: The Lounge - https://thelounge.chat]
10:58bennofs has joined #asahi-dev
11:00fossdd has quit [Remote host closed the connection]
11:00voidah has joined #asahi-dev
11:01fossdd has joined #asahi-dev
11:09dataviruset has quit [Quit: dataviruset]
11:10dataviruset has joined #asahi-dev
11:27tryhard[m] MODPOST Module.symvers
11:27tryhard[m]this thing appears again. i've no idea what's wrong.
11:27tryhard[m]ERROR: modpost: missing MODULE_LICENSE() in drivers/soc/apple/pmpv1.o
11:28JamesCalligeros[m]Did you specify a licence in your driver
11:30tryhard[m]JamesCalligeros[m]: yes
11:33jannau `strings drivers/soc/apple/pmpv1.o | grep license=`
11:42tryhard[m]jannau: nothing
11:42tryhard[m]actually the result .o is very small
11:45chaos_princesscan you post the entire file
11:45chaos_princesssomething is going very wrong there
11:46dataviruset has quit [Remote host closed the connection]
11:46tryhard[m]the makefile?
11:47jannauno, the\ whole source file
11:48jannaupasting the Makefile changes won't hurt but there is little that could go wrong
11:50voidah has quit [Ping timeout: 480 seconds]
11:54tryhard[m]its not ready yet obviously
11:54tryhard[m]obj-$(CONFIG_APPLE_PMP) += pmp.o
11:54tryhard[m]obj-$(CONFIG_APPLE_PMP_V1) += pmpv1.o
11:54chaos_princessdrop lines 8 and 10
11:55tryhard[m]i kept line 8 bcz it wont compile
11:55tryhard[m]just until i figure it out
11:55chaos_princessyou are fighting a symptom, not a cause
11:55chaos_princesskernel crate should be doing no_std for you
11:56tryhard[m]ok i'm building
11:56chaos_princessi suspect line 10 is the culprit
11:58tryhard[m]its actually the wrong config name i forgot to change it
11:58chaos_princessdrop it entirely, it is a wrong way to do what you are trying to do
11:58voidah has joined #asahi-dev
11:58chaos_princessand "wrong config name" is what is causing rustc to skip building everything inside that module
11:59tryhard[m]yeah i'm getting some unused varaibles warnings so that's good
12:01tryhard[m]yeah it passed
12:08voidah has quit [Ping timeout: 480 seconds]
12:11gargantua has quit [Ping timeout: 480 seconds]
12:16voidah has joined #asahi-dev
12:25voidah has quit [Ping timeout: 480 seconds]
12:32voidah has joined #asahi-dev
12:35pb17 has quit [Ping timeout: 480 seconds]
12:36pb17 has joined #asahi-dev
12:42voidah has quit [Ping timeout: 480 seconds]
12:49voidah has joined #asahi-dev
12:57jnn has joined #asahi-dev
13:01jn has quit [Ping timeout: 480 seconds]
13:02voidah has quit [Ping timeout: 480 seconds]
13:03gargantua has joined #asahi-dev
13:11voidah has joined #asahi-dev
13:14yukaI had a wild theory that the random Null pointer dereferences in the idle loop on M4 secondary cores could be caused by a deeper sleep state being now the (nonconfigurable) default.
13:14yukaAs in maybe after waking up from idle some of the registers have lost their value and now contain null values
13:14yukaHowever I'm not sure if this explanation is coherent with it only happening on secondary cores
13:21voidah has quit [Ping timeout: 480 seconds]
13:28voidah has joined #asahi-dev
13:34devadri has quit [Remote host closed the connection]
13:34devadri has joined #asahi-dev
13:35devadri has quit [Remote host closed the connection]
13:35devadri has joined #asahi-dev
13:46voidah has quit [Ping timeout: 480 seconds]
13:54voidah has joined #asahi-dev
14:02john-cabaj has joined #asahi-dev
14:04voidah has quit [Ping timeout: 480 seconds]
14:06yukaIf I'm not completely crazy, x20 is one of the registers saved and restored for deep sleep by the cpuidle-apple driver. And the null pointer dereference I'm getting is exactly dereferencing x20
14:07yukaSadly it seems just loading cpuidle-apple with the CYC_OVRD accesses removed is not sufficient
14:11voidah has joined #asahi-dev
14:12yukait is probably loaded too late
14:12yukaor rather registered, since it's a builtin
14:14chaos_princessif it is truly loaded too late, find the normal cpuidle driver and replace it's WFI with a WFE, or a loop
14:20yukawith WFE it just gets stuck. With WFI simply commented out it gets a bit further before it crashes (possibly because some other code also does WFI)
14:20chaos_princessso... remove every single wfi?
14:21voidah has quit [Ping timeout: 480 seconds]
14:21yukabasically
14:21yukabut the more I look at it, the more plausible it becomes that wfi always loses register state on M4
14:22yukaor, like, always _may_ lose register state, on the boot cpu it doesn't
14:24chaos_princessboot cpu is not supposed to be special, so that is probably a difference in some msr
14:24chaos_princessdon't we have a msr scanner? maybe diff all the things?
14:24yukaI checked the CYC_OVRD and it's 0 in all cpus and it can't be set
14:24yukabut yeah maybe there is some new msr controlling this
14:28svenis wfi allows to lose state according to the ARM ARM? if that's not allowed and we can confirm it does on m4 i'm gonna file a cheeky feedback assistant report / radar :D
14:28voidah has joined #asahi-dev
14:28sven*allowed
14:29yukaDo they claim that this is ARM ISA compliant anywhere?
14:30sveni mean something along the lines of "so you took away our toys (SPRR/GXF) to make this thing look like an architectural ARM machine, how about you also make wfi work correctly?" ;)
14:34sven" In those cases, the WFI is permitted to cause a loss of architectural state" :(
14:34svenoh well
14:35yukaSo I guess just nobody else implemented this?
14:35svenalso surprised how fast you found that! i was looking as well
14:35j`eybut Im not sure if 'powerdown sequence' is some other documented thing
14:35svenhmmm true
14:35sven"In some implementations, based on the configuration of system specific registers, WFI can be used as part of a powerdown sequence where no interrupts will cause WFI wakeup events, and restoration of power involves resetting of the PE. In those cases, the WFI is permitted to cause a loss of architectural state, as it is assumed that this state will
14:35svenhave been saved by software as part of the powerdown sequence before the WFI." that's the full quote
14:35sventhat doesn't quite sound like normal wfi to me
14:36yukaI have all cores up :)
14:36j`eyRHJPJY above it also mentions state
14:38voidah has quit [Ping timeout: 480 seconds]
14:38sven"If the system is configured such that the WFI or WFIT instruction can be completed, then the architecture requires that the architectural state is not lost." so that very much sounds to me like wfi isn't allowed to use state if the expectation is that execution will resume afterwards at next next instruction
14:38jannau"If the system is configured such that the WFI or WFIT instruction can be completed, then the architecture requires that the architectural state is not lost." means it can't lose some state but keep PC
14:38svenyeah, that's my reading as well
14:38voidah has joined #asahi-dev
14:38svenso if it does that on m4 i'll file a cheeky radar and see what happens :D
14:39yukaWe should first confirm it exactly by doing wfi in m1n1 and testing the register state afterwards
14:39svenotherwise i guess we'll have to add a quirk and patch out all wfis very early in the boot sequence :/
14:39svenoh yes, absolutely
14:40svenboot cpu vs. secondaries also shouldn't make a difference, so diffing sysregs like chaos_princess suggested is also a good idea
14:41chaos_princessi think its something related to unwinding
14:42tryhard[m]i don't understand
14:42chaos_princessgo into menuconfig and search for BTF, or UNWIND
14:43chaos_princessif you turn some of those off, it should build
14:43chaos_princessi just no longer remember what exactly
14:43jannaudisable DEBUG_INFO_BTF
14:44tryhard[m]i did that but then it disables my pmp
14:45chaos_princessdoes rust depend on it or sth?
14:47voidah has quit [Ping timeout: 480 seconds]
14:48chaos_princessi personally build with LLVM=1, maybe that is relevant?
14:48tryhard[m]`&& (!DEBUG_INFO_BTF [=y]`
14:50jannauwhich pahole version do you have?
14:50wilfredor has joined #asahi-dev
14:51jannauthe full condition for CONFIG RUST is `(!DEBUG_INFO_BTF [=n] || PAHOLE_HAS_LANG_EXCLUDE [=y] && !LTO [=n])`
14:52jannauv1.30 here
14:53jannaubut 1.25 should be recent enough: PAHOLE_VERSION >= 124
14:53tryhard[m]that's the latest ubuntu version
14:53tryhard[m]latest version via apt
14:56tryhard[m]when all of them were pretty much enabled
14:56voidah has joined #asahi-dev
15:06voidah has quit [Ping timeout: 480 seconds]
15:14ravikant_ has quit []
15:15voidah has joined #asahi-dev
15:16tryhard[m]ok i managed to build
15:18__nick__ has joined #asahi-dev
15:22wilfredor has quit [Remote host closed the connection]
15:22___nick___ has quit [Ping timeout: 480 seconds]
15:22wilfredor has joined #asahi-dev
15:24voidah has quit [Ping timeout: 480 seconds]
15:32voidah has joined #asahi-dev
15:34wilfredor has quit [Remote host closed the connection]
15:40alessaba has quit [Ping timeout: 480 seconds]
15:40alessaba has joined #asahi-dev
15:48voidah has quit [Ping timeout: 480 seconds]
15:57voidah has joined #asahi-dev
16:07pb17 has quit [Ping timeout: 480 seconds]
16:08pb17 has joined #asahi-dev
16:11gargantua has quit [Ping timeout: 480 seconds]
16:49gargantua has joined #asahi-dev
17:20okb has joined #asahi-dev
17:37wilfredor has joined #asahi-dev
17:39wilfredorchaos_princess, I went through your sleep scripts and traced the wake path in m1n1 (smp.c, pmgr.c, cpu_regs.h). I think the trampoline at RVBAR hangs because UART is clock-gated
17:39wilfredor ▎ mini-PMGR scratch (always-on domain) before touching UART, so after a failed wake you can reboot and check if the core actually reached RVBAR. Also fixed the ret (LR
17:39wilfredor ▎ after MBSE — writes to gated MMIO stall the bus on Apple Silicon, which matches the silent freeze. I adapted the scripts for T8103 with a trampoline that writes to
17:39wilfredor ▎ is garbage after reset). Repo if useful: https://github.com/wilfredor/m1-deepsleep it was tested manually
17:43wilfredoron Fedora 43 Asahi Remix, kernel 6.18.15, Apple M1 16GB RAM
17:47chaos_princess"writes to gated MMIO stall the bus on Apple Silicon" - no, they SError
17:47svenwrites to powered down devices (what you call clock-gated) cause an SError and don't hang indefinitely
17:48chaos_princessdid you just write to some register in pmgr that survives a reboot and concluded that this is a successful sleep entry/exit?
17:57DaniloAny[m] has joined #asahi-dev
17:57svenalso, why would uart be powered down by a wfi sequence? that just makes no sense
18:11r0ni has quit [Ping timeout: 480 seconds]
18:37r0ni has joined #asahi-dev
18:38fumnanya has joined #asahi-dev
18:39fumnanya has quit [Remote host closed the connection]
18:46wilfredor has quit [Read error: Connection reset by peer]
18:50voidah has quit [Ping timeout: 480 seconds]
18:51okb has quit [Ping timeout: 480 seconds]
18:58voidah has joined #asahi-dev
19:03pb17 has quit [Ping timeout: 480 seconds]
19:07voidah has quit [Ping timeout: 480 seconds]
19:09fumnanya has joined #asahi-dev
19:12wilfredor has joined #asahi-dev
19:12tpw_rulesdon't worry, i'm sure claude will figure it out!!
19:13pb17 has joined #asahi-dev
19:15voidah has joined #asahi-dev
19:15wilfredorsven or chaos_princess, has anyone traced the T8103 PMGR wake event mask registers? On T600x they're at 0x292004008-0x292004020, but i need the T8103 equivalents to complete full system sleep (MBSE path), btw i have an HV trace script ready but wanted to check if this has already been captured, repo with the scripts: https://github.com/wilfredor/m1-deepsleep
19:15nicolas17tpw_rules: 💀
19:16wilfredorclaude is your friend (not google)
19:16svenbut against our policy, so please stop this crap
19:17chaos_princesswilfredor: the reason i asked what HW you have is because then you can collect this data yourself and not order others around
19:17chaos_princessand yes, you were already told to cut it out with farming out stuff to llms
19:20wilfredorI underestand, sorry about that, I have a M1 and a second machine for USB serial, I'll set up the HV, trace myself and capture the T8103 wake masks from macOS sleep, will post results when I have them
19:24voidah has quit [Ping timeout: 480 seconds]
19:29zumi has quit [Remote host closed the connection]
19:33voidah has joined #asahi-dev
19:42voidah has quit [Ping timeout: 480 seconds]
19:51voidah has joined #asahi-dev
19:51c10l2 has joined #asahi-dev
19:52wilfredor has quit [Quit: Leaving]
19:56c10l has quit [Ping timeout: 480 seconds]
19:56c10l2 is now known as c10l
20:00voidah has quit [Ping timeout: 480 seconds]
20:07__nick__ has quit [Remote host closed the connection]
20:08voidah has joined #asahi-dev
20:18voidah has quit [Ping timeout: 480 seconds]
20:18yukaFor M4, I think I could enable WFI trapping and then handle the register save & restore in EL2? Like I would hack this into the Linux EL2 entrypoint. Not sure how difficult it would be to make it coexist with kvm.
20:18yukaBut also not sure how much overhead this would have
20:21okb has joined #asahi-dev
20:25voidah has joined #asahi-dev
20:29sventhat doesn't sound like a proper solution at all
20:34voidah has quit [Ping timeout: 480 seconds]
20:36yukacan you elaborate?
20:37okb has quit [Remote host closed the connection]
20:38okb has joined #asahi-dev
20:39yukaLike the other possibilities I see are:
20:39yuka1. Wait for 🍏 to deliver an iBoot update which makes WFI not lose register state
20:39yuka2. Somehow patch all WFI calls inside the Linux kernel
20:39chaos_princessdid msr scan not find anything?
20:40yukaI did not do it yet, but I somehow doubt there is a way to change this behavior
20:41svenhave you found all wfi calls yet? i don't think there are that many. iirc there's also some framework for boot-time patching alternative instructions to work around errata already
20:42voidah has joined #asahi-dev
20:46svenand, uh, isn't the kernel running in EL2? how would that trap hack even work there?
20:46yukaI think the kernel installs the kvm-stub in EL2 and then mostly runs in EL1
20:46yukaunless I somehow misremember the numbers of the exception levels
20:47chaos_princessthat is for nvhe
20:47chaos_princessand we do vhe with kernel running at el2
20:51voidah has quit [Ping timeout: 480 seconds]
20:56okb has quit [Remote host closed the connection]
20:59yukaI will try patching all the relevant wfis. I thought it was many more and would be infeasible.
20:59chaos_princessi really think that a msr scan is more promising
21:00yukalooking at xnu source there is no replacement for CYC_OVRD
21:00voidah has joined #asahi-dev
21:00yukaI really don't think this is configurable from what we have seen on M4
21:00chaos_princesswhy is it different on boot core then?
21:01svenyeah, this sounds like it’s configurable
21:02chaos_princessi think that is not the only place where iboot configures the boot core and then expects xnu to perform the same config on non-boot ones
21:04chaos_princessoh, btw, quick check, what macos are you on?
21:04yukalatest
21:04yukaI updated like 5 days ago
21:08fumnanya has quit [Ping timeout: 480 seconds]
21:08yukaI do not know which script you mean with msr scan. it would be in proxyclient/experiments?
21:09voidah has quit [Ping timeout: 480 seconds]
21:10fumnanya has joined #asahi-dev
21:15pb17 has quit [Ping timeout: 480 seconds]
21:15pb17 has joined #asahi-dev
21:19voidah has joined #asahi-dev
21:20fumnanya has quit [Ping timeout: 480 seconds]
21:28fumnanya has joined #asahi-dev
21:28voidah has quit [Ping timeout: 480 seconds]
21:33multipla1234[m]Hi! I just joined the channel to get some more insights on M4 bringup. Luckily at the right time. It seems I was able to live witness a milestone! Congrats! I dont think an unexperienced dev like me could help a lot in this stage but if there is let me know. I only have experience in some kernel driver development for nvidia jetson devices and having a M4 Mini myself. Anyway, congrats! Thanks for all the effort that is put into this
21:34yukaUartTimeout as soon as the first u.exec(insns, ...) runs
21:35yukawill decrease the size of the insns blocks
21:36voidah has joined #asahi-dev
21:37yukathe exception handler crashes
21:39yukaok, dumped the regs
21:39yukaof the boot core at least
21:52voidah has quit [Ping timeout: 480 seconds]
21:54fumnanya has quit [Remote host closed the connection]
21:55fumnanya has joined #asahi-dev
21:55voidah has joined #asahi-dev
22:07john-cabaj has quit [Ping timeout: 480 seconds]
22:19yukaI now have dumps of the boot core, and two other p-cores
22:19yukaso I can compare 3-way
22:20yukaalmost everything is readonly
22:21yukashould I upload the dumps somewhere?
22:27yukaIn fact, all regs which differ between the boot cpu and a secondary cpu are readonly, so it is going to be difficult to find out which one we would need
22:32ddxtanx_ has quit [Quit: Konversation terminated!]
22:38yukaanyways thanks for the hints, heading to bed
22:44c10l has quit [Quit: Bye o/]
22:44c10l has joined #asahi-dev
22:50fumnanya has quit [Ping timeout: 480 seconds]
22:56fumnanya has joined #asahi-dev
23:04fumnanya has quit [Ping timeout: 480 seconds]
23:13fumnanya has joined #asahi-dev
23:23fumnanya has quit [Ping timeout: 480 seconds]
23:27fumnanya has joined #asahi-dev
23:27michaelros4 has quit [Read error: Connection reset by peer]
23:27michaelros4 has joined #asahi-dev
23:45fumnanya has quit [Ping timeout: 480 seconds]
23:46fumnanya has joined #asahi-dev
…