<sven>
with one small weirdness that i haven't been able to figure out: clocks can be aliased to other clocks but sometimes such a chain leads to nowhere
vimal has quit [Remote host closed the connection]
<kettenis>
sven: with that diff we could enable the pcie clock and apply the tunables?
<sven>
we could probably enable the pcie clock. haven't looked into tunables yet
<kettenis>
after I'm done dealing with the 8-bit ASID fallout properly in the OpenBSD kernel, I'm going to look into using m1n1 such that I can get all the cores running
<sven>
i guess calling pmgr_adt_clocks_enable with /arm-io/{apcie,apciec0,apciec1,dart-apcie0,dart-apcie1} or so should bring up those clocks i guess
<sven>
for linux we could just extract the addresses of these clocks from apple's device tree and put them into the regular linux device tree
<kettenis>
to apply the tunables you need to enable the clocks such that you can access the pcie host bridge registers
<sven>
oh, duh, that makes sense :)
<kettenis>
the alternative is to export the tunables like corellium does
<sven>
hrm, i feel like we should take care of the tunables in either m1n1 or u-boot if possible
<j`ey>
kettenis: can you not use the spin table stuff that m1n1 does?
<kettenis>
u-boot uses standard device trees
<kettenis>
so having u-boot parsing the apple device tree would mean m1n1 has to pass its address somehow
<kettenis>
and would mean some code uplication
<sven>
okay. so that means we essentially need to do this in m1n1
<kettenis>
j`ey: I could if I was using m1n1
<j`ey>
oh right
<kettenis>
still using the corellium preloader at this point because I need the tunables to bring up PCIe
<kettenis>
right now u-boot applies the tunables and brings up PCIe
<kettenis>
so the OpenBSD driver for PCIe is pretty simple
<sven>
yeah, i think we should definitely apply any tunables we can before we jump to the bsd/linux/whatever kernel
<sven>
for usb there are different ones for device vs. host mode though. let me see if there are more cases where the tunables depend on some decision the kernel would make
<sven>
pcie needs more magic though. just enabling clocks isn't enough to make the MMIO range readable
<arnd>
kettenis: do you need anything beyond the config space access for PCIe in the kernel today?
<sven>
erm, no. scratch that. i'm just an idiot as usual. looks like enabling clocks is actually enough to make PCIe accessible
zkrx has quit [Ping timeout: 276 seconds]
zkrx has joined #asahi-dev
zkrx has quit [Ping timeout: 256 seconds]
zkrx has joined #asahi-dev
odmir has joined #asahi-dev
<marcan>
sven: as long as the tunables don't need re-applying except for full system sleep, it makes sense to do the tunables entirely in m1n1
<marcan>
for full system sleep, AIUI we're going to need some kind of extended hook anyway
<marcan>
because of the RVBAR issue
<marcan>
(and to apply chicken bits etc)
<marcan>
so we can then do the tunables there, however we decide to handle that
<marcan>
but we can just ignore all that stuff for now
<marcan>
the only thing that would be somewhat annoying is if we can't power down peripherals without re-applying tunables either, i.e. power gating kills all those settings too, but we'll worry about that when we get there and figure out how much power it saves us
<marcan>
I'm going to spend today writing the first progress report, let's see how that goes :)
<marcan>
*tomorrow
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
<kettenis>
arnd: I need to do some MSI config because the u-boot driver skips that
<kettenis>
I also have some code to establish MSI interrupts on behalf of devices
<kettenis>
other than that it is essentially just a "pci-host-ecam-generic" driver
superk has left #asahi-dev ["WeeChat 3.0"]
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
<sven>
marcan: sounds good
roxfan2 has joined #asahi-dev
roxfan has quit [Disconnected by services]
roxfan2 is now known as roxfan
zkrx has quit [Ping timeout: 245 seconds]
zkrx has joined #asahi-dev
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
odmir has quit [Ping timeout: 246 seconds]
Augur[m] has joined #asahi-dev
odmir has joined #asahi-dev
odmir has quit [Ping timeout: 245 seconds]
KindTwo has joined #asahi-dev
zarvox has quit [Ping timeout: 264 seconds]
KindOne has quit [Ping timeout: 246 seconds]
zarvox has joined #asahi-dev
KindTwo is now known as KindOne
odmir has joined #asahi-dev
odmir has quit [Read error: Connection reset by peer]
odmir has joined #asahi-dev
odmir has quit [Ping timeout: 245 seconds]
odmir has joined #asahi-dev
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
zkrx has quit [Ping timeout: 245 seconds]
pent1ckel has joined #asahi-dev
VinDuv has quit [Quit: Leaving.]
zkrx has joined #asahi-dev
amw has quit [Ping timeout: 246 seconds]
odmir has quit [Remote host closed the connection]
zarvox has quit [Ping timeout: 264 seconds]
zarvox has joined #asahi-dev
sirn has quit [Ping timeout: 240 seconds]
sirn has joined #asahi-dev
odmir has joined #asahi-dev
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
odmir has quit [Remote host closed the connection]