marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: | Wiki: | Logs:
yuyichao has quit [Read error: Connection reset by peer]
yuyichao has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
digicyc2 has joined #asahi-dev
digicyc has quit [Ping timeout: 480 seconds]
<Avaflow> tonight's fun task: "can I port my simple toy aarch64 OS to M1 before I get too drunk to program"
<Avaflow> if I get it to boot with UART working I call that a win
beeblebrox has joined #asahi-dev
<alyssa> Oh boy
Emantor has quit [Quit: ZNC -]
Emantor has joined #asahi-dev
beeblebrox has quit [Quit: Konversation terminated!]
nicolas17 has quit [Quit: Konversation terminated!]
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
<Avaflow> is the gdbserver command in the m1n1 hypervisor supported on a macos host system?
<Avaflow> getting "AttributeError: module 'os' has no attribute 'eventfd'" when I run gdbserver in the hv console and I feel like it's either only supported on linux hosts or I'm doing something silly wrong
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
SSJ_GZ has joined #asahi-dev
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
<Avaflow> I see, requires a linux host *and* py3.10
capta1nt0ad has joined #asahi-dev
Dcow has joined #asahi-dev
<Avaflow> update: while stepping through instructions in gdb, it may have come to my realisation that I am too drunk to comprehend asm. it was a valiant effort 🤣
capta1nt0ad has quit [Quit: Konversation terminated!]
<Avaflow> I have, however, gained a renewed appreciation for the work put into asahi
Dcow has quit [Ping timeout: 480 seconds]
SSJ_GZ has quit [Ping timeout: 480 seconds]
capta1nt0ad has joined #asahi-dev
Dcow has joined #asahi-dev
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-dev
<sven> jannau: I think I have usb3/dp hotplug stable now
<sven> ^-- that was one issue
<sven> the other was that it apparently really wants me to do some BIST (built-in self test I guess) before setting up the pipehandler
<sven> and another one was that I really need to shut dwc3 down before turning off atcphy
<sven> let me commit and push all that stuff
<sven> argh.. and I forgot to rebase on your branch. sorry :(
<jannau> sven: I'll take a look later, I want to get brightness control done
<sven> sure, I’ll see if I manage to rebase on your branch later
shaan has joined #asahi-dev
SSJ_GZ has joined #asahi-dev
shaan has quit []
capta1nt0ad has quit [Remote host closed the connection]
<sven> and ofc I still can't access the thunderbolt MMIO. I kinda hoped I would've fixed that by accident as well :(
<jannau> is that more than a power-domain issue?
<sven> I'm not sure. I also need to poke some random register inside pmgr to make it even come up
<sven> half of the MMIO works and the other half doesn't. maybe I also need to actually boot this ACIO thing first to make e.g. pciec come up
<maz> jannau: mba-M2 on order (tricked $boss into the "lab equipment" argument). I guess I'll revive these NV patches after all...
<sven> :>
<maz> now the question is how to rack the damn computer. any advise?
<jannau> thanks for unblocking apple from announcing mac minis with m2 next week ;)
<sven> lol
<jannau> maz: placing it simply on a rack shelf and maybe securing it with velcro?
<jannau> I guess you don't intend to work next to the rack with keyboard and display otherwise you could got with something fancy like
<maz> jannau: fancy indeed. but indeed I don't intend to face the rack (it is behind me when I'm home, and rather far away when at work...)
<maz> and I'll be positively annoyed if they announce the M2 mini this side of Xmas! ;-)
<sven> jannau: ugh. another race I just found: if you unplug/plug the type-c connector quickly enough the tps code essentially misses that it was changed at all. so please don't switch connectors too quickly when you test this :D
<jannau> I doubt they will update the mac mini this year
<jannau> sven: what's too fast? a little surprising that there is a race a human can win with manual connector handling
<sven> like, very fast. my adapter is very cheap and just putting a bit pressure on it can cause a very quick unplug/plug
<sven> what happens is that the tipd irq handler (which also calls into atcphy's mux_set and dwc3's role switch) first does all its handling and only at the very end acks the interrupts
<sven> doesn't help that this all also happens over i2c I guess
<sven> and I guess running this under the HV with sync tracing makes everything even slower :D
<sven> er, wait, i actually already fixed the interrupt thing. huh.
<sven> ah.. but not in this branch where i'm trying to split the tipd commit. nvm.
capta1nt0ad has joined #asahi-dev
as400 has quit [Remote host closed the connection]
<sven> marcan: do you happen to have any USB4 device? (i.e. something that actually uses Enter_USB instead of Enter_Mode)
lewurm has quit [Read error: Connection reset by peer]
<jannau> sven: I have a thunderbolt 4 hub. are there already devices with non-intel controllers
<sven> thunderbolt 4 might be good enough, can you dump TPS_REG_STATUS (0x1a), TPS_REG_POWER_STATUS (0x3f), TPS_REG_INTEL_VID (0x59) and TPS_REG_DATA_STATUS (0x5f) of that tps chip after connecting it?
<sven> i know that there's e.g. a caldigit dock that has usb4 / thunderbolt 4
<sven> fwiw, i'm essentially trying to get both the dwc3 role switch and the tipd changes ready to be sent upstream since they are useful on their own
la1440 has joined #asahi-dev
la1440 has quit []
<sven> thanks!
<jannau> documeted lengths from TI's documentaion doesn't match for TPS_REG_POWER_STATUS and TPS_REG_INTEL_VID. 10 instwad of 2 and 11 instead of 13 bytes
<sven> usually the start at least marches up
<sven> except for the irq regs which are just completely different
<sven> *matches
<sven> looks like there isn’t a difference between how it handles tbt4 vs tbt3
lewurm has joined #asahi-dev
as400 has joined #asahi-dev
zkrx has quit []
zkrx has joined #asahi-dev
cylm has joined #asahi-dev
felix_ has joined #asahi-dev
zzywysm has quit [Ping timeout: 480 seconds]
felix_ is now known as glxplz
glxplz has quit [Quit: glxplz]
cylm has quit [Ping timeout: 480 seconds]
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #asahi-dev
joske has joined #asahi-dev
<joske> sven: with asahi-dcpext-2022-11-12 on 16GB M1 mba:
Dcow has quit [Remote host closed the connection]
Dcow has joined #asahi-dev
<joske> ignore if not helpful/useful :-)
joske has quit [Remote host closed the connection]
<sven> uh, does it also show anything on the display?
<jannau> if not does show something after swtiching to another tty
<jannau> kind of useless without description what;s happing on display side
joske has joined #asahi-dev
<joske> display says no signal
<joske> hotplugged USB-C to DP cable when at GDM screen
<sven> I never tried anything in that branch outside of a tty fwiw
<joske> ah
<joske> I can try that
<sven> jannau’s branch also has some more fixes iirc
<sven> this is still in the very early “if it breaks you get to keep the parts” stage ;)
<joske> sure ;-)
<joske> just playing around
<sven> the other interesting test is to see if usb3 works
<joske> I have USB 3 flash drives
<joske> how can I see it's using USB3?
<jannau> joske: you can try to change ".crossbar_dp_single_pma = ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK100," to ".crossbar_dp_single_pma = ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK008," (both occurances)
<sven> dmesg should mention something about “new SuperSpeed device” and not “new high speed device”
<jannau> in drivers/phy/apple/atc.c
<sven> ah, right, I still need to figure out where exactly that thing comes from
alxdrl has joined #asahi-dev
<sven> it has to be known long before it negotiates a link rate and outside of dcp
joske has quit [Remote host closed the connection]
joske has joined #asahi-dev
alxdrl has quit [Remote host closed the connection]
<joske> new superspeed device :-)
<joske> hotplug screen on tty2 work! After VT switch like jannau said
<sven> nice!
<joske> this is with the patch jannau suggested
<joske> did not try without that, should I?
<sven> doesn't really matter, I put the value I got from traces from my mac mini but apparently they change depending on something else
<sven> I'll probably have to reverse engineer the kext to figure out what decides UNK100 vs. UNK009
<sven> *UNK008
alxdrl has joined #asahi-dev
<joske> hotplugged at GDM screen, and after some VT switches, seemed to work too, could move the mouse pointer to that screen
<joske> but as soon as I log in, no signal
<joske> if I switch back to a text console, it works again
alxdrl has quit [Remote host closed the connection]
<joske> switching back to the graphical tty seems to kill wayland
___nick___ has quit [Ping timeout: 480 seconds]
<sven> yeah, I think jannau has some patches somewhere to fix that iirc
<sven> for that branch the only interesting parts are if the display comes up at all and if superspeed works reliably
<joske> I'll try to replug the flash drive a few times
<sven> jannau: so I wonder if UNK008 vs. UNK100 actually also changes if the plug orientation changes. i'll try to get some traces for that tomorrow
<joske> plugged again, superspeed, logged out of GNOME, and then laptop froze :-D
<sven> uh oh :D
<joske> caps lock light still worked, but that was about it
joske has quit [Remote host closed the connection]
<sven> I assume you don't have serial output?
<jannau> sven: ah. I can imagine that I inserted the plug always in the same orientation since the dp connector is not symetric
<sven> I don't think I paid close attention to trying both orientation when I was taking the original traces but I do remember being very confused there
<sven> and it's the only thing I can think of
<ChaosPrincess> dp is not symmetric but the usb-c side should be
roxfan2 has joined #asahi-dev
joske has joined #asahi-dev
<joske> sven: no, booted with u-boot/grub
<sven> ChaosPrincess: uh, maybe I'm confused but how can usb-c be symmetric when it's in the DP altmode that uses all four lanes?
<ChaosPrincess> so, lets say that dp lanes are d0, d1, d2, and d3, usb plug lanes are p0-p3, socket are s0-s3. d0 is always connected to p0, but can be connected to either s0 or s3, depending on if you twist the cable or not
roxfan has quit [Ping timeout: 480 seconds]
<sven> doesn't the host then have to decide if it needs to route the lane to s0 or s3 depending on the orientation?
<ChaosPrincess> thats correct, the host needs to route it correctly
<sven> okay
<sven> I don't think there's anything in atcphy that does that because for the four lane mode swap_lanes was always set to false
<sven> so maybe that UNK008 vs. UNK100 in that mode decides the orientation
StupidYui has joined #asahi-dev
<jannau> sven: confirmed, UNK008 vs. UNK100 switches with the usb-c plug orientation
<sven> hah!
<jannau> let me check if it's the same for usb4
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
<sven> iirc the lane orientation for usb4 is configured somewhere inside ACIO or NHI
<jannau> ACIOPHY_CROSSBAR = 0x20 vs. ACIOPHY_CROSSBAR = 0x21
<sven> huh, looks like I messed that one up then
<sven> er. wait.
<sven> no, that's correct. I have 0 vs. 1.
<sven> but I think it doesn't set ATCPHY_MISC_LANE_SWAP
<sven> alright, so just one ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK100 needs to be ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK008 and then everything should be good
___nick___ has joined #asahi-dev
c10l has quit [Quit: Ping timeout (120 seconds)]
<amarioguy> btw i2c patch made it to i2c for-next branch, almost definitely going upstream when the next merge window comes around \o/
<sven> :)
roxfan2 is now known as roxfan
cylm has joined #asahi-dev
joske has quit [Quit: Leaving]
capta1nt0ad has quit [Quit: Konversation terminated!]
capta1nt0ad has joined #asahi-dev
capta1nt0ad has quit [Remote host closed the connection]
millenialhacker has joined #asahi-dev
<millenialhacker> could someone with a M1 laptop share the ISP registers addresses with me (from ADT)?
<millenialhacker> I think it
<millenialhacker> it's 0x22A000000
capta1nt0ad has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
<ChaosPrincess> reg = [Container: addr = 0x000000002A000000 size = 0x0000000004000000, Container: addr = 0x000000003B700000 size = 0x000000000008C000, Container: addr = 0x000000003C260000 size = 0x0000000000004000, Container: addr = 0x000000003C280000 size = 0x0000000000004000, Container: addr = 0x000000003C290000 size = 0x0000000000004000]
<ChaosPrincess> those are from adt, address needs to be added to 0x200000000
pthariensflame has joined #asahi-dev
pthariensflame has quit []
c10l has joined #asahi-dev
millenialhacker has quit [Remote host closed the connection]
SSJ_GZ has quit [Ping timeout: 480 seconds]