#
#asahi-dev · 2026-06-28 07:00
chaos_princessyou just pass -d to run_guest.py
#asahi-dev · 2026-06-28 07:00
yukado you usually apply it on your kernelcache before uploading it, or is there some function to let m1n1 patch it?
#asahi-dev · 2026-06-28 06:59
yuka* from what I understand
#asahi-dev · 2026-06-28 06:59
yukachaos_princess: from what i_can_has_debugger is a patch to the kernel?
#asahi-dev · 2026-06-28 06:48
yukathis whole "kernel write to read-only memory" feels like some mechanism for locking down address space has been left enabled
#asahi-dev · 2026-06-28 06:48
yukait wouldn't make sense anyways if it was amcc it would affect all cores equally
#asahi-dev · 2026-06-28 06:44
yukaSo, uh
#asahi-dev · 2026-06-28 06:41
yukaso it's 32 bit
#asahi-dev · 2026-06-28 06:41
yukano, the upper address reg is lower address reg + 4
#asahi-dev · 2026-06-28 06:40
yukaI guess the addresess should be 64 bit and are spread over multiple 32-bit mmio reads?
#asahi-dev · 2026-06-28 06:39
yuka(the ranges I end up from plain read32() on amcc {lower,upper}-limit-reg are 0x1-0xa6 and 0x0-0x35d, which seems quite odd to me)
#asahi-dev · 2026-06-28 06:38
chaos_princessor you can do that, read the xnu log, and just look at what pmgr logs. it dumps its mmio maps with names for each region if you pass that stuff to it
#asahi-dev · 2026-06-28 06:38
yukanickchan: ah fair, was just an idea but then probably not the cause
#asahi-dev · 2026-06-28 06:37
yukaiirc I already had one trace containing those writes
#asahi-dev · 2026-06-28 06:37
yukaI mean I can also trace all pmgr and then see where the pmp shaped writes end up
#asahi-dev · 2026-06-28 06:37
chaos_princess"pmgr-debug=0xffffffff pmgr-debug-devices=0xffffffff pmgr-debug-always-on=0xffffffff pmgr-debug-energy-model=0xffffffff pmgr-debug-restore-counter=1 pmgr-trace=1 -disable_mtx_chk" is what you will need for that. And make sure you have i_can_has_debugger enabled
#asahi-dev · 2026-06-28 06:37
nickchanand not some sync exception
#asahi-dev · 2026-06-28 06:36
nickchanif you are talking about the amcc part and not cpu register part write to protected region should come up as either a SError or amcc interrupt
#asahi-dev · 2026-06-28 06:36
yukaty
#asahi-dev · 2026-06-28 06:36
yukaAhh makes sense
#asahi-dev · 2026-06-28 06:35
chaos_princessyes, you figure out which pmgr mmio is the correct one, and put PMPRegTracer on it
#asahi-dev · 2026-06-28 06:35
yuka(and not locked)
#asahi-dev · 2026-06-28 06:35
yukanickchan: yes but c and d are not enabled
#asahi-dev · 2026-06-28 06:34
yukachaos_princess: so the PMPTracer traces the iokit part only, and if I want to see the power state communication I add another trace_device()?
#asahi-dev · 2026-06-28 06:34
nickchan-there's also c and d on m4
#asahi-dev · 2026-06-28 06:34
chaos_princesswifi does not connect to pmp. And you should get constant gpu on/off spam. if you are expecting stuff over rtkit - that is not how it works, all power state communication is via DEV_STATUS_TGT_WR and such
#asahi-dev · 2026-06-28 06:33
yukaI can't quite parse the lower-limit and upper-limit yet
#asahi-dev · 2026-06-28 06:33
yukaamcc-ctrr-a and amcc-ctrr-b seem to be enabled, write-disabled, and locked
#asahi-dev · 2026-06-28 06:32
yukaAn idea regarding the M4 "kernel write to read-only memory":
#asahi-dev · 2026-06-28 06:11
yukabut it's all been during boot
#asahi-dev · 2026-06-28 06:11
yukaHuh, I would've expected some PMPTracer output during operation when I turn off/on the wifi / display / ...
#asahi-dev · 2026-06-28 05:53
JamesCalligeros[m]Its just the syslog thing with the pointer to the buffer at various places in memory. I just had a thought though and will check something when i get home
#asahi-dev · 2026-06-28 05:52
sofusif you share your code i would be happy to take a look
#asahi-dev · 2026-06-28 05:52
JamesCalligeros[m]No big deal, not important
#asahi-dev · 2026-06-28 05:52
JamesCalligeros[m]I tried writing obvious values to various places in ram and scanning code and sram for it but it was in neither
#asahi-dev · 2026-06-28 05:51
JamesCalligeros[m]Hmm
#asahi-dev · 2026-06-28 05:50
sofuschadmed: the sizes look correct, it works on my t6020
#asahi-dev · 2026-06-28 00:33
chadmedsofus: i think maybe the reg containers in the t8112 dtsi are incorrectly sized. the adt reckons we have 0x1404000 at 0x268000000 but we're only mapping 0x1048000. whatever is in what we're calling sram is code.
#asahi-dev · 2026-06-27 21:11
chaos_princessrust would make that part easier, but its a c project for now
#asahi-dev · 2026-06-27 21:08
leiojust reads about defmt crate for other reasons and recalls the cm3 logging talk here from before
#asahi-dev · 2026-06-27 14:24
sofus* i think
#asahi-dev · 2026-06-27 14:22
sofusoh sorry i misread, the sram is 0x10000000-0x10010000 not the firmware
#asahi-dev · 2026-06-27 13:58
chadmedi'll just play with it when im not falling asleep ;)
#asahi-dev · 2026-06-27 13:58
chadmedyes and when you put it there it overwrites firmware, which is bad. when you put it at 0x10014000 its fine and everything works and the m3 writes to it, but avd->sram does not point to 0x10010000 so it cannot be read
#asahi-dev · 2026-06-27 13:56
sofusso logbuffer is not at 0x10014000 but 0x10004000
#asahi-dev · 2026-06-27 13:55
chadmedyeah thats what i meant the second time, i missed the last 0 :P
#asahi-dev · 2026-06-27 13:54
sofusi would think its 0x10000000 - 0x10010000
#asahi-dev · 2026-06-27 13:53
chadmedt8112
#asahi-dev · 2026-06-27 13:53
sofusoh what? What device is this?
#asahi-dev · 2026-06-27 13:52
chadmed0x10000000-0x1001000*

plus ›