#
✕ nick:sven
#asahi · 2021-07-22 17:06
svenbut uhh.. my initrd is rather small
#asahi · 2021-07-22 17:06
sveni've been booting linux with that patch fwiw
#asahi · 2021-07-22 11:06
svenyou should be able to put the root fs onto some mass storage thing though
#asahi · 2021-07-22 11:05
svendart/dev is not enough for nvme fwiw
#asahi · 2021-07-15 08:11
svenno
#asahi · 2021-07-13 18:17
svenweird. can't reproduce that anymore but i still have it in my terminal scrollback :/
#asahi · 2021-07-13 11:07
sveni'll check again tonight
#asahi · 2021-07-13 11:07
svenhuh, really? i'm pretty sure i saw it come up with the first message already in the mailbox
#asahi · 2021-07-13 09:22
sveni think so. (also, see -re)
#asahi · 2021-07-13 05:54
svenso i think 0x6 might be to switch the power state of the IOP and 0xb might be to tell it if the main SoC switched its power state.
#asahi · 2021-07-13 05:52
sven(and if i shut it down to state 0x00 it just hangs, but that may be because i don't really know yet how to restart these coprocessors once the mailbox is gone)
#asahi · 2021-07-13 05:51
svenlike "no-hibernate-sleep" and "no-shutdown"
#asahi · 2021-07-13 05:50
sveni'm not sure the storage processor can easily be rebooted. there are some suspicious properties in the adt
#asahi · 2021-07-13 05:49
sventhis is shared across all RTKit from what i can tell. i found this in the PMP firmware
#asahi · 2021-07-13 05:48
svenand if you switch back from that to normal mode it seems to re-trigger the whole init state machine
#asahi · 2021-07-13 05:48
svenand that state 0x10 is the closest state to the "normal" mode
#asahi · 2021-07-13 05:48
sveni don't know exactly yet what it does but 0x6/0xb seem to be some kind of "switch power state" commands
#asahi · 2021-07-13 05:48
svenmarcan: that sequence doesn't shut it down fwiw
#asahi · 2021-07-12 21:51
svenhrm, and i think the 0xb.. dance is actually not required. so just send(0x60000000000010), recv() = 0x70000000000010 and then send(0x60000000000020) should work
#asahi · 2021-07-12 21:40
svensame sequence should work for everything that runs RTKit
#asahi · 2021-07-12 21:30
svenaaalright. i can reset it. first send 0x60000000000010, wait for 0x70000000000010, reply with 0xb0000000000010, wait for 0xb0000000000010, then send 0x60000000000020 and everything will start all over
#asahi · 2021-07-12 14:03
svenhttps://f.svpe.de/1e49853d687b05aba385fcb56563196afbb2c7e41b83fbb7d5d606a97b62a2dd_nvmelog.txt
#asahi · 2021-07-12 14:01
svenso maybe that's actually required
#asahi · 2021-07-12 14:01
svenkettenis: huh, so it looks like macos actually acks the syslog messages eventually.
#asahi · 2021-07-12 13:28
svenso no easy way to just read from the mailbox mmio addr?
#asahi · 2021-07-12 13:28
svenah :/
#asahi · 2021-07-12 13:28
svensyslog messages should be type 5 and at least those don't need an ack
#asahi · 2021-07-12 13:27
svencan you easily just read the mailbox when the nvm controller gets stuck?
#asahi · 2021-07-12 13:24
svenor maybe that, yes
#asahi · 2021-07-12 13:23
svenbut there might be N messages stuck in that mailbox fifo and the coprocessor might wait until that thing is empty and block before sending the next one
#asahi · 2021-07-12 13:23
sventhe syslog, yes
#asahi · 2021-07-12 13:22
sveni don't know what it'll do once that thing is full with syslog requests
#asahi · 2021-07-12 13:22
svenafaict there's a fifo with N entries.
#asahi · 2021-07-12 13:22
svenkettenis: yes, but the coprocessor will send a message for each syslog entry to that mailbox and i don't know what happens if those are ignored
#asahi · 2021-07-12 13:21
svenbut we can't access its firmware and internal memory afaict
#asahi · 2021-07-12 13:21
sventhe nvme one is behind another "iommu" (which is really just an address filter) called SART
#asahi · 2021-07-12 13:20
svenor it just can't write to that mailbox anymore
#asahi · 2021-07-12 13:19
svenfrom what i can tell it just spams syslog messages to that shared memory buffer occasionally
#asahi · 2021-07-12 13:19
svenso i've managed to make the mailbox overflow already while trying to make it reboot
#asahi · 2021-07-12 13:12
svenworks for me as long as that coprocessor is fine with being completely ignored once linux or bsd is running ;)
#asahi · 2021-07-12 10:47
svenessentially i was just wondering where we should start that processor. if we could reset it every stage could just do that, but if that's not possible we should probably agree that e.g. u-boot is responsible for starting it and everything afterwards can just ignore it
#asahi · 2021-07-12 10:45
svenjust clearing this RUN bit seems to have to effect. i can even clear it before handling all those mailbox messages
#asahi · 2021-07-12 10:42
svenkettenis: did you ever figure out if it is possible to shutdown this ASN/nvme coprocessor again?
#asahi · 2021-07-07 19:17
svenyeah
#asahi · 2021-07-07 19:16
sventhey'd still be under NDAs and couldn't share those with anyone
#asahi · 2021-07-06 06:55
svenyou can try to disable PATA_LEGACY but this really shouldn't be happening
#asahi · 2021-07-06 06:53
svenamw: it's a page fault and it seems to crash within some pata setup code which is rather strange
#asahi · 2021-07-06 05:26
svenand that "device detected only before boot" sounds like that known quirk that only usb report only works at most once right now
#asahi · 2021-07-06 05:25
svenconfig_block should work fine
#asahi · 2021-07-06 05:25
svenamw: uh, that sounds broken

plus ›