#asahi-dev · 2021-12-20 04:43
tpw_ruleskettenis: i've finally released all my work. i made two patches to u-boot i'd like to get upstreamed in some manner#asahi-dev · 2021-12-19 19:54
tpw_ruleskettenis: yup it all works good now, thank you#asahi-dev · 2021-12-19 18:22
tpw_rulesalright, i patched the kernel to handle the zero length buffer request and it seems that only happens on the crashlog endpoint. the syslog and ioreporting endpoints request the same length as before and seem to work properly, including shutdown. so maybe u-boot's behavior is valid and this case should be handled in apple_rtkit_common_rx_get_buffer. but i'm not sure what will happen if rtkit crashes now#asahi-dev · 2021-12-19 17:56
tpw_rulesnow the kernel should probably have better parameter validation, but rtkit asking for 0 length buffers seems like it will easily create future problems#asahi-dev · 2021-12-19 17:55
tpw_rulesi think that's what's happening. rtkit is somehow remembering that you sent it a 0 length buffer in u-boot and asking for that again next time#asahi-dev · 2021-12-19 17:52
tpw_rules(this is not using the nvme/dev branch)#asahi-dev · 2021-12-19 17:50
tpw_ruleskettenis: i tested your version out, and it looks like when rtkit starts again, it asks for a 0 length buffer on endpoint 1, which causes the linux kernel to try to allocate a 0 length dma buffer and get upset. not sure if that's the kernel's problem but rtkit asking for such a buffer seems suspicious#asahi-dev · 2021-12-19 16:27
tpw_rulesjust to confirm, there are no objections to releasing a short guide on how to install nixos standalone with u-boot?#asahi-dev · 2021-12-19 15:42
tpw_ruleskettenis: i had a couple other things i think need to be fixed in the rtkit code. this was my patch for that and the nvme shutdown stuff: https://pastebin.com/Vfn4Exw1#asahi-dev · 2021-12-19 14:47
tpw_rulesis there new shutdown code?#asahi-dev · 2021-12-18 18:28
tpw_rulesbut kettenis i assume you are not interested in having uboot shut nvme down yet because that will break openbsd#asahi-dev · 2021-12-18 18:28
tpw_rulesah, simply not sending the 0xb command to shut it down seems to solve the problem for good#asahi-dev · 2021-12-18 18:14
tpw_ruleshm, i think i made a mistake when testing because i can't get it to work now. it just crashes in linux again. but i will try the parser out#asahi-dev · 2021-12-18 17:59
tpw_rulesyeah but it just accepts a file on the hard disk, which i'm not sure how to get#asahi-dev · 2021-12-18 17:59
tpw_rulesi thought you were talking about m1n1#asahi-dev · 2021-12-18 17:59
tpw_rulesoh, you mean the linux branch#asahi-dev · 2021-12-18 17:58
tpw_rulesi never quite figured out how to actually dump them for that to pars#asahi-dev · 2021-12-18 17:56
tpw_rulesbut probably explains why earlier experiments were having linux tell me it crashed#asahi-dev · 2021-12-18 17:55
tpw_rulesthat's rude of it#asahi-dev · 2021-12-18 17:53
tpw_rulesbut 0x10 with message type 6 ("set IOP power state")#asahi-dev · 2021-12-18 17:53
tpw_rulesi'm sending 0x01 to shut it down#asahi-dev · 2021-12-18 17:45
tpw_rulessven: good call on not sending that 0xb command#asahi-dev · 2021-12-18 17:45
tpw_ruleshm, it sure seems to... let me garbage collect my setup and make sure this works for real#asahi-dev · 2021-12-18 17:42
tpw_ruleswell, maybe linux knows how to do that#asahi-dev · 2021-12-18 17:35
tpw_rulesalthough now that i think about it, my shutdown code does not try to shut down the nvme. so maybe i need to do that better#asahi-dev · 2021-12-18 17:34
tpw_rulesand trying that second thing, the management interface still does respond to the shutdown messages. and uboot is able to reinitialize rtkit, but hangs trying to reinitialize the nvme itself#asahi-dev · 2021-12-18 17:28
tpw_rulesi just tried that first thing#asahi-dev · 2021-12-18 17:26
tpw_rulesendpoint*#asahi-dev · 2021-12-18 17:26
tpw_rulesno, it seems if i never initialize syslog, then the management interface doesn't respond to anything#asahi-dev · 2021-12-18 17:21
tpw_rulesmaybe i am not checking for them in the right place then#asahi-dev · 2021-12-18 17:17
tpw_ruleswell let me see if i can shut it down then. for whatever reason i don't actually get any syslog messages besides that 0xb type response#asahi-dev · 2021-12-18 17:12
tpw_rulesare you able to shut the processor down?#asahi-dev · 2021-12-18 16:25
tpw_rulesah ok#asahi-dev · 2021-12-18 16:24
tpw_rulessven: the problem is specifically giving rtkit non 16k aligned addresses. sart doesn't seem to care#asahi-dev · 2021-12-18 05:38
tpw_rulesanyway night#asahi-dev · 2021-12-18 05:37
tpw_rulesand doing that fixed it it seems. i'll actually like clean up and test it tomorrow#asahi-dev · 2021-12-18 05:37
tpw_ruleskettenis: i fixed u-boot. my shower thought is that the addresses you give to rtkit should probably be 16k aligned#asahi-dev · 2021-12-18 02:49
tpw_ruleshm, it seems not setting up SART at all is not enough to let it be resettable#asahi-dev · 2021-12-18 01:20
tpw_rulesso maybe i'm just not testing the reset properly#asahi-dev · 2021-12-18 01:20
tpw_rulesi mean my whole problem is it's not initialized enough i can get it to shut back down#asahi-dev · 2021-12-18 01:20
tpw_rulesoh. well i'm not sure if what u-boot is doing a full init. do you remember exactly how you tested that function?#asahi-dev · 2021-12-18 01:19
tpw_rules"it"?#asahi-dev · 2021-12-18 01:16
tpw_rulesmarcan: btw i fixed the issues with the device tree. u-boot has a hook to essentially do a merge of the device tree it loads with its own device tree#asahi-dev · 2021-12-18 01:02
tpw_ruleshm, that sure seems to be the case. bizarre#asahi-dev · 2021-12-17 23:43
tpw_rulesso this neat t8103-pmgr-pwrstate thing labeled ans2 cannot actually be used to reset the nvme stuff?#asahi-dev · 2021-12-17 22:44
tpw_ruleswhat exactly does the IOReporting endpoint talk about?#asahi-dev · 2021-12-17 22:32
tpw_rulesit's actual content issues, not just ordering#asahi-dev · 2021-12-17 22:30
tpw_rulesi did change a few other miscellaneous things to make the trace look more like linux's. but if/when i get all this working i'll send you a patch#asahi-dev · 2021-12-17 22:27
tpw_rulesi'm pretty sure there is still something wrong as the trace hasn't changed#asahi-dev · 2021-12-17 22:15
tpw_rulesok