#
✕ nick:sven
#asahi · 2021-07-28 17:43
svenfwiw, i haven't been able to reset the ANS, even though there's code in some kext that allegedly does just that
#asahi · 2021-07-28 17:41
svenit has _code_ to load these firmware, but i think that's dead code
#asahi · 2021-07-28 17:38
svenbut i'm sure that iboot verifies their signature before loading them
#asahi · 2021-07-28 17:37
sveni don't think those coprocessors have a bootrom, but we might not be able to reset them
#asahi · 2021-07-28 17:36
svenlooks like the ANS firmware has a "smc_to_ans" string. so maybe it actually talks to the smc directly
#asahi · 2021-07-28 17:34
svenoh, could be
#asahi · 2021-07-28 17:34
svenbut i also haven't talked to SMC yet except for the common rtkit stuff
#asahi · 2021-07-28 17:34
sveni've only seen syslog to a buffer inside that shared memory thing
#asahi · 2021-07-28 17:33
svenSMC is weird btw., it exposes shared memory over the MMIO bus (with the nonposted requirements and everything)
#asahi · 2021-07-28 17:32
svenah, makes sense
#asahi · 2021-07-28 17:30
svenall i know is that there's no data on either of those two endpoints when running mac os
#asahi · 2021-07-28 17:30
svencould be :)
#asahi · 2021-07-28 17:29
svenhm, true
#asahi · 2021-07-28 16:40
svenmaybe it's just a special flavor of rtkit ;)
#asahi · 2021-07-28 16:39
svenlooks like something special
#asahi · 2021-07-28 16:39
sven | avd,t8103
#asahi · 2021-07-28 16:39
sven |- compatible:
#asahi · 2021-07-28 16:39
sven🤷‍♂️
#asahi · 2021-07-28 16:31
svenand ANS is missing there for some reason, but that's RTKit too
#asahi · 2021-07-28 16:31
svengrep -lr RTKit /System/Volumes/Preboot/*/boot/*/usr/standalone/firmware/FUD/ results in SIO, ISP, AVE, DCP, AOP, ANE, GFX, DCP2 (???) and PMP
#asahi · 2021-07-28 16:29
svenpossibly everything except for the SEP
#asahi · 2021-07-28 16:27
sven(and probably the others rtkit-based coprocessors as well)
#asahi · 2021-07-28 16:27
sventhe code still has some rough edges that i'm not totally happy with but it seems to work for both ANS and SMC
#asahi · 2021-07-28 16:26
svenyeah, it's slowly getting there :)
#asahi · 2021-07-28 16:25
svenso i can't send commands yet without writing more code
#asahi · 2021-07-28 16:25
svenfwiw, i just get the SMC syslog messages so far
#asahi · 2021-07-28 16:20
svenno idea
#asahi · 2021-07-28 16:19
svenoh, arm64 instructions. i thought they were dt nodes :D
#asahi · 2021-07-28 16:17
svenwhat are those?
#asahi · 2021-07-28 16:07
svenugh. and ofc there's new merge conflics for the nvme platform split :(
#asahi · 2021-07-28 16:07
sven0x20 is called "ans2" and 0x21 is called "smc". no traffic on either of them when tracing under the hv yet
#asahi · 2021-07-28 16:06
sveni wrote the code, you get to test it ;p
#asahi · 2021-07-28 16:04
svenwho know. i haven't seen any traffic on it
#asahi · 2021-07-28 16:04
svenor maybe it needs to relay message to the SMC but can't talk to it directly?
#asahi · 2021-07-28 16:04
svenalyssa: let me rephrase, the ANS has one mailbox channel called "smc"
#asahi · 2021-07-28 16:03
sveni dunno what it does though
#asahi · 2021-07-28 16:03
svenit's at least called smc
#asahi · 2021-07-28 16:03
svenyeah, that
#asahi · 2021-07-28 16:03
sventhere's SMC
#asahi · 2021-07-28 16:03
svenno, i mean
#asahi · 2021-07-28 16:02
svenone of the two ANS endpoints is called "smc" fwiw. still no clue what it does though
#asahi · 2021-07-28 16:01
svenhah :)
#asahi · 2021-07-28 16:01
sven[ 131.139246] apple-mailbox 23e400000.mbox: syslog message: apComms.cpp:372: SMC HID Event: 01 fe 01
#asahi · 2021-07-28 16:00
svenin the syslog? let me try!
#asahi · 2021-07-28 16:00
sven(and to see [ 4.520198] apple-mailbox 23e400000.mbox: syslog message: apComms.cpp:372: SMC HID Event: 01 01 01 whenever you press the power button :D)
#asahi · 2021-07-28 15:59
svenhttps://github.com/AsahiLinux/linux/commits/asc/dev not happy yet, but it's a start. this should be enough to bring up ANS at least
#asahi · 2021-07-26 19:39
svenhttps://f.svpe.de/7c0ad6bd92388248a30905c15a49b5b0bd76a78a3ac13e3a6d6653d5c6fc00a8_mbox.txt that should be enough to bring up ans inside linux :)
#asahi · 2021-07-26 18:57
sven+ if (!irqd_irq_masked(d))
#asahi · 2021-07-26 18:57
sven- if (!irqd_irq_disabled(d) && !irqd_irq_masked(d))
#asahi · 2021-07-26 18:57
svenmarcan: looks like i can't enable_irq() an irq ever again if i disable it with disable_irq_nosync from inside an irq handler before. removing irqd_irq_disable(d) from eoi fixes that but i don't know why or if that's the correct fix

plus ›