#
…

2021-08-02

00:30kettenis has quit [Ping timeout: 480 seconds]
01:58kettenis has joined #asahi
02:19AndrewLee[m] has joined #asahi
02:26PhilippvK has joined #asahi
02:30phiologe has quit [Ping timeout: 480 seconds]
02:58jbowen_ has joined #asahi
03:05jbowen has quit [Ping timeout: 480 seconds]
04:42nico_32 has quit [Remote host closed the connection]
04:45quarkyalice has quit [Remote host closed the connection]
04:45nico_32 has joined #asahi
05:00quarkyalice has joined #asahi
05:20quarkyalice has quit [Quit: Leaving]
05:53hexchain[m] has left #asahi [#asahi]
09:48quarkyalice has joined #asahi
10:22amwmarcan: Do you know what's required to get the keyboard going?
10:23amwThe USB drive to run the M1 off is compact but the keyboard is annoyingly large
10:26svenSPI controller (iirc also based on something linux already has a driver for) + platform backend for the already existing driver
10:30svenoh, and probably gpio/pinctrl to make SPI work in the first place
10:35amwok - so we don't need those pesky dart/ASC thingies - Yeah!
10:36sventhat reminds me.. i should submit v5 of the dart driver
10:36pipcet[m]amw: I can answer questions about the corellium driver if that would help (and you don't want to look at it yourself)
10:38sventheir platform backend for the keyboard driver is probably a good start. might even already be upstreamable directly
10:40amwpipcet[m]:That would be nice. If it doesn't compromise my ability to make PRs I would be happy to look at it.
10:43pipcet[m]amw: best ask marcan about that, I don't want to do anything to ruin the PR-ability of anyone's changes :-)
10:43amwok - thanks - will do
12:15Raqbit6 has joined #asahi
12:17kettenisthe keyboard is allegedly the same as what is used in the most recent Intel Macs and does indeed use an SPI interface
12:17kettenison Intel Macs there is some sort of ACPI abstraction for the SPI controller though
12:18kettenisso that will require a new driver of some sort
12:18kettenisshouldn't be too complex though
12:21Raqbit has quit [Ping timeout: 480 seconds]
12:21Raqbit6 is now known as Raqbit
12:47pipcet[m]a complete driver is fairly complex, I'd say: you need to mux the pins to the SPI interface, write a driver for the SPI chip, write a driver for the second GPIO chip so you can receive interrupts from the keyboard, and then you need to adjust applespi to handle real SPI rather than ACPI. (Just maybe you can get away with setting the pins to GPIO and bit-banging SPI over it, but that's really only good enough for boot loaders.)
12:48pipcet[m]oh, and probably rely on m1n1 to bring up the clocks.
12:48kettenisor u-boot ;)
12:48_jannau_I see I need to stop slacking off on the pinctrl driver
12:51kettenisshould be possible to implement pinctrl using mostly generic code
13:00pipcet[m]also some of it might be set up the right way already, but relying on Apple to keep things sane seems a problematic bet at best.
13:04amwWould the linux/drivers/input/keyboard/applespi.c be relevant?
13:04pipcet[m]very much so :-)
13:16alyssaamw: I believe the rule is if you look at corellium code, tell sven but don't tell marcan 😋
13:18alyssakettenis: corellium didn't do DCP/AGX code so I'm clear 🙃
13:36pipcet[m]alyssa: btw, I'm playing around with the DCP stuff a little, but so far all I've found out is (1) the DCP doesn't like it if you fail to initialize the shared memory area to zero before giving it access (2) the magic numbers for setting the backlight brightness are "A352", 15, and 0x20d0000
13:46jbowen_ has quit [Quit: leaving]
13:53skipwich has joined #asahi
14:02jbowen has joined #asahi
14:58bronzie94 has joined #asahi
15:22bronzie94 has left #asahi [#asahi]
15:23Raito_Bezarius has quit [Ping timeout: 480 seconds]
15:31neobrain has joined #asahi
15:32Raito_Bezarius has joined #asahi
17:03roxfan has joined #asahi
18:09roxfan has quit [Read error: Connection reset by peer]
18:11quarkyalice has quit [Remote host closed the connection]
18:12quarkyalice has joined #asahi
18:16quarkyalice has quit [Remote host closed the connection]
18:17Andalu30 has joined #asahi
18:17quarkyalice has joined #asahi
18:22roxfan has joined #asahi
18:37marcanalyssa: I literally looked at corellium code on my stream the other day, where did this myth come from? >_>
18:38marcanpipcet[m]: those magic numbers are for what DCP firmware version? because as I said, the ABI is not stable, not even the call numbers
18:38marcan(which is yet another reason why we won't and cannot dual-boot within a single OS container :p)
18:49roxfan2 has joined #asahi
18:53Andalu30 has quit [Quit: Konversation terminated!]
18:53alyssamarcan: "where did this myth come from?" probably twitter
18:53alyssaor me and sven conspiring
18:53alyssaor me and sven conspiring on twitter?
18:54marcanthat sounds about right
18:55roxfan has quit [Ping timeout: 480 seconds]
18:58alyssa sven: 😈
19:00alyssamarcan: "A443": "IOMobileFramebufferAP::printRegs()",
19:00alyssa^ That seems super interesting, have you tried that?
19:00marcanI have not!
19:01marcanA443 = Call(int_, "do_create_default_frame_buffer")
19:01marcanremember what I said about unstable ABI?
19:02jixhow does that work when you have different mac os versions installed?
19:02j_eythe firmware is per-boot
19:03j_eyI mean, per partition
19:03alyssaj_ey: that's a relief.
19:03jixah, so at least it doesn't randomly change for linux then when you update mac os on another partition...
19:04marcanthis is why I'm going to declare certain macos versions (i.e. firmware bundles) golden for linux
19:04marcanand we will only support those
19:04j_eymarcan: I wonder if the DCP firmware and macos are in the same repo, or at least some shared headers
19:04alyssaalmost certainly.
19:04j_ey(just out of curiosity)
19:04marcanI'm pretty sure they have some generator thing for the IPC
19:04marcansimilar to what we'll do
19:05alyssamarcan: I'm also wondering, like
19:05alyssayou joke about splitting a driver down the middle and putting half on each processor
19:05alyssais it possible they literally have a single driver src tree and it's just compiled for heterogenous processor etc?
19:06marcanalyssa: printRegs does... nothing
19:06marcanand nah I don't think they're that smart
19:06marcanbut they do obviously share code
19:06marcanprobably via copy and paste :p
19:07marcanit's A444 on 12.0-beta3 fwiw
19:08marcanso poll: should I spend some time writing an install script so we can actually switch versions without doing a full macos install, and without a gian partition and waiting for an hour?
19:08marcanor should I keep that on the stack and go straight to working on AGX?
19:08* alyssacoughs #2
19:08j_eyI mean, the choice is obvious for me :P
19:09alyssai am admittedly biased towards getting to try out my 3d drivers on linux ;p
19:09marcanhave you verified that they work after updating macos btw? maybe some of the stuff you have to deal with in userspace is also firmware-dependent :p
19:10alyssait worked between two versions within 11.x ...
19:10kettenisthe benefit of #1 could be that more people start hacking on Linux kernel code
19:10marcantime to put on 12.0-betaX!
19:10marcansince you'll need that for DCP anyway
19:10alyssamarcan: thanks for volunteering to test ahead of time
19:10kettenisbut I'm not sure if that will really be the case
19:11marcanwell, I don't think writing an installer should take *that* long, unless I hit a showstopper, in which case I could shelve it and come back later
19:11marcanmain thing I need to verify is that you *can* use machine owner credentials from another installed OS for bputil/kmutil, I'm not entirely sure about that yet
19:11alyssakettenis: as much of a PITA the macos dual install is, it's far more newbie friendly than linux kernel hacking :(
19:11marcanif you can't that kind of breaks my current idea
19:11j_eymarcan: prototype installer to test assumption, then AGX >:D
19:12marcanalso if anyone knows of a portable python3 bundle thingy I can just download and run on macos/arm64, that would be helpful, since I'd much rather write this in python than, uh, shellscripts and C tools?
19:13kettenisthe recovery environment doesn't have python?
19:13marcanit has perl but just... no.
19:13* alyssacoughs agx
19:15kettenisregarding the dcp and agx code, it would be nice if that could would end up being evailable under a non-GPL license (dual licensed or using the same license as the i915/radeon/amdgpu code) such that we can use it in *BSD
19:16marcanwe do not load those blobs from the OS
19:16marcanthey are loaded from the bootloader
19:16marcanoh you mean the drivers?
19:16marcaneverything will be MIT
19:17marcan(dual MIT/GPL)
19:17marcanI made the decision at the start to MIT everything for this and other reasons :-)
19:17roxfan2i think xcode has python3, maybe you can make a minimal env from that one somehow
19:17roxfan2 is now known as roxfan
19:18marcanAIUI this is already the case for the core drm/kms code and the big drivers
19:19kettenisjust making sure alyssa is on board with that as well ;)
19:24erincandescent has quit [Remote host closed the connection]
19:39brentr123[m]<VinDuv_ "MacPorts can create install pack"> Could just brew install python3 and copy the directory with the files in it and zip it up
19:42jixnever used it but it seems there is a py2app thing that generates stand alone app bundles from python scripts and supports arm since the latest release https://py2app.readthedocs.io/en/latest/changelog.html#py2app-0-24
19:45marcanbrentr123[m]: I can't figure out how to download homebrew packages, lol
19:45marcanseems ghcr.io needs authentication?
19:45brentr123[m]<marcan "brentr123: I can't figure out ho"> Allow me
19:45marcanI assume it wants some token, presumably there is some API flow to get one
19:46brentr123[m]<marcan "I assume it wants some token, pr"> Here
19:46brentr123[m]Run this in terminal
19:46brentr123[m]Then brew install python3
19:46marcan... yes I know how to install homebrew
19:46marcanthe point being I want to be able to download the package directly so I don't have to
19:46marcanideally if the installer is python we shouldn't even need to build this on a mac
19:47marcananyway, I'm off to sleep
19:49pg12_ has joined #asahi
19:56pg12 has quit [Ping timeout: 480 seconds]
20:06fedx[m] has joined #asahi
20:06fedx[m] has left #asahi [#asahi]
20:07fedx[m] has joined #asahi
20:09fedx[m]I have a 16" MacBook Pro, does Asahi have the drivers I need to install Linux, and is it even possible to install Linux?
20:09Serentty[m]That's Intel.
20:09Serentty[m]Asahi is about the ARM ones.
20:10Serentty[m]You can install Linux on what you have, but it will be very different. If you just do some googling it shouldn't be that hard to find out what you need. Drivers might be slightly painful.
20:11fedx[m]The issue is it has a T2 chip which controls audio, keyboard, and most importantly storage. It is similar to an M1, and M1 Macs did away with a T2 because they have the functionality built in.
20:11fedx[m]It seemed reasonable to think Asahi would work on a T2.
20:11Serentty[m]Yeah, I've heard that that can cause driver pain.
20:12Serentty[m]<fedx[m] "It seemed reasonable to think As"> Unfortunately, everything is really different. The M1 Macs are much more like iOS devices.
20:12fedx[m]Huh, so this is more like jailbreaking or Project Sandcastle and a T2 is just drivers?
20:13Serentty[m]There's no jailbreaking necessary.
20:13Serentty[m]But porting and writing drivers, yes.
20:14marvin24 has joined #asahi
20:17pipcet[m]marcan: well, yes, that's why I said A352 rather than applyProperty. I have no idea whether it even is applyProperty here, because of the firmware version dependency.
20:18fedx[m]Ok, any good place to get help with T2 drivers?
20:31bps has quit [Ping timeout: 480 seconds]
21:10fedx[m]OK, Thanks!
21:15artemist has quit [Quit: artemist]
21:17artemist has joined #asahi
22:06TheJollyRoger has quit [Remote host closed the connection]
22:06TheJollyRoger has joined #asahi
23:12quarkyalice has quit [Remote host closed the connection]
23:12quarkyalice has joined #asahi
23:41quarkyalice has quit [Remote host closed the connection]
23:42quarkyalice has joined #asahi
23:52amwmarcan: Looked at the correllium code and keyboard looks straight forward, SPI + GPIO hardware + patches to apple keyboard driver
23:53amwCan I just start writing fresh code based on reading that and submit a PR or is that too risky?
23:53amwShould this be on #asahi-re? I'm just reading publically available C code on github...
…