#
…

2023-01-21

01:09chadmedis there a sane way to rename hwmon labels on the fly at runtime that doesnt involve hard coding it
01:09lonjil has quit [Quit: Quit.]
01:10chadmedim looking at smc hwmon and i want to grab the list of supported keys at runtime like applesmc does because its going to get real ugly trying to hardcode the supported keys for each machine
01:10chadmedbut at the same time the UX of having a giant list of keys called T*** P*** V*** and C*** is not very good, so it would be nice for the driver to rename ones we know as it goes
01:11chadmedin a way that does not involve a thousand lines of hard coded matches
01:31hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:32lonjil has joined #asahi-dev
01:39j`ey has quit [Ping timeout: 480 seconds]
01:58j`ey has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:42zalyx has joined #asahi-dev
02:42zalyx has quit []
02:45zalyx has joined #asahi-dev
03:03apalos has quit [Quit: ZNC 1.7.2 - https://znc.in]
03:04apalos has joined #asahi-dev
03:06apalos has quit []
03:07apalos has joined #asahi-dev
03:20amarioguyjannau: one question on pmu stuff, why do we use the FIQ mode in linux instead of the AIC mode (ostensibly should deliver as an IRQ)? is that just a legacy holdover mode from idevices or smth?
03:20amarioguydo m series chips only have the option to deliver these as FIQs?
03:21marcanI don't think I ever saw IRQ mode working
03:21marcanit doesn't make much sense either, it'd require a back channel from the CPUs to AIC which is implausible
03:21marcanmaybe it's just "deliver as IRQ directly" (like the GIC management IRQ, bypassing AIC)
03:22marcanbut that doesn't really buy you much
03:24amarioguygot it that makes sense, looked at an older xnu drop it seemed to be defined for at least H9P/A10 but on newer source drops this does not appear to apply for h13
03:25amarioguy(the aic mode is set in xnu via a macro per device)
03:25amarioguyotherwise fiq
03:25amarioguyso that tracks
03:25amarioguyCPMU_AIC_PMI the macro of interest
03:28nicolas17 has quit [Quit: Konversation terminated!]
04:30hertz has joined #asahi-dev
05:30stipa is now known as Guest2005
05:30stipa has joined #asahi-dev
05:30Guest2005 has quit [Read error: Connection reset by peer]
07:01noworries has joined #asahi-dev
07:02noworries has quit []
07:03faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:27chadmedis there a way to get the 4cc/ascii code of an smc key back from smc_core?
07:44noworries has joined #asahi-dev
07:45noworries has quit [Quit: Quit]
07:46noworries has joined #asahi-dev
07:46noworries has quit []
07:59snouhaud has joined #asahi-dev
08:15snouhaud has quit []
08:41svenhm, so it seems like that bar that only reads as -1 in Linux works fine in macOS
08:41svenI guess there’s still some magic init missing somewhere
08:41svenonly difference to the working bars in Linux seems to be that the broken one is marked as prefetchable
08:43sven(i.e. non-prefetchable ones work in linux while the only prefetchable bar that’s on the bus doesn’t)
08:46svenalso, hotplugging too fast breaks acio and resets the soc it seems :D
09:09yamii has quit [Quit: WeeChat 3.6]
09:17kettenis_sven: are the pci bridges set up correctly?
09:30svenhrm, I never checked but assumed that the linux pci code would do that correctly
09:30sveni'll take a closer look
09:54kloenk has quit [Remote host closed the connection]
09:55chadmed_ has quit [Remote host closed the connection]
09:56chadmed_ has joined #asahi-dev
10:01Z750 has quit [Quit: ZNC - https://znc.in]
10:34cylm has quit [Ping timeout: 480 seconds]
10:40chadmed_ has quit [Remote host closed the connection]
10:40nate8 has joined #asahi-dev
10:42chadmed_ has joined #asahi-dev
10:43Z750 has joined #asahi-dev
10:47kloenk has joined #asahi-dev
11:41timokrgr has quit [Quit: User left the chat]
11:42timokrgr has joined #asahi-dev
12:14gladiac has quit [Quit: k thx bye]
12:15gladiac has joined #asahi-dev
12:15svennot sure yet what the error is but it seems that the entire prefetchable memory region reads as -1 on the usb4 pcie controller
12:16gladiac has quit []
12:30svenoh for fuck's sake...
12:30svenbit 1 in port_base + 0x994 must be set to allow reads to that prefetchable region
12:31sven64 bytes from fra24s08-in-f3.1e100.net (142.250.186.163): icmp_seq=1 ttl=115 time=19.8 ms
12:31svenwell... there we go
12:33svenwell... looks like that #define even already exists: #define PORT_PREFMEM_ENABLE 0x00994
12:38svenurgh... but I can't set it in apple_pcie_setup_port because something seems to disable it again :/
12:48svenoh that's just great. any update to PCI_PREF_MEMORY_BASE or PCI_PREF_MEMORY_LIMIT clears that bit again 🙃
12:49TheLinkyour clearance got revoked ;)
13:13chadmed_povik: is there anything i can cherry pick to get V/ISENSE working in some capacity? i want to wire up and start testing the safety daemon at some point next week if possible
13:21svenguess that just leaves figuring out how to correctly trigger the bus rescan and cleaning up a bunch of hacks until I can look into DP-over-usb4 then
13:25jannauare you still looking for HPD irqs? apple seems to use DATA STATUS (0x50) bit 14 / 15 even for dp altmode. annotated as TBT HPD in the tps 65987ddh trm
13:27svenim pretty sure that doesn’t work with my usb3/DP hub and yet it works on macOS
13:27sveniirc I found an interrupt though
13:28svenor, well, the bit works iirc but I didn’t get an irq
13:30jannaumacos checks it after it gets AttentionReceived irqs
13:31svenmaybe I don’t remember correctly and the issue was just that the bit changed without a data status changes irq
13:33svenI think whatever I have in my latest branch worked for me though
13:36jannauit works somewhat with the exception of dwc3 role switch handling and the missed hpd events
13:36svenmissed hpd events?
13:37sventhe role switching issue is annoying
13:37svenmaybe we’ll have to rethink how that is handled :/
13:40jannauif I connect the adapter with dp cable connected there is only a single dp_sid update. It doesn't generate HPD events since dp_altmode_status_update() consumes that for altmode configuration
13:41svenI’d rework the oob event a bit anyway
13:42svenadd a “connected” flag to forward the actual HPD value and then just trigger it once after setup
14:08svenoh, there's also iommu-map/iommu-map-mask which is rather awkward for the usb4 pcie controller
14:08svenwe might have to think about an alternate mechanism to synchronize which iommu SID will be used for which pcie device
14:12kettenis_how many SIDs does the iommu have?
14:13kettenis_the obvious thing to do actually is just pass the full RID to the iommu driver and let it figure out what SID to use
14:13svenit also needs to be configured inside the pcie port with that rid2sid map
14:14sven(for which there are also 64 slots here)
14:14svenright now the pcie driver parses iommu-map and makes sure that rid2sid map is configured correctly
14:21zalyx has quit [Quit: later alligator]
14:22zalyx has joined #asahi-dev
14:22zalyx has quit []
14:24zalyx has joined #asahi-dev
14:36kettenis_given the way PCIe topologies work, you probably just want to map PCIe bus numbers onto SIDs
14:37svenI still have no clue about PCIe topologies ;)
14:37svenbut I'm happy if that works
14:40kettenis_that would limit you to 64 bus numbers, but that is probably plenty
14:42kettenis_PCIe has a switched topology with each downstream port of the switch getting its own bus number
14:55chadmed_ has quit [Ping timeout: 480 seconds]
15:10amarioguy has quit [Remote host closed the connection]
15:17faruk has joined #asahi-dev
15:18faruk has quit []
15:26faruk has joined #asahi-dev
15:47faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:05faruk has joined #asahi-dev
16:26stipa is now known as Guest2038
16:26stipa has joined #asahi-dev
16:32Guest2038 has quit [Ping timeout: 480 seconds]
16:51ChaosPrincess^touchbar support
16:56jannauis on-screen keyboard software configurable enough to "display" a single line of function keys?
16:59ChaosPrincessthere is no display support yet
16:59ChaosPrincessdigitizer only
17:00ChaosPrincessbut you could do something like parsing events with special userspace, and sending the f-key when the area directly above the corresponding number key is touched
17:01ChaosPrincessi may or may not do that, depending on how hard screen support ends up being
17:01jannauyes, I was asking if it's possible to convince a on-screen keyboard to use the digitizer
17:01ChaosPrincessi do not see why not
17:01ChaosPrincessaside from the fact that rn all userspace thinks this digitizer belongs to primary display with hilarious results
17:23nate8 has quit [Ping timeout: 480 seconds]
18:01yamii has joined #asahi-dev
18:05seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:06seeeath has joined #asahi-dev
18:12cylm has joined #asahi-dev
18:13seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:14seeeath has joined #asahi-dev
18:32amarioguy has joined #asahi-dev
19:08bcrumb has joined #asahi-dev
19:11bcrumb has quit []
19:16faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:21eiln has joined #asahi-dev
20:22eilnholy, nice work
20:29eiln has quit [Quit: Page closed]
20:32povikchadmed: not at the moment (while i pushed an ivsense branch yesterday it's not ready to go)
20:33poviki plan to continue working on it monday, to test it on j314
20:41___nick___ has joined #asahi-dev
20:58seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:59faruk has joined #asahi-dev
20:59seeeath has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:14jluthra has quit [Remote host closed the connection]
21:14jluthra has joined #asahi-dev
21:21hightower4 has joined #asahi-dev
21:27hightower3 has quit [Ping timeout: 480 seconds]
21:27yamii has quit [Quit: WeeChat 3.6]
21:29hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:31yamii has joined #asahi-dev
22:00mkurz has joined #asahi-dev
22:11chadmed_ has joined #asahi-dev
22:16chadmed_povik: ack no worries
22:34faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:43bcrumb has joined #asahi-dev
22:43zzywysm_ has joined #asahi-dev
22:47bcrumb has quit []
22:50zzywysm has quit [Ping timeout: 480 seconds]
23:09hertz has joined #asahi-dev
23:10faruk has joined #asahi-dev
23:15faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:19faruk has joined #asahi-dev
…