#
…

2021-07-28

00:09kettenis_ has joined #asahi
00:11kettenis has quit [Ping timeout: 480 seconds]
01:48yuyichao_ has joined #asahi
02:32phiologe has joined #asahi
02:35PhilippvK has quit [Ping timeout: 480 seconds]
04:17amwhablerentand[m]: I just uploaded a photo of my console kernel messages with the USB keyboard plugged in through a USB Type-C=>A 4 port hub https://raw.githubusercontent.com/amworsley/asahi-wiki/main/images/USB-keyboard-boot.png
05:14bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:30quarkyalice has joined #asahi
06:20hell__hablerentand[m]: most likely unrelated, but: judging by the timestamp of the `random: crng init done` log line, looks like your machine is short on entropy
06:34quarkyalice has quit [Ping timeout: 480 seconds]
06:39quarkyalice__ has joined #asahi
06:49alicela1n has quit [Quit: Reconnecting]
06:49alicela1n has joined #asahi
08:26akemin_dayo has quit [Ping timeout: 480 seconds]
09:03akemin_dayo has joined #asahi
09:40Namidairo has quit [Ping timeout: 480 seconds]
09:41aleasto has joined #asahi
12:12bisko has joined #asahi
12:39Namidairo has joined #asahi
12:40Namidairo has quit []
12:40Namidairo has joined #asahi
12:51hashcheck has joined #asahi
12:55yuyichao_ has quit [Ping timeout: 480 seconds]
13:04alyssahell__: I noticed that on mine as well
13:05alyssaamw: That looks normal?
13:05alyssaWhen I tried, I wasn't getting feedback from the keyboard at the console directly
13:05alyssabut I was when the shell finally came up
13:06alyssaIncidentally, init=/bin/sh was broken for me, didn't investigate why. assuming it was spamming UART instead of onscreen
13:07alyssaBooted as:
13:07alyssaM1N1DEVICE=/dev/ttyACM0 python3 proxyclient/tools/linux.py --bootargs="net.ifnames=0 rw root=/dev/sda2 rootwait rootfstype=ext4" ~/foo/Image.gz ~/foo/t8103-j274.dtb
13:07alyssa`rw root=/dev/sda2 rootwait rootfstype=ext4` is to boot off usb, you'll need to adjust for your own partition alayout. in my case /dev/sda1 contains a kernel for a chromebook ;)
13:08alyssa`net.ifnames=0` works around broken systemd behavior
13:08alyssanotice I'm not specifying init=, I'm using the default systemd for debin
13:19pipcet[m]you're not using an initrd at all?
13:27alyssaWhen I use Debian-built kernels I use the Debian initrd since things break otherwise, when I build my own kernel I don't use an initrd since I inevitably screw it up when rebuilding
13:27alyssaThis does preclude FDE on the kernels I build myself ..
13:28marcanalyssa: if you enable CONFIG_RANDOM_TRUST_BOOTLOADER, it'll start up with enough entropy
13:28marcanm1n1 passes through the seed from iBoot
13:28alyssamarcan: what do u do if u dont trust iFoot
13:31yuyichao_ has joined #asahi
13:31hashcheck has quit [Quit: Textual IRC Client: www.textualapp.com]
13:32* alyssashould get to "work"
13:40bradfier_ has joined #asahi
13:40bradfier has quit [Remote host closed the connection]
13:41yuyichao_ has quit [Ping timeout: 480 seconds]
15:59svenhttps://github.com/AsahiLinux/linux/commits/asc/dev not happy yet, but it's a start. this should be enough to bring up ANS at least
16:00sven(and to see [ 4.520198] apple-mailbox 23e400000.mbox: syslog message: apComms.cpp:372: SMC HID Event: 01 01 01 whenever you press the power button :D)
16:00pipcet[m]you get different messages if you hold it for a while, IIRC :-)
16:00svenin the syslog? let me try!
16:01sven[ 131.139246] apple-mailbox 23e400000.mbox: syslog message: apComms.cpp:372: SMC HID Event: 01 fe 01
16:01svenhah :)
16:01pipcet[m]I've been meaning to write code for the lid switch (which works the same way on the MBP)
16:02svenone of the two ANS endpoints is called "smc" fwiw. still no clue what it does though
16:02alyssa sven: nice nice
16:02alyssasven: sudden motion controller no wait
16:02alyssasystem management coprocessor er
16:03alyssaactual answer in the wiki
16:03svenno, i mean
16:03sventhere's SMC
16:03pipcet[m]the ANS has an SMC endpoint?!
16:03svenyeah, that
16:03svenit's at least called smc
16:03sveni dunno what it does though
16:03alyssasven: could just be an interrupt line from the SMC?
16:04pipcet[m](possibly it's for the SMC when it needs to talk to ANS without involving the AP?)
16:04svenalyssa: let me rephrase, the ANS has one mailbox channel called "smc"
16:04svenor maybe it needs to relay message to the SMC but can't talk to it directly?
16:04svenwho know. i haven't seen any traffic on it
16:05pipcet[m]have you tried setting your device on fire? It might be for high temperature conditions!
16:05alyssapipcet[m]: No, it's for sudden motion
16:05alyssasven: Try dropping your device from 10m
16:05pipcet[m]set it on fire AND drop it on the floor
16:06sveni wrote the code, you get to test it ;p
16:06alyssapipcet[m]: Good idea, thanks for volunteering
16:06pipcet[m]I've, uh, "tested" high temperature conditions by forgetting I was compiling stuff and putting my MBP back in the bag...
16:06tbodt has quit [Ping timeout: 480 seconds]
16:07sven0x20 is called "ans2" and 0x21 is called "smc". no traffic on either of them when tracing under the hv yet
16:07pipcet[m]alyssa: sudden motion is just 0g detection, right? You're paying for my space trip.
16:07svenugh. and ofc there's new merge conflics for the nvme platform split :(
16:07Z750 has quit [Ping timeout: 480 seconds]
16:07Simonx22 has quit [Ping timeout: 480 seconds]
16:12tbodt has joined #asahi
16:13Z750 has joined #asahi
16:13jackhill has quit [Ping timeout: 480 seconds]
16:15jackhill has joined #asahi
16:15Andalu30 has joined #asahi
16:16pipcet[m]I suppose no one's done any work towards making the HV trace LDNP, LDADDL, etc.?
16:17svenwhat are those?
16:19pipcet[m]weird memory accesses that are probably never used for MMIO space, but are used for DMA memory
16:19svenoh, arm64 instructions. i thought they were dt nodes :D
16:20pipcet[m]sven: you've got a mini, right? How many SMC keys do you have?
16:20svenno idea
16:24pipcet[m]probably not relevant yet, but there are just too many of those...
16:25svenfwiw, i just get the SMC syslog messages so far
16:25svenso i can't send commands yet without writing more code
16:26pipcet[m]that is awesome, though!
16:26svenyeah, it's slowly getting there :)
16:27sventhe code still has some rough edges that i'm not totally happy with but it seems to work for both ANS and SMC
16:27sven(and probably the others rtkit-based coprocessors as well)
16:28pipcet[m]which ones are rtkit-based? SIO, DCP, AOP?
16:29svenpossibly everything except for the SEP
16:30pipcet[m]that would be wonderful, at some point we're going to figure out how to make that thing produce audio :-)
16:31svengrep -lr RTKit /System/Volumes/Preboot/*/boot/*/usr/standalone/firmware/FUD/ results in SIO, ISP, AVE, DCP, AOP, ANE, GFX, DCP2 (???) and PMP
16:31svenand ANS is missing there for some reason, but that's RTKit too
16:39alyssasven: what about AVD?
16:39sven🤷‍♂️
16:39sven |- compatible:
16:39sven | avd,t8103
16:39svenlooks like something special
16:40alyssartkit wasn't special enough?
16:40svenmaybe it's just a special flavor of rtkit ;)
17:22Orsira has joined #asahi
17:26Orsira has quit [Remote host closed the connection]
17:26tomtastic_ has quit [Remote host closed the connection]
17:27marcansven: I do think ASCs can talk to each other's mailboxes somehow
17:27marcanso maybe it has to do with that, yeah
17:29marcanmultiple readers won't work, but multiple writers would
17:29svenhm, true
17:29marcanso perhaps there is a variant protocol for ASC-to-ASC where they each write to each other's mailbox only in the input direction
17:29marcanthat would require setting up an endpoint to just receive replies
17:29marcan(random-ass guess)
17:30tomtastic has joined #asahi
17:30svencould be :)
17:30marcanalyssa: avd is not a copro
17:30marcanit's pure hardware as far as I saw
17:30svenall i know is that there's no data on either of those two endpoints when running mac os
17:30marcanthere's no firmware for it
17:30marcanave *is* a copro
17:31marcanDCP2 is dcpext
17:31marcanand yes the firmware is a copy
17:31marcan(there's two DCPs, one for internal panel, one for DP/TB attached)
17:32ave(wow, I have an unfortunate name :p)
17:32marcansven: ANS is missing because it would be loaded from the iBoot1 blob and, unlike most everything else, actually has a stable ABI
17:32marcanso it doesn't have to match macOS versions, so not part of iBoot2 blobs
17:32marcanave: whoops :)
17:32svenah, makes sense
17:33marcanone thing I'm curious about is how they do DCP handover from iBoot1
17:33marcanthey have to
17:33marcanso that thing must have a way of at least doing glitchess firmware reloads for iBoot framebuffer states
17:33svenSMC is weird btw., it exposes shared memory over the MMIO bus (with the nonposted requirements and everything)
17:33marcanI think I saw some of that
17:34marcanthere's also the whole error reporting thing, right?
17:34marcansyslog goes to like three places
17:34sveni've only seen syslog to a buffer inside that shared memory thing
17:34svenbut i also haven't talked to SMC yet except for the common rtkit stuff
17:34marcanone is that, one is uart, and I think it can sometimes go to SPI too?
17:34avemarcan, nah dw!
17:34aveI'll just mute notifs here
17:34svenoh, could be
17:35alyssaave: you're pure hardware!
17:35alyssano wait you're a coprocessor
17:36svenlooks like the ANS firmware has a "smc_to_ans" string. so maybe it actually talks to the smc directly
17:36alyssamarcan: by the way, do we know if the firmwares are signed?
17:37alyssaand if not is there a way for eg m1n1 to load patched firmware (or would we have to futz with the preboot partition and break dual boot)
17:37sveni don't think those coprocessors have a bootrom, but we might not be able to reset them
17:38svenbut i'm sure that iboot verifies their signature before loading them
17:40alyssai did notice XNU loads AGX firmware specially.
17:40marcanalyssa: the firmwares are signed at the package level
17:40marcanthey are not verified by the copros themselves
17:40quarkyalice has joined #asahi
17:41marcanbut we can't change them on disk
17:41marcanI think the intent is that iBoot locks them in RAM, so we're not supposed to be able to modify them
17:41marcanbut I can't claim to have tried
17:41marcanalyssa: XNU does not load AGX firmware as far as I know
17:41marcanwhere do you see that?
17:41marcanit's on the preload list
17:41marcan(unless by "load" you mean "launch")
17:41svenit has _code_ to load these firmware, but i think that's dead code
17:42marcanyeah that
17:42marcanthere's lots of such dead code
17:42marcanobviously they *used* to load firmwares in drivers
17:42marcanthere's also a whole display driver that *doesn't* use DCP
17:42marcanbut that's not how it's done on M1
17:43svenfwiw, i haven't been able to reset the ANS, even though there's code in some kext that allegedly does just that
17:43sveni think that's just leftovers as well
17:43marcanI do hope I can reset DCP, because I sure expect to crash and confuse it often
17:43sven(or maybe there's a bit somewhere to disable resetting them, who knows)
17:43svenyeah... i've done that to ANS
17:43svenit's not great :D
17:43marcanthen again the m1n1 boot cycle is ~7 seconds which isn't *that* bad
17:43marcanANS... I'd be more scared of
17:44marcanOTOH the flash on the other end is still PCIe, and possibly NVMe?
17:44svenunless you actively try to crash it it's kinda hard
17:44marcanif so at least you shouldn't be able to damage it too badly.... hopefully
17:45marcananyway, /me -> sleep
17:45marcanyesterday and today have been, uh, days of unexpected things :(
17:45marcan(I'll let alyssa vouch :p)
17:45marcanhope I can stream tomorrow
17:45sveni've only managed to crash it by doing what mac os calls "sending a NMI" (makes sense :D), by sending invalid commands (who wouldn't panic there?!) and by telling to switch to a power state it's already in
17:47alyssamarcan: has had two days of unexpected things
17:47alyssastill not vouching unless i wake up to a dcp client tomorrrow ;P
17:57Ariadneyou guys are honestly killing this though
17:57alyssaAriadne: i hope not, i'm nonviolent
17:57Ariadnei meant figuratively
18:10roxfan has joined #asahi
18:11pipcet[m]when macOS crashes hard enough (or I enter the hypervisor), the clickpad on the MBP stops clicking. It's the weirdest thing.
18:11quarkyalice has quit [Ping timeout: 480 seconds]
18:11alyssapipcet[m]: like the home button on new iphones?
18:12pipcet[m]does it do that too? what horrible kind of witchcraft is this?
18:16alyssapipcet[m]: haptic feedback controlled in software so the user can configure the clickiness
18:16roxfan2 has quit [Ping timeout: 480 seconds]
18:18pipcet[m]oh, I see. that might mean I'm not definitely insane yet :-)
18:20reillyeon has quit [Remote host closed the connection]
18:21reillyeon has joined #asahi
18:24quarkyalice has joined #asahi
18:35quarkyalice has quit [Ping timeout: 480 seconds]
18:51yuyichao_ has joined #asahi
19:01Orsira has joined #asahi
19:02Andalu30 has quit [Remote host closed the connection]
19:02kit_ty_kate1 has quit [Quit: WeeChat 2.9]
19:02Orsira has quit [Remote host closed the connection]
19:25svenmarcan: i think you may be right with that iop communication theory
19:26svenfrom what i can tell ANS receives messages on endpoint 0x20 but replies to them using a different mechanism on endpoint 0x21
19:46aleasto has quit [Remote host closed the connection]
19:52bsandro has left #asahi [#asahi]
20:06sven[ 0.402106] apple-mailbox 277400000.mbox: syslog message: cmd.c:5414: boot mode normal
20:06sven[ 0.421379] nvme0n1: p1 p2 p3 p4 p5 p6
20:06svenaaaand nvme is back. this time with less hacks :)
20:25pipcet[m]sven: so much for things getting there "slowly" :-)
20:26svenit's still a hack. and getting this upstream will take a while :)
20:26alyssasven: let me know who to P/FW/AN
20:27svenfirst i need to clean up the quirks/fixes required to the nvme core. and then i'll have to figure out with arnd how to submit this
20:29alyssalmgtfy.com/?q=git+send-email
20:30svenvery helpful :P
23:15MTecknology has joined #asahi
23:24MTecknologyI'm struggling to follow a lot of what I'm reading. Is Asahi Linux intended to be strictly developer-focused (deal with the nitty gritty stuff), with distros being responsible for making installation easy for users?
23:24alyssaIn the long term, we want linux on apple silicon to be "boring"
23:25alyssa(so install linux on your mac like you would on any x86 PC)
23:25alyssaIn the medium term. marcan has talked about maintaining an arch linux arm downstream with all the M1 patches
23:25MTecknologyah, that would be nifty
23:25alyssaIn the short term, asahi is just a bunch of patches to linux and mesa, installing the full system is left as an exercise.
23:26alyssaPersonally I've been running debian from a manual debootstrap (i.e. no debian-installer) for years since arm64 is hard
23:28MTecknologyI got my first ever mac device today. I'm still trying to wade through the documentation and figure out what's even sane.
23:28alyssapipcet[m]: is the only one of us running M1 linux as a daily driver AFAIK
23:28alyssabut we talked about it today, and they're sane, so 😃
23:28MTecknologyTIL an alarming number of people think virtualizing (parallels) means "bare metal"
23:29MTecknologyI'm a Debian Dev... our sanity is questionable
23:36MTecknologyMy actual main driver is a laptop, so I can handle a bit of risk on my desktop (which /was/ a razer laptop stuffed into a large desktop case and filled with fans).
23:38MTecknologyI'm failing to find anything about debootstrap on mac. Are you describing a gentoo-style install from a live cd?
23:41pipcet[m]hi! my debootstrap stuff is currently broken, I'm afraid, if you're looking at that. You can install debian from it, I'm pretty sure.
23:45alyssa....Wait, right now I'm playing music from the m1 and compiling code on the chromebook. this seems horribly backwards, I really need to daily drive asahi :p
23:45MTecknologyThis is going to be a strange effort just to have a quieter gaming system. :P
23:45pipcet[m]it is backwards, I'm using the M1 for everything but music since I can't figure out how to get audio working :-)
23:46alyssapipcet[m]: currently booting macOS
23:46alyssawhat's wrong with audio?
23:47alyssaI mean. Obviously need to r/e the SoC sound stuff and write a driver. But in the mean time, type-C to 3.5 mm adaptors are like $10 at bestbuy
23:48MTecknologyTo start playing with this, do I need to follow all of the dev docs so that I can replicate it here?
23:50pipcet[m]so I'll just keep the power in one type-C port, the serial console for debugging in the other, and use the third one for audio? :-)
23:52alyssapipcet[m]: Exactly!
23:52alyssaDon't forget the fourth one for a USB hub if you're running mainline without pci patches
23:53pipcet[m]and UART on the fifth?
23:54alyssaOh and you'll need the sixth for m1n1
23:59pipcet[m]mtecknology: you mean the bputil/csrutil/kmutil stuff, or setting up a dual-boot environment?
…