#
…

2026-07-06

00:03ddxtanx has quit [Remote host closed the connection]
00:09nicolas17I saw a repo with devicetrees, but I think it was "ioreg -p IODeviceTree", not the raw ADT
00:15JamesCalligeros[m]we should probably just keep adt bin dumps somewhere
00:17enverbalalicoh...my...god, i completely forgot bin adts are in the macos installation package...
00:18nicolas17enverbalalic: not completely
00:18enverbalalicyeah it's gonna miss the stuff iboot prefills, but hopefully what i'm doing doesn't need that
00:18nicolas17the ipsw has devicetrees, but several parts are filled in by iBoot before passing them to the OS
00:18JamesCalligeros[m]yeah, we should have a repo of blobs pulled by m1n1.adt
00:22nicolas17also the files in the ipsw are img4 with lzfse compressed data inside :P
00:23enverbalalici just do img4tool to get the bin, and then run m1n1.adt on them
01:50enverbalalic has quit [Quit: enverbalalic]
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:00ciara has quit [Remote host closed the connection]
02:12ciara has joined #asahi-dev
02:18pb17 has quit [Ping timeout: 480 seconds]
02:28nela has quit [Quit: Ping timeout (120 seconds)]
02:28nela has joined #asahi-dev
02:32pb17 has joined #asahi-dev
03:37marvin24 has joined #asahi-dev
03:57nora_ has joined #asahi-dev
03:59nora has quit [Ping timeout: 480 seconds]
03:59balrog has joined #asahi-dev
04:02balrog_ has quit [Ping timeout: 480 seconds]
04:47niazlv[m] has joined #asahi-dev
04:59mattia013 has joined #asahi-dev
05:53rosalyntg has joined #asahi-dev
05:53rosalyntg_ has quit [Read error: Connection reset by peer]
06:20mattia013 has quit [Quit: mattia013]
06:22roxfan2 has quit [Ping timeout: 480 seconds]
06:26roxfan has joined #asahi-dev
06:45jamie__ has quit [Remote host closed the connection]
07:00nickchanlooking forward to the psci conduit and the m1n1 side code
07:01nickchanthough... is the resident/entry/exit latency all made-up?
07:10chadmedjannau: thanks, i vaguely remember seeing that. i will see if it suits our use case when i have time and then maybe we can drop the fake regulator altogether
07:11svenFirst goal is to just get an ack on the psci-via-efi approach
07:12nickchanthis is going to be fun for pre-M1
07:12nickchaneven more so for A7-A9 where i could play with having a real EL3
07:13nickchannot many platforms get you EL3 access
07:15svenas usual I’m gonna make it work for M1+ and not care about anything before and you get to have that fun then once it’s upstream :)
07:17chadmedif A7-A9 have EL3 can you not just put m1n1 in it and use the usual svc/hvc on those?
07:20jannauchadmed: I vaguely remember discussing this automated reset controller for shared reset-gpios before but I don't remember the outcome
07:21chadmedyeah neither. i'll have a play with it
07:23jannauchadmed: did you see https://github.com/AsahiLinux/m1n1/pull/612 ? I managed to confuse myself with the audio nodes / routing. I haven't looked in detail yet what mca / macaudio do so maybe that will clear up my confusion
07:28chadmedim not sure if it matters which MCA cluster is used for which set of codecs. as i understand the MCA driver, the cluster index is referential to the CPU side of the DAI and can take in any group of CODECs. the macaudio driver just ensures for the speaker DAI that there are an even number of CODECs per CPU
07:29chadmedpovik did most of this stuff though and the documentation appears largely lost to time which makes things difficult
07:30nickchanchadmed: m1n1 is already installed in EL3 on A7-A9, it just does not do anything at all now
07:31chadmedactually i can check this right now
07:32nickchannow if i ever had to turn on EL3 mmu that's even more fun in the pagetables because m1n1's 4K paging works by allocating like 4 MiB worth of static pagetables
07:32nickchan...I would actually have to do 4k paging properly
07:32nickchanand not have that 4 MiB worth of pagetable blob
07:39chadmedcase in point, how the driver manipulates the MCA per-cluster SYNCGEN_MCLK_SEL register makes little sense. The driver set it to 0b111 when the cluster is a clock consumer, but simply setting BIT(1) also works for that case. Setting BIT(1) also works when it is a clock provider, and also setting BIT(0)
07:40chadmedcould it be the mclk multiplier? could it be TX/RX direction clock config setting? who knows :P
07:42StanfordAppliedCyber[m]I believe that makes me the first person to run macos under m1n1 on any SPTM enabled device?
07:43nickchanso how to fix tlb flush
07:43svensomeone got macOS running on m2 under sptm by virtualizating everything
07:45StanfordAppliedCyber[m]nickchan: just always returning a noncachable page
07:46chadmedthe mca cluster does matter... i wonder if we just guessed/trialled and errored the correct routings
07:46nickchanm1 would be annoying without nested virt
07:55nickchanso I need to implement 4level paging in m1n1 which I think is overdue anyways
07:59nickchanhopefully no 5level paging on apple silicon anytime soon
08:01svenwhat do you need 4levels for?
08:01nickchansven: so m1n1's 4K paging is not scuffed
08:01svenno, I mean, for what feature
08:02nickchanif I ever enable mmu in EL3 for psci stuffs having to keep multiple megabytes of reserved pagetable is not ideal
08:02svendo you need a mmu for psci stuff?
08:02svenit’s maybe 100 instructions
08:03svenprobably a bit more once we can do proper sleep
08:05nickchanenable el3's mmu is also useful for python scripting purposes
08:06nickchanin particular that find_regs.py
08:10StanfordAppliedCyber[m]there's a few sources of nondeterminism as far as i can tell, all very rare, we make it to a working system >90% of the time, but one is some SPMI timeout that's almost certainly due to whatever latency virtualization introduces, and another is some SEP thing that i don't 100% know
08:38picnoir has quit [Ping timeout: 480 seconds]
08:47picnoir has joined #asahi-dev
08:56nickchanif i understand this code correctly this function returns the L3 of a paddr
08:57nickchanerm, vaddr
08:57nickchanand if the the vaddr is currently mapped using a L2 block entry then it is remapped using L3
08:58nickchanBut the way this code works right now if the vaddr is currently mapped using a L2 block, when remapping the output address (paddr) of the L3 entries would all be the same
08:58nickchan...which would break the originally L2 mapping other than the first L3 page of it
09:00nickchansince every L3 page in the originally L2 mapping would just get translated to the first L3 page
09:01nickchannvm I missed the l3d += BIT(VADDR_L3_OFFSET_BITS)
09:06lacamar[m]Amazing work, Stanford
09:10nickchanokay, got 4 level paging to work properly now
09:15nickchangotta rewrite the memory management comments too
09:20nickchanthe diff isn't even that big 1 file changed, 88 insertions(+), 56 deletions(-)
09:21nickchanjust 30 lines extra
09:43nickchanin practice on 16K the second L1 table would never be used in m1n1 so this does save memory even on m1
10:13samontab has joined #asahi-dev
10:21samontab has quit [Quit: Konversation terminated!]
11:05nickchan... no i do not really need mmu for EL3
11:06nickchan4level paging is still good for 4k paging though
12:10mripard has joined #asahi-dev
12:17mripard has quit [Quit: WeeChat 4.9.2]
12:23mripard has joined #asahi-dev
12:38sofus216/305 tests passed now!
12:39sofusim over allocating a little bit right now, when i fix that and clean up a bit vp9 should be done :)
12:39delroth has quit [Remote host closed the connection]
12:40sofus(macos gets 179/305)
12:42delroth has joined #asahi-dev
12:45mx08 has quit [Quit: WeeChat 3.8]
12:46mx08 has joined #asahi-dev
13:39mattia013 has joined #asahi-dev
13:40vimproved has quit [Remote host closed the connection]
13:42vimproved has joined #asahi-dev
14:58local1 has joined #asahi-dev
14:58local1 has left #asahi-dev [#asahi-dev]
15:34yukaI wanted to give the pci-pwrctrl-generic a try for the pcie pwren gpios
15:34rany has quit [Remote host closed the connection]
15:35yukaI can make it "work" by adding a regulator which is always-on and enables those gpios
15:36yukabut could not yet make pci-pwrctrl-generic actually enable the gpios through the regulator
15:38rany has joined #asahi-dev
15:47yukaOr maybe I misunderstood that pci-pwrctrl-generic could be used for this
15:49yukaOr it needs changes to pcie-apple?
15:52jannauyuka: my understanding was that it now requires changes in pcie-apple. change in v7.0 (or maybe v6.19)
15:53kevans91 has quit [Remote host closed the connection]
15:57yukaYes, I found a good summary here: https://lwn.net/Articles/1052333/
15:58kevans91 has joined #asahi-dev
16:18Guest12504 has quit [Remote host closed the connection]
16:42yukait works!
16:44Guest12678 has quit [Quit: Bridge terminating on SIGTERM]
16:44rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:49rhysmdnz has joined #asahi-dev
16:50Guest12749 has joined #asahi-dev
16:57yukaHuh, it seems the power on fails with -EPROBE_DEFER multiple times, and because I pass through the error code our entire probe gets called again at a later point?
16:57yukathat might cause problems if the resources are not fully cleaned up each time
16:59yukaalso console spam
17:00yukathe other pcie drivers which support pci-pwrctrl don't have special handling for this, so they start initializing, fail and get retried
17:02yukadownstream we avoid this: "check whether the GPPIO pin exists but leave it as is" before we even start initializing anything else
17:03yukaI'm not sure there is an equivalent to this in the pci-pwrctrl api :(
17:04yukabesides powering it on and then off again
17:14WindowPain has quit [Ping timeout: 480 seconds]
17:15* yukagoes to read old mailing list threads
17:23WindowPain has joined #asahi-dev
17:27yukaokay, so people back then weren't sure if the regulator should go into the pcie bridge node or in the device node beneath it
17:56hdbngr has quit [Remote host closed the connection]
17:56hdbngr has joined #asahi-dev
18:04pb17 has quit [Ping timeout: 480 seconds]
18:05pb17 has joined #asahi-dev
18:05hdbngr has quit [Ping timeout: 480 seconds]
18:12hdbngr has joined #asahi-dev
18:16svenpeter[m]Neal Gompa (Fedora): 20:12:50 <flokli> Has there been any discussion with upstream about the /lib/firmware/vendor additional path, as per https://asahilinux.org/docs/platform/open-os-interop/#linux-specific ?
18:16svenpeter[m]20:13:24 <flokli> The section starts with "we propose", but I don't see if it's only proposed in the docs, or with upstream.
18:16svenpeter[m]from #asahi-re:matrix.org
18:17flokli<sven> probably better in #asahi-dev, but neal has an updated version and wanted to submit that patch
18:19flokliWould it make sense to change the layout inside the cpios though? Right now it contains a vendorfw/ directory, but maybe it should be lib/firmware/vendor, so we don't need to do any silly copying around where the bootloader appends it as an additional initrd.
18:20hdbngr has quit [Ping timeout: 480 seconds]
18:26flokliOr well, initrd would only need to bind-mount / copy it to the rootfs before switch_root. So initializing hardware requiring vendorfw with kernel modules only in the real rootfs stays possible.
18:36hdbngr has joined #asahi-dev
18:50jannauflokli: using lib/firmware/vendor in firmware.cpio isn't compatible with usr-merge
18:51yukaI think I'll need to ask the pci people about some things anyways, so I'm preparing a minimal RFC with something that works but I know isn't good (and then some questions regarding how to make it good)
18:51jannauyuka: wouldn't the regulator need to be per-device since devices have distinct pwren-gpios
18:52yukain our case they don't?
18:52yukawifi and bluetooth have the same pwren-gpio
18:52yukais there any case of two pwren-gpios for the same slot?
18:52jannausd-card and usb-pcie xhci have separate ones
18:53yukawhich mac device/model?
18:54jannau14/16-inch macbook pros and imacs, mac studios and possibly m2* mac minis
18:55jannauit's not much of a problem since those gpios are active on m1n1 start
18:57yukabut they are on different pcie-bridges?
18:58yukaso different ports
18:58yukaso one pwren gpio per port
18:58jannauI misread pcie bridge for pcie controller node
19:00jannauwe don't care about bridge or device node for the normal devices. we might for mac pro. let me check
19:00sven is there any M-series chip that support 64 KiB pages?
19:01jannauI don't think so
19:03svenokay, good. UEFI technically requires all memory descriptors to be 64KiB aligned but i guess we can get away with 16 KiB then and I don't have to just the ld scripts :)
19:03sven*adjust
19:03chaos_princessi think sd-boot whines about it
19:04sventhe efi table i build will only work for directly chainloaded kernels anyway
19:04svengetting all this into u-boot or other 2nd stage loaders is going to be more fun
19:04chaos_princessdon't worry too much about it, it just prints a warning and proceeds anyway
19:04svenah, good
19:04jannauwe might have aligned a few bits to 64k for u-boot
19:05sventhe end of .text / beginning of .data is only 16 KiB aligned and what i care about here
19:05sveni'll leave it as-is for now
19:05svenjust need some proof of concept for the RFC series anyway
19:06jannaunot noted in m1n1 commit messages. I might have u-boot changes in mind
19:07jannauwe probably should align that to 64k. not urgent. I think some pre-M1 Ax SoCs supported 4k and 64k
19:08svenyeah, probably just s/16k/64k/ in the ld script
19:09svenanyway, i'll leave it as-is for now
19:31sofusi updated my pr with vp9 support, only tested on m2 pro
19:31sofuswould be nice to validate that it also works on base m1
19:32sofusi would be suprised if it does not work on anything else
19:55coroner21 has joined #asahi-dev
20:01chaos_princessdoes not compile, submit_num is not a thing in avd_ctx
20:03yukaActually, I think I found a somewhat elegant solution for pwren
20:03sofusoops forgot to add the updated header
20:04sofusforce-pushed now
20:06chaos_princessgithub not taking like 10 minutes to resolve the diff, (impossible challenge)
20:09sofushow did i not know you can just give mpv a yt link??
20:11sofusoh wow, looks like i save ~4 W
20:11sofuswith a 4k video
20:25chaos_princesst6031 maybe works?
20:25chaos_princessthis is what i get by using ffmpeg to decode to pngs
20:26chaos_princessthis is crowd_run_1080X504_fr30_bd10_odd_size_l3
20:26sofuswhoah ha
20:31chaos_princesscrowd_run_1080X512_fr30_bd8_8buf_l3 decodes normally, i guess that video just uses something you do not implement correctly
20:33sofusoh i see bd10 bit depth 10 maybe? That would make sense
20:33sofusit should actually work, its just the bytes per line calculation being wrong
20:34chaos_princessyea, i had a pre-filtered folder with the ones that macos supports and just grabbed a random one from there
20:38sofusi assumed there was close to no userspace support for anything other than profile one
20:40chaos_princessthose are what macos decodes
20:41sofuswhere did you get theese? I tested with some other ones
20:41chaos_princessctrl+f "test bitstreams"
20:46sofusthanks, here are the ones i have testet (and the results) https://pastebin.com/f1LqPi3V
20:47sofusall the yuv4* are actually lying, i found out it was software decoding
20:55enverbalalic has joined #asahi-dev
20:55hdbngr has quit [Read error: Connection reset by peer]
21:08ninelore has quit [Ping timeout: 480 seconds]
21:18chaos_princesswant me to try setting up t8103 too, or no reason at this point?
21:21ninelore has joined #asahi-dev
21:24pjv has joined #asahi-dev
21:36first_thunder02 has quit [Read error: Connection reset by peer]
21:36first_thunder02 has joined #asahi-dev
21:36enverbalaliccan someone sahre a m1n1 dtb dump from a m3 please
21:37chaos_princessdo you specifically want a live one, or a template is fine
21:37pjv has quit [Ping timeout: 480 seconds]
21:37lion328 has quit [Remote host closed the connection]
21:37chaos_princessactually, what are you looking for
21:38enverbalalicwhat does 0x2fa400000 and 0x2fac00000 map to
21:40lion328 has joined #asahi-dev
21:42chaos_princessfirst one is mtp, can't find second
21:43enverbalalicok same as i found, dtsi says second reg-names is coproc-sram, but how that address is figured out i have no idea
21:44chaos_princesstake the address from adt, add 0x210000000
21:44first_thunder026 has joined #asahi-dev
21:45first_thunder02 has quit [Remote host closed the connection]
21:45first_thunder026 is now known as first_thunder02
22:02first_thunder02 has quit [Ping timeout: 480 seconds]
22:03first_thunder02 has joined #asahi-dev
22:12first_thunder02 has quit [Read error: Connection reset by peer]
22:12first_thunder02 has joined #asahi-dev
22:21mattia013 has quit [Remote host closed the connection]
22:39first_thunder029 has joined #asahi-dev
22:40first_thunder02 has quit [Remote host closed the connection]
22:40first_thunder029 is now known as first_thunder02
22:51yukaafter rubberducking with flokli, the remaining pci-pwrctrl questions answered themselves, and I no longer see anything wrong with this approach, so I sent it
22:52hdbngr has joined #asahi-dev
22:57chaos_princessis it ok that there is no deinit code?
22:59first_thunder028 has joined #asahi-dev
22:59first_thunder02 has quit [Read error: Connection reset by peer]
22:59first_thunder028 is now known as first_thunder02
23:00hdbngr has quit [Ping timeout: 480 seconds]
23:05yukaProbably not :D
23:05yukaUnloading and loading the driver also crashes hard
23:05yukaBut that's an exisiting issue
23:07yukaAlso suspend support would be nice
23:07chaos_princesslike, fully power down the pcie link?
23:07chaos_princesswouldn't it require moving init code from m1n1 to kernel
23:39StanfordAppliedCyber[m]anyone using kisd on macos: make sure to launchctl disable system/com.apple.deviceinterfaced and kill any current processes
23:39StanfordAppliedCyber[m]debugging my debugusb (heh) right now, making some progress with yuka's help
23:39StanfordAppliedCyber[m]maybe i can finally abandon my horrible hacks of my hypervisor
23:53hdbngr has joined #asahi-dev
…