#
✕ nick:sven
#asahi-dev · 2021-12-18 17:54
svenhrm, i might've confused those two
#asahi-dev · 2021-12-18 17:52
svenand that's also the thing you have to send to shut it down
#asahi-dev · 2021-12-18 17:52
svenif you never send 0xb with 0x20 as the argument the power state remains at 0x10
#asahi-dev · 2021-12-18 17:51
svenso the thing is if you send 0xb ("set AP power state") twice with the same power state RTKit panics
#asahi-dev · 2021-12-18 17:35
svenhm... 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?
#asahi-dev · 2021-12-18 17:28
svenmaybe 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"
#asahi-dev · 2021-12-18 17:26
sventhat sounds like what happened when i tried to boot without syslog originally
#asahi-dev · 2021-12-18 17:22
svenah ok, i just misunderstood then
#asahi-dev · 2021-12-18 17:21
sveniirc the first message for me comes when the admin queue is set up
#asahi-dev · 2021-12-18 17:21
svenfeels like we have different firmware then :D
#asahi-dev · 2021-12-18 17:18
svenyou'll only get syslog messages once you start bringing up nvme
#asahi-dev · 2021-12-18 17:12
svenlet me try that with the firmware i have
#asahi-dev · 2021-12-18 17:12
svenhrm, so that one isn't mandatory after all then
#asahi-dev · 2021-12-18 16:26
svenSART should only require 4K alignment or so
#asahi-dev · 2021-12-18 16:26
svenI guess rtkit runs with 16k pages as well and just doesn’t want to map non aligned buffers for those
#asahi-dev · 2021-12-18 16:25
svenyes, I just refer to them as SART buffers as opposed to NVMMU buffers used for most nvme data
#asahi-dev · 2021-12-18 09:36
svenso I guess only the syslog thread hangs then if you don’t setup the SART buffers correctly
#asahi-dev · 2021-12-18 09:36
svenbut good to know
#asahi-dev · 2021-12-18 09:36
svenweird
#asahi-dev · 2021-12-18 09:34
svenM1 pro/Max was already simple even though they changed a lot
#asahi-dev · 2021-12-18 09:25
svenim still baffled SART can be skipped and nvme then still works :/
#asahi-dev · 2021-12-18 09:24
svenHmmm… iirc SART should allow anything aligned to 4K
#asahi-dev · 2021-12-17 22:55
svenMight be a descendant of that
#asahi-dev · 2021-12-17 22:55
svenhttps://opensource.apple.com/source/xnu/xnu-4570.41.2/iokit/IOKit/IOKernelReporters.h.auto.html
#asahi-dev · 2021-12-17 22:51
svenlet me know once you figure it out :-)
#asahi-dev · 2021-12-17 22:36
svenbecause i'm pretty sure i see one for ANS
#asahi-dev · 2021-12-17 22:36
sven hm.... that's strange
#asahi-dev · 2021-12-17 22:31
sventhe different endpoints on RTKit (syslog, crashlog, etc.) are running in different threads
#asahi-dev · 2021-12-17 22:31
svenfwiw, the trace doesn't have to look exactly identical
#asahi-dev · 2021-12-17 22:27
svenhrm, so even with those 0x102/0x1002 writes it still tries to write to the syslog. i'm still confused how that ever worked
#asahi-dev · 2021-12-17 22:15
svenmaybe it's more like "report AP power state"
#asahi-dev · 2021-12-17 22:15
svenask apple about that one. the name comes from a string RTKit sends over syslog when you use that message with an invalid power state
#asahi-dev · 2021-12-17 22:13
sventpw_rules: AP = that thing that runs linux/openbsd/u-boot/..., IOP = that thing which runs RTKit
#asahi-dev · 2021-12-17 22:12
sveni haven't observed any difference without those fwiw
#asahi-dev · 2021-12-17 22:12
sventhose weird 0x102/0x1002 writes?
#asahi-dev · 2021-12-17 22:10
svenbecause it definitely logs when the admin queue is brought up
#asahi-dev · 2021-12-17 22:10
svenokay, that's very strange then
#asahi-dev · 2021-12-17 22:08
svenand that thing should hang if SART isn't configured correctly
#asahi-dev · 2021-12-17 22:08
svenIOP = the thing RTKit runs on
#asahi-dev · 2021-12-17 22:08
svenuh, i'm confused now
#asahi-dev · 2021-12-17 22:07
svenyeah, but nvme should also hang in that state
#asahi-dev · 2021-12-17 22:04
svenbut i'm still not sure how that could ever work. it should hang once nvme is brought up because it will try to write to the syslog at that point
#asahi-dev · 2021-12-17 22:03
svenmaybe you accidentally did find a way to boot ANS without booting RTKit completely
#asahi-dev · 2021-12-17 21:41
sventhat all looks correct to me
#asahi-dev · 2021-12-17 21:40
svenyeah, i dunno what's going on with tpw_rules's machine either
#asahi-dev · 2021-12-17 21:39
svenmy money is still on some issue with the device tree. that hypervisor trace very much looks like u-boot for some reason thinks SART is 0x277400000. and i know it didn't use to think that because it also worked for me
#asahi-dev · 2021-12-17 21:36
svennow that could've changed if apple changed the ANS firmware but it would surprise me
#asahi-dev · 2021-12-17 21:36
svenand it wasn't possible to bring up nvme without rtkit being up as well
#asahi-dev · 2021-12-17 21:35
svenas i said, i very much remember trying to get away with as little initialization as possible
#asahi-dev · 2021-12-17 21:35
sventhat sounds weird

plus ›