ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
doggkruse has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
yuyichao has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi-dev
alcazar has joined #asahi-dev
baracaio[m] has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
jakebot has quit [Quit: The Lounge - https://thelounge.chat]
jakebot has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
jakebot has quit []
jakebot has joined #asahi-dev
atsalyuk has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
pedrohos[m] has joined #asahi-dev
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doggkruse has joined #asahi-dev
atsalyuk has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
thevar1able has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
thevar1able has quit [Quit: Textual IRC Client: www.textualapp.com]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
PhilippvK has joined #asahi-dev
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi-dev
phiologe has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
atsalyuk has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
chadmed has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
atsalyuk has joined #asahi-dev
jluthra has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
loki_val has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
chadmed has joined #asahi-dev
jluthra has joined #asahi-dev
jluthra has quit []
jluthra has joined #asahi-dev
c10l53 has quit []
c10l53 has joined #asahi-dev
jluthra has quit [Quit: WeeChat 1.9.1]
atsalyuk has quit [Ping timeout: 480 seconds]
<jannau> alexsv: welcome. have you already started looking into it? For USB-C displayport alt mode there are 3 things you'll have to look at
<jannau> 1. 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
<jannau> the 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
<jannau> it will currently not work if you boot via u-boot (to be fixed very soon, probably tonight CEST)
<jannau> on the display processor side there seem to be no or nor huge difference between the main display adn external displays
<jannau> apple calls the nodes for the main display dcp and disp0 in their device-tree
<jannau> the nodes for the external display(s) are called dcpextN and dispextN
nicolas17 has quit [Ping timeout: 480 seconds]
<jannau> 3. 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
<jannau> there is also a dp-crossbar which probably needs to to be configured
<jannau> I don't think we have documentation besides the code and the tracing implementation
<j`ey> jannau: whats disp0 "do"?
<marcan> that's the actual display hardware
<marcan> dcp is just the CPU
<marcan> in PMGR it's actually called something like DISP0_CPU or so IIRC
<j`ey> ah, so dcp pokes mmio in disp0, and the main cpu just enables pmgr stufff for disp0
atsalyuk has joined #asahi-dev
<jannau> main cpu also maintains the iommu for display processor, dcp and disp0 both have their own dart
the_lanetly_052 has joined #asahi-dev
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<alexsv> jannau: Thanks a lot! This is already a lot to read!
<alexsv> One more question: why is everything dependent on m1n1? Is it about FW blobs?
jluthra has joined #asahi-dev
<alexsv> Ach, m1n1 actually creates the FDT for Linux, as I can see
jluthra has quit []
<_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
<_jannau_> firmware is already loaded by iboot so we do not have to care about that
<chadmed> more 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
atsalyuk has quit [Ping timeout: 480 seconds]
Telvana2 has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
Telvana has quit [Ping timeout: 480 seconds]
<sven> looks 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 :/
<sven> so 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
<sven> and that interrupt sticks until it's actually triggered and handled by the CPU
<sven> so 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
<arnd> My 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
<maz> arnd: jannau has done some initial bring-up work: https://github.com/jannau/linux/tree/asahi-t6002
<arnd> maz, _jannau_, thanks!
<maz> there is also a bunch of m1n1 fixes for that, but I can't find them anymore (must have closed the tab)
<maz> ah, here you go! :D
jluthra has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
<_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
<arnd> _jannau_: is it enough to boot into a kernel with display and keyboard,or do I need a serial console?
<_jannau_> u-boot support is in https://github.com/AsahiLinux/u-boot/commits/asahi and already on the u-boot mailing list
<_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
<_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)
<arnd> ok, 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
<arnd> using efi-earlycon for debugging does sound easier than serial, as I don't have another mac
MajorBiscuit has joined #asahi-dev
<_jannau_> running linux under m1n1's hypervisor should work (but not extensively tested) and has serial over usb acm
<shenki> i can recommend that method
<shenki> for basic kernel testing at least
<arnd> right, good idea
<marcan> arnd: I might poke around in a bit, just need to get a chore taken care of
<marcan> and yeah, the HV was made for this (also)
<marcan> _jannau_: I almost *always* run it under the HV while testing, I would call that extensively tested enough
<marcan> only thing is I think there's still a bug in vUART input, it drops characters if you paste too many at once
Poplar has joined #asahi-dev
atsalyuk has joined #asahi-dev
<j`ey> same, I always run under m1n1 hv, via normal USB cable
<_jannau_> not yet extensively tested on t6002, macos HV is definitively busted (probably the second pmgr instance)
<arnd> I 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
bps has joined #asahi-dev
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #asahi-dev
Poplar is now known as poplar
<j`ey> arnd: lets us know how you get on
r0ni has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
atsalyuk has quit [Ping timeout: 480 seconds]
ChaosPrincess has quit [Quit: WeeChat 3.4.1]
ChaosPrincess has joined #asahi-dev
bps has joined #asahi-dev
atsalyuk has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
kameks has joined #asahi-dev
alcazar has joined #asahi-dev
<sven> okay, 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
<sven> i 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
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
atsalyuk has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
the_lanetly_052 has joined #asahi-dev
alcazar has joined #asahi-dev
atsalyuk has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<robinp_> for https://github.com/AsahiLinux/docs/wiki/SW:Hypervisor why do the code examples use a t8101 - isn't that an A14 ?
<sven> M1 essentially is a variant of A14 and they share the same kernel iirc
skrzyp has joined #asahi-dev
<sven> similar 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
<chadmed> there will be no m2, there will only be M1/Pro/Max/Ultra Gen 2 SuperSpeed
crabbedhaloablut has joined #asahi-dev
alcazar has joined #asahi-dev
loki_val has quit [Ping timeout: 480 seconds]
loki_val has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
crabbedhaloablut has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
rikkaa has joined #asahi-dev
atsalyuk has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
yuyichao has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
kameks has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
yuyichao has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
nicolas17 has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
amarioguy has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
atsalyuk has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
doggkruse has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
alcazar has joined #asahi-dev
<arnd> It 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
<arnd> which 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?
<j`ey> you can use a C-A cable
alcazar has quit [Ping timeout: 480 seconds]
<j`ey> pinging jannau on their other handle
<maz> arnd: the debug port is the one closer to the Ethernet port.
<jannau> arnd: debug port is the one next to the ethernet port but that should only matter for the hw uart
<j`ey> but that's not needed for m1n1 to work over USB
<arnd> ok, I see, then there must be another problem. Does the ttyACM only work if I boot into m1n1 without the u-boot payload?
<jannau> arnd: there should be two ttyACM devices when m1n1 is loaded
<kevans91> it needs to hit the proxy stuff after not detecting an executable payload
<kevans91> in my experience, at least
<jannau> ah, yes. m1n1 needs to be standalone on the device without payload
<arnd> ok, got it. So I reinstall m1n1 with no payload and then pass it u-boot or a kernel from the host, right
<jannau> then tools/run_guest.py in proxyclient can be used to execute m1n1 + payload from the usb connected computer
<kevans91> it'd be most convenient if you could drive the proxyclient on the guest, but that seems nontrivial
alcazar has joined #asahi-dev
emilytrau[m] has joined #asahi-dev
herbas has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
<arnd> Thanks!
<amarioguy> what does the "apcie=0xfffffffe" boot arg exactly do?
<amarioguy> the looks of it, it changes something about the Apple PCIe controller, not exactly sure what it would do tho
alcazar has quit [Ping timeout: 480 seconds]
rikkaa has quit [Quit: Connection closed for inactivity]
Telvana2 has quit [Read error: Connection reset by peer]
alcazar has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
Telvana has joined #asahi-dev
Telvana has quit [Remote host closed the connection]
Telvana has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
herbas has quit [Remote host closed the connection]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alcazar has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
<j`ey> arnd: did you get it working?
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<arnd> j`ey: I decided to stop trying for the moment, shouldn't be too hard from here tomorrow
alcazar has joined #asahi-dev
<j`ey> arnd: ok :-)
alcazar has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
alcazar has joined #asahi-dev
___nick___ has joined #asahi-dev
___nick___ has quit []
alcazar has quit [Ping timeout: 480 seconds]
___nick___ has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
amarioguy has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
doggkruse has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<nicolas17> if curl can't connect to the server or resolve DNS or something like that, it will return a non-zero exit code
<nicolas17> but if the server (or the proxy intercepting it >.>) returns an HTTP error code like 403, it will exit with zero code
<nicolas17> you may want to add -f to the curl command to make it exit non-zero on HTTP error codes too
<nicolas17> I 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
<alexsv> jannau: in which component the mentioned uboot boot for dcp is to be fixed?
amarioguy has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<jannau> alexsv: 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
MajorBiscuit has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
<jannau> hypervisor not well tested on t6002 means support for starting CPUs on the second die is missing
<jannau> that's for bare metal, HV support is in m1n1/hv.py line 156ff
<j`ey> ah right
alcazar has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
systwi has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alexsv has quit [Ping timeout: 480 seconds]
<jannau> fixed
MajorBiscuit has joined #asahi-dev
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
systwi has joined #asahi-dev
alcazar has joined #asahi-dev
MajorBiscuit has quit [Quit: WeeChat 3.4]
alcazar has quit [Ping timeout: 480 seconds]
yuyichao has quit [Quit: Konversation terminated!]
yuyichao has joined #asahi-dev
alcazar has joined #asahi-dev
tired has joined #asahi-dev
<nametable[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?
<nametable[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
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<j`ey> nametable[m]: the m1n1 already installed can be used
c10l531 has joined #asahi-dev
<j`ey> nametable[m]: I cant remember the command off the top of my head, but you can set -v in the nvram boot args
<j`ey> and then m1n1 will wait 5s for some USB activity before boooting the payload
alcazar has joined #asahi-dev
<nametable[m]> j`ey: Thanks,
<nametable[m]> I'll give that a shot
<rqou_> jannau: "it will currently not work if you boot via u-boot (to be fixed very soon, probably tonight CEST)" <-- is this fixed yet?
c10l53 has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-dev
alcazar has quit [Ping timeout: 480 seconds]
<nametable[m]> <j`ey> "nametable: https://github.com/..."; <- When I run "bputil -a" I get an error "Failed to disable boot-args restriction: 11"
<j`ey> what does bputil -d show?
alcazar has joined #asahi-dev
jcramerus[m] has joined #asahi-dev
<rqou_> 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
alcazar has quit [Ping timeout: 480 seconds]
<nametable[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"
<j`ey> is asahi your default startup disk?
<nametable[m]> Yes, without going to the boot menu, it currently boots to Asahi
tired has quit [Quit: /]
tired has joined #asahi-dev
alcazar has joined #asahi-dev