ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
brolin has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
barrowsx has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
<povik>
alyssa: glad you get a kick out of it :-p
<povik>
cy8aer: that might come to be useful
<povik>
we can move array processing off to the firmware, that's actually part of the value proposition here
<povik>
but even then we want a userspace demonstrator first, that shows the benefit
<nicolas17>
so this is one of the few chips without strict firmware signature checking, and you're doing your own firmware?
barrowsx has quit [Quit: barrowsx]
<nicolas17>
an 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?
<marcan>
nicolas17: we remove specifically the one port m1n1 uses
<marcan>
each port has an independent controller, DART, etc. so we can just steal one
<nicolas17>
is it separate controllers?
<nicolas17>
ah cool
<marcan>
m1n1 also has code to forward this to the Linux DT for the same reason
<marcan>
the HV also intercepts power domain controls so macOS doesn't go trying to shut down the ones the HV uses
<jannau>
only thing that is shared between the usb ports is the interrupt of the usb-c port switch and PD controllers
<jannau>
and even that is not shared, there is a multiplexer which we currently ignore
chadmed_ has quit [Quit: Konversation terminated!]
chadmed_ has joined #asahi-dev
bisko has joined #asahi-dev
maximbaz has quit [Quit: bye]
maximbaz has joined #asahi-dev
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
bisko has quit []
gladiac has joined #asahi-dev
roxfan2 has joined #asahi-dev
roxfan has quit [Ping timeout: 480 seconds]
roxfan2 has quit [Ping timeout: 480 seconds]
nsklaus has joined #asahi-dev
bps has joined #asahi-dev
bisko has joined #asahi-dev
Deroy2112 has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
Deroy2112 has quit [Remote host closed the connection]
bigman has joined #asahi-dev
bigman has quit []
bisko has joined #asahi-dev
bigman has joined #asahi-dev
bigman has quit []
bps has quit [Ping timeout: 480 seconds]
bps has joined #asahi-dev
mkurz has joined #asahi-dev
mkurz_ has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
roxfan has joined #asahi-dev
roxfan2 has joined #asahi-dev
roxfan has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
richyliu29 has joined #asahi-dev
richyliu2 has quit [Ping timeout: 480 seconds]
richyliu29 is now known as richyliu2
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
gladiac has quit [Quit: k thx bye]
amarioguy has joined #asahi-dev
brolin has joined #asahi-dev
Sid has joined #asahi-dev
Sid is now known as sid-linux
sid-linux has quit []
sid-linux has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
sid-linux has quit [Quit: User exited]
sid-linux has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
<sid-linux>
Hi -- this is my first message on this group ! Please guide me if my question is better discussed elsewhere !
<sid-linux>
I'm having problems with the PMU on the M2
<maz>
I guess they dropped the interrupt signalling this time around, and we don't support the exception mechanism.
<sid-linux>
Could it be a big deal to get it to work? Or could it just be a bug/something different about the M2 PMU?
<maz>
I know as much as you do. that's the beauty of undocumented HW.
<sid-linux>
:-) ... Though you probably know a lot more than me anyways ! guessing from your irc nic and the git-blame
<sid-linux>
you probably wrote the original apple_cpu_pmu_m1.c ?
<maz>
yup
<sid-linux>
:-)
gladiac has joined #asahi-dev
<maz>
but 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...
<sid-linux>
The 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)
<sid-linux>
Once 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
<sid-linux>
blocker at the moment
<sid-linux>
(Though rr does already pass many of its internal tests already on M2 but is hamstrung by this PMU not interrupting limitation)
<maz>
well, I don't have much hope this is going to get magically fixed, unless someone reverse engineers what macos does.
<sid-linux>
Thanks for taking the time to chat with me about this btw. It was helpful even though resolution is unknown at the moment
<maz>
np[
derzahl has joined #asahi-dev
<maz>
bingo.
<maz>
the counter are wider than 48 bits this time.
<maz>
counters*
<maz>
by 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.
<sid-linux>
Wow !! Very encouraging !
<maz>
"[ perf record: Captured and wrote 3.477 MB perf.data (81501 samples) ]"
<sid-linux>
:-) :-)
<maz>
so the new format is 64 bits, with bit 63 as the overflow bit which triggers the interrupt.
<maz>
I really don't want to add another event flag for this crap, this is getting silly.
<maz>
I'll sleep on it and post a patch tomorrow or next week. at least I know know what's going on.
<maz>
sid-linux: if you send me an email, I can credit you for the report in the patch.
<sid-linux>
your email is the same in the git-blame ?
<maz>
yes.
<sid-linux>
Thanks -- I will send !
sid-linux has quit [Quit: User exited]
sid-linux has joined #asahi-dev
<sid-linux>
maz: email sent !
<maz>
sid-linux: you're OK with that email ending up in the kernel tree, right?
<sid-linux>
yes thats cool...
<sid-linux>
(you should use my name as in my email... not my irc nick)
<sid-linux>
(thanks)
<sid-linux>
What I mean: the full name in my email you got from me
<maz>
(and on this note, I'm stepping away from the computer...)
<sid-linux>
sorry this is a newbie
<sid-linux>
question
<sid-linux>
but 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
<maz>
it's exactly the same if you're used to build your own kernel on x86.
<sid-linux>
where you can just compile the kernel and dnf install it
<maz>
I 'dpkg -i' my own kernels, but that's a matyter of taste... ;-)
<maz>
matter*
<sid-linux>
I'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.
<maz>
so 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.
brolin has joined #asahi-dev
<maz>
if you already have *something* running, no need to touch m1n1 or grub.
<maz>
but 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.
<sid-linux>
I'm sure there is some stuff on custom kernel compilation for asahi online. I'll investigate and report back.
<maz>
anyway, if you get a chance to test this patch before I send it, that'd be most appreciated.
<sid-linux>
I went with arch because I'm new to asahi and wanted to take the easy defaults. Otherwise I like fedora. I certainly
<sid-linux>
intend to test it out
<sid-linux>
(Asahi uses arch by default as you know)
<ellyq>
probably not for long :P
<sid-linux>
maz: 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 !
<sid-linux>
ellyq: any idea when we might get a new distribution with asahi? I'd love fedora. I wonder what it is going to be?
sid-linux has quit [Quit: User exited]
<ellyq>
sid-linux: I know as much as you do, but if my hunch is right, I'd love to help with maintaining the new distro :)
<ellyq>
ah rats, they left
sid-linux has joined #asahi-dev
<sid-linux>
ellyq: sorry ! had to reboot. here only briefly though again. I'm rooting for fedora. I've used the aarch64 version
<sid-linux>
via podman in macOS. Fedora is a great distribution and its aarch64 version is just as good as the x86 one !
<ellyq>
sid-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
<sid-linux>
thanks for the tip !
<ellyq>
you'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 :)
<sid-linux>
Yes, #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 !