#
✕ nick:sven
#asahi · 2021-08-09 10:37
svenyes
#asahi · 2021-08-09 10:36
svenand it has the AES engine behind it which should make peeking into the device address space painless
#asahi · 2021-08-09 10:36
svenso somehow that DART cannot even read the pagetable. that DART/DAPF is also not locked so we can play around with it
#asahi · 2021-08-09 10:35
svenif i setup the SIO DART as i usually would i get a fault with the "no ttbr" (and another unknown) error bit set on any access
#asahi · 2021-08-09 10:34
sveneven more weird: that SIO DART cannot even read its first level pagetable. so maybe somehow that stream #15 is also involved in that
#asahi · 2021-08-09 10:33
svenand that #15 stream... for some reason it seems to be set to bypass to that other DART (sio i think) which also has a DAPF as well
#asahi · 2021-08-09 10:33
svenDAPF lock is a different bit than DART lock though i think
#asahi · 2021-08-09 10:31
svenand this is probably better implemented by the people (read: marcan/alyssa) working on DCP
#asahi · 2021-08-09 10:30
sveni think there are more important things i want to do first (do asc/rproc in a sane way, nvme, 4k/16k dma-iommu, pcie, usb-phy)
#asahi · 2021-08-09 09:52
svenawesome :-)
#asahi · 2021-08-09 07:18
svenfair enough :)
#asahi · 2021-08-09 07:00
svensure! i would've been happy to get those before my first upstream submission as well :)
#asahi · 2021-08-09 06:28
svenyeah, and i think it's also nice to be able to do some kind of early internal review while we still iterate. we can probably catch lots of common gotcha long before we need to annoy maintainers on the mailing lists ;)
#asahi · 2021-08-08 16:29
sveni even confirmed that with the hv by intercepting the read from the register and changing it :D
#asahi · 2021-08-08 16:28
sventhere's an assert that ensure that the pagesize specified in the ADT is the same you can read from one DART register
#asahi · 2021-08-08 16:28
svenyeah, but there's none :)
#asahi · 2021-08-08 16:27
svenand then sometimes reverse engineering kexts to figure out very specific details (e.g. to double check that there's no way to reconfigure the DART pagesize)
#asahi · 2021-08-08 16:26
svenand the DART was mostly just poking registers and staring at pagetables iboot left around for us
#asahi · 2021-08-08 16:26
svenand reading lots of linux source code
#asahi · 2021-08-08 16:26
svenmostly, yes.
#asahi · 2021-08-08 16:20
svento add map_pages/unmap_pages which i could directly hook up
#asahi · 2021-08-08 16:20
svenjust one series
#asahi · 2021-08-08 14:20
svenpipcet[m]: https://github.com/AsahiLinux/linux/tree/devel
#asahi · 2021-08-08 14:16
svenso.. v5.14-rc4 right now
#asahi · 2021-08-08 14:16
svensounds good. let's rebase every rc i guess
#asahi · 2021-08-08 13:48
sventhere's going to be some overhead with squashing commits together and everything, but at least we won't have N branches that people end up merging anyway. and we hopefully won't duplicate work.
#asahi · 2021-08-08 13:48
svenpipcet[m]: So how about this: Let's designate some branch (devel?) as our current known-good working downstream fork. we use normal github PRs etc., and do internal code review (lower quality but faster than LKML) and regularly rebase on upstream
#asahi · 2021-08-08 13:46
svenand you should still enable them and then get their frequency in your driver
#asahi · 2021-08-08 13:46
sventhere's a fixed clock driver in the kernel
#asahi · 2021-08-08 13:44
svenjust looked at the ADT. looks like it doesn't use any clocks gates but just a single clock with 24MHz instead. so clocks = <&clk24> in the DT should be fine
#asahi · 2021-08-08 13:38
svenpipcet[m]: ^--
#asahi · 2021-08-08 13:38
svenwhenever we get clocks ready we can just replace that with the real clock then
#asahi · 2021-08-08 13:37
svenjust make it consume a clock and use a fixed frequency clock in the device tree
#asahi · 2021-08-08 13:37
svenactually... doesn't matter i think :D
#asahi · 2021-08-08 13:36
svendoes WDT need a clock gate? or just a frequency reference?
#asahi · 2021-08-07 14:47
sveni'm pretty sure it does
#asahi · 2021-08-07 14:01
svenno, i mean, i have some WIP code to split asc to mailbox and clients. if i had known that you worked on this i could've focused on gpio/pinctrl/or any of the other stuff that's left to do
#asahi · 2021-08-07 13:57
svenugh.. and now we've done duplicated work :(
#asahi · 2021-08-06 15:17
sven(internally, the device's dma_map_ops will be set to the ones from dma-iommu.c which will eventually call into apple-dart.c)
#asahi · 2021-08-06 15:17
svenand then dma_alloc_coherent should just work
#asahi · 2021-08-06 15:16
svenalyssa: so to have memory mapped to the disp0-dart you need to declare that dart in the DT, then add iommus = <&dart stream-id>; to whatever device you want to use DMA with
#asahi · 2021-08-06 15:11
svenlooks like it should work though
#asahi · 2021-08-06 15:08
svenno idea about dma_alloc_noncoherent
#asahi · 2021-08-06 15:07
sventhe framebuffer is coherent fwiw. either by default or because the DART works its magic
#asahi · 2021-08-06 14:01
sven*require
#asahi · 2021-08-06 14:00
sventhat asc driver will probably required some changes either way. i'm still not sure the rtkit handling belongs in drivers/mailbox
#asahi · 2021-08-06 13:59
sventhanks for volunteering to test and fix them!
#asahi · 2021-08-06 13:59
svenuhhh... who knows. maybe?
#asahi · 2021-08-06 10:40
svenwhich is why i'll try to prepare that RFC series this weekend to see if it makes sense to continue working in that direction
#asahi · 2021-08-06 10:40
sventhey weren't opposed to it so far fwiw, but that can change once some of the limitations are clear

plus ›