#
…

2022-04-05

00:00doggkruse has joined #asahi-dev
00:01alcazar has quit [Ping timeout: 480 seconds]
00:08alcazar has joined #asahi-dev
00:16alcazar has quit [Ping timeout: 480 seconds]
00:21yuyichao has quit [Ping timeout: 480 seconds]
00:24alcazar has joined #asahi-dev
00:33alcazar has quit [Ping timeout: 480 seconds]
00:41alcazar has joined #asahi-dev
00:50alcazar has quit [Ping timeout: 480 seconds]
01:00alcazar has joined #asahi-dev
01:08alcazar has quit [Ping timeout: 480 seconds]
01:08yuyichao has joined #asahi-dev
01:18alcazar has joined #asahi-dev
01:25baracaio[m] has joined #asahi-dev
01:26alcazar has quit [Ping timeout: 480 seconds]
01:35alcazar has joined #asahi-dev
01:49jakebot has quit [Quit: The Lounge - https://thelounge.chat]
01:49jakebot has joined #asahi-dev
01:51alcazar has quit [Ping timeout: 480 seconds]
01:53jakebot has quit []
01:56jakebot has joined #asahi-dev
01:56atsalyuk has quit [Ping timeout: 480 seconds]
01:59alcazar has joined #asahi-dev
02:00pedrohos[m] has joined #asahi-dev
02:00doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:01doggkruse has joined #asahi-dev
02:06atsalyuk has joined #asahi-dev
02:07alcazar has quit [Ping timeout: 480 seconds]
02:08thevar1able has joined #asahi-dev
02:17alcazar has joined #asahi-dev
02:25alcazar has quit [Ping timeout: 480 seconds]
02:26alcazar has joined #asahi-dev
02:34alcazar has quit [Ping timeout: 480 seconds]
02:36thevar1able has quit [Quit: Textual IRC Client: www.textualapp.com]
02:43alcazar has joined #asahi-dev
02:52alcazar has quit [Ping timeout: 480 seconds]
02:58PhilippvK has joined #asahi-dev
03:00skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:01phiologe has quit [Ping timeout: 480 seconds]
03:02alcazar has joined #asahi-dev
03:10alcazar has quit [Ping timeout: 480 seconds]
03:12atsalyuk has quit [Ping timeout: 480 seconds]
03:18alcazar has joined #asahi-dev
03:23kov has quit [Quit: Coyote finally caught me]
03:23kov has joined #asahi-dev
03:26alcazar has quit [Ping timeout: 480 seconds]
03:36alcazar has joined #asahi-dev
03:44alcazar has quit [Ping timeout: 480 seconds]
03:46chadmed has quit [Ping timeout: 480 seconds]
03:52alcazar has joined #asahi-dev
04:01alcazar has quit [Ping timeout: 480 seconds]
04:06atsalyuk has joined #asahi-dev
04:07jluthra has quit [Ping timeout: 480 seconds]
04:10alcazar has joined #asahi-dev
04:16loki_val has joined #asahi-dev
04:22alcazar has quit [Ping timeout: 480 seconds]
04:30alcazar has joined #asahi-dev
04:31chadmed has joined #asahi-dev
04:42jluthra has joined #asahi-dev
04:44jluthra has quit []
04:44jluthra has joined #asahi-dev
05:00c10l53 has quit []
05:00c10l53 has joined #asahi-dev
05:06jluthra has quit [Quit: WeeChat 1.9.1]
05:12atsalyuk has quit [Ping timeout: 480 seconds]
05:28jannaualexsv: welcome. have you already started looking into it? For USB-C displayport alt mode there are 3 things you'll have to look at
05:30jannau1. macos under m1n1 hypervisor (https://github.com/AsahiLinux/docs/wiki/SW:Hypervisor), for the main display part we have hv/trace_dcp.py as tracing script
05:32jannauthe second part is dcp, there is working linux driver for the main display in https://github.com/jannau/linux/tree/asahi-dcp, it requires this m1n1 branch https://github.com/jannau/m1n1/tree/dcp
05:33jannauit will currently not work if you boot via u-boot (to be fixed very soon, probably tonight CEST)
05:35jannauon the display processor side there seem to be no or nor huge difference between the main display adn external displays
05:35jannauapple calls the nodes for the main display dcp and disp0 in their device-tree
05:36jannauthe nodes for the external display(s) are called dcpextN and dispextN
05:40nicolas17 has quit [Ping timeout: 480 seconds]
05:40jannau3. the usb-c ports have to be configured for displayport alt mode. that probaly needs to to build on on sven's USB3 work: https://github.com/AsahiLinux/linux/tree/atc-WIP with this m1n1 pull request https://github.com/AsahiLinux/m1n1/pull/170
05:40jannauthere is also a dp-crossbar which probably needs to to be configured
05:42jannauI don't think we have documentation besides the code and the tracing implementation
05:57j`eyjannau: whats disp0 "do"?
05:59marcanthat's the actual display hardware
05:59marcandcp is just the CPU
06:00marcanin PMGR it's actually called something like DISP0_CPU or so IIRC
06:03j`eyah, so dcp pokes mmio in disp0, and the main cpu just enables pmgr stufff for disp0
06:06atsalyuk has joined #asahi-dev
06:29jannaumain cpu also maintains the iommu for display processor, dcp and disp0 both have their own dart
06:37the_lanetly_052 has joined #asahi-dev
06:46doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:55alexsvjannau: Thanks a lot! This is already a lot to read!
06:55alexsvOne more question: why is everything dependent on m1n1? Is it about FW blobs?
06:56jluthra has joined #asahi-dev
06:56alexsvAch, m1n1 actually creates the FDT for Linux, as I can see
06:59jluthra has quit []
06:59_jannau_iboot initializes the display (at least partially) and maps some memory in the dcp/disp0 iommu. We have to maintain those iommu mappings otherwise the display processor crashes. m1n1 adds those mappings to the FDT
07:00_jannau_firmware is already loaded by iboot so we do not have to care about that
07:07chadmedmore generally, m1n1 handles all the low level init required for linux to see a "normal" arm64 machine in a state it would expect to find one in
07:10atsalyuk has quit [Ping timeout: 480 seconds]
07:25Telvana2 has joined #asahi-dev
07:28MajorBiscuit has joined #asahi-dev
07:30Telvana has quit [Ping timeout: 480 seconds]
07:31svenlooks like the nvme irq is just a bit dumb. it'll trigger once when a new completion arrives, and if you send a new command and that command completes before you write the CQ doorbell it won't trigger again :/
07:31svenso that "mystery lock" really just fixes that race and ensures the controller won't see any new commands inbetween the start of the irq handler and the write to the CQ DB
07:34svenand that interrupt sticks until it's actually triggered and handled by the CPU
07:34svenso even if you drive the nvme controller using polling and handle everything, disable interrupts at the nvme level and then shut it down again you'll _still_ get that interrupt
07:35arndMy Mac Ultra (t6002) is going to arrive later today, is there anything I can start trying out on it already, or is it pointless until marcan has done some of the initial work? In the github sources I don't see any reference to the machine or the SoC yet
07:37mazarnd: jannau has done some initial bring-up work: https://github.com/jannau/linux/tree/asahi-t6002
07:38arndmaz, _jannau_, thanks!
07:38mazthere is also a bunch of m1n1 fixes for that, but I can't find them anymore (must have closed the tab)
07:38mazah, here you go! :D
07:38jluthra has joined #asahi-dev
07:40MajorBiscuit has quit [Ping timeout: 480 seconds]
07:40_jannau_kernel changes are just the device tree, based on the asahi repo. t600x support in mainline is not yet useful since the iommu support is missing
07:41arnd_jannau_: is it enough to boot into a kernel with display and keyboard,or do I need a serial console?
07:42_jannau_u-boot support is in https://github.com/AsahiLinux/u-boot/commits/asahi and already on the u-boot mailing list
07:47_jannau_arnd: usb-a ports don't work since the controller needs firmware that is embedded in the macos driver. display over hdmi (preferably at 1920x1080) and usb-c ports work
07:48_jannau_usb-c ports could be a little flaky without https://lore.kernel.org/all/20220329183817.21656-1-povik+lin@cutebit.org/ (pts6598x probe fails due i2c errors)
07:49arndok, I think I can find room for one of my old screens on the desk, or use a capture card to view the screen on my current system
07:51arndusing efi-earlycon for debugging does sound easier than serial, as I don't have another mac
07:51MajorBiscuit has joined #asahi-dev
07:54_jannau_running linux under m1n1's hypervisor should work (but not extensively tested) and has serial over usb acm
07:58shenkii can recommend that method
07:58shenkifor basic kernel testing at least
07:59arndright, good idea
08:03marcanarnd: I might poke around in a bit, just need to get a chore taken care of
08:03marcanand yeah, the HV was made for this (also)
08:04marcan_jannau_: I almost *always* run it under the HV while testing, I would call that extensively tested enough
08:05marcanonly thing is I think there's still a bug in vUART input, it drops characters if you paste too many at once
08:06Poplar has joined #asahi-dev
08:06atsalyuk has joined #asahi-dev
08:06j`eysame, I always run under m1n1 hv, via normal USB cable
08:07_jannau_not yet extensively tested on t6002, macos HV is definitively busted (probably the second pmgr instance)
08:07arndI think _jannau_ meant the t6002 specifically isn't extensive tested in hv mode yet, but I guess it's easier for me to get started that way, usb-acm sounds more pleasant than a second monitor with no scrollback
08:15bps has joined #asahi-dev
08:22Emantor has quit [Quit: ZNC - http://znc.in]
08:22Emantor has joined #asahi-dev
08:25Poplar is now known as poplar
08:30j`eyarnd: lets us know how you get on
08:35r0ni has quit [Ping timeout: 480 seconds]
09:07bps has quit [Ping timeout: 480 seconds]
09:13atsalyuk has quit [Ping timeout: 480 seconds]
09:22ChaosPrincess has quit [Quit: WeeChat 3.4.1]
09:23ChaosPrincess has joined #asahi-dev
09:51bps has joined #asahi-dev
10:06atsalyuk has joined #asahi-dev
10:08alcazar has quit [Ping timeout: 480 seconds]
10:16alcazar has joined #asahi-dev
10:24alcazar has quit [Ping timeout: 480 seconds]
10:28kameks has joined #asahi-dev
10:34alcazar has joined #asahi-dev
10:37svenokay, i guess I still don't know what that nvme race is. turns out writing to the CQ DB with head < tail will re-enable the interrupt
10:38sveni thought it might be something like "re-issue and complete a command with a tag that's already in the CQ but not yet acked with the DB" but that also works
10:42alcazar has quit [Ping timeout: 480 seconds]
10:50alcazar has joined #asahi-dev
10:59alcazar has quit [Ping timeout: 480 seconds]
11:07alcazar has joined #asahi-dev
11:13atsalyuk has quit [Ping timeout: 480 seconds]
11:16alcazar has quit [Ping timeout: 480 seconds]
11:25alcazar has joined #asahi-dev
11:33alcazar has quit [Ping timeout: 480 seconds]
11:42alcazar has joined #asahi-dev
11:51alcazar has quit [Ping timeout: 480 seconds]
11:51the_lanetly_052 has quit [Ping timeout: 480 seconds]
11:53the_lanetly_052 has joined #asahi-dev
12:01alcazar has joined #asahi-dev
12:06atsalyuk has joined #asahi-dev
12:14alcazar has quit [Ping timeout: 480 seconds]
12:25alcazar has joined #asahi-dev
12:33alcazar has quit [Ping timeout: 480 seconds]
12:36robinp_for https://github.com/AsahiLinux/docs/wiki/SW:Hypervisor why do the code examples use a t8101 - isn't that an A14 ?
12:38svenM1 essentially is a variant of A14 and they share the same kernel iirc
12:38skrzyp has joined #asahi-dev
12:40svensimilar to how M1 Pro/Max/Ultra (this is as bad as the USB naming *sigh*) is t6000/t6001/t6002 and how they also all share the same kernel
12:40chadmedthere will be no m2, there will only be M1/Pro/Max/Ultra Gen 2 SuperSpeed
12:41crabbedhaloablut has joined #asahi-dev
12:42alcazar has joined #asahi-dev
12:44loki_val has quit [Ping timeout: 480 seconds]
12:53loki_val has joined #asahi-dev
12:53alcazar has quit [Ping timeout: 480 seconds]
12:54crabbedhaloablut has quit [Ping timeout: 480 seconds]
13:02alcazar has joined #asahi-dev
13:10alcazar has quit [Ping timeout: 480 seconds]
13:19alcazar has joined #asahi-dev
13:25rikkaa has joined #asahi-dev
13:27atsalyuk has quit [Ping timeout: 480 seconds]
13:27alcazar has quit [Ping timeout: 480 seconds]
13:32alcazar has joined #asahi-dev
13:39yuyichao has quit [Ping timeout: 480 seconds]
13:40alcazar has quit [Ping timeout: 480 seconds]
13:43kameks has quit [Ping timeout: 480 seconds]
13:50alcazar has joined #asahi-dev
13:56yuyichao has joined #asahi-dev
13:58alcazar has quit [Ping timeout: 480 seconds]
13:58DarkShadow44 has quit [Quit: ZNC - https://znc.in]
13:59DarkShadow44 has joined #asahi-dev
14:07alcazar has joined #asahi-dev
14:15alcazar has quit [Ping timeout: 480 seconds]
14:26alcazar has joined #asahi-dev
14:29nicolas17 has joined #asahi-dev
14:34alcazar has quit [Ping timeout: 480 seconds]
14:37alcazar has joined #asahi-dev
14:39amarioguy has joined #asahi-dev
14:51alcazar has quit [Ping timeout: 480 seconds]
14:51atsalyuk has joined #asahi-dev
15:00alcazar has joined #asahi-dev
15:09alcazar has quit [Ping timeout: 480 seconds]
15:18alcazar has joined #asahi-dev
15:27alcazar has quit [Ping timeout: 480 seconds]
15:36alcazar has joined #asahi-dev
15:36doggkruse has joined #asahi-dev
15:40amarioguy has quit [Ping timeout: 480 seconds]
15:45alcazar has quit [Ping timeout: 480 seconds]
15:53amarioguy has joined #asahi-dev
15:54alcazar has joined #asahi-dev
16:01arndIt took me a while to get macos into a working state with updates and repartitioning, and then I managed to get into u-boot with _jannau_'s m1n1, I can see the output on my hdmi capture, but I have not figured out what I need to do to make the ttyACM devices appear on my host to talk to u-boot without a keyboard
16:02arndwhich of the 6 type-c ports is the debug port? Do I need a C-to-C cable or can I plug the other end into a USB-A port on my host?
16:03j`eyyou can use a C-A cable
16:03alcazar has quit [Ping timeout: 480 seconds]
16:04j`eypinging jannau on their other handle
16:06mazarnd: the debug port is the one closer to the Ethernet port.
16:06jannauarnd: debug port is the one next to the ethernet port but that should only matter for the hw uart
16:06j`eybut that's not needed for m1n1 to work over USB
16:07arndok, I see, then there must be another problem. Does the ttyACM only work if I boot into m1n1 without the u-boot payload?
16:08jannauarnd: there should be two ttyACM devices when m1n1 is loaded
16:08kevans91it needs to hit the proxy stuff after not detecting an executable payload
16:08kevans91in my experience, at least
16:08jannauah, yes. m1n1 needs to be standalone on the device without payload
16:09arndok, got it. So I reinstall m1n1 with no payload and then pass it u-boot or a kernel from the host, right
16:10jannauthen tools/run_guest.py in proxyclient can be used to execute m1n1 + payload from the usb connected computer
16:12kevans91it'd be most convenient if you could drive the proxyclient on the guest, but that seems nontrivial
16:13alcazar has joined #asahi-dev
16:18emilytrau[m] has joined #asahi-dev
16:19herbas has joined #asahi-dev
16:21alcazar has quit [Ping timeout: 480 seconds]
16:28alcazar has joined #asahi-dev
16:28arndThanks!
16:34amarioguywhat does the "apcie=0xfffffffe" boot arg exactly do?
16:35amarioguythe looks of it, it changes something about the Apple PCIe controller, not exactly sure what it would do tho
16:37alcazar has quit [Ping timeout: 480 seconds]
16:44rikkaa has quit [Quit: Connection closed for inactivity]
16:46Telvana2 has quit [Read error: Connection reset by peer]
16:47alcazar has joined #asahi-dev
16:49MajorBiscuit has quit [Ping timeout: 480 seconds]
16:50Telvana has joined #asahi-dev
16:50Telvana has quit [Remote host closed the connection]
16:52Telvana has joined #asahi-dev
16:55amarioguy has quit [Ping timeout: 480 seconds]
16:55alcazar has quit [Ping timeout: 480 seconds]
17:05alcazar has joined #asahi-dev
17:13alcazar has quit [Ping timeout: 480 seconds]
17:18amarioguy has joined #asahi-dev
17:21alcazar has joined #asahi-dev
17:30alcazar has quit [Ping timeout: 480 seconds]
17:33herbas has quit [Remote host closed the connection]
17:38alcazar has joined #asahi-dev
17:46alcazar has quit [Ping timeout: 480 seconds]
17:52doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:55alcazar has joined #asahi-dev
18:02amarioguy has quit [Ping timeout: 480 seconds]
18:03alcazar has quit [Ping timeout: 480 seconds]
18:07j`eyarnd: did you get it working?
18:13alcazar has joined #asahi-dev
18:21alcazar has quit [Ping timeout: 480 seconds]
18:28arndj`ey: I decided to stop trying for the moment, shouldn't be too hard from here tomorrow
18:29alcazar has joined #asahi-dev
18:29j`eyarnd: ok :-)
18:38alcazar has quit [Ping timeout: 480 seconds]
18:38amarioguy has joined #asahi-dev
18:48alcazar has joined #asahi-dev
18:54___nick___ has joined #asahi-dev
18:55___nick___ has quit []
18:56alcazar has quit [Ping timeout: 480 seconds]
18:57___nick___ has joined #asahi-dev
19:06alcazar has joined #asahi-dev
19:15alcazar has quit [Ping timeout: 480 seconds]
19:19the_lanetly_052 has quit [Ping timeout: 480 seconds]
19:20amarioguy has quit [Ping timeout: 480 seconds]
19:22amarioguy has joined #asahi-dev
19:25alcazar has joined #asahi-dev
19:33alcazar has quit [Ping timeout: 480 seconds]
19:43alcazar has joined #asahi-dev
19:51alcazar has quit [Ping timeout: 480 seconds]
20:01alcazar has joined #asahi-dev
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:09MajorBiscuit has joined #asahi-dev
20:09alcazar has quit [Ping timeout: 480 seconds]
20:14doggkruse has joined #asahi-dev
20:17alcazar has joined #asahi-dev
20:26alcazar has quit [Ping timeout: 480 seconds]
20:27nicolas17if curl can't connect to the server or resolve DNS or something like that, it will return a non-zero exit code
20:27nicolas17but if the server (or the proxy intercepting it >.>) returns an HTTP error code like 403, it will exit with zero code
20:28nicolas17you may want to add -f to the curl command to make it exit non-zero on HTTP error codes too
20:28nicolas17I don't know if github would ever make raw.githubusercontent.com return 403 (blocking IPs?) or why, but if there is a fallback, we might as well use it in that case too
20:32alexsvjannau: in which component the mentioned uboot boot for dcp is to be fixed?
20:33amarioguy has quit [Ping timeout: 480 seconds]
20:35alcazar has joined #asahi-dev
20:43alcazar has quit [Ping timeout: 480 seconds]
20:45jannaualexsv: see https://github.com/jannau/m1n1/tree/dcp-nb and https://github.com/jannau/linux/tree/asahi-dcp-nb it changes the way how the premapped memory regions are expressed in the fdt, u-boot broke with the previous one
20:47MajorBiscuit has quit [Ping timeout: 480 seconds]
20:53alcazar has joined #asahi-dev
20:54MajorBiscuit has joined #asahi-dev
21:01alcazar has quit [Ping timeout: 480 seconds]
21:11alcazar has joined #asahi-dev
21:13jannauhypervisor not well tested on t6002 means support for starting CPUs on the second die is missing
21:17jannauthat's for bare metal, HV support is in m1n1/hv.py line 156ff
21:18j`eyah right
21:19alcazar has quit [Ping timeout: 480 seconds]
21:20MajorBiscuit has quit [Ping timeout: 480 seconds]
21:27alcazar has joined #asahi-dev
21:34systwi has quit [Ping timeout: 480 seconds]
21:39alcazar has quit [Ping timeout: 480 seconds]
21:42alexsv has quit [Ping timeout: 480 seconds]
21:49MajorBiscuit has joined #asahi-dev
21:49alcazar has joined #asahi-dev
21:57alcazar has quit [Ping timeout: 480 seconds]
22:04systwi has joined #asahi-dev
22:07alcazar has joined #asahi-dev
22:07MajorBiscuit has quit [Quit: WeeChat 3.4]
22:15alcazar has quit [Ping timeout: 480 seconds]
22:20yuyichao has quit [Quit: Konversation terminated!]
22:20yuyichao has joined #asahi-dev
22:23alcazar has joined #asahi-dev
22:27tired has joined #asahi-dev
22:38nametable[m]Is the best way to setup m1n1 after already installing and trying Asahi to just erase the partitions and run the install script again?
22:39nametable[m]I'm trying to setup for RE and development, but let me know if I should ask this in #_oftc_#asahi:matrix.org instead
22:40alcazar has quit [Ping timeout: 480 seconds]
22:48alcazar has joined #asahi-dev
22:56alcazar has quit [Ping timeout: 480 seconds]
23:03j`eynametable[m]: the m1n1 already installed can be used
23:03c10l531 has joined #asahi-dev
23:04j`eynametable[m]: I cant remember the command off the top of my head, but you can set -v in the nvram boot args
23:04j`eyand then m1n1 will wait 5s for some USB activity before boooting the payload
23:05alcazar has joined #asahi-dev
23:07nametable[m]j`ey: Thanks,
23:07nametable[m]I'll give that a shot
23:08rqou_jannau: "it will currently not work if you boot via u-boot (to be fixed very soon, probably tonight CEST)" <-- is this fixed yet?
23:10c10l53 has quit [Ping timeout: 480 seconds]
23:13alcazar has quit [Ping timeout: 480 seconds]
23:24alcazar has joined #asahi-dev
23:32alcazar has quit [Ping timeout: 480 seconds]
23:32nametable[m]<j`ey> "nametable: https://github.com/..." <- When I run "bputil -a" I get an error "Failed to disable boot-args restriction: 11"
23:37j`eywhat does bputil -d show?
23:39alcazar has joined #asahi-dev
23:43jcramerus[m] has joined #asahi-dev
23:45rqou_nametable[m]: going to guess: are you using the correct "paired" recovery image? you have to make the install you're trying to configure with bputil the default boot option before it will work
23:48alcazar has quit [Ping timeout: 480 seconds]
23:49nametable[m]rqou_: Hmm, I'm not sure if I'm using the "paired" recovery. When I try volume 1 instead of 2, I get a different error "Failed to create local policy"
23:50j`eyis asahi your default startup disk?
23:52nametable[m]Yes, without going to the boot menu, it currently boots to Asahi
23:54tired has quit [Quit: /]
23:55tired has joined #asahi-dev
23:56alcazar has joined #asahi-dev
…