#asahi-dev · 2022-01-21 07:50
marcanI guess security-wise it doesn't make any sense to validate that#asahi-dev · 2022-01-21 07:49
marcanright#asahi-dev · 2022-01-21 07:49
marcanANS does have a region specified at least, but it might just be its TZ region then?#asahi-dev · 2022-01-21 07:48
marcandoes ANS get all its buffers from the host?#asahi-dev · 2022-01-21 07:48
marcanmaybe we should have a generic mechanism for supporting one or more RTKit/coprocessor memory ranges?#asahi-dev · 2022-01-21 07:47
marcanso for SMC I just pass in SRAM as another reg#asahi-dev · 2022-01-21 07:47
marcanI just wonder if the crashlog buf is in there#asahi-dev · 2022-01-21 07:47
marcanyes, that's the firmware sections one#asahi-dev · 2022-01-21 07:47
marcanyou mean the segment-ranges stuff?#asahi-dev · 2022-01-21 07:47
marcandoes it?#asahi-dev · 2022-01-21 07:46
marcanDCP does not have one, so we need some other way to whitelist that the crashlog buffer is where it is supposed to be#asahi-dev · 2022-01-21 07:45
marcaniop-*-nub.region-base,region-size: that's the whitelist for SMC; it is also used for AOP, ANS (would be good to check how that one interacts? the ANS one is in RAM), and there are some analogous concepts for GPU but no idea how those work#asahi-dev · 2022-01-21 07:44
marcan(we need a way to pass that via the DT; DCP has a different one on t8103 and t6000)#asahi-dev · 2022-01-21 07:43
marcaniop-*-nub.asc-dram-mask is the offset that needs to be ORed with IOVAs to get DVAs#asahi-dev · 2022-01-21 07:43
marcanso a few things from ADT that we care about:#asahi-dev · 2022-01-21 07:43
marcanactually, let me look for something#asahi-dev · 2022-01-21 07:42
marcan(right now the driver just calls its own RTKit callback for the check)#asahi-dev · 2022-01-21 07:42
marcanand also the driver needs to invoke that check itself (since SMC has its own buffer), so whatever way it's done, it should be reusable between RTKit and the driver#asahi-dev · 2022-01-21 07:41
marcanthe only thing I need is the ability to run the RTKit requested buffers through a check that they are in an allowlist, of some form#asahi-dev · 2022-01-21 07:41
marcansven/_jannau_: Feel free to hack up the API however you want, I don't mind rebasing SMC on top#asahi-dev · 2022-01-21 07:40
marcansven: smc/rtkit-patches#asahi-dev · 2022-01-21 07:37
marcanlet me commit & push#asahi-dev · 2022-01-21 07:37
marcansven: not pushed yet, but yes, I have some#asahi-dev · 2022-01-21 05:28
marcanDCP would have to check that all prealloc requests fall in the VRAM/DCP/whatever (this is in the ADT somewhere I think) RAM range#asahi-dev · 2022-01-21 05:27
marcane.g. for SMC I pre-ioremap all SRAM and then just validate that any requests from RTKit fall in that range and return a pointer to that offset in the ioremap area#asahi-dev · 2022-01-21 05:27
marcanand then the driver itself can figure out how to handle individual devices#asahi-dev · 2022-01-21 05:27
marcangiven the API we have I think it'd make sense to just let the IOP decide and invoke either API depending on whether it wants a prealloc buffer or not#asahi-dev · 2022-01-20 08:59
marcan(could be)#asahi-dev · 2022-01-20 08:59
marcanor is there another one on the touchbar macs?#asahi-dev · 2022-01-20 08:59
marcanthe tcon is for the main display I thought?#asahi-dev · 2022-01-20 08:58
marcannot SPI#asahi-dev · 2022-01-20 08:58
marcandisplay is MIPI, totally different story#asahi-dev · 2022-01-20 08:58
marcanIIRC the touch bar uses some kind of hid-over-spi, but it might be a *different* hid-over-spi#asahi-dev · 2022-01-20 08:53
marcanChaosPrincess: the CS line going low often delimits packet boundaries#asahi-dev · 2022-01-20 04:26
marcan(maybe in a year or two when things settle down a bit more I'd be comfortable with that kind of thing?)#asahi-dev · 2022-01-20 04:26
marcantoo much stuff going on already#asahi-dev · 2022-01-20 04:26
marcankrbtgt: someone actually wanted me to mentor their master's thesis on reversing ANE... but unfortunately I don't trust myself with that level of commitment :(#asahi-dev · 2022-01-20 04:25
marcanthe only time that piece of paper has ever been useful was when I moved to japan (though I'm glad I got it now)#asahi-dev · 2022-01-20 04:25
marcanended up with a 3-year degree after like 5-6 years#asahi-dev · 2022-01-20 04:24
marcanI switched universities 3 times across 2 countries, then got tired of all that nonsense and signed up for an online uni that wouldn't force me to attend classes on stuff I already knew ¯\_(ツ)_/¯#asahi-dev · 2022-01-19 13:26
marcancool :)#asahi-dev · 2022-01-19 13:05
marcanyeah#asahi-dev · 2022-01-19 13:04
marcanj`ey: marcan: probably nearly failed the Google interviews, manages to bullshit out GPIO command 0xff from thin air#asahi-dev · 2022-01-19 13:03
marcanack#asahi-dev · 2022-01-19 13:03
marcan(if you have an sdhci-pci driver to use for that)#asahi-dev · 2022-01-19 13:02
marcantbh though, if u-boot wants e.g. the SD slot GPIO poked, we can probably just do that trivially in m1n1 with the existing RTKit scaffolding, now that we're stuck with it anyway.#asahi-dev · 2022-01-19 13:02
marcanat least you can rip off my binary search now that it works :p#asahi-dev · 2022-01-19 12:59
marcanso feel free to copypasta if the structure works for you :)#asahi-dev · 2022-01-19 12:59
marcanfwiw, not sure if you saw, but this whole thing is MIT/GPL too#asahi-dev · 2022-01-19 12:58
marcanI actually want subnodes though, to be able to pass info to subdrivers