#
…

2021-10-13

00:16alyssahmmm do I m1 or sleep
00:16The_DarkFire_[m]M1 will be there tomorrow
00:16alyssaYeah but so will my homework
00:22Orsira has quit [Quit: WeeChat 3.3]
00:31yuyichao_ has joined #asahi
00:35yuyichao has quit [Ping timeout: 480 seconds]
00:49robinp_ has quit [Read error: Connection reset by peer]
01:14yuyichao_ has quit [Ping timeout: 480 seconds]
01:51Nspace has quit [Quit: Nspace]
02:25phiologe has joined #asahi
02:27PhilippvK has quit [Ping timeout: 480 seconds]
03:03yuyichao_ has joined #asahi
03:27marvin24 has joined #asahi
03:30marvin24_ has quit [Ping timeout: 480 seconds]
03:52kov has quit [Quit: Coyote finally caught me]
03:52kov has joined #asahi
05:19marcanwell, sounds like this weekend is going to be interesting
05:28marcanJTL: M1X/M2
05:52chadmedthey really gonna make me get up at 3am to watch this? *sigh* all business should be conducted on my timezone only
07:06j_eymarcan: lets hope they release macbook pros w/o touchbar lol
07:06marcanthat's pretty much confirmed
07:06marcantouchbar is dead
07:07marcan(which is unfortunate for M1 MBP owners since... there probably will never be enough momentum for a good ecosystem for those)
07:07marcan(but at least we'll do keyboard emu)
07:07svendid apple ever create a good ecosystem for the touchbar? it felt pretty useless on my old work-mbp
07:08marcanfair point...
07:11j_eyits a nice idea, maybe if it was above the normal keys, or something
07:19j_eythat was a bit over the top :p
07:19klangeIt's the _touch_ bit that always annoyed me, so Maximum-style in-key displays would be great...
07:21svenyup, will ack that later :)
07:22kode54 has quit [Quit: Ping timeout (120 seconds)]
07:23grange_c has quit [Quit: Ping timeout (120 seconds)]
07:23maz has quit [Quit: ZNC 1.8.1+deb1 - https://znc.in]
07:23kenzie has quit [Quit: Ping timeout (120 seconds)]
07:25klangeMaximus 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?
07:26blasty has quit [Remote host closed the connection]
07:26nico_32 has quit [Remote host closed the connection]
07:28akemin_dayo has quit [Ping timeout: 480 seconds]
07:29Ziemas has quit [Remote host closed the connection]
07:30Hotswap has quit [Remote host closed the connection]
07:41nico_32 has joined #asahi
07:42blasty has joined #asahi
07:49user_ has joined #asahi
07:56user_ has quit []
08:20Hotswap has joined #asahi
08:20Ziemas has joined #asahi
08:21maz has joined #asahi
08:21kode54 has joined #asahi
08:23grange_c has joined #asahi
08:25kenzie has joined #asahi
08:27akemin_dayo has joined #asahi
08:48rross101j_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?
08:53j_eyrross101: nice, using linux.py or run_guest?
08:53j_eygraphics should Just Work with the current framebuffer
09:04rross101run_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
09:08j_eyit should print the console to the screnn too
09:08j_ey*screen
09:09rross101Hmm. not doing that.
10:37JTL1 has joined #asahi
10:39JTL is now known as Guest2710
10:39JTL1 is now known as JTL
10:39Guest2710 has quit [Ping timeout: 480 seconds]
10:39JTL has quit []
10:39JTL has joined #asahi
10:44bps has quit [Remote host closed the connection]
10:45bps has joined #asahi
10:49JTL is now known as JTL1
10:50JTL1 has quit []
10:50JTL has joined #asahi
11:05aleasto has joined #asahi
11:13povikj_ey: not here it doesn't (graphics just work)
11:13povikwith the lagcy framebuffer or SIMPLEDRM, both doesn't work for me
11:14Glanzmann has joined #asahi
11:14poviki am actually quite frustrated by it, spent some time trying to get it to work
11:14povikthe lagacy framebuffer crashes xorg
11:14povikthe SIMPLEDRM never shows up in /dev/dri/ or where it should
11:14Glanzmannpovik: For me and alyssa it seems to work.
11:14GlanzmannAt least I worked several days on the mini.
11:14GlanzmannThat is with Debian testing.
11:15j_eypovik: oh, i never tried X, but at least the console should be printed
11:15poviki tried deubgging it and saw SIMPLEDRM never gets its probe called
11:15povikj_ey: yeah, console works alright with the legacy framebuffer
11:16GlanzmannActually you can use the mini as a desktop, if you have usb sound device and don't mind the tiering in firefox.
11:17povikGlanzmann: can you tell more about your setup? do you have SIMPLEDRM enabled?
11:17poviki use debian bookworm, let's see if this is the same as testing
11:18povikthis is with a DCP driver, right?
11:18Glanzmannpovik: I followed alyssa lead, documented in the txt above, than I installed xorg, fvwm2, uxterm, firefox, tmux, and so on and ran 'startx'.
11:18Glanzmannpovik: The DCP driver is already in allysas tree.
11:19Glanzmannpovik: So that are the exact steps to reproduce.
11:19povikguess it has come to that
11:19GlanzmannX comes up with the wrong resultion, but you can fix it with xrandr.
11:19povikGlanzmann: thanks, i will try merging the DCP driver into my tree
11:19povikif that doesn't work, i will try the exact same steps
11:20Glanzmannpovik: Once you audio driver is ready for beta testing, let me know, than I'll try it.
11:20povikGlanzmann: sure will do
12:16Glanzmann has quit [Quit: leaving]
12:32rross101 has quit [Remote host closed the connection]
13:03alyssapovik: oh no
13:09el0y has joined #asahi
13:15alyssapovik: just looked at your sound driver WIP, looks good :-)
13:16alyssanit - what are the peek/poke functions for? why not just use readl/writel directly?
13:18rross101 has joined #asahi
13:21povikglad there are some eyes on it
13:21povikalyssa: no purpouse apart from that it looks nicer to me
13:21j_eyive seen quite a few drivers do that
13:22povikyeah, got inspired elsewhere
13:22j_eyAIC does it even
13:23rross101 has quit [Remote host closed the connection]
13:41alyssapovik: also, how goes the r/e? :]
13:41jbowen has joined #asahi
14:04everslick_ has quit [Remote host closed the connection]
14:04everslick_ has joined #asahi
14:07yuyichao_ has quit [Ping timeout: 480 seconds]
14:07alyssalooks like linux-next has PCI+i2c+tipd now, nice :]
14:09povikalyssa: haven't done much yet
14:09svennext up: horrible dwc3 quirk and a minimal atc phy driver
14:10svenand i guess i should start to work on sane device tree commits as well for that stuff
14:10svenand then *finally* back to nvme :)
14:10povikso far i have been trying the codec to tell me when the audio jack is plugged in
14:10povikit has yet to tell me
14:11alyssapovik: that's not pinctrl or smc or something?
14:11povikwell an interrupt goes through pinctrl
14:11povikbut the codec does the sensing itself
14:11povikalso learned theres a different jack wiring in china
14:15* alyssarebases on linux-next/master
14:15alyssadiff down to... uh... +9607 -67 ...
14:15povikfrankly most of my time spent on M1 lately has been trying to get graphics to work
14:15rross101 has joined #asahi
14:15povikalyssa: should have jumped on your driver right away
14:15alyssathe largest changes in there by line count are DCP and NVMe
14:15alyssaDCP, because it is a bloody pain, and NVMe, because upstream wants it copypasted
14:16alyssaand +900 lines of device tree changes alone
14:18alyssaj_ey: what's the status of pinctrl?
14:19j_eyalyssa: I should be sending out v3 soon (not sure if today, but this week for sure)
14:20alyssawould be nice to have 90's linux desktop in linux-next anyway :0
14:20j_eyLinus pinged me asking me how it was going :)
14:20j_ey(Wallej, pinctrl maintainer, not torvalds)
14:20alyssaI have yet to interact with Linus Torvalds
14:20j_ey*Walleij
14:23rross101 has quit [Remote host closed the connection]
14:24alyssa^ current state of my downstream
14:24yuyichao_ has joined #asahi
14:25alyssapovik: might be useful to you, e.g. for dcp you need to cherrypick everything under DCP and RTKit and device tree
14:25svenah, locked darts *sigh*
14:27alyssasven: marcan basically volunteered to take on locked darts after getting agx.py written ;)
14:28alyssaI suppose when agx.py does get written my diff to linux-next will balloon again
14:28povikwe should get a live chart
14:29povikalyssa: re: commits, great, thanks
14:30alyssasven: the drm/cma-helper commit isn't mine but is needed for DCP.
14:30sven*shrug*
14:30sveni don't even have a screen connected to my development machine :D
14:31alyssaI gave it a reviewed-and-tested-by ... guess I should bump it on dri-devel since it's a prereq
14:31alyssait's like 1 line
14:37alyssasent a v2 with my tag on it as a gentle bump
14:38alyssasven: NVMe doesn't build against linux-next
14:38alyssarq_integrity_vec, blk_integrity_rq, ... got yeeted
14:38j_eydrivers/nvme is a moving target I guess
14:39sven16:09:41 <sven> next up: horrible dwc3 quirk and a minimal atc phy driver
14:39sven16:10:10 <sven> and i guess i should start to work on sane device tree commits as well for that stuff
14:39sven16:10:17 <sven> and then *finally* back to nvme :)
14:42alyssamissing #include
14:42alyssak yeah +1 line fix :)
14:42* svenlikes problems that solve themselves!
14:42alyssasven: I am one such problem! :-p
15:19Nspace has joined #asahi
15:20bps has quit [Ping timeout: 480 seconds]
15:25poviki looked over some locked dart commits
15:25povikdoes it have an explanation?
15:26povikwhy does iboot lock the root pointer if it doesnt prevent us from modifying the lookup table?
15:26povikalso does macos modify the locked dart? does it need to? do we need to?
15:26poviki have questions :)
15:40Nspace has quit [Quit: Nspace]
15:56bps has joined #asahi
16:02svenno idea why iboot locks that dart
16:02svenmacos just reuses the pre-configured pagetable and that's what we will have to do as well
16:11povikbut we can still modify the mapping arbitrarily if we write to memory at that locked pointer, correct?
16:12svenwhat do you mean with "write to memory at that locked pointer"
16:12svenbut yes, we control the full pagetable
16:13povikAFAIK theres a register which says "this is where you should look first to look up virtual addresses"
16:13povikthis register is locked, but it points into memory we can write to
16:14povikdoesnt make much sense why its locked
16:14povikcan we lock other darts if we want to?
16:14svenit's a bit in some register, the dart driver even checks for that and refuses to probe
16:14svenwe first suspected it was meant to protect the DCP firmware but I don't think so anymore
16:14sventhe firmware is somehow mapped with this DAPF thing, but that has a different lock bit
16:15bps has quit [Ping timeout: 480 seconds]
16:15svenand apparently the co-processors have something like KTRR anyway
16:15povikcan we modify the firmware? what prevents us?
16:15svenit's signed
16:16povikassuming its just a blob in memory
16:16povikwe can write to it at any time
16:16svenwe can't
16:16svenwe 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
16:16svenbut we also don't need to run our own code there so we don't really care
16:17povikthis is just for the challenge of it :)
16:18svenat least I enjoy this project because there's no exploiting involved :)
16:22alyssasven: dumb question. why can't we unset the lock bit?
16:22alyssais it like a one-way fuse?
16:22svenpretty much
16:22sventhat bit locks down almost every register
16:23sventhe only thing left unlocked is the stuff required to flush the translation cache
16:28yuyichao has joined #asahi
16:31sven<sven> oh, and that wasn't a dumb question. it was the first thing i tried :D
16:31sven^-- not sure if that went through before my internet died
16:31j_eyit didnt
16:32yuyichao_ has quit [Ping timeout: 480 seconds]
16:49artemist has quit [Quit: artemist]
16:49artemist has joined #asahi
17:09yuyichao_ has joined #asahi
17:13yuyichao has quit [Ping timeout: 480 seconds]
17:14skali has joined #asahi
17:15jbowen has quit [Ping timeout: 480 seconds]
17:16jbowen has joined #asahi
17:20___nick___ has joined #asahi
17:20___nick___ has quit []
17:22___nick___ has joined #asahi
17:22bdju has quit [Remote host closed the connection]
17:22skali is now known as skali_
17:35poviksven: so to understand this fully: there's some protection mechanism which applies to ranges of physical addresses which makes the coprocessor firmwares read-only?
17:35svenwe can't even _read_ the firmware from the main processor
17:35svenbut for the DCP itself the .text section likely is read-only, yes
17:36svenand anything that's outside the text section can never be executed
17:36alyssaROP/JOP? :-p
17:36svenusually you use that to get a rwx mapping but that won't work here :D
17:38povikah, so this is some effectively isolated memory. okay
17:54yuyichao has joined #asahi
17:55skali_ is now known as skali
17:56skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:58yuyichao_ has quit [Ping timeout: 480 seconds]
17:58yuyichao_ has joined #asahi
18:03yuyichao has quit [Ping timeout: 480 seconds]
18:18bps has joined #asahi
18:21rgort10[m] has joined #asahi
18:30Nspace has joined #asahi
18:33yuyichao has joined #asahi
18:36yuyichao_ has quit [Ping timeout: 480 seconds]
18:42bps has quit [Ping timeout: 480 seconds]
18:49povikalyssa: the commit hashes you posted are not in mu-one/linux
18:50poviklet me know when you push, no hurry
18:56marcansven: ISTR being able to read various firmwares from the AP, way back when I was dumping memory
18:56marcanbut maybe the DCP isn't one of those
18:58svenhm.. i think i could only read everything after the .text section of DCP but didn't see the actual code anywhere
18:58svenbut i also didn't look very hard so it's possible i missed it
18:58tertu has quit [Remote host closed the connection]
18:58yuyichao_ has joined #asahi
18:58tertu has joined #asahi
18:58svenbut i'm pretty sure i couldn't access the ANS firmware
19:00Nspace has quit [Quit: Nspace]
19:01erincandescent has quit [Remote host closed the connection]
19:01Nspace has joined #asahi
19:02erincandescent has joined #asahi
19:02yuyichao has quit [Ping timeout: 480 seconds]
19:03bdju has joined #asahi
19:03sorearwhat happens if you try? synchronous exception?
19:06sven(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)
19:07povikah so this lives in the same physical address space after all
19:08marcanthe memory controller has a lot of carveout/protection features
19:13povikcould 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?
19:14svenunlike the other processors SEP can never be shut down
19:14svenand you need to setup some shared memory buffers to boot it
19:14marcaniBoot has a driver for it
19:14svenand SEP has a ROM which the other processors don't
19:15marcanit has to
19:15povikwait but the interface presented by SEP or the other coprocessors is coded in the firmware, so that does not make sense
19:15povikyeah, that does not make sense
19:15svenok, let me rephrase: you cannot shut down SEP without SEP cooperating
19:15svenbut i think the bigger reason is that SEP has a ROM and can verify the firmware you pass it
19:16marcanit's off when we boot though, right?
19:16marcanit has its own secureboot chain
19:16marcanwhich the other ASCs don't
19:16povikmakes sense
19:16marcanit also has way, way fancier memory protection
19:16marcanand memory encryption
19:16marcanand signing
19:17marcanif you compromise iBoot you compromise all the other ASCs, but not SEP
19:17povikmarcan: ^^ was just answering my own question up there
19:18jacoxon has joined #asahi
19:18marcanSEP firmware is also encrypted
19:18marcanwhich none of the others are
19:19marcanthat's one reason it makes sense for it to be off when the OS boots
19:19marcanif you want to use its services and trust the secret blob, boot it
19:19marcanif you don't, don't
19:19svengood point
19:20marcanthough AIUI the SEP is designed not to have power over the AP either
19:20marcanit's basically two-way isolation
19:20marcanit still has a DART etc
19:20marcanso there's not much reason to be concerned about backdoors other than in the SEP services themselves
19:24povikmarcan: is there some feature of the memory controller i could use to find the burst size register in audio dma?
19:24povikis there e.g. a transaction counter?
19:25poviki also thought about looking at dart faults, maybe they will have beginnings of the bursts only
19:28rross101 has joined #asahi
19:30gabuscus_ has joined #asahi
19:32jacoxon has quit []
19:34gabuscus has quit [Ping timeout: 480 seconds]
19:47___nick___ has quit [Ping timeout: 480 seconds]
19:47nsklaus_ has joined #asahi
19:53nsklaus has quit [Ping timeout: 480 seconds]
20:06rross101_ has joined #asahi
20:17rross101 has quit [Remote host closed the connection]
20:20rross101_ has quit [Remote host closed the connection]
20:20rross101 has joined #asahi
20:21rross101Hey 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.
20:23j_eyrross101: builtin keyboard support isnt on an asahi branch
20:24j_eythere's corellium patches for it though
20:29krbtgthey, if you can't read the firmware or write to it, out of sight, out of mind
20:30krbtgtit's the ryf way
20:36rross101 has quit [Quit: Page closed]
20:58jbowen has quit [Quit: leaving]
22:07aleasto has quit [Quit: Konversation terminated!]
22:28alyssapovik: sorry, rebased and hadn't pushed. branch 20211013 has it now
22:44alyssakrbtgt: The DCP driver will work fine in linux-libre unironically.
22:44alyssaactually, everything except SEP and Wi-Fi/Bluetooth will..
22:49krbtgtgotta love Boratcom
23:11yuyichao_ has quit [Ping timeout: 480 seconds]
23:14bps has joined #asahi
23:15chadmed has quit [Ping timeout: 480 seconds]
23:24s-h-i-n-o-b-i_ has quit [Remote host closed the connection]
23:28Nspace has quit [Quit: Nspace]
23:49yuyichao_ has joined #asahi
23:56nobodynada has joined #asahi
23:57nobodynadaHello! 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?
23:58nobodynadaI 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)
…