#
✕ nick:marcan
#asahi-dev · 2021-11-15 11:02
marcanmaz: since we're *eventually* going to have to support this suspend dance, what's your thinking? right now for arm64 there is only PSCI and ACPI.
#asahi-dev · 2021-11-15 10:36
marcanah, it sets [0] Disable WFI Return. fair.
#asahi-dev · 2021-11-15 10:21
marcanso indeed the CPUs come back through RVBAR, but the more interesting question is how did this happen....
#asahi-dev · 2021-11-15 10:20
marcanthat was when macos went to sleep
#asahi-dev · 2021-11-15 10:20
marcanha, while messing with the HV I caught m1n1 booting the primary core from RVBAR (i.e. through what normally is the secondary entry) and then blowing up on the spinlocks not working
#asahi-dev · 2021-11-15 05:46
marcanif anyone else has an 8-core, I'd appreciate an ADT dump (in m1n1/proxyclient: `python -m m1n1.adt -r adt.bin > adt.txt` and note that it might contain your wifi password; remove the huge `nvram-proxy-data` line if you want to get rid of that)
#asahi-dev · 2021-11-15 05:44
marcanbut it looks like Jawse left :/
#asahi-dev · 2021-11-15 05:44
marcanI was thinking about asking if anyone had the 8 core models, since we probably need to do something there
#asahi-dev · 2021-11-13 17:45
marcanbut if something is hitting registers we don't expect it to, I might as well have it crash and investigate
#asahi-dev · 2021-11-13 17:44
marcanbase is different because that is expected to change from SoC to SoC
#asahi-dev · 2021-11-13 17:43
marcanit's useful to have the thing blow up when something unexpected happens (like a future version of macos hitting a higher event reg)
#asahi-dev · 2021-11-13 17:43
marcanI don't particularly mind having fail situations like these when they might yield interesting information in the future
#asahi-dev · 2021-11-13 17:42
marcanyes, just use 8000; if macos still crashes then it means it uses the timer (which is interesting information) and then I guess use c000
#asahi-dev · 2021-11-13 17:41
marcanthat should've been 0x8000 all along
#asahi-dev · 2021-11-13 17:41
marcanok, that's just a bug then
#asahi-dev · 2021-11-13 17:41
marcanoh wait, that's still AIC
#asahi-dev · 2021-11-13 17:41
marcanactually isn't the timer at 8k? I forget what's at 4000... :p
#asahi-dev · 2021-11-13 17:40
marcanmight as well consider the timer part of it
#asahi-dev · 2021-11-13 17:40
marcanyeah, just make it 8000 I guess
#asahi-dev · 2021-11-13 17:39
marcanoh, you mean for AIC1
#asahi-dev · 2021-11-13 17:39
marcanwhere are you seeing 0x4000?
#asahi-dev · 2021-11-13 17:39
marcan#define AIC2_REG_SIZE 0x10000
#asahi-dev · 2021-11-13 17:38
marcanhmm? is macOS hitting registers > 0xc000?
#asahi-dev · 2021-11-13 17:31
marcanjeffmiw: in general, the ADT is terrible and full of lies; do not trust it to be correct for anything :p
#asahi-dev · 2021-11-13 17:31
marcanaic1, IIRC there's a timer and other stuff we don't care about / map
#asahi-dev · 2021-11-13 17:31
marcanwhich is 0x10000 bytes total (event page at 0xc000)
#asahi-dev · 2021-11-13 17:31
marcanaic2 has a bunch of pages for event registers for presumably ASCs, but the CPU only cares about the first
#asahi-dev · 2021-11-13 16:53
marcan(the format is obviously a raw cortex-m3 memory image, it starts with initial SP and the vector table)
#asahi-dev · 2021-11-13 16:52
marcanbut it's probably not worth doing that initially
#asahi-dev · 2021-11-13 16:52
marcanre avd, at least given it's a 35kb blob of unsigned cortex-m3 junk, it would seem entirely feasible to reverse engineer whatever it's doing and write an open source replacement
#asahi-dev · 2021-11-13 16:48
marcanprores doesn't look like it has firmware
#asahi-dev · 2021-11-13 16:46
marcaner, kernelcache offsets/lengths
#asahi-dev · 2021-11-13 16:46
marcanand then the installer just has a table of kext offsets/lengths to cut out (and maybe a sha1 for sanity check)
#asahi-dev · 2021-11-13 16:46
marcansince we're going to support a subset of versions anyway, I guess we can just have a semiautomated script that finds the firmwares in the kernelcache given the kext and maybe some manual ghidra (the annoying part is matching up firmware blobs to hardware versions, since that's just a code reference)
#asahi-dev · 2021-11-13 16:45
marcanthe firmwares do change from version to version, at least some of them
#asahi-dev · 2021-11-13 16:37
marcanprores, no idea yet, though I'd hope that a codec as relatively simple as that doesn't need firmware either...
#asahi-dev · 2021-11-13 16:37
marcanjpeg wouldn't have firmware, that'd be silly for a jpeg decoder
#asahi-dev · 2021-11-13 16:35
marcanapparently not :/
#asahi-dev · 2021-11-13 16:35
marcanAVD did not which is why I assumed it was firmwareless
#asahi-dev · 2021-11-13 16:35
marcanthat one's easy
#asahi-dev · 2021-11-13 16:35
marcanno, AVE has a Chinook loaded by iBoot
#asahi-dev · 2021-11-13 16:25
marcan(for different hardware versions)
#asahi-dev · 2021-11-13 16:25
marcanannoyingly, there are 6 blobs all named with the same symbol name, apparently
#asahi-dev · 2021-11-13 16:25
marcan(it's a little cortex-m3 thing)
#asahi-dev · 2021-11-13 16:24
marcanso I guess we need a stupid firmware cutter to deal with that :/
#asahi-dev · 2021-11-13 16:24
marcansome 35kb blob... that's embedded in the kext
#asahi-dev · 2021-11-13 16:24
marcanapparently AVD *does* have firmware
#asahi-dev · 2021-11-13 16:24
marcanugh, dammit
#asahi-dev · 2021-11-11 10:28
marcanTIL people revert stuff when it breaks out of tree platforms
#asahi-dev · 2021-11-11 09:36
marcanwell, someone else did rather

plus ›