marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
odmir has quit [Ping timeout: 276 seconds]
Emantor has quit [Quit: ZNC - http://znc.in]
odmir has joined #asahi-dev
Emantor has joined #asahi-dev
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-dev
phiologe has quit [Ping timeout: 245 seconds]
odmir has quit [Remote host closed the connection]
taziden has quit [Ping timeout: 264 seconds]
phiologe has joined #asahi-dev
taziden has joined #asahi-dev
VinDuv has joined #asahi-dev
KindTwo has joined #asahi-dev
KindOne has quit [Ping timeout: 264 seconds]
KindTwo is now known as KindOne
<sven> https://github.com/AsahiLinux/m1n1/pull/34 adds support to enable clocks from device tree entires
<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> tunable-device 00 00 00 00 08 00 00 00 00 70 00 00 00 00 00 00 |.........p......|
<sven> tunable-host 00 00 00 00 08 00 00 00 00 70 00 00 00 70 00 00 |.........p...p..|
<sven> not a big difference, so worse case that's just a quirk in dwc3 then
<sven> *worst
KindTwo has joined #asahi-dev
KindOne has quit [Ping timeout: 272 seconds]
KindTwo is now known as KindOne
_whitelogger has joined #asahi-dev
vimal has joined #asahi-dev
riker77 has quit [Quit: Quitting IRC - gone for good...]
riker77 has joined #asahi-dev
snalty has quit [Ping timeout: 246 seconds]
snalty has joined #asahi-dev
<sven> https://github.com/AsahiLinux/m1n1/pull/35 aaand tunables support
<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]
odmir has joined #asahi-dev