#
…

2022-11-12

00:26yuyichao has quit [Read error: Connection reset by peer]
00:26yuyichao has joined #asahi-dev
00:28chadmed has quit [Quit: Konversation terminated!]
01:15digicyc2 has joined #asahi-dev
01:18digicyc has quit [Ping timeout: 480 seconds]
01:34Avaflowtonight's fun task: "can I port my simple toy aarch64 OS to M1 before I get too drunk to program"
01:35Avaflowif I get it to boot with UART working I call that a win
01:58beeblebrox has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:25beeblebrox has quit [Quit: Konversation terminated!]
02:44nicolas17 has quit [Quit: Konversation terminated!]
02:45___nick___ has quit []
02:47___nick___ has joined #asahi-dev
02:50___nick___ has quit []
02:51___nick___ has joined #asahi-dev
03:54Dcow has joined #asahi-dev
04:02Dcow has quit [Ping timeout: 480 seconds]
04:21Avaflowis the gdbserver command in the m1n1 hypervisor supported on a macos host system?
04:22Avaflowgetting "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
04:28Dcow has joined #asahi-dev
04:37Dcow has quit [Ping timeout: 480 seconds]
05:04Dcow has joined #asahi-dev
05:12Dcow has quit [Ping timeout: 480 seconds]
05:18SSJ_GZ has joined #asahi-dev
05:39Dcow has joined #asahi-dev
05:47Dcow has quit [Ping timeout: 480 seconds]
06:14Dcow has joined #asahi-dev
06:22Dcow has quit [Ping timeout: 480 seconds]
06:23AvaflowI see, requires a linux host *and* py3.10
06:43capta1nt0ad has joined #asahi-dev
06:50Dcow has joined #asahi-dev
06:50Avaflowupdate: 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 🤣
06:50capta1nt0ad has quit [Quit: Konversation terminated!]
06:51AvaflowI have, however, gained a renewed appreciation for the work put into asahi
06:58Dcow has quit [Ping timeout: 480 seconds]
07:23SSJ_GZ has quit [Ping timeout: 480 seconds]
07:24capta1nt0ad has joined #asahi-dev
08:09Dcow has joined #asahi-dev
08:25Dcow has quit [Ping timeout: 480 seconds]
08:32Dcow has joined #asahi-dev
08:38svenjannau: I think I have usb3/dp hotplug stable now
08:38sven-#define ACIOPHY_CROSSBAR_PROTOCOL_USB3_DP_SWAPPED 0x10
08:38sven+#define ACIOPHY_CROSSBAR_PROTOCOL_USB3_DP_SWAPPED 0x11
08:38sven^-- that was one issue
08:38sventhe other was that it apparently really wants me to do some BIST (built-in self test I guess) before setting up the pipehandler
08:39svenand another one was that I really need to shut dwc3 down before turning off atcphy
08:39svenlet me commit and push all that stuff
08:46svenargh.. and I forgot to rebase on your branch. sorry :(
09:04jannausven: I'll take a look later, I want to get brightness control done
09:05svensure, I’ll see if I manage to rebase on your branch later
09:12shaan has joined #asahi-dev
09:13SSJ_GZ has joined #asahi-dev
09:34shaan has quit []
09:38capta1nt0ad has quit [Remote host closed the connection]
10:19svenand ofc I still can't access the thunderbolt MMIO. I kinda hoped I would've fixed that by accident as well :(
10:43jannauis that more than a power-domain issue?
10:44svenI'm not sure. I also need to poke some random register inside pmgr to make it even come up
10:45svenhalf 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
10:52mazjannau: mba-M2 on order (tricked $boss into the "lab equipment" argument). I guess I'll revive these NV patches after all...
10:58maznow the question is how to rack the damn computer. any advise?
11:08jannauthanks for unblocking apple from announcing mac minis with m2 next week ;)
11:09jannaumaz: placing it simply on a rack shelf and maybe securing it with velcro?
11:11jannauI guess you don't intend to work next to the rack with keyboard and display otherwise you could got with something fancy like https://www.racksolutions.eu/rack-shelves/laptop-sliding-shelves.html
11:14mazjannau: 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...)
11:15mazand I'll be positively annoyed if they announce the M2 mini this side of Xmas! ;-)
11:15svenjannau: 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
11:20jannauI doubt they will update the mac mini this year
11:22jannausven: what's too fast? a little surprising that there is a race a human can win with manual connector handling
11:23svenlike, very fast. my adapter is very cheap and just putting a bit pressure on it can cause a very quick unplug/plug
11:24svenwhat 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
11:24svendoesn't help that this all also happens over i2c I guess
11:25svenand I guess running this under the HV with sync tracing makes everything even slower :D
11:26svener, wait, i actually already fixed the interrupt thing. huh.
11:27svenah.. but not in this branch where i'm trying to split the tipd commit. nvm.
12:23capta1nt0ad has joined #asahi-dev
12:47as400 has quit [Remote host closed the connection]
13:07svenmarcan: do you happen to have any USB4 device? (i.e. something that actually uses Enter_USB instead of Enter_Mode)
13:28lewurm has quit [Read error: Connection reset by peer]
13:48jannausven: I have a thunderbolt 4 hub. are there already devices with non-intel controllers
13:49sventhunderbolt 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?
13:50sveni know that there's e.g. a caldigit dock that has usb4 / thunderbolt 4
13:52svenfwiw, 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
14:07la1440 has joined #asahi-dev
14:09la1440 has quit []
14:24sventhanks!
14:27jannaudocumeted 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
14:31svenusually the start at least marches up
14:31svenexcept for the irq regs which are just completely different
14:31sven*matches
14:37svenlooks like there isn’t a difference between how it handles tbt4 vs tbt3
14:43lewurm has joined #asahi-dev
15:55as400 has joined #asahi-dev
16:12zkrx has quit []
16:22zkrx has joined #asahi-dev
16:55cylm has joined #asahi-dev
18:02felix_ has joined #asahi-dev
18:03zzywysm has quit [Ping timeout: 480 seconds]
18:06felix_ is now known as glxplz
18:06glxplz has quit [Quit: glxplz]
19:05cylm has quit [Ping timeout: 480 seconds]
19:40bpye has quit [Quit: Ping timeout (120 seconds)]
19:40bpye has joined #asahi-dev
19:47joske has joined #asahi-dev
19:49joskesven: with asahi-dcpext-2022-11-12 on 16GB M1 mba: https://paste.debian.net/1260496/
19:53Dcow has quit [Remote host closed the connection]
19:54Dcow has joined #asahi-dev
19:55joskeignore if not helpful/useful :-)
19:55joske has quit [Remote host closed the connection]
20:01svenuh, does it also show anything on the display?
20:04jannauif not does show something after swtiching to another tty
20:05jannaukind of useless without description what;s happing on display side
20:07joske has joined #asahi-dev
20:07joskedisplay says no signal
20:07joskehotplugged USB-C to DP cable when at GDM screen
20:08svenI never tried anything in that branch outside of a tty fwiw
20:08joskeI can try that
20:08svenjannau’s branch also has some more fixes iirc
20:09sventhis is still in the very early “if it breaks you get to keep the parts” stage ;)
20:09joskesure ;-)
20:09joskejust playing around
20:09sventhe other interesting test is to see if usb3 works
20:10joskeI have USB 3 flash drives
20:10joskehow can I see it's using USB3?
20:11jannaujoske: 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)
20:11svendmesg should mention something about “new SuperSpeed device” and not “new high speed device”
20:11jannauin drivers/phy/apple/atc.c
20:11svenah, right, I still need to figure out where exactly that thing comes from
20:12alxdrl has joined #asahi-dev
20:12svenit has to be known long before it negotiates a link rate and outside of dcp
20:14joske has quit [Remote host closed the connection]
20:14joske has joined #asahi-dev
20:17alxdrl has quit [Remote host closed the connection]
20:18joskenew superspeed device :-)
20:20joskehotplug screen on tty2 work! After VT switch like jannau said
20:21joskethis is with the patch jannau suggested
20:21joskedid not try without that, should I?
20:21svendoesn't really matter, I put the value I got from traces from my mac mini but apparently they change depending on something else
20:22svenI'll probably have to reverse engineer the kext to figure out what decides UNK100 vs. UNK009
20:22sven*UNK008
20:22alxdrl has joined #asahi-dev
20:23joskehotplugged at GDM screen, and after some VT switches, seemed to work too, could move the mouse pointer to that screen
20:23joskebut as soon as I log in, no signal
20:24joskeif I switch back to a text console, it works again
20:24alxdrl has quit [Remote host closed the connection]
20:25joskeswitching back to the graphical tty seems to kill wayland
20:25___nick___ has quit [Ping timeout: 480 seconds]
20:26svenyeah, I think jannau has some patches somewhere to fix that iirc
20:26svenfor that branch the only interesting parts are if the display comes up at all and if superspeed works reliably
20:26joskeI'll try to replug the flash drive a few times
20:27svenjannau: 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
20:28joskeplugged again, superspeed, logged out of GNOME, and then laptop froze :-D
20:28svenuh oh :D
20:28joskecaps lock light still worked, but that was about it
20:29joske has quit [Remote host closed the connection]
20:29svenI assume you don't have serial output?
20:32jannausven: ah. I can imagine that I inserted the plug always in the same orientation since the dp connector is not symetric
20:33svenI 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
20:33svenand it's the only thing I can think of
20:33ChaosPrincessdp is not symmetric but the usb-c side should be
20:35roxfan2 has joined #asahi-dev
20:36joske has joined #asahi-dev
20:36joskesven: no, booted with u-boot/grub
20:36svenChaosPrincess: uh, maybe I'm confused but how can usb-c be symmetric when it's in the DP altmode that uses all four lanes?
20:38ChaosPrincessso, 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
20:40roxfan has quit [Ping timeout: 480 seconds]
20:40svendoesn't the host then have to decide if it needs to route the lane to s0 or s3 depending on the orientation?
20:40ChaosPrincessthats correct, the host needs to route it correctly
20:41svenI don't think there's anything in atcphy that does that because for the four lane mode swap_lanes was always set to false
20:41svenso maybe that UNK008 vs. UNK100 in that mode decides the orientation
20:43StupidYui has joined #asahi-dev
20:49jannausven: confirmed, UNK008 vs. UNK100 switches with the usb-c plug orientation
20:50jannaulet me check if it's the same for usb4
20:50jluthra has quit [Remote host closed the connection]
20:51jluthra has joined #asahi-dev
20:51sveniirc the lane orientation for usb4 is configured somewhere inside ACIO or NHI
20:53jannauACIOPHY_CROSSBAR = 0x20 vs. ACIOPHY_CROSSBAR = 0x21
20:54jannauso PROTOCOL_SWAPPED
20:54svenhuh, looks like I messed that one up then
20:54svener. wait.
20:55svenno, that's correct. I have 0 vs. 1.
20:55svenbut I think it doesn't set ATCPHY_MISC_LANE_SWAP
20:56jannauyes, I missed ACIOPHY_CROSSBAR_PROTOCOL_USB4_SWAPPED vs. ACIOPHY_CROSSBAR_PROTOCOL_USB4
20:57svenalright, so just one ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK100 needs to be ACIOPHY_CROSSBAR_DP_SINGLE_PMA_UNK008 and then everything should be good
21:11___nick___ has joined #asahi-dev
21:12c10l has quit [Quit: Ping timeout (120 seconds)]
21:23amarioguybtw i2c patch made it to i2c for-next branch, almost definitely going upstream when the next merge window comes around \o/
21:44roxfan2 is now known as roxfan
21:49cylm has joined #asahi-dev
22:25joske has quit [Quit: Leaving]
22:35capta1nt0ad has quit [Quit: Konversation terminated!]
22:37capta1nt0ad has joined #asahi-dev
22:50capta1nt0ad has quit [Remote host closed the connection]
22:51millenialhacker has joined #asahi-dev
22:52millenialhackercould someone with a M1 laptop share the ISP registers addresses with me (from ADT)?
22:53millenialhackerit's 0x22A000000
22:53capta1nt0ad has joined #asahi-dev
23:27cylm has quit [Ping timeout: 480 seconds]
23:27ChaosPrincessreg = [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]
23:27ChaosPrincessthose are from adt, address needs to be added to 0x200000000
23:31pthariensflame has joined #asahi-dev
23:32pthariensflame has quit []
23:54c10l has joined #asahi-dev
23:54millenialhacker has quit [Remote host closed the connection]
23:58SSJ_GZ has quit [Ping timeout: 480 seconds]
…