#
#asahi-dev · 2026-07-06 12:40
sofus(macos gets 179/305)
#asahi-dev · 2026-07-06 12:39
sofusim over allocating a little bit right now, when i fix that and clean up a bit vp9 should be done :)
#asahi-dev · 2026-07-06 12:38
sofus216/305 tests passed now!
#asahi-dev · 2026-07-06 11:06
nickchan4level paging is still good for 4k paging though
#asahi-dev · 2026-07-06 11:05
nickchan... no i do not really need mmu for EL3
#asahi-dev · 2026-07-06 09:43
nickchanin practice on 16K the second L1 table would never be used in m1n1 so this does save memory even on m1
#asahi-dev · 2026-07-06 09:21
nickchanjust 30 lines extra
#asahi-dev · 2026-07-06 09:20
nickchanthe diff isn't even that big 1 file changed, 88 insertions(+), 56 deletions(-)
#asahi-dev · 2026-07-06 09:15
nickchangotta rewrite the memory management comments too
#asahi-dev · 2026-07-06 09:10
nickchanokay, got 4 level paging to work properly now
#asahi-dev · 2026-07-06 09:06
lacamar[m]Amazing work, Stanford
#asahi-dev · 2026-07-06 09:01
nickchannvm I missed the l3d += BIT(VADDR_L3_OFFSET_BITS)
#asahi-dev · 2026-07-06 09:00
nickchansince every L3 page in the originally L2 mapping would just get translated to the first L3 page
#asahi-dev · 2026-07-06 08:58
nickchan...which would break the originally L2 mapping other than the first L3 page of it
#asahi-dev · 2026-07-06 08:58
nickchanBut the way this code works right now if the vaddr is currently mapped using a L2 block, when remapping the output address (paddr) of the L3 entries would all be the same
#asahi-dev · 2026-07-06 08:57
nickchanand if the the vaddr is currently mapped using a L2 block entry then it is remapped using L3
#asahi-dev · 2026-07-06 08:57
nickchanerm, vaddr
#asahi-dev · 2026-07-06 08:56
nickchanif i understand this code correctly this function returns the L3 of a paddr
#asahi-dev · 2026-07-06 08:56
nickchanhttps://github.com/AsahiLinux/m1n1/blob/4c47636d53998da65a57aa69cf7bc06f8b8bcd7e/src/memory.c#L241
#asahi-dev · 2026-07-06 08:10
StanfordAppliedCyber[m]there's a few sources of nondeterminism as far as i can tell, all very rare, we make it to a working system >90% of the time, but one is some SPMI timeout that's almost certainly due to whatever latency virtualization introduces, and another is some SEP thing that i don't 100% know
#asahi-dev · 2026-07-06 08:06
nickchanin particular that find_regs.py
#asahi-dev · 2026-07-06 08:05
nickchanenable el3's mmu is also useful for python scripting purposes
#asahi-dev · 2026-07-06 08:03
svenprobably a bit more once we can do proper sleep
#asahi-dev · 2026-07-06 08:02
svenit’s maybe 100 instructions
#asahi-dev · 2026-07-06 08:02
svendo you need a mmu for psci stuff?
#asahi-dev · 2026-07-06 08:02
nickchanif I ever enable mmu in EL3 for psci stuffs having to keep multiple megabytes of reserved pagetable is not ideal
#asahi-dev · 2026-07-06 08:01
svenno, I mean, for what feature
#asahi-dev · 2026-07-06 08:01
nickchansven: so m1n1's 4K paging is not scuffed
#asahi-dev · 2026-07-06 08:01
svenwhat do you need 4levels for?
#asahi-dev · 2026-07-06 07:59
nickchanhopefully no 5level paging on apple silicon anytime soon
#asahi-dev · 2026-07-06 07:55
nickchanso I need to implement 4level paging in m1n1 which I think is overdue anyways
#asahi-dev · 2026-07-06 07:46
nickchanm1 would be annoying without nested virt
#asahi-dev · 2026-07-06 07:46
chadmedthe mca cluster does matter... i wonder if we just guessed/trialled and errored the correct routings
#asahi-dev · 2026-07-06 07:45
StanfordAppliedCyber[m]nickchan: just always returning a noncachable page
#asahi-dev · 2026-07-06 07:43
svensomeone got macOS running on m2 under sptm by virtualizating everything
#asahi-dev · 2026-07-06 07:43
nickchanso how to fix tlb flush
#asahi-dev · 2026-07-06 07:42
StanfordAppliedCyber[m]I believe that makes me the first person to run macos under m1n1 on any SPTM enabled device?
#asahi-dev · 2026-07-06 07:41
nickchan🎉
#asahi-dev · 2026-07-06 07:40
StanfordAppliedCyber[m]GG, it works
#asahi-dev · 2026-07-06 07:40
StanfordAppliedCyber[m]https://pastebin.com/5P70xEqM
#asahi-dev · 2026-07-06 07:40
chadmedcould it be the mclk multiplier? could it be TX/RX direction clock config setting? who knows :P
#asahi-dev · 2026-07-06 07:39
chadmedcase in point, how the driver manipulates the MCA per-cluster SYNCGEN_MCLK_SEL register makes little sense. The driver set it to 0b111 when the cluster is a clock consumer, but simply setting BIT(1) also works for that case. Setting BIT(1) also works when it is a clock provider, and also setting BIT(0)
#asahi-dev · 2026-07-06 07:32
nickchanand not have that 4 MiB worth of pagetable blob
#asahi-dev · 2026-07-06 07:32
nickchan...I would actually have to do 4k paging properly
#asahi-dev · 2026-07-06 07:32
nickchannow if i ever had to turn on EL3 mmu that's even more fun in the pagetables because m1n1's 4K paging works by allocating like 4 MiB worth of static pagetables
#asahi-dev · 2026-07-06 07:31
chadmedactually i can check this right now
#asahi-dev · 2026-07-06 07:30
nickchanchadmed: m1n1 is already installed in EL3 on A7-A9, it just does not do anything at all now
#asahi-dev · 2026-07-06 07:29
chadmedpovik did most of this stuff though and the documentation appears largely lost to time which makes things difficult
#asahi-dev · 2026-07-06 07:28
chadmedim not sure if it matters which MCA cluster is used for which set of codecs. as i understand the MCA driver, the cluster index is referential to the CPU side of the DAI and can take in any group of CODECs. the macaudio driver just ensures for the speaker DAI that there are an even number of CODECs per CPU
#asahi-dev · 2026-07-06 07:23
jannauchadmed: did you see https://github.com/AsahiLinux/m1n1/pull/612 ? I managed to confuse myself with the audio nodes / routing. I haven't looked in detail yet what mca / macaudio do so maybe that will clear up my confusion

plus ›