marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
<alyssa>
hmmm do I m1 or sleep
<The_DarkFire_[m]>
Sleep
<The_DarkFire_[m]>
M1 will be there tomorrow
<alyssa>
Yeah but so will my homework
<The_DarkFire_[m]>
Fair point
Orsira has quit [Quit: WeeChat 3.3]
yuyichao_ has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
robinp_ has quit [Read error: Connection reset by peer]
yuyichao_ has quit [Ping timeout: 480 seconds]
Nspace has quit [Quit: Nspace]
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
yuyichao_ has joined #asahi
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi
<marcan>
well, sounds like this weekend is going to be interesting
kenzie has quit [Quit: Ping timeout (120 seconds)]
<klange>
Maximus was an idea that came too soon. Those little OLED displays were too expensive in 2005~2007. While not properly keyboard-shaped, you can get a Stream Deck for a similar concept these days for, what, ¥30k?
blasty has quit [Remote host closed the connection]
nico_32 has quit [Remote host closed the connection]
akemin_dayo has quit [Ping timeout: 480 seconds]
Ziemas has quit [Remote host closed the connection]
Hotswap has quit [Remote host closed the connection]
nico_32 has joined #asahi
blasty has joined #asahi
user_ has joined #asahi
user_ has quit []
Hotswap has joined #asahi
Ziemas has joined #asahi
maz has joined #asahi
kode54 has joined #asahi
grange_c has joined #asahi
kenzie has joined #asahi
akemin_dayo has joined #asahi
<rross101>
j_ey: a new day, booted with the latest cpufreq/v1 branch and have got all the way to a working serial console with debian setup running. Thanks for your help. Next steps - getting a USB ethernet dongle to work, getting graphics to work?
<j_ey>
rross101: nice, using linux.py or run_guest?
<j_ey>
graphics should Just Work with the current framebuffer
<rross101>
run_guest. The laptop screen just has the logo on it; and I can't get further in the setup because I've no internet. I could copy a filesystem/drivers to a USB drive; not sure where to go to find the right ones
<j_ey>
it should print the console to the screnn too
<j_ey>
*screen
<rross101>
Hmm. not doing that.
JTL1 has joined #asahi
JTL is now known as Guest2710
JTL1 is now known as JTL
Guest2710 has quit [Ping timeout: 480 seconds]
JTL has quit []
JTL has joined #asahi
bps has quit [Remote host closed the connection]
bps has joined #asahi
JTL is now known as JTL1
JTL1 has quit []
JTL has joined #asahi
aleasto has joined #asahi
<povik>
j_ey: not here it doesn't (graphics just work)
<povik>
with the lagcy framebuffer or SIMPLEDRM, both doesn't work for me
Glanzmann has joined #asahi
<povik>
i am actually quite frustrated by it, spent some time trying to get it to work
<Glanzmann>
povik: I followed alyssa lead, documented in the txt above, than I installed xorg, fvwm2, uxterm, firefox, tmux, and so on and ran 'startx'.
<Glanzmann>
povik: The DCP driver is already in allysas tree.
<Glanzmann>
povik: So that are the exact steps to reproduce.
<povik>
guess it has come to that
<Glanzmann>
X comes up with the wrong resultion, but you can fix it with xrandr.
<povik>
Glanzmann: thanks, i will try merging the DCP driver into my tree
<povik>
if that doesn't work, i will try the exact same steps
<Glanzmann>
povik: Once you audio driver is ready for beta testing, let me know, than I'll try it.
<povik>
Glanzmann: sure will do
Glanzmann has quit [Quit: leaving]
rross101 has quit [Remote host closed the connection]
<alyssa>
povik: oh no
el0y has joined #asahi
<alyssa>
povik: just looked at your sound driver WIP, looks good :-)
<alyssa>
nit - what are the peek/poke functions for? why not just use readl/writel directly?
rross101 has joined #asahi
<povik>
:)
<povik>
glad there are some eyes on it
<povik>
alyssa: no purpouse apart from that it looks nicer to me
<j_ey>
ive seen quite a few drivers do that
<povik>
yeah, got inspired elsewhere
<j_ey>
AIC does it even
rross101 has quit [Remote host closed the connection]
<alyssa>
povik: also, how goes the r/e? :]
jbowen has joined #asahi
everslick_ has quit [Remote host closed the connection]
everslick_ has joined #asahi
yuyichao_ has quit [Ping timeout: 480 seconds]
<alyssa>
looks like linux-next has PCI+i2c+tipd now, nice :]
<povik>
alyssa: haven't done much yet
<sven>
next up: horrible dwc3 quirk and a minimal atc phy driver
<sven>
and i guess i should start to work on sane device tree commits as well for that stuff
<sven>
and then *finally* back to nvme :)
<povik>
so far i have been trying the codec to tell me when the audio jack is plugged in
<povik>
it has yet to tell me
<alyssa>
povik: that's not pinctrl or smc or something?
<povik>
well an interrupt goes through pinctrl
<povik>
but the codec does the sensing itself
<povik>
also learned theres a different jack wiring in china
* alyssa
rebases on linux-next/master
<alyssa>
diff down to... uh... +9607 -67 ...
<povik>
frankly most of my time spent on M1 lately has been trying to get graphics to work
rross101 has joined #asahi
<povik>
alyssa: should have jumped on your driver right away
<alyssa>
the largest changes in there by line count are DCP and NVMe
<alyssa>
DCP, because it is a bloody pain, and NVMe, because upstream wants it copypasted
<alyssa>
and +900 lines of device tree changes alone
<alyssa>
j_ey: what's the status of pinctrl?
<j_ey>
alyssa: I should be sending out v3 soon (not sure if today, but this week for sure)
<alyssa>
ack
<alyssa>
would be nice to have 90's linux desktop in linux-next anyway :0
<j_ey>
Linus pinged me asking me how it was going :)
<j_ey>
(Wallej, pinctrl maintainer, not torvalds)
<alyssa>
:)
<alyssa>
I have yet to interact with Linus Torvalds
<j_ey>
*Walleij
rross101 has quit [Remote host closed the connection]
<povik>
can we modify the firmware? what prevents us?
<sven>
it's signed
<povik>
assuming its just a blob in memory
<povik>
we can write to it at any time
<sven>
nope
<sven>
we can't
<sven>
we can write to some area which contains vtables and stuff but we'd run into the KTRR-like protection if we tried to use that to run our own code
<sven>
but we also don't need to run our own code there so we don't really care
<povik>
this is just for the challenge of it :)
<sven>
at least I enjoy this project because there's no exploiting involved :)
<alyssa>
sven: dumb question. why can't we unset the lock bit?
<alyssa>
is it like a one-way fuse?
<sven>
pretty much
<sven>
that bit locks down almost every register
<sven>
the only thing left unlocked is the stuff required to flush the translation cache
yuyichao has joined #asahi
<sven>
<sven> oh, and that wasn't a dumb question. it was the first thing i tried :D
<sven>
^-- not sure if that went through before my internet died
<j_ey>
it didnt
yuyichao_ has quit [Ping timeout: 480 seconds]
artemist has quit [Quit: artemist]
artemist has joined #asahi
yuyichao_ has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
skali has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
___nick___ has joined #asahi
___nick___ has quit []
___nick___ has joined #asahi
bdju has quit [Remote host closed the connection]
skali is now known as skali_
<povik>
sven: so to understand this fully: there's some protection mechanism which applies to ranges of physical addresses which makes the coprocessor firmwares read-only?
<sven>
we can't even _read_ the firmware from the main processor
<sven>
but for the DCP itself the .text section likely is read-only, yes
<sven>
and anything that's outside the text section can never be executed
<alyssa>
ROP/JOP? :-p
<sven>
usually you use that to get a rwx mapping but that won't work here :D
<povik>
ah, so this is some effectively isolated memory. okay
yuyichao has joined #asahi
skali_ is now known as skali
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yuyichao_ has quit [Ping timeout: 480 seconds]
yuyichao_ has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
bps has joined #asahi
rgort10[m] has joined #asahi
Nspace has joined #asahi
yuyichao has joined #asahi
yuyichao_ has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
<povik>
alyssa: the commit hashes you posted are not in mu-one/linux
<povik>
let me know when you push, no hurry
<marcan>
sven: ISTR being able to read various firmwares from the AP, way back when I was dumping memory
<marcan>
but maybe the DCP isn't one of those
<sven>
hm.. i think i could only read everything after the .text section of DCP but didn't see the actual code anywhere
<sven>
but i also didn't look very hard so it's possible i missed it
tertu has quit [Remote host closed the connection]
yuyichao_ has joined #asahi
tertu has joined #asahi
<sven>
but i'm pretty sure i couldn't access the ANS firmware
Nspace has quit [Quit: Nspace]
erincandescent has quit [Remote host closed the connection]
Nspace has joined #asahi
erincandescent has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
bdju has joined #asahi
<sorear>
what happens if you try? synchronous exception?
<sven>
yup
<sven>
(maybe not for DCP if i missed it, but that's what happened when i tried to access memory where the ANS firmware is supposed to exist)
<povik>
ah so this lives in the same physical address space after all
<marcan>
the memory controller has a lot of carveout/protection features
<povik>
could the reason why kernel is passed SEPFW and not the other firmwares in that the interface of SEP is different, and iboot doesnt have a driver for it?
<sven>
unlike the other processors SEP can never be shut down
<sven>
and you need to setup some shared memory buffers to boot it
<marcan>
iBoot has a driver for it
<sven>
and SEP has a ROM which the other processors don't
<marcan>
it has to
<povik>
wait but the interface presented by SEP or the other coprocessors is coded in the firmware, so that does not make sense
<povik>
yeah, that does not make sense
<marcan>
?
<sven>
ok, let me rephrase: you cannot shut down SEP without SEP cooperating
<sven>
but i think the bigger reason is that SEP has a ROM and can verify the firmware you pass it
<marcan>
it's off when we boot though, right?
<sven>
yes
<marcan>
yeah
<marcan>
it has its own secureboot chain
<marcan>
which the other ASCs don't
<povik>
makes sense
<marcan>
it also has way, way fancier memory protection
<marcan>
and memory encryption
<marcan>
and signing
<marcan>
if you compromise iBoot you compromise all the other ASCs, but not SEP
<povik>
marcan: ^^ was just answering my own question up there
jacoxon has joined #asahi
<marcan>
SEP firmware is also encrypted
<marcan>
which none of the others are
<marcan>
that's one reason it makes sense for it to be off when the OS boots
<marcan>
if you want to use its services and trust the secret blob, boot it
<marcan>
if you don't, don't
<sven>
good point
<marcan>
though AIUI the SEP is designed not to have power over the AP either
<marcan>
it's basically two-way isolation
<marcan>
it still has a DART etc
<sven>
yeah
<marcan>
so there's not much reason to be concerned about backdoors other than in the SEP services themselves
<povik>
marcan: is there some feature of the memory controller i could use to find the burst size register in audio dma?
<povik>
is there e.g. a transaction counter?
<povik>
i also thought about looking at dart faults, maybe they will have beginnings of the bursts only
rross101 has joined #asahi
gabuscus_ has joined #asahi
jacoxon has quit []
gabuscus has quit [Ping timeout: 480 seconds]
___nick___ has quit [Ping timeout: 480 seconds]
nsklaus_ has joined #asahi
nsklaus has quit [Ping timeout: 480 seconds]
rross101_ has joined #asahi
rross101 has quit [Remote host closed the connection]
rross101_ has quit [Remote host closed the connection]
rross101 has joined #asahi
<rross101>
Hey all. Do I need to use a different dts file for the Macbook Pro? Wondering if that's why my keyboard isn't working when I get a kernel to boot.
<j_ey>
rross101: builtin keyboard support isnt on an asahi branch
<rross101>
ah ok
<j_ey>
there's corellium patches for it though
<krbtgt>
hey, if you can't read the firmware or write to it, out of sight, out of mind
<krbtgt>
it's the ryf way
rross101 has quit [Quit: Page closed]
jbowen has quit [Quit: leaving]
aleasto has quit [Quit: Konversation terminated!]
<alyssa>
povik: sorry, rebased and hadn't pushed. branch 20211013 has it now
<alyssa>
krbtgt: The DCP driver will work fine in linux-libre unironically.
<alyssa>
actually, everything except SEP and Wi-Fi/Bluetooth will..
<krbtgt>
gotta love Boratcom
yuyichao_ has quit [Ping timeout: 480 seconds]
bps has joined #asahi
chadmed has quit [Ping timeout: 480 seconds]
s-h-i-n-o-b-i_ has quit [Remote host closed the connection]
Nspace has quit [Quit: Nspace]
yuyichao_ has joined #asahi
nobodynada has joined #asahi
<nobodynada>
Hello! I'm most likely going to be getting a M1X (or whatever they call it) as soon as it's available. Once I have the hardware, is there anything I can be doing to help contribute to the project?
<nobodynada>
I have cursory knowledge & experience with systems programming but not much with reverse engineering or the Linux kernel (besides what I've learned from watching marcan's streams)