#
✕ nick:mischa85
#asahi-dev · 2025-04-05 19:58
mischa85https://github.com/mischa85/m1n1/blob/test/proxyclient/m1n1/sventest.py
#asahi-dev · 2025-04-05 19:58
mischa85sven: i wrote this, i hope i understood you correctly
#asahi-dev · 2025-04-05 17:15
mischa85i can just use CNTVCT_EL0
#asahi-dev · 2025-04-05 17:15
mischa85oh wait
#asahi-dev · 2025-04-04 17:08
mischa85nickchan: you mentioned trying disabling cpu power domains to gain write access to cyc_ovrd. how to? considering there's no ps-regs and the power registers are still unknown
#asahi-dev · 2025-04-04 17:06
mischa85well if there's a will there's a way
#asahi-dev · 2025-03-31 20:27
mischa85another suggestion found in irc logs are pointing towards the page tables not being set up properly. common issue is the very first instruction failing. it mentions a translation fault which points to page tables setup, but i don't think that's the case here as mmu is deactivated
#asahi-dev · 2025-03-31 18:27
mischa85and msr(CYC_OVRD_EL1,1) gives a sync exception, so the register is indeed unwritable
#asahi-dev · 2025-03-31 18:04
mischa85i can read the registers tho: mrs(CYC_OVRD_EL1) = 0x0, mrs(ACC_OVRD_EL1) = 0x1800109000040212, mrs(ACC_EBLK_OVRD_EL1) = 0x8800
#asahi-dev · 2025-03-31 18:03
mischa85sven: not having any access yet to m1/m2, but while making a clean branch this one turned out to be suspicious. git blaming the m1n1 tree found that original commit mentioning FIQ
#asahi-dev · 2025-03-31 17:58
mischa85so the question probably boils down to: how to access the OVRD register?
#asahi-dev · 2025-03-31 17:41
mischa85which doesn't seem to be possible on M4 Donan: https://github.com/yu-re-ka/m1n1/commit/c0a59fa10b311cfb29029ee3c84b917172a54872
#asahi-dev · 2025-03-31 17:32
mischa85i have a strong hunch the absence of this call, which crashes t6041, has something to do with my hv troubles: https://github.com/AsahiLinux/m1n1/commit/5a4e30a98d2ac9a998df49e4c5aa513a222b6509
#asahi-dev · 2025-03-30 20:16
mischa85i will test this on m1 somewhere this week
#asahi-dev · 2025-03-30 20:16
mischa85here is a clean commit of the minimal changes i made to m1n1 for t6041: https://github.com/mischa85/m1n1/commit/a2f3b4a2473a19db577b5c38c7e99bbf3a213823
#asahi-dev · 2025-03-30 17:55
mischa85yes good one, i'll give it a go. first i'll redo the necessary changes on upstream m1n1
#asahi-dev · 2025-03-30 17:51
mischa85i even disabled fb and display
#asahi-dev · 2025-03-30 17:51
mischa85i'll try baking a new one from the git. it's such a minimal setup right now anyway
#asahi-dev · 2025-03-30 17:49
mischa85hmmm. not at hand but i have one i can borrow for that
#asahi-dev · 2025-03-30 17:36
mischa85regs[4] contain the address being jumped to everytime. it almost seems like it fails at the very first instruction
#asahi-dev · 2025-03-30 17:29
mischa85also: PMU(u).reset_panic_counter() doesn't work: https://gist.github.com/mischa85/9ea6d1a3354508b875e6a272cbe04b11
#asahi-dev · 2025-03-30 16:45
mischa85i feel so close to booting but i feel stuck
#asahi-dev · 2025-03-30 16:45
mischa85anybody has any clue what direction i should be looking? sprr/gxf? pmgr? vmkeylo/hi?
#asahi-dev · 2025-03-30 11:49
mischa85almost right after hv_start it throws Exception: FIQ
#asahi-dev · 2025-03-30 11:47
mischa85https://gist.github.com/mischa85/bbb642c040602eca9db43637e5eb599f
#asahi-dev · 2025-03-30 11:46
mischa85trying to run m1n1.macho as guest crashes in the same way
#asahi-dev · 2025-03-30 10:34
mischa85not yet, i'll try
#asahi-dev · 2025-03-30 10:30
mischa85i'll just try to the 110mbyte development kernel. 115200 ouch
#asahi-dev · 2025-03-30 09:37
mischa85chaoss_princess mentioned amx probably not being part of m4 anymore due to sme, so that's one reg accounted for
#asahi-dev · 2025-03-30 09:22
mischa85sven: they all return 0x0 tho
#asahi-dev · 2025-03-30 09:18
mischa85to be totally clear, they are okay to read, but writing fails
#asahi-dev · 2025-03-30 09:17
mischa85jannau: yes, it seems like they are
#asahi-dev · 2025-03-30 08:41
mischa85trying to see if i can make sense of why some register writes don't work and if it gives any clues why the hv fails. this happens on msr(VMKEYLO_EL2, 0x4E7672476F6E6147): https://gist.github.com/mischa85/21ba3a4cba6cb1fd4c3de44ea4e0dd55
#asahi-dev · 2025-03-29 22:21
mischa85is any of the msr() calls i took out absolutely vital? they all crash tho
#asahi-dev · 2025-03-29 21:58
mischa85but that function is extremely verbose anyway? not much printf to add there...
#asahi-dev · 2025-03-29 21:52
mischa85it doesn't log anything from either
#asahi-dev · 2025-03-29 21:26
mischa85doesn't hurt to do both i guess
#asahi-dev · 2025-03-29 21:26
mischa85proooobably hv_exc_fiq()
#asahi-dev · 2025-03-29 21:15
mischa85hv_update_fiq() that is?
#asahi-dev · 2025-03-29 21:09
mischa85xnu
#asahi-dev · 2025-03-29 21:06
mischa85ok i took out SYS_IMP_APL_AMX_CTL_EL2, SYS_IMP_APL_APVMKEYLO_EL2, SYS_IMP_APL_APVMKEYHI_EL2, SYS_IMP_APL_APSTS_EL12, SYS_IMP_APL_SPRR_CONFIG_EL1 and SYS_IMP_APL_GXF_CONFIG_EL1 from hv_start(). execution reaches hv_enter_guest but crashes like this: https://gist.github.com/mischa85/864fe86f35034a6bb7f1fe64965cbc62
#asahi-dev · 2025-03-29 20:28
mischa85on it
#asahi-dev · 2025-03-29 20:22
mischa85still sync error: https://gist.github.com/mischa85/ad2fc8d180fab0cd1244ea24b6083d13
#asahi-dev · 2025-03-29 20:22
mischa85alright a lot of the msr() calls now work, obviously. the only things commented out now are AMX_CONFIG_EL1, VMKEYLO_EL2, VMKEYHI_EL2, APSTS_EL12, SPRR_CONFIG_EL1 and GXF_CONFIG_EL1
#asahi-dev · 2025-03-29 19:21
mischa85which means i can now succesfully read the HCR_EL2 register
#asahi-dev · 2025-03-29 19:21
mischa85which means this did not get set: region = 0
#asahi-dev · 2025-03-29 19:20
mischa85guess what i had set: self.mmu_off = False
#asahi-dev · 2025-03-29 19:19
mischa85and i feel stupid
#asahi-dev · 2025-03-29 19:19
mischa85i found it
#asahi-dev · 2025-03-29 19:19
mischa85oh boy

plus ›