ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
<chadmed>
is there a sane way to rename hwmon labels on the fly at runtime that doesnt involve hard coding it
lonjil has quit [Quit: Quit.]
<chadmed>
im 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
<chadmed>
but 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
<chadmed>
in a way that does not involve a thousand lines of hard coded matches
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<amarioguy>
jannau: 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?
<amarioguy>
do m series chips only have the option to deliver these as FIQs?
<marcan>
I don't think I ever saw IRQ mode working
<amarioguy>
ah fair
<marcan>
it doesn't make much sense either, it'd require a back channel from the CPUs to AIC which is implausible
<marcan>
maybe it's just "deliver as IRQ directly" (like the GIC management IRQ, bypassing AIC)
<marcan>
but that doesn't really buy you much
<amarioguy>
got 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
<amarioguy>
(the aic mode is set in xnu via a macro per device)
<amarioguy>
otherwise fiq
<amarioguy>
so that tracks
<amarioguy>
CPMU_AIC_PMI the macro of interest
nicolas17 has quit [Quit: Konversation terminated!]
hertz has joined #asahi-dev
stipa is now known as Guest2005
stipa has joined #asahi-dev
Guest2005 has quit [Read error: Connection reset by peer]
noworries has joined #asahi-dev
noworries has quit []
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chadmed>
is there a way to get the 4cc/ascii code of an smc key back from smc_core?
noworries has joined #asahi-dev
noworries has quit [Quit: Quit]
noworries has joined #asahi-dev
noworries has quit []
snouhaud has joined #asahi-dev
snouhaud has quit []
<sven>
hm, so it seems like that bar that only reads as -1 in Linux works fine in macOS
<sven>
I guess there’s still some magic init missing somewhere
<sven>
only difference to the working bars in Linux seems to be that the broken one is marked as prefetchable
<sven>
(i.e. non-prefetchable ones work in linux while the only prefetchable bar that’s on the bus doesn’t)
<sven>
also, hotplugging too fast breaks acio and resets the soc it seems :D
yamii has quit [Quit: WeeChat 3.6]
<kettenis_>
sven: are the pci bridges set up correctly?
<sven>
hrm, I never checked but assumed that the linux pci code would do that correctly
<sven>
i'll take a closer look
kloenk has quit [Remote host closed the connection]
chadmed_ has quit [Remote host closed the connection]
chadmed_ has quit [Remote host closed the connection]
nate8 has joined #asahi-dev
chadmed_ has joined #asahi-dev
Z750 has joined #asahi-dev
kloenk has joined #asahi-dev
timokrgr has quit [Quit: User left the chat]
timokrgr has joined #asahi-dev
gladiac has quit [Quit: k thx bye]
gladiac has joined #asahi-dev
<sven>
not sure yet what the error is but it seems that the entire prefetchable memory region reads as -1 on the usb4 pcie controller
gladiac has quit []
<sven>
oh for fuck's sake...
<sven>
bit 1 in port_base + 0x994 must be set to allow reads to that prefetchable region
<sven>
64 bytes from fra24s08-in-f3.1e100.net (142.250.186.163): icmp_seq=1 ttl=115 time=19.8 ms
<sven>
well... there we go
<chadmed>
\o/
<sven>
well... looks like that #define even already exists: #define PORT_PREFMEM_ENABLE0x00994
<sven>
urgh... but I can't set it in apple_pcie_setup_port because something seems to disable it again :/
<sven>
oh that's just great. any update to PCI_PREF_MEMORY_BASE or PCI_PREF_MEMORY_LIMIT clears that bit again 🙃
<TheLink>
your clearance got revoked ;)
<chadmed_>
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
<sven>
guess 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
<jannau>
are 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
<sven>
im pretty sure that doesn’t work with my usb3/DP hub and yet it works on macOS
<sven>
iirc I found an interrupt though
<sven>
or, well, the bit works iirc but I didn’t get an irq
<jannau>
macos checks it after it gets AttentionReceived irqs
<sven>
maybe I don’t remember correctly and the issue was just that the bit changed without a data status changes irq
<sven>
I think whatever I have in my latest branch worked for me though
<jannau>
it works somewhat with the exception of dwc3 role switch handling and the missed hpd events
<sven>
missed hpd events?
<sven>
the role switching issue is annoying
<sven>
maybe we’ll have to rethink how that is handled :/
<jannau>
if 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
<sven>
I’d rework the oob event a bit anyway
<sven>
add a “connected” flag to forward the actual HPD value and then just trigger it once after setup
<sven>
oh, there's also iommu-map/iommu-map-mask which is rather awkward for the usb4 pcie controller
<sven>
we might have to think about an alternate mechanism to synchronize which iommu SID will be used for which pcie device
<kettenis_>
how many SIDs does the iommu have?
<sven>
64
<kettenis_>
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
<sven>
it also needs to be configured inside the pcie port with that rid2sid map
<sven>
(for which there are also 64 slots here)
<kettenis_>
ah, right
<sven>
right now the pcie driver parses iommu-map and makes sure that rid2sid map is configured correctly
zalyx has quit [Quit: later alligator]
zalyx has joined #asahi-dev
zalyx has quit []
zalyx has joined #asahi-dev
<kettenis_>
given the way PCIe topologies work, you probably just want to map PCIe bus numbers onto SIDs
<sven>
I still have no clue about PCIe topologies ;)
<sven>
but I'm happy if that works
<kettenis_>
that would limit you to 64 bus numbers, but that is probably plenty
<kettenis_>
PCIe has a switched topology with each downstream port of the switch getting its own bus number
chadmed_ has quit [Ping timeout: 480 seconds]
amarioguy has quit [Remote host closed the connection]
faruk has joined #asahi-dev
faruk has quit []
faruk has joined #asahi-dev
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jannau>
is on-screen keyboard software configurable enough to "display" a single line of function keys?
<ChaosPrincess>
there is no display support yet
<ChaosPrincess>
digitizer only
<ChaosPrincess>
but 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
<ChaosPrincess>
i may or may not do that, depending on how hard screen support ends up being
<jannau>
yes, I was asking if it's possible to convince a on-screen keyboard to use the digitizer
<ChaosPrincess>
i do not see why not
<ChaosPrincess>
aside from the fact that rn all userspace thinks this digitizer belongs to primary display with hilarious results
nate8 has quit [Ping timeout: 480 seconds]
yamii has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
cylm has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
amarioguy has joined #asahi-dev
bcrumb has joined #asahi-dev
bcrumb has quit []
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eiln has joined #asahi-dev
<eiln>
holy, nice work
eiln has quit [Quit: Page closed]
<povik>
chadmed: not at the moment (while i pushed an ivsense branch yesterday it's not ready to go)
<povik>
i plan to continue working on it monday, to test it on j314
___nick___ has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faruk has joined #asahi-dev
seeeath has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
hightower4 has joined #asahi-dev
hightower3 has quit [Ping timeout: 480 seconds]
yamii has quit [Quit: WeeChat 3.6]
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yamii has joined #asahi-dev
mkurz has joined #asahi-dev
chadmed_ has joined #asahi-dev
<chadmed_>
povik: ack no worries
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bcrumb has joined #asahi-dev
zzywysm_ has joined #asahi-dev
bcrumb has quit []
zzywysm has quit [Ping timeout: 480 seconds]
hertz has joined #asahi-dev
faruk has joined #asahi-dev
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]