#
…

2021-07-25

00:00tsida has quit [Remote host closed the connection]
00:17al3xtjames has quit [Quit: Ping timeout (120 seconds)]
00:17al3xtjames has joined #asahi
00:26al3xtjames9 has joined #asahi
00:28al3xtjames has quit [Ping timeout: 480 seconds]
00:28al3xtjames9 is now known as al3xtjames
02:35PhilippvK has joined #asahi
02:38phiologe has quit [Ping timeout: 480 seconds]
03:12skipwich has quit [Ping timeout: 480 seconds]
04:58quarkyalice has quit [Ping timeout: 480 seconds]
06:10TheJollyRoger2 is now known as TheJollyRoger
06:20trippeh has quit [Quit: leaving]
08:07tomtastic_ has joined #asahi
08:09tomtastic has quit [Ping timeout: 480 seconds]
09:36tsida has joined #asahi
09:46tomtastic_ has quit [Ping timeout: 480 seconds]
09:53bps has quit [Ping timeout: 480 seconds]
09:53tomtastic has joined #asahi
10:01tomtastic has quit [Ping timeout: 480 seconds]
10:04tomtastic has joined #asahi
10:12tomtastic_ has joined #asahi
10:14tomtastic has quit [Ping timeout: 480 seconds]
10:24tomtastic_ has quit [Ping timeout: 480 seconds]
10:25tomtastic has joined #asahi
10:33bps has joined #asahi
10:42johnnywalkins has joined #asahi
11:05aleasto has joined #asahi
11:18bps has quit [Ping timeout: 480 seconds]
11:44svenalright, 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
11:54yuyichao has quit [Remote host closed the connection]
11:54yuyichao_ has joined #asahi
11:57aleasto has quit [Ping timeout: 480 seconds]
11:57aleasto has joined #asahi
12:55aleasto has quit [Remote host closed the connection]
13:19bps has joined #asahi
14:08frode_0xa has joined #asahi
14:08frode_0xa has quit []
14:09frode_0xa has joined #asahi
14:24Mary has quit [Quit: byeee]
14:27amw has quit [Ping timeout: 480 seconds]
14:33skipwich has joined #asahi
14:37amw has joined #asahi
14:37johnnywalkins has quit [Remote host closed the connection]
14:39skipwich has quit [Quit: DISCONNECT]
14:39skipwich has joined #asahi
14:41skipwich has quit []
14:41skipwich has joined #asahi
14:46Mary has joined #asahi
15:19everslick has quit [Ping timeout: 480 seconds]
15:35marcansven: 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
15:38sventhe only thing that just works is the dart branch fwiw. the rest is in various state of broken and/or requires hacks :D
15:39sven*states
15:45marcangood reason to fix things!
15:46marcanalso I want to get my head around how we'd handle the DART lock situation
15:46svenugh, yeah. that's gonna be fun
15:46marcanit should be doable, but annoying
15:49svenfor 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
15:49svenand nvme kinda works if you boot through u-boot as well
15:49sven*but i don't know what
15:51marcannow might be a good time to start writing an ASC driver
15:51marcanthat would also bring up nvme
15:51svennvme needs ASC + SART
15:51svenor, well, nvme needs ASC which usually goes through a DART but here is uses SART
15:52marcanwhat was the SART anyway? just some filters?
15:52svenSART is just a dumb DMA address filter and i haven't thought about how to implement that
15:53svenit's litterally 16x2 registers. first one is the address and second one is the lengths (+some flags)
15:53marcanI was thinking we might as well have an apple nvme ASC driver that would also take care of that
15:53marcanand then that instantiates or links with the actual nvme device
15:53svenso the actual nvme device doesn't need SART actually
15:54marcanyeah, this would just be a driver for the ASC instantiation for ANS
15:54svenbut yeah, maybe just a special compatible for the mailbox driver that whitelists the shared memory in SART
15:54marcanreally an ans driver
15:54marcandoes ANS have any endpoints other than the system stuff?
15:54sventechnically yes
15:54svenbut i haven't seen them being used
15:54sven0x20 and 0x21 i think
15:55marcanany idea what they do?
15:55sveni haven't seen any traffic on them when running the hv
15:55svenand i don't think we have the ANS firmware
15:56svenwhere?
15:57marcanor at least I swear I saw it
15:57svenit's not in the preboot volume
15:59marcanansf.t8103.release.im4p in the restore ipsw
15:59svenah, that's where it's hidden
16:00sveneither 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
16:01marcanyeah, it probably makes sense to just have a special nvme subdriver that mostly does nothing
16:01marcando you think SART can be implemented as a really dumb passthrough only iommu?
16:01sventwo reasons: there's only one iommu per bus and there's no domain type for "passthrough only"
16:01sventhe second one might be fixable, the first one would be painful to fix
16:01marcanper bus?
16:02marcanlike for the whole arm soc bus?
16:02svenyeah, one type(!) of iommu
16:02marcanwait what
16:02sveni guess there was no need for more than one type so far?
16:03marcanoh well, this can be an ugly special case in the ans driver then
16:04marcanwe could just throw ans in a sub-bus though
16:04marcandummy devtree buses are free
16:04svenah, true
16:05svenhrm, though i guess i'd have to look up how to make that work. usually bus_set_iommu is called with platform_bus_type or pci_bus_type
16:05marcanwait, are those singlets?
16:05svenbut i guess you could just call it with dev->bus for the ans device and it should do the right thing
16:08marcanso it's not even per bus instance, it's per bus type?!
16:08svenno, i think platform_bus_type is just the "virtual" top-level bus for platform devices
16:08svenbut i haven't read much of that code yet
16:09marcan/home/marcan/asahi/git/linux/drivers/iommu/arm/arm-smmu/arm-smmu.c: err = bus_set_iommu(&fsl_mc_bus_type, ops);
16:09marcanthere's definitely other cases, but it's rare
16:09marcanlike it needs a bus type
16:09marcanso a bus driver
16:09marcanI'm not sure we want to go there just for SART
16:10sveni don't think so ;)
16:10svenit's not really an iommu anyway
16:10marcanmeh, special case in ANS it is then
16:10svenit's also only used inside the ANS afaict
16:10marcanit can be a separate tiny driver referenced from ANS if we want, to make it less ugly
16:10marcaner, from ASC
16:10svenif it was used in multiple places we could probably implement our own dma_map_ops or something for it, but meh.
16:11marcannot worth it
16:12marcanactually one way to do it would be to have the ASC driver just have a callback to set some kind of extra map_ops
16:12marcanand then the (very simple) ANS driver knows about SART and sets that prior to calling init on the ASC device
16:12marcanimplementing SART internally
16:50sventhere's also the clock gates left to do
16:50svennot very important because we can just turn them all on from m1n1, but uh.. i think we should have them at some point
17:07tobikoch has quit [Quit: WeeChat 2.8]
17:18pinskia has quit [Remote host closed the connection]
17:19pinskia has joined #asahi
17:19alyssasven: initramfs.cpio.gz is now on your link list
17:20svenoh, you can use whatever or nothing at all i think
17:21svenlast time i tried to give it to you you wanted me to send you the busybox source code via snailmail :-P
17:21alyssausually i dont use initramfs, but there's not an nvme driver on here so errrr
17:21alyssaAh yes, that does sound like something I'd do.
17:21tomtastic_ has joined #asahi
17:21alyssawhy does booting 1tr take so long
17:22svenyou could just use a usb stick for the rootfs with that kernel :P
17:22alyssanod, does that work?
17:22svenit should
17:22sveni think someone in here did that (amw maybe?)
17:22alyssaalright, I think I have a debian arm64 rootfs kicking somewhere
17:23tomtastic has quit [Ping timeout: 480 seconds]
17:23svenyou could also try to boot the kernel without that initrd at first
17:24svenit'll die, but at least you should see something on the screen and/or your serial console
17:24alyssaok, your kernel boots
17:24alyssa(and immediate dies due to no rootfs, but that's what it should do)
17:24alyssa8 penguins, snazzy
17:24alyssaso what's wrong with mine..
17:26svenyou did enable ARCH_APPLE, didn't you?
17:27svenhm. let me see if i can upload my .config
17:29alyssak diff'ing
17:32alyssalet me reprovision this vps because please
18:04alyssasven: my kernel boots with your config :tada:
18:05svennice :)
18:06alyssasven: which usb ports work rn, just type-c?
18:07svenunless you want also mess around with u-boot, then you can also make the usb a ports work
18:08svenoh, they also only work once. so better plug in the usb device before booting the kernel
18:08alyssaokay it sees my usb drive and partitions, but says no filesystem could mount root
18:09alyssa`root=/dev/sda2 rootwait` is this wrong syuntax lol
18:09sveni'm also not sure i have any filesystems enabled in my config fwiw
18:09alyssathat could be it lol
18:09alyssalet's see
18:10sveni started with a pretty minimal .config
18:10sveni'd actually be surprised if any filesystem is enabled :D
18:10alyssalol enabled ext4
18:10alyssarebuilding
18:11svenare you using the latest dart/dev btw? not that it matters, but i'd like more people to test the current version :)
18:11alyssano, but one thing at a time
18:15alyssaok, progress. systemd is unhappy, looks like more .config stuff missing for proper debian
18:16sveniirc someone had a .config that boots debian here a few days (weeks?) ago
18:17sveni've been happy with busybox, userland is boring ;)
18:17cth451_desktop(I'll be happy with a initrd sh, but no luck so far)
18:18cth451_desktopmaybe i should try strip down my initrd.
18:18alyssasven: you
18:18alyssayou disabled unix sockets
18:18sventhat's not true. i just didn't enable them!
18:20alyssasven: seeing a bunch of blk_update_request I/O errors btw
18:20alyssathough that might just be FS corruption lmao
18:20svenwhat did you do to your fs?
18:23alyssait's a years old USB pendrive..
18:28alyssai dont know how to work efficiently with .config ugh
18:34alyssahere let's try this new config.
18:43alyssawhy is this recompiling everything and why isn't ccache helping :V
18:43alyssacache hit rate 21.78 %
18:43svendid you switch cpu page sizes?
18:43alyssai guess it is helping.
19:05crabbedhaloablut has joined #asahi
19:10loki_val_ has joined #asahi
19:11loki_val has quit [Ping timeout: 480 seconds]
19:13crabbedhaloablut has quit [Ping timeout: 480 seconds]
19:17alyssasven: With more config enabled, it's getting further but still hanging(?)
19:17alyssagetting a USB disconnect, looks like
19:18alyssaand then it reconnects as /dev/sdb instead of /dev/sda
19:18svenuh.. that sounds strange
19:18svencan you upload the log somewhere?
19:18alyssaI don't have uart, this is onscreen
19:18svenusb disconnect and reconnect shouldn't work at all :s
19:18alyssait's behind a hub
19:18svenoh, okay
19:19svenstill very strange
19:19svencan you take a photo? :D
19:20alyssasec, trying something
19:23julianp[m] has joined #asahi
19:25alyssasometimes m1n1 boots (confirmed by usb) without the display ever coming on. ugh
19:27alyssaoh and also
19:27alyssaWaiting for reconnection... . Connected
19:28alyssam1n1.proxy.UartTimeout: Expected 1 bytes, got 0 bytes
19:28alyssathough that might be buggy kenrel on my lapto
19:29svenhrm, i've seen that happen when i try to chainload too early after a reboot. but that's kinda expected i think
19:49loki_val_ has quit []
19:49crabbedhaloablut has joined #asahi
19:59alyssarace condition in m1n1?
20:01sventhe 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
20:02sveneasily fixed with a highly sophisticated sleep 6 in my linux.sh :D
20:39kettenissven, the SART is already partly setup
20:39svenyes, i know. it's just missing the entry for the shared mailbox buffers
20:39kettenisu-boot adds entries for syslog/crashlog pages of the ASC
20:40kettenisyou want to move that into m1n1?
20:40sveni don't have any plans
20:40kettenisor is this just for playing around with this
20:41sveni mean, i could move it into mini, but does that buy us anything?
20:41kettenisnothing from my point of view ;)
20:43kettenisso after processing a few more mailbox messages in u-boot I don't see any further messages when using NVMe in OpenBSD
20:44kettenisI 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
20:45svennice :)
20:45svenwhat were those hangs caused by?
20:45kettenisdon't know unfortunately
20:45kettenisbut they disappear if I don't issue multiple commands in parallel
20:46kettenisso I suspect the code we have that deals with the weird way apple does the command queues isn't quite right yet
20:49svenhm, ok
20:49svenwhat was the last status of those pcie bindings you submitted btw.?
20:51kettenisstill waiting for maz to bless the MSI stuff
20:52kettenismaybe I should do a respin to fix the unneeded include issue that was spotted in v4
20:53kettenissomeone threw me a riscv curveball so that has distracted me a bit
20:59kettenislooks like the pinctrl binding has made it into linus' tree
20:59kettenisat some point we'll need to coordinate changes to the actual device tree
21:00sventhe dart binding has been reviewed as well. i'll probably need one or two more versions for the driver itself though
21:00kettenisso maybe I should try to move u-boot over to your dart bindings then
21:01svenyeah, i don't expect it to change anymore
21:04alyssasven: Just updated to the new version
21:04alyssathe stacktrace isn't there but the bug still is
21:05alyssaNew version isn't any more broken anyway
21:05alyssaalso curious, it takes 90 seconds for "random: crng init" ? that's questionable
21:05sventhat's... good i guess? :D
21:06svendid you try bypass mode? if that also has the bug it's not inside the dart driver
21:06alyssait still won't boot to a shell for me
21:06alyssaoh uhhhh
21:07alyssabypass mode is still broken
21:07svenmake sure your kernel has 45d39448b4d0260743f25d88fd929451ec8296f2, otherwise dwc3 can't do 64 bit reads/writes
21:07sven*64bit DMA
21:07svenshould be in 5.14
21:07alyssadont have it
21:08svenah, wait
21:08svenxhci. nevermind.
21:08svenerm.. wait..
21:08svendwc3 probe should fail without that one i think
21:08alyssawait do i have it uh
21:08svenclearly we're professionals here :-P
21:09alyssaI do have the patch just didn't see it at first because of shallow clone
21:09svenbut if you also get the same bug in bypass mode it's outside of the dart driver
21:09svenphew :)
21:09alyssasven: I have a more specific symptom now -- sometime during boot, the USB device (hub) itself gets disconnected -- like, power cut -- then immmediately reconnecetd
21:10alyssaand then presumably the reconnect fails due to PHY nonsense
21:10alyssabut the disconnect is itself visible -- the LED on my mouse cuts out
21:10alyssaalthough, no, maybe not PHY
21:11alyssaok curious
21:11alyssausb-a flash drive --> usb-a hub --> usb-c port behaves differently than usb-a flash drive --> usb-c port
21:13alyssait's still not running my init, even though nothing seems wrong
21:14alyssait has "VFS: Mounted root..." and "Run /bin/sh as init process", but no shell
21:14alyssaunless that's just missing keyboard and the shell is over UART or something
21:17sveni've only been using a shell over uart
21:17alyssaoh maybe it's just super slow
21:18svenuh, that would also be weird
21:18alyssai mean. yes.
21:19alyssasven: okay yeah there's definitely something screwed up with my hub
21:20alyssanow it's in a loop of connected/disconnecting usb over on over yikes
21:20alyssathis is bizarre
21:20svensounds like a normal day when you're using usb
21:21alyssamaybe it's underucrrent
21:21alyssaunderpowered
21:21alyssaseems odd
21:21alyssaBenson help
21:21kettenisI would expect apple to provide a decent amount of power through the type-C ports
21:22alyssamight be a crummy hub though
21:22svennot sure if we need to do something special (like sending another message to that pd chip) for hi-power modes though
21:28alyssaUsing an externally powered hub "fixes" the problem.
21:31alyssaok, next up, figure out what I need for usb ethernet
21:31alyssa("is this all for a twitter pic?" "definitely")
21:34jabashque has quit [Quit: Connection closed for inactivity]
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:21alyssaenabled the CONFIG so now it sees the interface, still not resolving.
…