#asahi-dev · 2021-12-19 19:02
svenyeah, it also can’t recover from a panic with that reset#asahi-dev · 2021-12-19 17:55
sventhe reset is unfortunately not a full reset :(#asahi-dev · 2021-12-19 16:23
svenlol#asahi-dev · 2021-12-19 16:04
svenso if that nvme driver works and the rtkit library also works for SMC I think everything should be ready to submit a RFC in January #asahi-dev · 2021-12-19 15:42
sven(knowing my luck that one kernel panics for everyone else while it works just fine for me :D)#asahi-dev · 2021-12-19 15:37
svenmarcan: alright, i think you can replace the old driver in asahi with what's in nvme/dev if that branch still works on t6k#asahi-dev · 2021-12-19 15:33
svenhrm, so i think macos just issues much less flush commands compared to linux#asahi-dev · 2021-12-19 15:16
svennice :)#asahi-dev · 2021-12-19 15:02
svennot 100% sure yet, but macOS at least uses flushs#asahi-dev · 2021-12-19 14:55
svenaw.. so telling ANS what time it is also doesn't make the flushs go faster :D#asahi-dev · 2021-12-19 14:48
sven(plus the usual cleanup)#asahi-dev · 2021-12-19 14:47
svennot really. since yesterday i've just fixed a few bugs w.r.t interactions with the linux nvme subsystem#asahi-dev · 2021-12-19 14:46
svenalright, i think i'm mostly happy with nvme/dev now. there's still that weird flush slowdown but other than that i haven't been able to make it panic anymore#asahi-dev · 2021-12-19 14:39
svenhah#asahi-dev · 2021-12-19 14:27
svenit seems to be more like “start cpu”#asahi-dev · 2021-12-19 14:27
svenyou can also clear the bit before shutting down rtkit#asahi-dev · 2021-12-19 14:27
svenyup#asahi-dev · 2021-12-19 14:27
svenrtkit still needs to be alive and cleanly shut down though :(#asahi-dev · 2021-12-19 14:26
svenyes#asahi-dev · 2021-12-19 14:11
svenanyway, nvme/dev should fix the error recovery stuff now#asahi-dev · 2021-12-19 14:00
svenhrm, macOS seems to use the flush command as well. I wonder why it isn’t slowed as much as Linux is #asahi-dev · 2021-12-18 22:12
svenhuh. i just shutdown nvme after writing a lot of data and it seems that remove_sq/cq actually flushed some more data because it took a few seconds to complete. and that was after a flush already#asahi-dev · 2021-12-18 21:36
svenits firmware is ~1MB or so. assuming that most of that is rtkit it shouldn't be too hard to confirm how smart it actually is :)#asahi-dev · 2021-12-18 21:29
svenpovik: ^--#asahi-dev · 2021-12-18 21:29
sven | | | | +-o IODMAController0000008A <class AppleSmartIODMAController, id 0x1000004be, registered, matched, active, busy 0 (3 ms), retain 11>#asahi-dev · 2021-12-18 21:29
sven | | | | +-o sio-dma <class AppleSmartIODMANub, id 0x100000189, registered, matched, active, busy 0 (14 ms), retain 8>#asahi-dev · 2021-12-18 21:29
sven | | | | +-o AppleSmartIO <class AppleSmartIO, id 0x100000499, registered, matched, active, busy 0 (17 ms), retain 6>#asahi-dev · 2021-12-18 21:29
sven ioreg | grep -i smartio#asahi-dev · 2021-12-18 21:06
svencould also be that it just allocates a ringbuffer at the beginning and then just keeps reusing that somehow#asahi-dev · 2021-12-18 21:05
svenhm... i never got to the actual DMA packets fwiw#asahi-dev · 2021-12-18 20:35
svensio_dart_tracer.dart.iotranslate(0x388<<12) that's still in my m1n1_history#asahi-dev · 2021-12-18 20:32
svenshould've taken notes :(#asahi-dev · 2021-12-18 20:31
sventhose already should have pointers to IOVA space in them#asahi-dev · 2021-12-18 20:30
svenand it was at the beginning of the IOVA space iirc#asahi-dev · 2021-12-18 20:30
svenoh... i think the pointer was shifted#asahi-dev · 2021-12-18 20:30
svenhm.. so what i remember from looking at it very briefly was that there were a lot of setup messages at the beginning#asahi-dev · 2021-12-18 20:20
svenyou can also pass smartio_debug=0xff and make XNU more verbose#asahi-dev · 2021-12-18 20:18
sven*pointers#asahi-dev · 2021-12-18 20:17
svenhrm, doesn't it just map buffers in DART and then send the points as messages?#asahi-dev · 2021-12-18 17:59
svenjust open("crashlog.b", "w").write(iface.readmem(crashlog_addr, 0x8000)) or something like that#asahi-dev · 2021-12-18 17:59
svenm1n1 also has a crashlog parser somewhere#asahi-dev · 2021-12-18 17:58
sventhe crashlog is just written to the buffer it requested originally #asahi-dev · 2021-12-18 17:58
svenhm?#asahi-dev · 2021-12-18 17:56
svenit would've complained about something like "Invalid AP Power" there#asahi-dev · 2021-12-18 17:56
sventhe code in nvme/dev parses the crashlog it sends fwiw#asahi-dev · 2021-12-18 17:55
svenyup. and what's even worse is that flipping that reset bit can't revive the co-processor after a panic#asahi-dev · 2021-12-18 17:55
svenso if RTKit thinks the AP power state is 0x01 and you send it 0xb with 0x01 again it'll just panic#asahi-dev · 2021-12-18 17:54
svenbut they are modeled after what iBoot does anyway