2025-12-18
00:19hdbngr has joined #asahi-dev
00:28hdbngr has quit [Ping timeout: 480 seconds]
00:35mixi has quit [Ping timeout: 480 seconds]
00:46mixi has joined #asahi-dev
01:17rany_ has joined #asahi-dev
01:21rany has quit [Ping timeout: 480 seconds]
01:21rany_ is now known as rany
01:35rany_ has joined #asahi-dev
01:37rany has quit [Ping timeout: 480 seconds]
01:39rany_ is now known as rany
01:55b074should I get the kernelcache from a copy of macOS with the same version as the kernel, or can I just install KDK on my primary install and create the cache from it?
03:33tobhe_ has joined #asahi-dev
03:40tobhe has quit [Ping timeout: 480 seconds]
03:40john-cabaj has joined #asahi-dev
03:56hdbngr has joined #asahi-dev
04:04hdbngr has quit [Ping timeout: 480 seconds]
04:11hdbngr has joined #asahi-dev
04:20hdbngr has quit [Ping timeout: 480 seconds]
04:25marvin24 has joined #asahi-dev
04:52nora has joined #asahi-dev
04:54nora_ has quit [Ping timeout: 480 seconds]
05:01hdbngr has joined #asahi-dev
05:07bubblepipe has joined #asahi-dev
05:09hdbngr has quit [Ping timeout: 480 seconds]
05:13john-cabaj has quit [Ping timeout: 480 seconds]
05:22vimproved has quit [Ping timeout: 480 seconds]
05:34Guest33784 has quit [singleton.oftc.net nucleus.oftc.net]
05:34shenki has quit [singleton.oftc.net nucleus.oftc.net]
05:34lethalbit has quit [singleton.oftc.net nucleus.oftc.net]
05:42lethalbit has joined #asahi-dev
05:45bubblepipe has quit [Remote host closed the connection]
05:46shenki has joined #asahi-dev
05:48enick_959 has joined #asahi-dev
05:52vimproved has joined #asahi-dev
05:56pb17 has quit [Ping timeout: 480 seconds]
05:58pb17 has joined #asahi-dev
06:00hdbngr has joined #asahi-dev
06:08hdbngr has quit [Ping timeout: 480 seconds]
06:30hdbngr has joined #asahi-dev
06:32hamr8 has quit [Ping timeout: 480 seconds]
06:38hdbngr has quit [Ping timeout: 480 seconds]
07:02hdbngr has joined #asahi-dev
07:02hamr8 has joined #asahi-dev
07:10hdbngr has quit [Ping timeout: 480 seconds]
07:56k1nch0 has joined #asahi-dev
08:03hdbngr has joined #asahi-dev
08:11hdbngr has quit [Ping timeout: 480 seconds]
08:21ece314378925355451680698427415 has quit [Ping timeout: 480 seconds]
08:21Calandracas__ has joined #asahi-dev
08:28Calandracas_ has quit [Ping timeout: 480 seconds]
08:40k1nch0 has quit [Quit: Lost terminal]
08:40nimprod3l has joined #asahi-dev
09:04hdbngr has joined #asahi-dev
09:12hdbngr has quit [Ping timeout: 480 seconds]
09:21Seti_ has quit [Ping timeout: 480 seconds]
10:05hdbngr has joined #asahi-dev
10:13hdbngr has quit [Ping timeout: 480 seconds]
10:19hdbngr has joined #asahi-dev
10:23oliver_interesting: when comparing cntpct against the timestamps that are submitted in dcp swap requests, the values are totally off when tracing. cntpct vs dcp ts value: https://files.narf.zone/156ad921f5d8432d/Screenshot%20From%202025-12-18%2011-16-39.png
10:23oliver_I did verify that cntpct correlates to realtime values. any idea why this might be the case?
10:28hdbngr has quit [Ping timeout: 480 seconds]
10:36hdbngr has joined #asahi-dev
10:45hdbngr has quit [Ping timeout: 480 seconds]
11:06hdbngr has joined #asahi-dev
11:09oliver_what i do see is that the dcp ts1 is updated by exactly 8.33ms, even when we get a real frame only every 100ms while tracing. for ts2 and ts3 macos adds ~14ms and ~12ms on top, independent of the target frame rate. so maybe it does not even depend on the realtime clock. thats something i'll try out now
11:14hdbngr has quit [Ping timeout: 480 seconds]
11:15hdbngr has joined #asahi-dev
11:22oliver_haha, yea i know what 8.33ms means, my question is: why is it set totally independent of the real time
11:23chadmedi wouldnt discount m1n1 itself stealing time in this case. tracing is slow as heck and if youre only getting a swap complete every 100ms then your real timing is going to be way off
11:23chadmedcntpct is going to keep incrementing at 24mhz no matter what youre doing so that could explain why the values drift (if im reading your plot correctly)
11:24hdbngr has quit [Ping timeout: 480 seconds]
11:24chadmedif ts1 _seems_ to always be tied to the "target" refresh rate then perhaps as i suspected last night it should be tied to the currently set mode when submitting a swap
11:24oliver_yes, i get that, i would assume that macos writes ts1=cntpct+8.33ms... but it doesnt, it just writes ts1=ts1_prev + 8.33ms, even if cntpct increased by 100ms
11:25chaos_princessprobably getting it from that dcp mmio?
11:26chadmedthat or the driver is waiting for a swap to finish then just going ts_prev + 1/refresh rate when doing the next swap
11:29chadmedhave a look at how some of the stuff in proxyclient/experiments interact with RegMonitor
11:30chadmedor if you just want to poke around at a point in time you can break into the hypervisor on the serial console with ctrl+c and use the same functionality like an old school memory monitor
11:31oliver_okay, and where can i find some information about what memory regions belong to the dcp?
11:33chadmedbut i would think (perhaps incorrectly) that if dcp were keeping time out of band with whatever the cpus are doing then it would keep ticking even while waiting for a swap to complete
11:34hdbngr has joined #asahi-dev
11:37oliver_if the dcp would keep time in sync with the cpu, and macos reads and uses that time for swap_submit requests, then i would not get a perfect 8.33ms between each submit
11:42hdbngr has quit [Ping timeout: 480 seconds]
11:59oliver_regarding the mmio in the adt, are we talking about the `reg` definitions in here?: https://github.com/AsahiLinux/linux/blob/773401986194d732f8f8a3b18b50d46d469a5dee/arch/arm64/boot/dts/apple/t600x-die0.dtsi#L330
11:59oliver_I interpret the first one as 0x4000 bytes at 0x38bc00000, which are also the values i would use with RegMonitor, is that correct?
12:01jannaunot quite. the reg values have to be translated by based on /arm-io/ranges m1n1's adt code already does this
12:03jannaubut yes. for a start tou could look at do a trace_device and/or trace_range in the hypervisor
12:11hdbngr has joined #asahi-dev
12:20hdbngr has quit [Ping timeout: 480 seconds]
12:24hdbngr has joined #asahi-dev
12:33hdbngr has quit [Ping timeout: 480 seconds]
12:41mripard has joined #asahi-dev
12:54fl0_idsven if I do make it to c3 ( not sure yet ) would also be up for some m3 hacking (or at least testing etc)
12:56nimprod3l has quit [Remote host closed the connection]
13:07hdbngr has joined #asahi-dev
13:16hdbngr has quit [Ping timeout: 480 seconds]
13:21hdbngr has joined #asahi-dev
13:30hdbngr has quit [Ping timeout: 480 seconds]
14:08hdbngr has joined #asahi-dev
14:17hdbngr has quit [Ping timeout: 480 seconds]
14:41hdbngr has joined #asahi-dev
14:49hdbngr has quit [Ping timeout: 480 seconds]
14:52john-cabaj has joined #asahi-dev
14:55hdbngr has joined #asahi-dev
15:04hdbngr has quit [Ping timeout: 480 seconds]
15:09hdbngr has joined #asahi-dev
15:16pb17 has quit [Ping timeout: 480 seconds]
15:18hdbngr has quit [Ping timeout: 480 seconds]
15:36pb17 has joined #asahi-dev
15:52hdbngr has joined #asahi-dev
16:01hdbngr has quit [Ping timeout: 480 seconds]
16:10hdbngr has joined #asahi-dev
16:28hdbngr has quit [Ping timeout: 480 seconds]
16:48hdbngr has joined #asahi-dev
16:57hdbngr has quit [Ping timeout: 480 seconds]
17:00rany_ has joined #asahi-dev
17:05rany has quit [Ping timeout: 480 seconds]
17:09rany_ is now known as rany
17:11hdbngr has joined #asahi-dev
17:18svenelly will also be there. She’s also trying to get me to finish slides before so that I have time to hack :D
17:20chaos_princesseveryone cool is going to c3 :(
17:20hdbngr has quit [Ping timeout: 480 seconds]
17:23nickchancan have multiple things with the same compatibles and then have 2 different ways of starting the cpu
18:10hdbngr has joined #asahi-dev
18:21hdbngr has quit [Ping timeout: 480 seconds]
18:32hdbngr has joined #asahi-dev
18:38weirdtreethingi can't wait to watch the talk
18:40oliver_I was playing with the idea of coming too, I actually live in Hamburg. But looks like it is already sold out.
18:41hdbngr has quit [Ping timeout: 480 seconds]
19:13hdbngr has joined #asahi-dev
19:22hdbngr has quit [Ping timeout: 480 seconds]
19:23mattia013 has quit [Remote host closed the connection]
19:29jnusually they're already available as a livestream and in "relive" (livestream dumps that haven't been finalized yet)
19:52hdbngr has joined #asahi-dev
20:05chadmed has quit [Quit: Konversation terminated!]
20:06chadmed has joined #asahi-dev
20:06chadmed has quit []
20:06chadmed has joined #asahi-dev
20:09___nick___ has joined #asahi-dev
20:10hdbngr has quit [Ping timeout: 480 seconds]
20:17hdbngr has joined #asahi-dev
20:50___nick___ has quit []
20:51___nick___ has joined #asahi-dev
20:53___nick___ has quit []
20:58oliver_well, after some more experimentation, it seems that the dcp does not care much about the values in the three timestamp fields as long as they are non zero. even if i set them all to 1 i get smooth 120hz.
21:02chaos_princesswhat are those for then?
21:03jannaumeh. not really closer to VRR then :(. let's set them to 120 for now and enable the 120Hz mode
21:04chaos_princesswhat does one need for vrr?
21:05hdbngr_ has joined #asahi-dev
21:07catred has joined #asahi-dev
21:07chaos_princessno, not asking "why would you want vrr", but rather "what features should hardware expose in order for linux to drive it in vrr mode"
21:07oliver_jannau: set them to a fixed (meaningless value of) 120 you mean? or mimic what macos does, increment the timer by 8.33ms on each submit?
21:11hdbngr has quit [Ping timeout: 480 seconds]
21:11jannauchaos_princess: the driver needs to set a vrr property on the connector and I think we need a EDID
21:12jannaunot sure how to determine with the internal displays that they are actually running with VRR
21:12chaos_princessok, but how does the drm core communicates the refresh rate it wants? Does it just call the page flip function at a variable rate and expects that to happen?
21:24hdbngr_ has quit [Ping timeout: 480 seconds]
21:31hdbngr has joined #asahi-dev
21:40hdbngr has quit [Ping timeout: 480 seconds]
21:48hdbngr has joined #asahi-dev
21:55hightower3 has joined #asahi-dev
21:57hdbngr has quit [Ping timeout: 480 seconds]
21:57b074where can I find more information about the debug DWARF structure? I'm trying to load the t6030 dev kernel, but the MachO structure does not contain a UNIXTHREAD cmd type
22:00jannauoliver_: did you look at the values of `ts64_unk`? at least at some point it looked like it might be a timestamp as well. I don't remember the details though
22:00pb17 has quit [Ping timeout: 480 seconds]
22:01mesa has quit [Read error: Connection reset by peer]
22:01mesa has joined #asahi-dev
22:01pb17 has joined #asahi-dev
22:03hightower4 has quit [Ping timeout: 480 seconds]
22:05oliver_Only just briefly, I couldnt quickly make sense of it, and i didn't need it to get to 120hz. But I can check again
22:05hdbngr has joined #asahi-dev
22:09jannauyou can if you're interested in finding the the sense behind the timestamps and/or VRR. I've asked mostly out of curiosity at this point
22:14hdbngr has quit [Ping timeout: 480 seconds]
22:16hdbngr has joined #asahi-dev
22:25hdbngr has quit [Ping timeout: 480 seconds]
22:30svenoliver_: I can probably organize a ccc ticket if you want to attend, there’s like 4 or so speakers at the fail0verflow assembly who don’t need the ticket that they bought and I don’t think we sold all of them yet
22:35hdbngr has joined #asahi-dev
22:43hdbngr has quit [Ping timeout: 480 seconds]
22:51mesa has quit [Remote host closed the connection]
22:51hdbngr has joined #asahi-dev
23:00mesa has joined #asahi-dev
23:05john-cabaj has quit [Ping timeout: 480 seconds]
23:14hdbngr has quit [Ping timeout: 480 seconds]
23:17b074I dont get it. It seems that a UNIXTHREAD command is expected to set the entry point (https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/m1n1/macho.py#L146)
23:17b074but all mach-o files I downloaded does not include it https://gist.github.com/thiago4455/16da2733244309ef070a94df59fbd483
23:19chaos_princessi think you need to build the kernelcache, as described here https://asahilinux.org/docs/sw/m1n1-hypervisor/#getting-the-macos-development-kernel-and-creating-the-kernelcache
23:21b074I do have the kernelcache built, and I'm passing it to the run_gest.py as described in "Starting the development kernel under the m1n1 hypervisor"
23:22chaos_princessshould work then
23:22hdbngr has joined #asahi-dev
23:24b074but on the load_macho function in hv/__init__.py, im getting an error due to a None macho.entry
23:25b074tracing back the definitions showed that this entry is defined only due to the UNIXTHREAD on the Mach-O file
23:30b074This is the full output of run_guest.py https://gist.github.com/thiago4455/4819d99118692e4a015a27b104fedb4d
23:31hdbngr has quit [Ping timeout: 480 seconds]
23:33chaos_princessyour args appear to be wrong, should be sth like `python3 proxyclient/tools/run_guest.py -s kernel.development.t8103.13.5 dev.kc.macho.development.13.5 -- "debug=0x14e serial=3 apcie=0xfffffffe -enable-kprintf-spam wdt=-1 clpc=0"`
23:33chaos_princessmissing the -s in front of the symbol file
23:39hdbngr has joined #asahi-dev
23:47hdbngr has quit [Ping timeout: 480 seconds]
23:57hdbngr has joined #asahi-dev