2021-12-18
01:10bpye has joined #asahi-dev
01:11skipwich has quit [Quit: DISCONNECT]
01:12skipwich has joined #asahi-dev
01:14bpye4 has joined #asahi-dev
01:14skipwich has quit []
01:14marcansven: that would be a cute hack, if we can just have the kmutil m1n1 chainload something from AuxKC :D
01:16tpw_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
01:19rwhitby has joined #asahi-dev
01:19bpye has quit [Ping timeout: 480 seconds]
01:20tpw_rulesoh. well i'm not sure if what u-boot is doing a full init. do you remember exactly how you tested that function?
01:21bpye has joined #asahi-dev
01:22rwhitby has quit []
01:22alyssa has quit [Quit: leaving]
01:26bpye4 has quit [Ping timeout: 480 seconds]
01:45Dcow_ has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:23marcantpw_rules: the reset seems to work if you have it crash init by not setting up SART properly. IIRC
02:23yuyichao has joined #asahi-dev
02:53riker77_ has joined #asahi-dev
02:58riker77 has quit [Ping timeout: 480 seconds]
02:58riker77_ is now known as riker77
03:44kov has quit [Quit: Coyote finally caught me]
03:44kov has joined #asahi-dev
03:52skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
04:01PhilippvK has joined #asahi-dev
04:01skoobasteeve has joined #asahi-dev
04:04phiologe has quit [Ping timeout: 480 seconds]
04:33Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:37Dcow has quit [Ping timeout: 480 seconds]
04:39Dcow has joined #asahi-dev
04:44amarioguy has quit [Ping timeout: 480 seconds]
04:46Dcow_ has joined #asahi-dev
04:51Dcow has quit [Ping timeout: 480 seconds]
05:09Jamie[m]1does anyone have a convenient method for syncing up events in MMIO traces to the thing that caused it (i.e. a way to get a marker to show up in the trace from macOS userland?)
05:22marcanand then read/write that register to trigger events; you get a whole two bits for writes (though macOS writes zeroes to it all the time, so you need to filter that out either by value or EL1)
05:23marcanI'd actually been meaning to implement this for this use case, especially for the GPU stuff, just haven't gotten there yet
05:24marcananother option would be a debug break; I think we trap brks unconditionally right now (and lower them automatically since a patch I sent some time ago), at least from EL1 but presumably EL0 too
05:25Glanzmann has joined #asahi-dev
05:32skipwich has joined #asahi-dev
05:37tpw_ruleskettenis: i fixed u-boot. my shower thought is that the addresses you give to rtkit should probably be 16k aligned
07:20skipwich has quit [Quit: DISCONNECT]
07:38amarioguy has joined #asahi-dev
08:15amarioguy has quit [Ping timeout: 480 seconds]
08:33the_lanetly_052 has joined #asahi-dev
08:46ChaosPrincess has quit [Quit: WeeChat 3.3]
08:46thunfisch has quit [Remote host closed the connection]
08:47thunfisch has joined #asahi-dev
09:00l3k[m] has joined #asahi-dev
09:00Sebhl[m] has joined #asahi-dev
09:01thunfisch has quit [Ping timeout: 480 seconds]
09:27aleasto has joined #asahi-dev
09:30thunfisch has joined #asahi-dev
09:32Glanzmannsven: Porting the mac mini to Linux was much easier: https://github.com/torvalds/linux/commit/b74ba22f030eb7ab88f7d8954ad18ecc0ac5ce3c
09:35kettenissven: I can confirm that if I provide memory blocks that are 16K aligned, I do see the final APPLE_RTKIT_MGMT_SET_AP_PWR_STATE message
10:45ChaosPrincess has joined #asahi-dev
11:09amarioguy has joined #asahi-dev
11:45amarioguy has quit [Ping timeout: 480 seconds]
12:02PhilippvK has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
12:06phiologe has joined #asahi-dev
12:46Dcow has joined #asahi-dev
13:20VinDuv has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
13:57Dcow has quit [Quit: Textual IRC Client: www.textualapp.com]
14:17Dcow has joined #asahi-dev
14:30yuyichao has quit [Quit: Konversation terminated!]
14:31yuyichao has joined #asahi-dev
14:48aeadio has joined #asahi-dev
14:48aead has quit [Remote host closed the connection]
14:48MajorBiscuit has joined #asahi-dev
15:15MajorBiscuit has quit [Quit: WeeChat 3.3]
15:15MajorBiscuit has joined #asahi-dev
15:21Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:25VinDuv has joined #asahi-dev
15:26m42uko has quit [Ping timeout: 480 seconds]
15:31MajorBiscuit has quit [Ping timeout: 480 seconds]
15:35Dcow has joined #asahi-dev
15:38m42uko has joined #asahi-dev
15:44Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:55Dcow has joined #asahi-dev
15:55amarioguy has joined #asahi-dev
16:04Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:15tdmm has joined #asahi-dev
16:24tpw_rulessven: the problem is specifically giving rtkit non 16k aligned addresses. sart doesn't seem to care
16:25svenyes, I just refer to them as SART buffers as opposed to NVMMU buffers used for most nvme data
16:26svenI guess rtkit runs with 16k pages as well and just doesn’t want to map non aligned buffers for those
16:43Dcow has joined #asahi-dev
16:50tdmm has left #asahi-dev [#asahi-dev]
16:53aleasto has quit [Ping timeout: 480 seconds]
17:01the_lanetly_052 has quit [Ping timeout: 480 seconds]
17:05amarioguy has quit [Ping timeout: 480 seconds]
17:11amarioguy has joined #asahi-dev
17:17tpw_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
17:26tpw_rulesno, it seems if i never initialize syslog, then the management interface doesn't respond to anything
17:28svenmaybe we should define what we mean by "enable syslog". could be "send start ep for the syslog endpoint" but could also be "send this 0xb command which we thought was syslog_init"
17:34tpw_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
17:35svenhm... so i know that the syslog thread in the rtkit firmware registers a callback for "power state changes" (i.e. that 0xb) command. so maybe that just gets stuck if the endpoint isn't initialized?
17:35tpw_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
17:36wCPO has joined #asahi-dev
17:45tpw_ruleshm, it sure seems to... let me garbage collect my setup and make sure this works for real
17:51svenso the thing is if you send 0xb ("set AP power state") twice with the same power state RTKit panics
17:55svenso if RTKit thinks the AP power state is 0x01 and you send it 0xb with 0x01 again it'll just panic
17:55svenyup. and what's even worse is that flipping that reset bit can't revive the co-processor after a panic
17:59svenjust open("crashlog.b", "w").write(iface.readmem(crashlog_addr, 0x8000)) or something like that
18:08MajorBiscuit has joined #asahi-dev
18:09MajorBiscuit has quit []
18:14tpw_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
18:22aleasto has joined #asahi-dev
18:28tpw_rulesah, simply not sending the 0xb command to shut it down seems to solve the problem for good
18:28tpw_rulesbut kettenis i assume you are not interested in having uboot shut nvme down yet because that will break openbsd
18:33nabaiste^ has joined #asahi-dev
18:48MajorBiscuit has joined #asahi-dev
19:01Glanzmann has quit [Quit: EOF]
19:06Major_Biscuit has joined #asahi-dev
19:07MajorBiscuit has quit [Ping timeout: 480 seconds]
19:21yamii has quit [Quit: WeeChat 3.3]
19:22yamii has joined #asahi-dev
19:41Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:49aeadio has quit [Quit: ZNC - https://znc.in]
20:06aead has joined #asahi-dev
20:10MajorBiscuit has joined #asahi-dev
20:11jannausigh, I still don't understand how sio is set up but at least I can now read the SPI transfers through RegMonitor
20:15MajorBiscuit has quit []
20:16Major_Biscuit has quit [Ping timeout: 480 seconds]
20:21MajorBiscuit has joined #asahi-dev
20:29aleasto has quit [Remote host closed the connection]
20:30svenhm.. so what i remember from looking at it very briefly was that there were a lot of setup messages at the beginning
20:31MajorBiscuit has quit [Quit: WeeChat 3.3]
20:32MajorBiscuit has joined #asahi-dev
21:00jannauit might write the address I'm interested in at a fixed offset from the adresse of one setup message
21:06svencould also be that it just allocates a ringbuffer at the beginning and then just keeps reusing that somehow
21:24ey3ball[m] has joined #asahi-dev
21:29sven | | | | +-o AppleSmartIO <class AppleSmartIO, id 0x100000499, registered, matched, active, busy 0 (17 ms), retain 6>
21:29sven | | | | +-o sio-dma <class AppleSmartIODMANub, id 0x100000189, registered, matched, active, busy 0 (14 ms), retain 8>
21:29sven | | | | +-o IODMAController0000008A <class AppleSmartIODMAController, id 0x1000004be, registered, matched, active, busy 0 (3 ms), retain 11>
21:36svenits 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 :)
22:12svenhuh. 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
22:28MajorBiscuit has quit [Quit: WeeChat 3.3]
22:34Glanzmann has joined #asahi-dev
22:35MajorBiscuit has joined #asahi-dev
22:49psykose has quit [Ping timeout: 480 seconds]
22:49psykose has joined #asahi-dev
23:34MajorBiscuit has quit [Quit: WeeChat 3.3]
23:36Dcow has joined #asahi-dev
23:46MajorBiscuit has joined #asahi-dev