#
…

2023-05-27

00:08brolin has joined #asahi-dev
00:17brolin has quit [Ping timeout: 480 seconds]
00:26brolin has joined #asahi-dev
00:28barrowsx has joined #asahi-dev
00:34brolin has quit [Ping timeout: 480 seconds]
00:40brolin has joined #asahi-dev
00:44povikalyssa: glad you get a kick out of it :-p
00:45povikcy8aer: that might come to be useful
00:47povikwe can move array processing off to the firmware, that's actually part of the value proposition here
00:48povikbut even then we want a userspace demonstrator first, that shows the benefit
00:49brolin has quit [Ping timeout: 480 seconds]
00:59compassion3 has joined #asahi-dev
01:05compassion has quit [Ping timeout: 480 seconds]
01:05compassion3 is now known as compassion
01:06barrowsx has quit [Quit: barrowsx]
01:11barrowsx has joined #asahi-dev
01:17alyssapovik: =D
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:21Emantor has joined #asahi-dev
01:23nopeslide13 has joined #asahi-dev
02:00gabuscus_ has quit []
02:17gabuscus has joined #asahi-dev
02:19bps has joined #asahi-dev
02:24chadmed_ has joined #asahi-dev
02:52barrowsx has quit [Quit: barrowsx]
02:53bps has quit [Remote host closed the connection]
03:00skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:08marcanpovik: awesome :D
03:49barrowsx has joined #asahi-dev
04:29barrowsx has quit [Quit: barrowsx]
04:35barrowsx has joined #asahi-dev
04:42nicolas17so this is one of the few chips without strict firmware signature checking, and you're doing your own firmware?
04:43barrowsx has quit [Quit: barrowsx]
04:55nicolas17an interesting question showed up in another chat, can you use USB from macOS when running under m1n1? if so how does that work, given that m1n1 is using USB by itself? is it virtualizing the USB controller for macOS to use it concurrently?
05:01marcannicolas17: we remove specifically the one port m1n1 uses
05:01marcaneach port has an independent controller, DART, etc. so we can just steal one
05:01nicolas17is it separate controllers?
05:02marcanm1n1 also has code to forward this to the Linux DT for the same reason
05:03marcanthe HV also intercepts power domain controls so macOS doesn't go trying to shut down the ones the HV uses
05:50jannauonly thing that is shared between the usb ports is the interrupt of the usb-c port switch and PD controllers
05:50jannauand even that is not shared, there is a multiplexer which we currently ignore
06:00chadmed_ has quit [Quit: Konversation terminated!]
06:00chadmed_ has joined #asahi-dev
07:35bisko has joined #asahi-dev
08:05maximbaz has quit [Quit: bye]
08:05maximbaz has joined #asahi-dev
08:31bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
08:33bisko has joined #asahi-dev
08:33bisko has quit []
08:55gladiac has joined #asahi-dev
09:14roxfan2 has joined #asahi-dev
09:22roxfan has quit [Ping timeout: 480 seconds]
10:28roxfan2 has quit [Ping timeout: 480 seconds]
10:34nsklaus has joined #asahi-dev
10:44bps has joined #asahi-dev
11:07bisko has joined #asahi-dev
11:17Deroy2112 has joined #asahi-dev
11:18bisko has quit [Ping timeout: 480 seconds]
11:18Deroy2112 has quit [Remote host closed the connection]
11:22bigman has joined #asahi-dev
11:24bigman has quit []
11:29bisko has joined #asahi-dev
11:43bigman has joined #asahi-dev
11:44bigman has quit []
11:48bps has quit [Ping timeout: 480 seconds]
11:57bps has joined #asahi-dev
12:43mkurz has joined #asahi-dev
12:45mkurz_ has quit [Ping timeout: 480 seconds]
13:03bps has quit [Ping timeout: 480 seconds]
13:12roxfan has joined #asahi-dev
13:14roxfan2 has joined #asahi-dev
13:20roxfan has quit [Ping timeout: 480 seconds]
14:17brolin has joined #asahi-dev
14:27richyliu29 has joined #asahi-dev
14:28richyliu2 has quit [Ping timeout: 480 seconds]
14:28richyliu29 is now known as richyliu2
15:00brolin has quit [Ping timeout: 480 seconds]
15:36brolin has joined #asahi-dev
16:08brolin has quit [Ping timeout: 480 seconds]
17:04gladiac has quit [Quit: k thx bye]
17:07amarioguy has joined #asahi-dev
17:59brolin has joined #asahi-dev
18:02Sid has joined #asahi-dev
18:05Sid is now known as sid-linux
18:05sid-linux has quit []
18:06sid-linux has joined #asahi-dev
18:07brolin has quit [Ping timeout: 480 seconds]
18:09brolin has joined #asahi-dev
18:12sid-linux has quit [Quit: User exited]
18:13sid-linux has joined #asahi-dev
18:17brolin has quit [Ping timeout: 480 seconds]
18:20sid-linuxHi -- this is my first message on this group ! Please guide me if my question is better discussed elsewhere !
18:20sid-linuxI'm having problems with the PMU on the M2
18:23sid-linuxTL;DR while the PMU on M2 seems to work, it is not able to deliver notifications after a certain number of events have been triggered.
18:28bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:28sid-linuxprobably IRQ related but I don't know much about IRQ kernel internals on linux
18:45mazwhat's the symptom?
18:52derzahl has quit [Ping timeout: 480 seconds]
18:54sid-linuxHere is something the proves that something is indeed awry https://github.com/AsahiLinux/linux/issues/150#issuecomment-1565303888
18:55sid-linuxWhen you set a PMU counter to interrupts after a few events it will do that; but here while PMU counts,
18:55sid-linuxit never interrupts (as it should)
18:55maz"[ perf record: Woken up 31284 times to write data ]"
18:55mazM2 pro.
18:56mazno interrupt though.
18:56mazM1 definitely generates interrupts.
18:56sid-linuxHow do did you gather there are no interrupts btw?
18:56sid-linuxon your M2
18:56maz"cat /proc/interrupts" is your friend.
18:57sid-linuxOh yes... so you're just seeing all zeros?
18:57mazhow did you gather that there was no interrupts?
18:57sid-linuxBy seeing no samples were collected. On intel for a similar counter I usually will see thousands of samples
18:58sid-linuxDid your perf tell you that it collected some samples
18:58alyssa has left #asahi-dev [#asahi-dev]
18:59sid-linux(i did see it woke you up 31284 times but what does it say for number of samples collected)
18:59mazah, no sample indeed. works fine on M1.
18:59mazso the driver is broken on M2.
18:59mazoh well.
19:01mazI guess they dropped the interrupt signalling this time around, and we don't support the exception mechanism.
19:05sid-linuxCould it be a big deal to get it to work? Or could it just be a bug/something different about the M2 PMU?
19:06mazI know as much as you do. that's the beauty of undocumented HW.
19:08sid-linux:-) ... Though you probably know a lot more than me anyways ! guessing from your irc nic and the git-blame
19:08sid-linuxyou probably wrote the original apple_cpu_pmu_m1.c ?
19:09gladiac has joined #asahi-dev
19:12mazbut the driver was based on a description of the HW written by marcan. the assumption was that the HW was similar, but it obviously isn't...
19:23sid-linuxThe end objective is to get the rr record/replay debugger to work on M2. (I understand it works on the M1 but I haven't tried that out myself as I dont have access to an M1 unfortunately)
19:24sid-linuxOnce the PMU is able to issue interrupts it will be very easy to get rr to work on M2. I think that is the main
19:24sid-linuxblocker at the moment
19:30sid-linux(Though rr does already pass many of its internal tests already on M2 but is hamstrung by this PMU not interrupting limitation)
19:30mazwell, I don't have much hope this is going to get magically fixed, unless someone reverse engineers what macos does.
19:32sid-linuxThanks for taking the time to chat with me about this btw. It was helpful even though resolution is unknown at the moment
19:44derzahl has joined #asahi-dev
19:48mazbingo.
19:48mazthe counter are wider than 48 bits this time.
19:48mazcounters*
19:49mazby forcing the counters to 64 bits, I get interrupts. No idea whether that's the right value yet, but at least that's a good hint of what's going on.
19:50sid-linuxWow !! Very encouraging !
19:55maz"[ perf record: Captured and wrote 3.477 MB perf.data (81501 samples) ]"
19:58mazso the new format is 64 bits, with bit 63 as the overflow bit which triggers the interrupt.
19:59mazI really don't want to add another event flag for this crap, this is getting silly.
20:00mazI'll sleep on it and post a patch tomorrow or next week. at least I know know what's going on.
20:01mazsid-linux: if you send me an email, I can credit you for the report in the patch.
20:02sid-linuxyour email is the same in the git-blame ?
20:04sid-linuxThanks -- I will send !
20:04sid-linux has quit [Quit: User exited]
20:20sid-linux has joined #asahi-dev
20:21sid-linuxmaz: email sent !
20:24mazsid-linux: you're OK with that email ending up in the kernel tree, right?
20:28sid-linuxyes thats cool...
20:29sid-linux(you should use my name as in my email... not my irc nick)
20:30sid-linuxWhat I mean: the full name in my email you got from me
20:36maz(and on this note, I'm stepping away from the computer...)
20:36sid-linuxsorry this is a newbie
20:37sid-linuxbut is there a quick way I can get a custom kernel for m2. Its probably much more complicated than on say fedora on an intel
20:37mazit's exactly the same if you're used to build your own kernel on x86.
20:37sid-linuxwhere you can just compile the kernel and dnf install it
20:38mazI 'dpkg -i' my own kernels, but that's a matyter of taste... ;-)
20:38mazmatter*
20:39sid-linuxI'll explore this myself -- no problems. I am also new to asahi/arch and have to figure out what I need to do for m1n1, grub etc.
20:40mazso whatever distro you're using, the same tooling should apply. the complexity of the apple stuff is that upstream isn't really usable for most people, and you need to grab the asahi tree instead.
20:40brolin has joined #asahi-dev
20:40mazif you already have *something* running, no need to touch m1n1 or grub.
20:42mazbut you'll have to look at the arch doc to find out how this works - I stick with Debian because I know my way around it.
20:42sid-linuxI'm sure there is some stuff on custom kernel compilation for asahi online. I'll investigate and report back.
20:42mazanyway, if you get a chance to test this patch before I send it, that'd be most appreciated.
20:43sid-linuxI went with arch because I'm new to asahi and wanted to take the easy defaults. Otherwise I like fedora. I certainly
20:43sid-linuxintend to test it out
20:43sid-linux(Asahi uses arch by default as you know)
20:44ellyqprobably not for long :P
21:03sid-linuxmaz: just a heads up -- I've timed out for today. I'm going to try to get a custom kernel going on Sunday and try to test your patch out. Thanks again and have a nice day/evening !
21:04sid-linuxellyq: any idea when we might get a new distribution with asahi? I'd love fedora. I wonder what it is going to be?
21:06sid-linux has quit [Quit: User exited]
21:07ellyqsid-linux: I know as much as you do, but if my hunch is right, I'd love to help with maintaining the new distro :)
21:07ellyqah rats, they left
21:16sid-linux has joined #asahi-dev
21:20sid-linuxellyq: sorry ! had to reboot. here only briefly though again. I'm rooting for fedora. I've used the aarch64 version
21:20sid-linuxvia podman in macOS. Fedora is a great distribution and its aarch64 version is just as good as the x86 one !
21:21ellyqsid-linux: to be honest, I haven't tried because I sold my mac, but you can build asahi kernel for fedora just fine if you want, folks over at #asahi-alt probably discussed it already
21:22sid-linuxthanks for the tip !
21:23ellyqyou're welcome, you can either make packages or just run make install, but it does get messy... but let's discuss it in that channel if you'd like :)
21:24sid-linuxYes, #asahi-alt / #asahi better forum for those discussion -- see you there sometime -- nice to meet you though. I'm going to exit for now. Have a good day/evening !
21:24ellyqthanks, take care!
21:25sid-linux has quit [Quit: User exited]
21:36barrowsx has joined #asahi-dev
21:37roxfan2 has quit [Ping timeout: 480 seconds]
21:39barrowsx has quit []
21:59barrowsx has joined #asahi-dev
22:02roxfan has joined #asahi-dev
23:29chadmed_ is now known as chadmed
23:40barrowsx has quit [Quit: barrowsx]
23:46nsklaus has quit [Ping timeout: 480 seconds]
…