#
✕ nick:sven
#asahi · 2021-09-11 12:37
sveni think they are still in the current driver as well
#asahi · 2021-09-11 12:37
svenand i've tried writing all ones there and it completely ignored that.
#asahi · 2021-09-11 12:37
svenand some of them are just always zero
#asahi · 2021-09-11 12:37
sventhe upper bits contain things like the read/write pointer of the HW fifo
#asahi · 2021-09-11 12:36
sven(if the coprocessor is dead, but that's easy to do)
#asahi · 2021-09-11 12:36
svenso if i write to offset 0x60/0x68 i can read those messages from 0xa0/0xa8
#asahi · 2021-09-11 12:35
sventhe coprocessor sees the same mmio space
#asahi · 2021-09-11 12:35
svenyou can access both ends of the mailbox
#asahi · 2021-09-11 12:35
sventhe mailbox hardware
#asahi · 2021-09-11 12:34
svenhm. i never tried to use writel actually
#asahi · 2021-09-11 12:33
svenkettenis: because it ignores the upper 32bit
#asahi · 2021-09-11 12:32
svenespecially for certain parts like the entire graphics stack or the usb phy stuff
#asahi · 2021-09-07 20:02
svenit's a chained interrupt controller with level triggered interrupts but i can get away without modeling it explicitly because each interrupt is also an independent AIC interrupt
#asahi · 2021-09-07 19:54
svenit's literally that. it triggers when the "mailbox has data" line is high and not only when the edge of that line rises
#asahi · 2021-09-07 19:53
sven IRQ_TYPE_LEVEL_HIGH - high level triggered
#asahi · 2021-09-07 19:47
svenit's a bit stupid, but i suspect that the four interrupts used to share a single line
#asahi · 2021-09-07 19:46
svenbut you have to ack it at the mailbox level at some point because otherwise it will keep firing even if there's no new data
#asahi · 2021-09-07 19:46
svenit's level sensitive. you can ack it all you want. if there's new data it will just fire again
#asahi · 2021-09-07 19:45
sventhey are there for a reason :P
#asahi · 2021-09-07 19:45
svenyeah, please read the comments
#asahi · 2021-09-07 15:09
sven+are
#asahi · 2021-09-07 15:09
svenbut iirc there some other drivers that mentioned FIFOs
#asahi · 2021-09-07 15:08
svenlet's see if the maintainer even likes that mode first :)
#asahi · 2021-09-07 15:04
sven:D
#asahi · 2021-09-07 15:03
svenalright, just submitted the first versions for the mailbox. i guess in ~30 minutes i'll find some dumb mistake in there :>
#asahi · 2021-09-06 16:48
svenmy best guess is that m3 is an older version of asc and that it used to only have a single shared interrupt line
#asahi · 2021-09-06 16:47
svenotherwise the interrupt will keep firing. which kinda makes sense.
#asahi · 2021-09-06 16:47
svenyup
#asahi · 2021-09-06 16:45
svenyeah, could be
#asahi · 2021-09-06 16:45
svendunno any details, i just poked random memory locations until CIO came up
#asahi · 2021-09-06 16:45
svenit's not one of the normal "clocks"
#asahi · 2021-09-06 16:44
svenyeah, it's weird
#asahi · 2021-09-06 16:44
svenjust needed to see [ 0.456216] apple-mailbox 501100000.mbox: < RX 00b0000000000020 00000000 to confirm these m3 mailboxes also work :)
#asahi · 2021-09-06 16:42
sven*wouldn't
#asahi · 2021-09-06 16:42
sveni just realized i also forgot to setup the dart, so i would've have been able to get the syslog anyway :D
#asahi · 2021-09-06 16:42
sven(well, "clock". no idea what it is but i need to enable it before i can bring up cio)
#asahi · 2021-09-06 16:41
svenno idea yet where it gets that address from though
#asahi · 2021-09-06 16:41
svenfwiw, CIO0_RECONFIG-V is actually some clock as well. it's in the devices structure but it's at 0x23b788000 and needs the first bit set to enable it
#asahi · 2021-09-06 16:24
sveni also found some precedent for just having a single channel mailbox: apparently something on the raspberry pi also uses some bits of the message as a channel but back then the conclusion on the mailing list was that the mailbox should still be single channel
#asahi · 2021-09-06 16:22
svendoesn't seem to send anything over syslog though, but that's probably because i only did the bare minimum to enable it
#asahi · 2021-09-06 16:22
svenbut other than that this thunderbolt/CIO coprocessor just uses the standard rtkit protocol
#asahi · 2021-09-06 16:20
svenand doing that the other way turned a bit ugly
#asahi · 2021-09-06 16:20
svenyeah, because it turned out that the m3 mailbox actually needs the interrupts to be acked at the mailbox controller
#asahi · 2021-09-06 16:19
sven(random observation i made this evening: if you enable just enough magic for this CIO coprocessor to start you have about 2-3 minutes before the mini restarts because some internal hardware or software state machine probably died)
#asahi · 2021-09-06 16:17
svenwill probably submit that tomorrow
#asahi · 2021-09-06 16:17
svenstalker :-P
#asahi · 2021-09-04 12:23
svenyeah, and i'm quite glad that I could remain at a safe distance from that spec :D
#asahi · 2021-09-04 12:21
sveni've been avoiding that spec as well so far
#asahi · 2021-09-04 12:05
svenwhich means you actually get usb 3 on the xhci (type A) ports but not on the USB C ports :(
#asahi · 2021-09-03 19:27
svenah, nice :)

plus ›