#
✕ nick:sven
#asahi-re · 2021-08-23 06:13
svenhaven't seen anything with more than 2
#asahi-re · 2021-08-23 06:11
svenmarcan: pmgr.c is missing the second parent fwiw. i think it was just after the first parent in the structure at the top
#asahi-re · 2021-08-23 06:09
svenyeah
#asahi-re · 2021-08-23 06:08
sven+of
#asahi-re · 2021-08-23 06:08
svenwhich the maintainers would probably hate and which isn't enough anyway because the two parents thing
#asahi-re · 2021-08-23 06:07
sventhat was a single clock controller with a clocks property that can reference the controller itself
#asahi-re · 2021-08-23 06:07
sveni think the only code we have is https://github.com/AsahiLinux/m1n1/blob/main/src/pmgr.c
#asahi-re · 2021-08-23 06:06
svenand also not enough, because some clocks have *two* parents
#asahi-re · 2021-08-23 06:06
sveni have some hack https://github.com/AsahiLinux/linux/commits/clk/dev there but that's not great
#asahi-re · 2021-08-23 06:06
svenhttps://github.com/AsahiLinux/linux/commits/nvme/new first three commits or so are the variant that keeps sending messages and requests and irq once the FIFO is full fwiw
#asahi-re · 2021-08-23 06:05
svenclocks, i2c. i think j_ey did some work on gpio/pinctrl but i dunno how far along he is
#asahi-re · 2021-08-23 06:04
svenyeah, i have two variants that i implemented: one just uses the poll mode as-as. the other one convinces it to keep sending unless it gets EBUSY and request the irq to continue then
#asahi-re · 2021-08-23 06:02
svenbut that's a small thing
#asahi-re · 2021-08-23 06:02
svenyeah. the core needs a small change anyway unless we want to wait for an interrupt for every single message we sent
#asahi-re · 2021-08-23 06:01
svenwhich... we don't
#asahi-re · 2021-08-23 06:01
sventhe whole channel concepts really seems to be more about a single mailbox block having multiple FIFOs
#asahi-re · 2021-08-23 06:01
svenyeah
#asahi-re · 2021-08-23 06:00
svenso just a simple mailbox driver + rtkit shared library sounds good then
#asahi-re · 2021-08-23 06:00
svenyeah
#asahi-re · 2021-08-23 06:00
sveni briefly looked into remoteproc but that doesn't fit all that well either
#asahi-re · 2021-08-23 06:00
svenyeah
#asahi-re · 2021-08-23 05:56
svenmarcan: yeah, so if we can really just handle every single co-processor with a single driver i think that shared rtkit library you suggested makes sense
#asahi-re · 2021-08-21 15:31
svenhm, might only be important to decide how to handle all the common rtkit stuff for the kernel
#asahi-re · 2021-08-21 14:31
svenand i suspect the pagetable format is going to be very similar
#asahi-re · 2021-08-21 14:30
svenit'll certainly be capable of creating IOVA -> physaddr mappings just like DART can
#asahi-re · 2021-08-21 14:30
svenbut afaik DART has stuff like subpage-protection. no idea if GART has that as well
#asahi-re · 2021-08-21 14:27
svenor maybe it's an entirely different thing
#asahi-re · 2021-08-21 13:43
sveni.e. that whole node in the ADT is essentially an Apple hack :D
#asahi-re · 2021-08-21 13:42
sveni think they built it because they also need the normal RTKit shared memory buffers to go through GART
#asahi-re · 2021-08-21 13:41
svenalyssa: so that AGXArmFirmwareMapper is just a small wrapper around the actual IOMMU
#asahi-re · 2021-08-21 06:07
svenbecause that iommu framework only supports a single iommu type per bus and i'm not keen on changing that
#asahi-re · 2021-08-21 06:06
sveni *really* hope you can implement that iommu inside the gfx driver and not inside the iommu framework
#asahi-re · 2021-08-21 06:06
svenand huh... mapper-gfx-asc is strange
#asahi-re · 2021-08-21 06:05
svenAGXArmFirmwareMapper sounds like it just maps the firmware though
#asahi-re · 2021-08-21 06:05
svenfwiw, DART is technically three levels as well (first one in MMIO and then two levels of pagestables)
#asahi-re · 2021-07-14 14:41
sven:D
#asahi-re · 2021-07-13 09:22
svenso that kinda matches what i reversed from the RTKit firmware
#asahi-re · 2021-07-13 09:22
svenmarcan: r.e. that question from the other channel: i've looked at an older iBoot and it seems to also send both 0x6 and 0xb with 0x10 before moving on to XNU.
#asahi-re · 2021-07-13 05:56
svennot sure that's officially intended though but it should work :D
#asahi-re · 2021-07-13 05:56
svenand i think you can just re-send the syslog iova and it will update the buffer address
#asahi-re · 2021-07-13 05:55
svenwhile the 0xb handler looks much simpler and also has a "Invalid AP power: %d" string
#asahi-re · 2021-07-13 05:55
svenmarcan: should probably move this here. so 0x6 calls a function that i didn't want to reverse engineer which does a lot of crap
#asahi-re · 2021-07-05 21:40
sveni don't think we have an up-to-date list like that
#asahi-re · 2021-04-08 08:57
svenI looked at strings and it contains "%s[%d]: page size is incorrectly configured: config %#x actual %#x" which I believe to be a panic if the hard-wired pagesize doesn't match the value given in the ADT
#asahi-re · 2021-04-08 08:56
svenI'm like 99% sure it doesn't but it would be nice to get confirmation
#asahi-re · 2021-04-08 08:56
svenif anyone wants to reverse engineer something useful: can someone take a look at apple's dart driver and see if it configures the page size somewhere?
#asahi-re · 2021-04-03 17:16
sven*without 0x100 set
#asahi-re · 2021-04-03 17:15
svenhttps://opensource.apple.com/source/xnu/xnu-4570.1.46/pexpert/arm/pe_identify_machine.c.auto.html that's why i believe that the entries with 0x100 set in clock-ids come from the cpu0 node
#asahi-re · 2021-04-03 17:12
sveni've just used grep to see if clock-frequencies-regs appears anywhere and couldn't find it
#asahi-re · 2021-04-03 17:12
svendoes it actually manipulate frequencies?

plus ›