#asahi · 2021-07-30 15:33
svenhttps://github.com/AsahiLinux/linux/tree/nvme/dev if anyone wants to give it a try. very much WIP#asahi · 2021-07-30 15:11
svenmac os seems to avoid that. looks like i'll have to write a nvme tracer :(#asahi · 2021-07-30 15:11
svenhrm, so there's clearly some magic shutdown sequence missing because i always get [ 0.517736] apple-mailbox 277400000.mbox: syslog message: band.c:3390: Push abandoning non-blank band:0096 flow:HST_DYN Validity 000006f1 Age 0 uncleanReboot yes#asahi · 2021-07-30 14:27
sventhis thing also seems to somehow support automatic aes encryption for read/write commands#asahi · 2021-07-30 14:26
sveni'll push what i have later#asahi · 2021-07-30 14:25
sveni only care that it doesn't cause such states ;)#asahi · 2021-07-30 14:25
sveni don't care if my drivers handles recovery from a "persistent broken state" fwiw#asahi · 2021-07-30 11:38
svenit's just the first time i've booted a real userland#asahi · 2021-07-30 11:38
sventhe mailbox driver + somewhat cleaned up nvme patches#asahi · 2021-07-30 11:36
sven|-nvme0n1p5 259:5 0 22.5G 0 part / :-)#asahi · 2021-07-30 06:14
svenamw: have you tested the latest dart/dev branch? if you want to i can credit you in the commit with a tested-by tag then (https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes)#asahi · 2021-07-29 20:48
svenapple-mailbox 277400000.mbox: syslog message: util.c:4145: Util read unmap element: 8, lba: 512, size : 24#asahi · 2021-07-29 20:48
svenapple-mailbox 277400000.mbox: syslog message: util.c:4121: element=PANICLOG written size=2097152, host request trimmed to end of written content#asahi · 2021-07-29 20:48
sventhe worst i managed to do were these syslog message when trying to read from one of the other two namespaces:#asahi · 2021-07-29 20:47
sven'cause i've been trying to break it but it's been surprisingly stable so far#asahi · 2021-07-29 20:47
svenpipcet[m]: you've had some issues with nvme, haven't you? any simple way to reproduce them?#asahi · 2021-07-29 16:38
svenah, ofc!#asahi · 2021-07-29 16:26
sven*explains#asahi · 2021-07-29 16:26
svenyeah, okay, that epxplains it#asahi · 2021-07-29 16:26
svenoh.... it starts at 1 :D#asahi · 2021-07-29 15:59
sven*as far as i understand this#asahi · 2021-07-29 15:58
sven[ 0.448653] apple-mailbox 277400000.mbox: syslog message: nvme_admin_ans2.c:2729: Invalid namespace 0 <-- i wonder what that's about. afaik this, 0 should be valid namespace :/#asahi · 2021-07-29 15:56
svenok. let's see.#asahi · 2021-07-29 15:46
svensounds good. i should probably also switch to a sane .config though#asahi · 2021-07-29 15:45
svenperfect!#asahi · 2021-07-29 15:45
svenunrelated to that, can i just download some $random-distro userland from somewhere? i wanna use nvme-cli and adding that to my initrd sounds painful#asahi · 2021-07-29 15:43
svenessentially only usb 2 works until i get around to writing the full phy driver#asahi · 2021-07-29 15:40
svenhablerentand[m]: preferably some adapter that's as dumb as possible#asahi · 2021-07-29 12:06
svenyou can also NMI the coprocessor if the crashlog msg is too slow fwiw. write32(asc_base + 0x10004, 0x11) followed by write32(asc_base + 0x10024, 0x1) i think#asahi · 2021-07-29 07:34
sventhere's even a bypass DAPF bit in the TCR fwiw#asahi · 2021-07-29 07:34
svenin an older iphone there's a DART with 4k pages which required more iirc#asahi · 2021-07-29 07:33
svenbut i haven't seen any device with more than 32 address lines connected#asahi · 2021-07-29 07:33
sventechnically it can do more#asahi · 2021-07-29 07:33
svenmarcan: 32 bit at most#asahi · 2021-07-29 07:16
sventhat crash_soft/hard should go into crashlog though#asahi · 2021-07-29 07:16
svenremember how i called this a "hack"? :P#asahi · 2021-07-29 07:16
svenmaybe 3 gets the two messages#asahi · 2021-07-29 07:16
svenmarcan: i think i messed up the endpoints :D#asahi · 2021-07-29 07:14
svenon SMC it never asks for an address, it just sends me an address in that mmio shared memory window#asahi · 2021-07-29 07:14
svenso on ANS it asks for a physical address and then also sends the same one back but that's expected because it goes through SART#asahi · 2021-07-29 07:13
svennot sure if that's correct :D#asahi · 2021-07-29 07:12
sven:(#asahi · 2021-07-29 07:11
svenmarcan: can you check if you can write these? i believe the DAPF lockdown bit is different from the DART lockdown bit#asahi · 2021-07-29 07:08
sveni never got this to work correctly#asahi · 2021-07-29 07:08
svendunno how accurate that is#asahi · 2021-07-29 07:07
svenmarcan: my notes say the regs might be [config, sid, start (64bit), end (64bit)]#asahi · 2021-07-29 07:05
sveniirc TLB cache thing was before?#asahi · 2021-07-29 07:05
svendepends on the device#asahi · 2021-07-29 07:05
svenhrm.#asahi · 2021-07-29 07:04
svenit's not in the device tree though but i believe that's this DAPF thing