#asahi-re · 2021-01-25 19:03
davidrysk[m]but I doubt upstream would take an Apple-specific implementation like that#asahi-re · 2021-01-25 19:03
davidrysk[m]Apple's PAC implementation has separate keys for kernel and user mode and is quite a bit more robust#asahi-re · 2021-01-25 19:00
j`eyah right#asahi-re · 2021-01-25 19:00
davidrysk[m]j`ey: SYS_ -- apple calls them ARM64_REG_blah#asahi-re · 2021-01-25 19:00
davidrysk[m]which means the newer CPUs don't have HAS_MIGSTS#asahi-re · 2021-01-25 18:59
j`eymarcan: hm, did you make up the name SYS_APCTL_EL1 then?#asahi-re · 2021-01-25 18:59
marcanyes#asahi-re · 2021-01-25 18:59
davidrysk[m]they... reassigned it as a register used for PAC#asahi-re · 2021-01-25 18:59
marcancorellium messed that up in their chickenbits dump and documented it as MIGSTS or whatever#asahi-re · 2021-01-25 18:59
davidrysk[m]hah#asahi-re · 2021-01-25 18:59
marcansame encoding#asahi-re · 2021-01-25 18:58
marcanit became that#asahi-re · 2021-01-25 18:58
marcan#define SYS_APCTL_EL1 sys_reg(3, 4, 15, 0, 4)#asahi-re · 2021-01-25 18:58
marcanthat register does not even exist any more#asahi-re · 2021-01-25 18:58
davidrysk[m]though it appears that Apple only uses the MIGSTS register when dumping error state#asahi-re · 2021-01-25 18:58
davidrysk[m]I'm referring to MIGSTS and related registers#asahi-re · 2021-01-25 18:58
marcanon stream I said we didn't need any of that migration stuff on this chip#asahi-re · 2021-01-25 18:51
j`eywas that referenecing something marcan said?#asahi-re · 2021-01-25 18:51
j`eyright, but I was confused by your initial "are you sure that migration is unused on the m1?"#asahi-re · 2021-01-25 18:51
davidrysk[m]and vice versa#asahi-re · 2021-01-25 18:51
davidrysk[m]p-core to e-core#asahi-re · 2021-01-25 18:51
j`eydavidrysk[m]: what migration were you referencing?#asahi-re · 2021-01-25 18:44
davidrysk[m]heh they're only using that to dump error state anyway#asahi-re · 2021-01-25 18:43
davidrysk[m]so there's no need to mess around with ARM64_REG_MIGSTS_EL1?#asahi-re · 2021-01-25 18:42
marcanfor M1 type stuff with both clusters on at once#asahi-re · 2021-01-25 18:42
marcanlinux can just randomly decide to schedule a process on a different core at any time#asahi-re · 2021-01-25 18:41
marcanthe migration stuff is necessary for the socs with mutually-exclusive cores#asahi-re · 2021-01-25 18:41
marcanthere is no need for hardware assistance#asahi-re · 2021-01-25 18:41
marcanthe scheduler can just do it#asahi-re · 2021-01-25 18:41
marcandavidrysk[m]: but the cores run in parallel#asahi-re · 2021-01-25 18:38
davidrysk[m]yeah there's https://www.kernel.org/doc/html/latest/scheduler/sched-energy.html#asahi-re · 2021-01-25 18:36
davidrysk[m](does linux support migration for regular ARM BIG.little and if so how?)#asahi-re · 2021-01-25 18:36
davidrysk[m]I'd expect it to be useful if the scheduler decides that a process does not need to be on a p-core anymore#asahi-re · 2021-01-25 18:36
davidrysk[m]marcan: are you sure that migration is unused on the m1?#asahi-re · 2021-01-25 18:32
bastilianThe keyboard clickity-clack from the streams is my ASMR#asahi-re · 2021-01-23 15:30
marcanhthh_: alyssa says your approach sounds good, just one thing (PM)#asahi-re · 2021-01-23 05:27
hthh_sounds good, yeah - i won't be contributing code, and that's exactly what i've been doing for long-form names (mnemonics are also completely made up)#asahi-re · 2021-01-23 05:21
marcanI've asked Alyssa what she thinks about this approach#asahi-re · 2021-01-23 05:21
marcan(code, I mean)#asahi-re · 2021-01-23 05:21
marcanthis does mean that you should stay on that side of the clean room, so no contributing to Mesa please :)#asahi-re · 2021-01-23 05:20
marcanfor long-form register names, I would encourage you to make up your own interpretation about what they do and use that name#asahi-re · 2021-01-23 05:19
marcanthings like uX / srX are not a problem#asahi-re · 2021-01-23 05:19
marcanregister names are OK#asahi-re · 2021-01-23 05:15
hthh_sure, yeah, clean-room docs is my goal - i currently document what the compiler outputs in a few places, which isn't "just the instructions" but is what alyssa is looking at too - but yeah, i intend to clean it up a bit in that respect. (i'm also considering register names to be "facts" - lots of grey areas)#asahi-re · 2021-01-23 05:03
marcanalyssa has been doing this completely black-box up to this point, without any internal APIs; we ban outright decompilation of the GPU stack because it's just not needed; using internal APIs to get more information about the ISA is more of a grey area, but if it goes through clean-room docs that should be fine. let's keep it that way.#asahi-re · 2021-01-23 05:01
marcanbut if LLVMisms from Apple's implementation leak into the docs, that can taint them#asahi-re · 2021-01-23 05:00
marcanas long as you write clean docs that we can use to write a clean-room implementation, this is valuable work#asahi-re · 2021-01-23 05:00
marcanhthh_: make sure the documentation strictly documents the instructions, and not anything about what llvm does#asahi-re · 2021-01-23 04:48
hthh_(the hope is the operands stay pretty consistent and i can just write hardware tests to automate verification of my assumptions)#asahi-re · 2021-01-23 04:44
hthh_oh so many - unfortunately llvm considers each combination of opcode and output sizes to be a distinct instruction, so the reversing process is still very manual, either getting the compiler to generate opcodes from known code, or constructing it myself to run on the gpu and check its behavior