ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
zumi_ has joined #asahi-dev
zumi has quit [Remote host closed the connection]
zumi_ is now known as zumi
nela has quit [Quit: Ping timeout (120 seconds)]
nela has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
john-cabaj has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
rrendec has quit [Ping timeout: 480 seconds]
john-cabaj has quit [Ping timeout: 480 seconds]
<chadmed>
ive pushed and released speakersafetyd 1.1.0 which runs as the speakersafetyd user by default
<nicolas17>
was it root before?
<chadmed>
yeah
<nicolas17>
ah I see, only privileges it needs are granted by the "audio" group?
<fl0_id>
I was experimenting with the bluetooth packet logger on macos for testing resume etc - is there a secret to use that app or is it know that only some combinations of software/hardware firmware work? It just doesn't give any output. kinda like this https://developer.apple.com/forums/thread/761623
<nicolas17>
fl0_id: I tried it once and it logged stuff, but it seemed like the bluetooth stack used vendor-defined commands for basic operations (like sending LE advertisements) which the GUI didn't know how to decode
<nicolas17>
that's in xcode additional tools package, right?
<fl0_id>
nicolas17 well that's a next step. but it would be weird if it doesn't decode anything.
<fl0_id>
yes
nyx_o has quit [Read error: Connection reset by peer]
<fl0_id>
mmh I thought I maybe had an old version, but it seems the packet logger binary stayed the same, still a 2022 version number
chadmed_ has quit [Remote host closed the connection]
nyx_o has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
ciara has quit [Remote host closed the connection]
ciara has joined #asahi-dev
pb17 has joined #asahi-dev
psykose has quit [Remote host closed the connection]
<fl0_id>
chaos_princess thx. I found that, but then wasn't sure of that was only for sending to apple and it required rebooting and it was late...
<fl0_id>
jannau no I hadn't thanks. I was just going based on wiki info
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
rrendec has joined #asahi-dev
wtfcxt has quit [Ping timeout: 480 seconds]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
mattia013 has joined #asahi-dev
mischa85 has joined #asahi-dev
chrisl has joined #asahi-dev
<mischa85>
aight i'm back on t6041 duties again. this time taking a closer look at what happens regarding the HCR_EL2 register. it crashes on the first call: hcr = HCR(self.u.mrs(HCR_EL2))
___nick___ has joined #asahi-dev
<j`ey>
that's pretty weird, just reading a register
chrisl has quit [Ping timeout: 480 seconds]
pb17 has quit [Ping timeout: 480 seconds]
<mischa85>
searching HCR_EL2 on the IRC history of this channel results in someone mentioning it being a per-core setting rather than system-wide
<mischa85>
so my theory, perhaps this register is tied to a disabled core and it's trying to read it?
<j`ey>
mrs reads the current cores register
<mischa85>
what sets the current core? i want m1n1 to strictly use cpu4
<j`ey>
well current core as in the core that executes that instruction
<mischa85>
hmmm, should be fine then
<mischa85>
this is odd
<mischa85>
no wonder i had to comment out all the register stuff to at least not make it crash
<mischa85>
at least not crash before it transfers the kernel
<fl0_id>
(though not directly relevant, except for how packet logger works)
chrisl has joined #asahi-dev
___nick___ has quit []
elvishjerricco has quit [Remote host closed the connection]
chrisl has quit [Ping timeout: 480 seconds]
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
<mischa85>
ok i want to test some things, but i have some noobish questions. i'm trying read32(MIDR_EL1) which of course doesn't work because it expects an integer. but i cannot for the life of me figure out what that integer should be
<mischa85>
MIDR_EL1 also doesn't seem to be defined anywhere in the sourcecode?
<mischa85>
i expect it to be defined as an address of some sorts
<mischa85>
i'm missing something obvious here
<chaos_princess>
That does not make sense, read32 is a memory read, and MIDR_EL1 id a system register
<chaos_princess>
like, it is closer to x15 or eax than a memory address
<mischa85>
ok, thank you. i'll see if i can find something like that in the m1n1 shell
elvishjerricco has joined #asahi-dev
<mischa85>
ok derp got it
<mischa85>
mrs() is available in the shell
<mischa85>
and it somehow gives me that same instruction abort when i try to do mrs(MIDR_EL1)
<mischa85>
which is odd because that register read succeeds when being done from chickens.c
<mischa85>
which means something between chickens.c and uartproxy is messing things up
<j`ey>
mischa85: in chickens.c it's reading it directly/compiled, with mrs() in the shell, im pretty sure it tries to allocate some memory, and then copy the instruction there
<mischa85>
j`ey: thanks. does that mean when mrs() gets called from the hypervisor python script it tries to do the same?
<j`ey>
yeah from python it has to copy the instruction to memory somewhere to execute
<j`ey>
if it's in the C it's just in the memory loaded when m1n1 starts
<mischa85>
i think we're onto something
<mischa85>
so that memory allocation fails
<chaos_princess>
If memory allocation failed i think you'd have no python at all
<chaos_princess>
it looks more like it fails to make it executable
<mischa85>
guess what i had set: self.mmu_off = False
<mischa85>
which means this did not get set: region = 0
<mischa85>
which means i can now succesfully read the HCR_EL2 register
<j`ey>
nice
pb17 has quit [Ping timeout: 480 seconds]
WindowPain5 has joined #asahi-dev
WindowPain has quit [Ping timeout: 480 seconds]
WindowPain5 is now known as WindowPain
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
pb17 has joined #asahi-dev
<mischa85>
alright 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
<chaos_princess>
"Exception taken from EL2h" - i dont think so?
<j`ey>
it could be a exception from the hv
<j`ey>
so xnu started, but then somethign went wrong in the hv
jnn is now known as jn
<chaos_princess>
i guess we will find out once the printf results return :P
___nick___ has quit [Remote host closed the connection]
<mischa85>
ok 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
<j`ey>
are you running xnu or linux btw?
<mischa85>
xnu
<chaos_princess>
time to spam printfs into the fiq handler :P
<mischa85>
hv_update_fiq() that is?
<mischa85>
proooobably hv_exc_fiq()
<mischa85>
doesn't hurt to do both i guess
ddxtanx has quit [Remote host closed the connection]