ChanServ 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-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
tsida has quit [Remote host closed the connection]
al3xtjames has quit [Quit: Ping timeout (120 seconds)]
al3xtjames has joined #asahi
al3xtjames9 has joined #asahi
al3xtjames has quit [Ping timeout: 480 seconds]
al3xtjames9 is now known as al3xtjames
PhilippvK has joined #asahi
phiologe has quit [Ping timeout: 480 seconds]
skipwich has quit [Ping timeout: 480 seconds]
quarkyalice has quit [Ping timeout: 480 seconds]
TheJollyRoger2 is now known as TheJollyRoger
trippeh has quit [Quit: leaving]
tomtastic_ has joined #asahi
tomtastic has quit [Ping timeout: 480 seconds]
tsida has joined #asahi
tomtastic_ has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
tomtastic has joined #asahi
tomtastic has quit [Ping timeout: 480 seconds]
tomtastic has joined #asahi
tomtastic_ has joined #asahi
tomtastic has quit [Ping timeout: 480 seconds]
tomtastic_ has quit [Ping timeout: 480 seconds]
tomtastic has joined #asahi
bps has joined #asahi
johnnywalkins has joined #asahi
aleasto has joined #asahi
bps has quit [Ping timeout: 480 seconds]
<sven>
alright, i think i'm happy with dart/dev now. would be great if some people could test it to make sure everything still works and then i'll probably send v5 a week or so from now
yuyichao has quit [Remote host closed the connection]
yuyichao_ has joined #asahi
aleasto has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi
aleasto has quit [Remote host closed the connection]
bps has joined #asahi
frode_0xa has joined #asahi
frode_0xa has quit []
frode_0xa has joined #asahi
Mary has quit [Quit: byeee]
amw has quit [Ping timeout: 480 seconds]
skipwich has joined #asahi
amw has joined #asahi
johnnywalkins has quit [Remote host closed the connection]
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi
skipwich has quit []
skipwich has joined #asahi
Mary has joined #asahi
everslick has quit [Ping timeout: 480 seconds]
<marcan>
sven: hopefully I get back on a dev flow next week, and I want to spend a day or two poking at linux merge branches and testing all that stuff
<sven>
the only thing that just works is the dart branch fwiw. the rest is in various state of broken and/or requires hacks :D
<sven>
*states
<marcan>
good reason to fix things!
<marcan>
also I want to get my head around how we'd handle the DART lock situation
<sven>
ugh, yeah. that's gonna be fun
<marcan>
it should be doable, but annoying
<sven>
for the rest of the branches.. i2c needs a gpio controller for the interrupt, pcie needs the dt bindings (i think kettenis submitted some but i don't want what their status is)+u-boot for the bringup+dart
<sven>
and nvme kinda works if you boot through u-boot as well
<sven>
*but i don't know what
<marcan>
now might be a good time to start writing an ASC driver
<marcan>
that would also bring up nvme
<sven>
nvme needs ASC + SART
<sven>
or, well, nvme needs ASC which usually goes through a DART but here is uses SART
<marcan>
yeah
<marcan>
what was the SART anyway? just some filters?
<sven>
SART is just a dumb DMA address filter and i haven't thought about how to implement that
<sven>
it's litterally 16x2 registers. first one is the address and second one is the lengths (+some flags)
<marcan>
I was thinking we might as well have an apple nvme ASC driver that would also take care of that
<marcan>
and then that instantiates or links with the actual nvme device
<sven>
so the actual nvme device doesn't need SART actually
<marcan>
yeah, this would just be a driver for the ASC instantiation for ANS
<sven>
but yeah, maybe just a special compatible for the mailbox driver that whitelists the shared memory in SART
<marcan>
really an ans driver
<marcan>
or that
<marcan>
does ANS have any endpoints other than the system stuff?
<sven>
technically yes
<sven>
but i haven't seen them being used
<sven>
0x20 and 0x21 i think
<marcan>
any idea what they do?
<sven>
nope
<sven>
i haven't seen any traffic on them when running the hv
<sven>
and i don't think we have the ANS firmware
<marcan>
we do
<sven>
where?
<marcan>
or at least I swear I saw it
<sven>
it's not in the preboot volume
<marcan>
ansf.t8103.release.im4p in the restore ipsw
<sven>
ah, that's where it's hidden
<sven>
either way, we can just have a apple,mbox = <&ans_mbox 0x20>, <&ans_mbox 0x21>; or something like that in the nvme node. that should bring up ANS then. or maybe have it send a ping message to the asc and wait for the reply
<marcan>
yeah, it probably makes sense to just have a special nvme subdriver that mostly does nothing
<marcan>
do you think SART can be implemented as a really dumb passthrough only iommu?
<sven>
nope
<sven>
two reasons: there's only one iommu per bus and there's no domain type for "passthrough only"
<sven>
the second one might be fixable, the first one would be painful to fix
<marcan>
per bus?
<marcan>
like for the whole arm soc bus?
<sven>
yeah, one type(!) of iommu
<marcan>
wait what
<marcan>
why
<sven>
i guess there was no need for more than one type so far?
<marcan>
heh
<marcan>
oh well, this can be an ugly special case in the ans driver then
<alyssa>
though that might be buggy kenrel on my lapto
<sven>
hrm, i've seen that happen when i try to chainload too early after a reboot. but that's kinda expected i think
loki_val_ has quit []
crabbedhaloablut has joined #asahi
<alyssa>
race condition in m1n1?
<sven>
the uart doesn't exactly have any flow control. so if i chainload too early it'll send the first request, the request will get lost and i will never get a reply
<sven>
easily fixed with a highly sophisticated sleep 6 in my linux.sh :D
<kettenis>
sven, the SART is already partly setup
<sven>
yes, i know. it's just missing the entry for the shared mailbox buffers
<kettenis>
u-boot adds entries for syslog/crashlog pages of the ASC
<kettenis>
you want to move that into m1n1?
<sven>
i don't have any plans
<kettenis>
or is this just for playing around with this
<sven>
i mean, i could move it into mini, but does that buy us anything?
<kettenis>
nothing from my point of view ;)
<kettenis>
so after processing a few more mailbox messages in u-boot I don't see any further messages when using NVMe in OpenBSD
<kettenis>
I also have a workaround for the hangs I was seeing, so I can actually run off the NVMe and do a full build of the OS now
<sven>
nice :)
<sven>
what were those hangs caused by?
<kettenis>
don't know unfortunately
<sven>
hm
<kettenis>
but they disappear if I don't issue multiple commands in parallel
<kettenis>
so I suspect the code we have that deals with the weird way apple does the command queues isn't quite right yet
<sven>
hm, ok
<sven>
what was the last status of those pcie bindings you submitted btw.?
<kettenis>
still waiting for maz to bless the MSI stuff
<kettenis>
maybe I should do a respin to fix the unneeded include issue that was spotted in v4
<kettenis>
someone threw me a riscv curveball so that has distracted me a bit
<sven>
:-)
<kettenis>
looks like the pinctrl binding has made it into linus' tree
<sven>
nice!
<kettenis>
at some point we'll need to coordinate changes to the actual device tree
<sven>
the dart binding has been reviewed as well. i'll probably need one or two more versions for the driver itself though
<kettenis>
so maybe I should try to move u-boot over to your dart bindings then
<sven>
yeah, i don't expect it to change anymore
<alyssa>
sven: Just updated to the new version
<alyssa>
the stacktrace isn't there but the bug still is
<alyssa>
New version isn't any more broken anyway
<alyssa>
also curious, it takes 90 seconds for "random: crng init" ? that's questionable
<sven>
that's... good i guess? :D
<sven>
did you try bypass mode? if that also has the bug it's not inside the dart driver
<alyssa>
it still won't boot to a shell for me
<alyssa>
oh uhhhh
<alyssa>
bypass mode is still broken
<sven>
make sure your kernel has 45d39448b4d0260743f25d88fd929451ec8296f2, otherwise dwc3 can't do 64 bit reads/writes
<sven>
erm
<sven>
*64bit DMA
<alyssa>
uhh
<sven>
should be in 5.14
<alyssa>
dont have it
<sven>
ah, wait
<sven>
xhci. nevermind.
<sven>
erm.. wait..
<sven>
dwc3 probe should fail without that one i think
<alyssa>
wait do i have it uh
<sven>
clearly we're professionals here :-P
<alyssa>
I do have the patch just didn't see it at first because of shallow clone
<sven>
but if you also get the same bug in bypass mode it's outside of the dart driver
<alyssa>
yeah
<sven>
phew :)
<alyssa>
sven: I have a more specific symptom now -- sometime during boot, the USB device (hub) itself gets disconnected -- like, power cut -- then immmediately reconnecetd
<alyssa>
and then presumably the reconnect fails due to PHY nonsense
<alyssa>
but the disconnect is itself visible -- the LED on my mouse cuts out
<alyssa>
although, no, maybe not PHY
<sven>
uh
<alyssa>
hold on
<alyssa>
ok curious
<alyssa>
usb-a flash drive --> usb-a hub --> usb-c port behaves differently than usb-a flash drive --> usb-c port
<alyssa>
it's still not running my init, even though nothing seems wrong
<alyssa>
it has "VFS: Mounted root..." and "Run /bin/sh as init process", but no shell
<alyssa>
unless that's just missing keyboard and the shell is over UART or something
<sven>
i've only been using a shell over uart
<alyssa>
oh maybe it's just super slow
<sven>
uh, that would also be weird
<alyssa>
i mean. yes.
<alyssa>
sven: okay yeah there's definitely something screwed up with my hub
<alyssa>
now it's in a loop of connected/disconnecting usb over on over yikes
<alyssa>
this is bizarre
<sven>
sounds like a normal day when you're using usb
<alyssa>
maybe it's underucrrent
<alyssa>
underpowered
<alyssa>
seems odd
<alyssa>
Benson help
<kettenis>
I would expect apple to provide a decent amount of power through the type-C ports
<alyssa>
might be a crummy hub though
<sven>
not sure if we need to do something special (like sending another message to that pd chip) for hi-power modes though
<alyssa>
Using an externally powered hub "fixes" the problem.
<alyssa>
ok, next up, figure out what I need for usb ethernet
<alyssa>
("is this all for a twitter pic?" "definitely")
jabashque has quit [Quit: Connection closed for inactivity]