#asahi · 2021-10-16 14:29
sven\o/#asahi · 2021-10-16 11:02
svenotherwise it's kinda broken#asahi · 2021-10-16 11:02
svenwe'll probably need that fun quirk for dwc3 first#asahi · 2021-10-16 11:00
svenadding usb with the pd chips is already a lot#asahi · 2021-10-16 11:00
svenprobably :D#asahi · 2021-10-16 10:58
sveni'm trying to clean up the device tree mess we have a little bit :D#asahi · 2021-10-16 10:57
svenlooks good to me#asahi · 2021-10-16 10:56
svenbut we need #interrupt-cells = <2>; in the device tree with the current code to make it work#asahi · 2021-10-16 10:56
svenbut it might make more sense to just round robin distribute the interrupts across the groups or something anyway#asahi · 2021-10-16 10:55
sveni think you'd need a custom irq_domain_ops then to default the group to zero when only two cells are present. #asahi · 2021-10-16 10:50
svenj_ey: i think the pinctrl binding also needs the #interrupt-cells = <2> property. can you add that as well when you submit the apple,npins change?#asahi · 2021-10-15 16:06
svenyeah, that i can agree with. all i'm saying is that "robustness" doesn't make any sense to me#asahi · 2021-10-15 16:06
svenand the DT has special entries to tell XNU where the pagetables are#asahi · 2021-10-15 16:05
svenxnu has special code to deal with this behavior#asahi · 2021-10-15 16:05
sveni just don't think robustness makes any sense at all#asahi · 2021-10-15 16:03
svenalyssa: that doesn't make much sense tbh if we can overwrite the firmware as marcan figured out#asahi · 2021-10-15 16:02
svenmarcan: hah, i can totally believe that#asahi · 2021-10-15 16:02
svenyes#asahi · 2021-10-15 16:01
svenhow would that increase robustness?#asahi · 2021-10-15 15:53
svenso then i really don't understand why that DCP DART is locked anymore :/#asahi · 2021-10-15 15:44
svenso if the third one isn't 1 you can actually reconfigure it. but they're all locked afaict#asahi · 2021-10-15 15:44
sventhe registers are always START, END and then LOCK#asahi · 2021-10-15 15:43
sveni guess#asahi · 2021-10-15 15:43
sven6a0 is start, 6a4 is end and 6a8 is enable #asahi · 2021-10-15 15:42
svenand 0x800000000+read32(0x2000006a4)<<12 the end i think#asahi · 2021-10-15 15:42
svenmarcan: so get the first SEP region 0x800000000+read32(0x2000006a0)<<12 is the start#asahi · 2021-10-15 15:41
svenregion-id-4 = [0x00000009DAD90000, 0x0000000001D90000] so that matches up with what i found above#asahi · 2021-10-15 15:38
svenyou should be able to get ANS from the SART entries as well i think#asahi · 2021-10-15 15:34
svenhrm, so if the TZ0 registers are at the same location as on A13 it's at 0x9dcb1f000...0x9dad90000 on my machine i think#asahi · 2021-10-15 15:29
svenso i guess i really just tried ANS2 but for some reason thought i also tried for DCP#asahi · 2021-10-15 15:29
svenhrm, true. i can read/write DCP firmware as well here#asahi · 2021-10-15 15:28
svenhrm, we should be able to just read those TZ0 registers if we know where they are#asahi · 2021-10-15 15:26
svenbut let me try again#asahi · 2021-10-15 15:26
svenhrm. i would've sworn that i tried DCP as well#asahi · 2021-10-15 15:25
svenweird. so maybe I just tried ANS2 and misremembered? :/#asahi · 2021-10-15 15:24
svenuh. wait. is that code or the data section you wrote to?#asahi · 2021-10-15 15:24
svenso why the hell is the DART locked then?#asahi · 2021-10-15 15:23
svenlol#asahi · 2021-10-15 15:23
svenwtf#asahi · 2021-10-15 15:23
svenhuuh#asahi · 2021-10-15 14:46
sveni think i downloaded it from somewhere: /Users/speter/Downloads/aarch64-unknown-linux-gnu/bin/ :D#asahi · 2021-10-15 14:46
svendon't think so#asahi · 2021-10-15 14:45
svenuh, just a regular gcc cross-compiler in my $PATH#asahi · 2021-10-15 13:59
svenlol#asahi · 2021-10-15 13:06
svenso fixing them is probably a good idea and might uncover other subtle bugs#asahi · 2021-10-15 13:06
svenbut another issue was that the code didn't save some register before calling a function it should have saved iirc#asahi · 2021-10-15 13:05
svenhttps://github.com/AsahiLinux/m1n1/blob/main/src/start.S#L97 :D#asahi · 2021-10-15 13:04
svenlast time one issue was that clang silently converted '\r' to 'r' #asahi · 2021-10-15 13:03
svenso i guess we should either fail to even build on clang or fix those :D#asahi · 2021-10-15 13:02
svenugh.. i think we added clang support early on but never tested it again