#
…

2026-02-11

00:01Guest2266 has quit [Remote host closed the connection]
00:02Sai_ has joined #asahi-dev
00:03Sai_ has quit [Remote host closed the connection]
00:08hdbngr has quit [Ping timeout: 480 seconds]
00:11fl0_id__ has joined #asahi-dev
00:16hdbngr has joined #asahi-dev
00:18Sai_ has joined #asahi-dev
00:21Sai_ has quit [Remote host closed the connection]
00:24hdbngr has quit [Ping timeout: 480 seconds]
00:32hdbngr has joined #asahi-dev
00:34Sai_ has joined #asahi-dev
00:35KongrooParadox has joined #asahi-dev
00:35Sai_ has quit [Remote host closed the connection]
00:38[KongrooParadox] has quit [Ping timeout: 480 seconds]
00:40lukeleppan has quit [Quit: Ping timeout (120 seconds)]
00:41hdbngr has quit [Ping timeout: 480 seconds]
00:42lukeleppan has joined #asahi-dev
00:43lukeleppan has quit []
00:46jvoisin has quit [Remote host closed the connection]
00:47jvoisin has joined #asahi-dev
00:49hdbngr has joined #asahi-dev
00:52lukeleppan has joined #asahi-dev
00:52mixi has quit [Ping timeout: 480 seconds]
00:53Sai_ has joined #asahi-dev
00:55Sai_ has quit [Remote host closed the connection]
00:58hdbngr has quit [Ping timeout: 480 seconds]
01:00hdbngr has joined #asahi-dev
01:01mixi has joined #asahi-dev
01:03Rock has joined #asahi-dev
01:04Rock is now known as Guest2271
01:04Guest2271 has quit [Remote host closed the connection]
01:08hdbngr has quit [Ping timeout: 480 seconds]
01:10fl0_id__ has quit [Ping timeout: 480 seconds]
01:11Sai_ has joined #asahi-dev
01:17hdbngr has joined #asahi-dev
01:27pb17 has quit [Ping timeout: 480 seconds]
01:28hdbngr has quit [Ping timeout: 480 seconds]
01:30nicolas17 has joined #asahi-dev
01:37hdbngr has joined #asahi-dev
01:41jvoisin has quit [Ping timeout: 480 seconds]
01:41Sai_ has quit [Remote host closed the connection]
01:41pb17 has joined #asahi-dev
01:45Sai_ has joined #asahi-dev
01:46hdbngr has quit [Ping timeout: 480 seconds]
01:55hdbngr has joined #asahi-dev
02:04hdbngr has quit [Ping timeout: 480 seconds]
02:12hdbngr has joined #asahi-dev
02:21hdbngr has quit [Ping timeout: 480 seconds]
02:27beastd|2 has joined #asahi-dev
02:28hdbngr has joined #asahi-dev
02:31beastd has quit [Ping timeout: 480 seconds]
02:37hdbngr has quit [Ping timeout: 480 seconds]
02:41Shiz sven : chaos_princess: well, the biggest difference is that we can't virtualize it easily on m4 anymore but i'm pretty sure we can on m2/m3 if we really cared
02:41Shizwhy is that?
02:44hdbngr has joined #asahi-dev
02:46nicolas17I think on M4 macOS expects SPTM to handle pagetables, but if you boot a "foreign OS" like m1n1, the proprietary instructions to initialize guarded exception levels and make SPTM run on it, are all disabled
02:47Shizwell yeah, if you boot a raw object it dumps you into EL2 with all that stuff disabled, while mach-O boot goes through SPTM
02:47Sai_ has quit [Remote host closed the connection]
02:47Shizbut that's the case for both m2/m3 and m4, as far as I can see?
02:47Rock has joined #asahi-dev
02:48ShizI'm reading virtualizing 'it' as SPTM here, so I'm wondering why it would be different on m4
02:48Rock is now known as Guest2283
02:51nicolas17according to sven's talk at 39c3, the CPU extensions are available on M2/M3 when booting a foreign OS, they are not on M4
02:53nicolas17sven: btw are your slides available? you skipped a few things due to time constraints
02:53nicolas17AH just found it on mastodon
02:53hdbngr has quit [Ping timeout: 480 seconds]
02:54nicolas17"Either: emulate GL2 on a "regular" ARM CPU: Trap genter/gexit and create shadow copies of pagetables, or: Try to inject hardware driver kexts into vmapple XNU that can run without guarded levels"
02:57Shizyea, emulating GL2 would be my thought
02:57Shizgenter/gexit should be trappable as undefined instructions
02:58Shizthat's what i understood as 'virtualizing' sptm :p
02:58oliver_ has joined #asahi-dev
02:59nicolas17ah now I see the context of the conversation :p
03:00oliver has quit [Ping timeout: 480 seconds]
03:01nicolas17to emulate GL2 first you need to understand how it works and how the software uses it, and for that the best way is what y'all have been doing for other hardware: pass-through virtualization that logs accesses but then forwards it to the real hardware
03:01nicolas17and *that* needs M2/M3
03:01hdbngr has joined #asahi-dev
03:01skipwich has quit [Remote host closed the connection]
03:02skipwich has joined #asahi-dev
03:03nicolas17then you can start emulating the behavior instead of letting the actual CPU handle it
03:03nicolas17then you can move that to an M4
03:04nicolas17at least that's how I'd do it...
03:06nicolas17Shiz: so yeah I think what sven meant with "we can't virtualize it on m4" is "we can't run macOS in m1n1 and trace the way it accesses GXF, because there is no GXF available when we do that"
03:08nickchana lot of other registers are also disabled
03:08nickchanthis includes things like Apple Generic Timer, but
03:09nickchanmost worringly, SYS_IMP_APL_VM_TMR_FIQ_ENA_EL2 is on the disabled list
03:09nickchanno hyoervisor will work right without that
03:10nickchanand this is a dealbreaker even for just running linux
03:10nicolas17in magical land where we have hardware documentation or whatever and we can magically port linux to m4... we can't run VMs because registers required for hypervisor are disabled in raw boot mode??
03:11nickchannicolas17: think so and it is especially a dealbreaker because there's no sane way to reproduce muvm
03:12jvoisin has joined #asahi-dev
03:12nickchanMacOs won't have the graphics drivers
03:12hdbngr has quit [Ping timeout: 480 seconds]
03:13nicolas17...do we need to lobby Apple?
03:13nickchaneither that or rat race
03:13nickchanBut rat race is not happening given absolutely nothing has happened to ios 17.0's sptm
03:14nicolas17if you mean exploits I find that unlikely :P
03:15nickchannicolas17: but it's unlikely lobbying would do a thing given the kind of stuff qualcomm can get away with
03:15nickchanregarding EL2
03:16nickchanon "laptops"
03:17nicolas17IIRC macOS 11 shipped with only Mach-O boot objects
03:18nicolas17they added raw boot objects later, to our benefit
03:19nicolas17so if we tell them "fine keep your GL2 secrets but we really need the hypervisor system register" *maybe* they will listen?
03:19nickchanas garbage as this is this is still better than qhat qualcomm is doing
03:19hdbngr has joined #asahi-dev
03:20nickchanthe way it's implemented is mrs still works but msr will undef
03:20tobhe_ has joined #asahi-dev
03:21nicolas17I don't consider qualcomm to be a high bar :p https://wetdry.world/@ipg/114999351341131151
03:23nickchanit's always possible to have m1n1 running under sptm and put linux in EL1 and use NV to say it's EL2 but way way too cursed
03:23nickchanbut this is way too cursed and complex given that all the custom registers need to be save/restored too
03:24nicolas17write a driver to make Linux delegate its pagetable management to Apple's SPTM code, how hard could it be
03:24nickchannicolas17: that will never work
03:24nickchanbecause no RWX
03:24nickchanthis is why I said EL1
03:25nickchanit would need some sort of virtual smmu though
03:25nickchanyes this is cursed but honestly that's just qualcomm level of cursedness from perspective of linux
03:25nickchan(they emulated smmu)
03:26nicolas17then there's M5 where I think every OS is using exclaves (:
03:27tobhe has quit [Ping timeout: 480 seconds]
03:27jvoisin has quit [Read error: Connection reset by peer]
03:28nickchan(context: obviously EL1/vEL2 linux VM worked under macOS somehow)
03:28hdbngr has quit [Ping timeout: 480 seconds]
03:29nickchannot a high bar but just show how much it is possible to get away with
03:31pb17 has quit [Ping timeout: 480 seconds]
03:33nickchanand that's not ideal because nv performance is bad
03:33pb17 has joined #asahi-dev
03:33nickchanand if users stack another layer of NV on that it would be even worse
03:35nicolas17...what's "NV"?
03:35nickchannicolas17: nested virtualization
03:35hdbngr has joined #asahi-dev
03:36nickchanfor starter on how complex that would be, s3_4_c15_c10_7 is a register similar to the ARM VNCR_EL2 but for all the custom registers :-)
03:37beastd|2 has quit [Ping timeout: 480 seconds]
03:40beastd|2 has joined #asahi-dev
03:44hdbngr has quit [Ping timeout: 480 seconds]
03:45hexdump02 has joined #asahi-dev
03:47hexdump0815 has quit [Ping timeout: 480 seconds]
03:48nickchanin qualcomm case essentially exploits happened and people get el2
03:51hdbngr has joined #asahi-dev
03:52nicolas17nickchan: fun fact, a few years ago never_released wanted to play around with nested virtualization and only had M1, so I gave him an ssh account on my M2 Mac; a month later I rebooted and saw him in the macOS login screen and freaked out for a second until I remembered >.>
03:59hdbngr has quit [Ping timeout: 480 seconds]
04:06hdbngr has joined #asahi-dev
04:15hdbngr has quit [Ping timeout: 480 seconds]
04:19Guest2283 has quit [Remote host closed the connection]
04:22hdbngr has joined #asahi-dev
04:28skipwich has quit [Ping timeout: 480 seconds]
04:31hdbngr has quit [Ping timeout: 480 seconds]
04:31e9 has quit [Remote host closed the connection]
04:31nora has joined #asahi-dev
04:33nora_ has quit [Ping timeout: 480 seconds]
04:38hdbngr has joined #asahi-dev
04:38Rock has joined #asahi-dev
04:39Rock is now known as Guest2292
04:39Guest2292 has quit [Remote host closed the connection]
04:47hdbngr has quit [Ping timeout: 480 seconds]
04:50Sai_ has joined #asahi-dev
04:53Sai_ has quit [Remote host closed the connection]
04:54hdbngr has joined #asahi-dev
04:57michaelros has quit [Quit: The Lounge - https://thelounge.chat]
04:57JamesCalligeros[m]i do have a feeling that some of the stuff that's ended up disabled in raw boot object mode is probably not intentional
04:58michaelros has joined #asahi-dev
05:03hdbngr has quit [Ping timeout: 480 seconds]
05:08Sai_ has joined #asahi-dev
05:10hdbngr has joined #asahi-dev
05:10Sai_ has quit [Remote host closed the connection]
05:18emptynine has joined #asahi-dev
05:25Sai_ has joined #asahi-dev
05:26hdbngr has quit [Ping timeout: 480 seconds]
05:26Sai_ has quit [Remote host closed the connection]
05:29emptynine has quit [Quit: WeeChat 4.7.1]
05:35hdbngr has joined #asahi-dev
05:38ansg191 has quit [Remote host closed the connection]
05:41Rock has joined #asahi-dev
05:41Rock has quit [Remote host closed the connection]
05:44hdbngr has quit [Ping timeout: 480 seconds]
05:52hdbngr has joined #asahi-dev
05:57Rock has joined #asahi-dev
05:58Rock is now known as Guest2296
06:00Sai_ has joined #asahi-dev
06:00Guest2296 has quit [Remote host closed the connection]
06:01hdbngr has quit [Remote host closed the connection]
06:02Sai_ has quit [Remote host closed the connection]
06:02hdbngr has joined #asahi-dev
06:02Sai_ has joined #asahi-dev
06:06svenI’ve filed a feedback assistance thingy about that msr last week, so let’s see what happens
06:12hdbngr has quit [Ping timeout: 480 seconds]
06:41luma has quit [Ping timeout: 480 seconds]
06:48nigel has joined #asahi-dev
06:50knorkle has quit [Remote host closed the connection]
06:50luma has joined #asahi-dev
07:07jvoisin has joined #asahi-dev
07:11nigel has quit [Remote host closed the connection]
07:23nicolasmaia has joined #asahi-dev
07:49emptynine has joined #asahi-dev
08:11gargantua has quit [Ping timeout: 480 seconds]
08:17gargantua has joined #asahi-dev
08:20nicolasmaia has quit [Quit: nicolasmaia]
08:20nicolasmaia has joined #asahi-dev
08:27nicolasmaia has quit [Quit: nicolasmaia]
09:06freetolga has joined #asahi-dev
09:33rany has quit [Remote host closed the connection]
09:35rany has joined #asahi-dev
09:39rany has quit [Remote host closed the connection]
09:39rany has joined #asahi-dev
10:03murdakah has joined #asahi-dev
10:04murdakah has quit [Read error: Connection reset by peer]
10:04murdakah has joined #asahi-dev
10:04murdakah has quit [Read error: Connection reset by peer]
10:05[KongrooParadox] has joined #asahi-dev
10:05murdakah has joined #asahi-dev
10:06murdakah has quit [Remote host closed the connection]
10:07KongrooParadox has quit [Ping timeout: 480 seconds]
10:14Sai_ has quit [Remote host closed the connection]
10:28Rock has joined #asahi-dev
10:29Rock is now known as Guest2319
10:29Guest2319 has quit [Remote host closed the connection]
10:31integralpilot has joined #asahi-dev
10:32integralpilotthey never replied to the one i made when the latest macOS was missing a KDK
10:33integralpilot(meaning, on it, you couldn't build ANY kernel collections, even of older OSes, their tooling just wouldn't allow it without a KDK matching the currently running build number)
10:33integralpiloti'm not really sure if it's good for low-level stuff but let's hope
10:36svenlet’s just say I’ve been more successful in e.g. getting that raw object bootloader on m4 fixed with a feedback assistant report ;)
10:36sven*bootloop
10:37svenno promises, but they want to support Linux while the kdk releases have been a mess for a long time
10:37integralpilotoh that's good :D
10:38kitlith_ has joined #asahi-dev
10:41kitlith has quit [Ping timeout: 480 seconds]
10:43kitlith_ is now known as kitlith
10:44Sai_ has joined #asahi-dev
10:46nicolasmaia has joined #asahi-dev
10:46Sai_ has quit [Remote host closed the connection]
10:46integralpilot has quit [Quit: integralpilot]
10:52nicolasmaia has quit [Quit: nicolasmaia]
10:58murdakah has joined #asahi-dev
11:00murdakahHowdy! I've just watched Sven's talk at 39C3 and I'm really interested to know what changed between M3 and M4 regarding EL2 and GL2, and whether GL2 was always there or that the ISA extensions have merely been disabled in the new chips?
11:01Sai_ has joined #asahi-dev
11:01NickChan[m]murdakah: GL2 is still there on M4 just disabled in raw boot object mode
11:02Sai_ has quit [Remote host closed the connection]
11:03NickChan[m]GXF is introduced in A13 with GL0 and GL1 (register encoding work slightly different there); and underwent a significant revision in A14/M1 adding GL2 since the CPU now has EL2 support
11:03murdakahThanks Nick. So how does that not limit us more? Because GL2 sounds more restrictive than EL2?
11:04murdakahGXF meaning guarded exception levels right?
11:04NickChan[m]on m1 m2 m3 m1n1 starts executing in EL2 with GL2 turned off
11:05NickChan[m]well with gxf turned off
11:05lukeleppan has quit [Ping timeout: 480 seconds]
11:05NickChan[m]since it's turned off it is entirely up to m1n1 to enable gxf and start executing code in GL2, and enabling GXF adds restrictions to the normal EL levels
11:05murdakahnickchan: Ah ok that makes more sensem that it sused to be EL2 and now is GL2
11:06NickChan[m]for example; HCR_EL2 can't be written to in EL2 when GL2 is enabled
11:06nicolasmaia has joined #asahi-dev
11:06KongrooParadox has joined #asahi-dev
11:06nicolasmaia has quit [Remote host closed the connection]
11:07NickChan[m]But on m4 m1n1/raw boot object starts executing in EL2 with GXF completely disabled so it is not possible to vietualize xnu in a similar way as on previous chips
11:07NickChan[m]a lot of other ISA extensions required by apple silicon xnu is also disabled
11:08murdakahGot it, and thats the restricted memory access.
11:08murdakahOk I htink thats the part I don't imderstand, how enabling GXF enables virtualisation
11:08NickChan[m](if you check the previous messages, right now *nothing* can be virtualized because of critical system register is disabled, but that might be a big)
11:09[KongrooParadox] has quit [Ping timeout: 480 seconds]
11:09NickChan[m]murdakah: it's a feature used by apple silicon xnu so it is needed to virtualize apple silicon xnu
11:09NickChan[m](talking about gxf)
11:11murdakahOh right ok that makes sense, so XNU requires GXF and thus GL2, and because of that we cant run XNU in the raw object mode in a hypervisor
11:11NickChan[m]For the apple silicon xnu that would be correct
11:11murdakahin order to monitor/dump what its doing to the rest of the hardware
11:12murdakahnichchan: (Yes only talking about applie silicon yes)
11:14[KongrooParadox] has joined #asahi-dev
11:15nicolasmaia has joined #asahi-dev
11:16KongrooParadox has quit [Ping timeout: 480 seconds]
11:17Sai_ has joined #asahi-dev
11:19lukeleppan has joined #asahi-dev
11:19Sai_ has quit [Remote host closed the connection]
11:19nicolasmaia has quit []
11:19lukeleppan has quit []
11:21KongrooParadox has joined #asahi-dev
11:24[KongrooParadox] has quit [Ping timeout: 480 seconds]
11:25nicolasmaia has joined #asahi-dev
11:26lukeleppan has joined #asahi-dev
11:29nicolasmaia has quit []
11:34Rock has joined #asahi-dev
11:35Rock is now known as Guest2324
11:35Guest2324 has quit [Remote host closed the connection]
11:40[KongrooParadox] has joined #asahi-dev
11:43KongrooParadox has quit [Ping timeout: 480 seconds]
11:43nicolasmaia has joined #asahi-dev
11:51Sai_ has joined #asahi-dev
11:55Sai_ has quit [Remote host closed the connection]
11:55nicolasmaia has quit [Quit: nicolasmaia]
12:02murdakahnickchan: thanks for the explanation, I appreciate it
12:08nicolasmaia has joined #asahi-dev
12:08Sai_ has joined #asahi-dev
12:09nicolasmaia has quit [Remote host closed the connection]
12:09Sai_ has quit [Remote host closed the connection]
12:14jskis running macos under the hypervisor on M3 just supposed to work on current m1n1?
12:16nickchanm3 needs some small modifications so no
12:16nickchan(compared to m4 ofc)
12:17nicolasmaia has joined #asahi-dev
12:18jskcould you give me a hint? I can run linux under the hypervisor so I just assumed macos would work as well
12:21pb17 has quit [Ping timeout: 480 seconds]
12:23noopwafelyou need a few m1n1 fixes and you need to binary patch a few xnu bits and you need to boot only the boot cpu (otherwise the other cores panic due to timeouts)
12:24nickchannoopwafel: wasn't it one core per cluster
12:24nicolasmaia has quit [Quit: nicolasmaia]
12:24noopwafelyou need to provide a DT with one core per cluster but you don't need to _boot_ it. you can just ignore the mmio write.
12:25nicolasmaia has joined #asahi-dev
12:26Sai_ has joined #asahi-dev
12:27nickchanalso don't use macOS 26 since those expected sptm
12:27Sai_ has quit [Remote host closed the connection]
12:28chaos_princessuse 14 specifically
12:28jskthanks :) will try
12:28noopwafelI PMed jsk with the branch.
12:29noopwafelwe worked out (I think) what the actual needed changes are recently, will make PRs once I am not sick..
12:31pb17 has joined #asahi-dev
12:32noopwafel(and yes, use 14.8.3)
12:41Mary has quit [Quit: .]
12:42Mary has joined #asahi-dev
12:43Rock has joined #asahi-dev
12:43Rock is now known as Guest2329
12:43Guest2329 has quit [Remote host closed the connection]
12:44Mary has quit []
12:45Mary has joined #asahi-dev
12:46hdbngr has joined #asahi-dev
12:47nicolasmaia has quit [Quit: nicolasmaia]
12:52nicolasmaia has joined #asahi-dev
12:53hdbngr has quit [Read error: Connection reset by peer]
12:53nicolasmaia has quit [Remote host closed the connection]
12:54KongrooParadox has joined #asahi-dev
12:54nicolasmaia has joined #asahi-dev
12:54nicolasmaia has quit [Remote host closed the connection]
12:56[KongrooParadox] has quit [Ping timeout: 480 seconds]
13:01Sai_ has joined #asahi-dev
13:02pizzaiolo1 has joined #asahi-dev
13:02Sai_ has quit [Remote host closed the connection]
13:03pizzaiolo1 has quit [Remote host closed the connection]
13:09Sai_ has joined #asahi-dev
13:12Sai_ has quit [Remote host closed the connection]
13:16zumi has joined #asahi-dev
13:17pizzaiolo1 has joined #asahi-dev
13:21CME has quit [Ping timeout: 480 seconds]
13:26Sai_ has joined #asahi-dev
13:28Sai_ has quit [Remote host closed the connection]
13:42Sai_ has joined #asahi-dev
13:45Sai_ has quit [Remote host closed the connection]
13:46CME has joined #asahi-dev
13:49pb17 has quit [Ping timeout: 480 seconds]
13:51pb17 has joined #asahi-dev
13:58pizzaiolo1 has quit [Ping timeout: 480 seconds]
13:59Rock has joined #asahi-dev
13:59Rock is now known as Guest2332
14:02Guest2332 has quit [Remote host closed the connection]
14:05fl0_idnoopwafel oh, all the best, get well soon!
14:10Sai_ has joined #asahi-dev
14:13Sai_ has quit [Remote host closed the connection]
14:13gargantua has quit [Ping timeout: 480 seconds]
14:22[KongrooParadox] has joined #asahi-dev
14:25KongrooParadox has quit [Ping timeout: 480 seconds]
14:27Sai_ has joined #asahi-dev
14:31Sai_ has quit [Remote host closed the connection]
14:36john-cabaj has joined #asahi-dev
14:36murdakah: DT, as in device tree?
14:36murdakah*noopwafel
14:43nickchandevice tree yes
14:44nickchanin this context it is talking about Apple Device Tree
14:46murdakahForgive me for all these questions as I have a lot, how are these device trees populated? Are they just "magically" emitted from the SOC when queried?
14:46Sai_ has joined #asahi-dev
14:48murdakahOnly slightly related I'm trying to understand how hardware helps with virtualisation, not finding really good resources online, only handwavy "this and then that enables this" but the "that" described is incredibly vague
14:48Sai_ has quit [Remote host closed the connection]
14:50chaos_princessyou write the linux dt mostly by hand by referencing the apple one
14:51skipwich has joined #asahi-dev
14:52nickchanthe apple one is from the macOS shipped inside IPSW which is filled by iBoot from multiple sources
14:54nickchanmainly includes "syscfg" which is some location on disk (the template values in IPSW will say "syscfg" for those); some from hardware register; and some from how exactly did the bootloader load things like coprocessor firmwares and other files into memory
14:55nickchanand the linux dt is indeed by hand except for the pmgr power domain part which is generated from ADT but still required fixup
15:03Rock has joined #asahi-dev
15:04Rock is now known as Guest2337
15:04Guest2337 has quit [Remote host closed the connection]
15:08murdakahOh ok so the device tree is generated by iBoot or is it available in the IPSW?
15:08murdakahchaos_princess: so there is no standard device tree then
15:09chaos_princessboth. Template in ipsw, some values are fixed up by iboot
15:11Sai_ has joined #asahi-dev
15:12Sai_ has quit [Remote host closed the connection]
15:17gargantua has joined #asahi-dev
15:17KongrooParadox has joined #asahi-dev
15:20[KongrooParadox] has quit [Ping timeout: 480 seconds]
15:25murdakahThese instructions https://asahilinux.org/docs/hw/cpu/apple-instructions are lited from decompiled firmware or something?
15:29Sai_ has joined #asahi-dev
15:31Sai_ has quit [Remote host closed the connection]
15:33murdakahMosta curious about how genter and gexit was found
15:33nickchani think that one come from disassembling iOS kernels
15:35nickchanto figure out how ppl worked on a13
15:35nickchanmul53 comes from attempts to emulated t8030 on qemu
15:36nickchanamx i think is people doing matrix math and wanted to see what black magic accelerate.framework is doing
15:39murdakahSo some of these are from the A13/t8030 which shres the same lineage as M
15:39nickchanonce you find wkdmd it is possible to infer wkdmc as well
15:41nickchana lot of those names are from files that are not redacted properly
15:43murdakahAre you referring tot names like wkdmd?
15:43murdakahThe instructions I mean
15:44murdakahIn theory we can either emulate or translate those instructions to get XNU running in raw boot object mode?
15:45Sai_ has joined #asahi-dev
15:46murdakahNot really sure what this means (from Sven's slides): Try to inject hardware driver kexts into vmapple XNU that can run without guarded levels
15:47nickchanmurdakah: ARM provides no mechanism to trap UNDEFINED instructions to EL2
15:47fl0_idvmapple is a special xnu kernel for virtualized macos on macos. it runs in a different mode
15:48fl0_idif you inject stuff there, I assume the idea is that you then can trace from there
15:48nickchanas for lineage; it's piles on top of piles of extensions on the Apple A7 design :-)
15:52svenEL1 code is read-only anyway so could just static patch genter/exit and other stuff to a hvc
15:52svenEL0 is a bit more tricky, but i guess we could patch EL1 exception handlers and redirect anything undef to EL2 that way as well
15:52Sai_ has quit [Remote host closed the connection]
15:53svenand the vmapple idea is to run that kernel in non-apple-entitled mode and inject hardware kexts to trace them that way
15:53svendoesn't solve the "EL0 uses apple isa extensions" problem though
15:55svenbut we have no idea if any of those approaches work or what their limitations are
16:03pb17 has quit [Ping timeout: 480 seconds]
16:07nickchanit's known that vmapple macos 12 can run with basically no isa extension
16:07nickchanof course rosetta doesn't work in this state
16:08nickchanlater versions has issues but it's due to some hvc
16:09nickchanthat isn't trapped all the way to the vmm
16:09Rock has joined #asahi-dev
16:09Rock is now known as Guest2343
16:09Guest2343 has quit [Remote host closed the connection]
16:10nickchanof course the only way is know for sure is to test but because of that fiq mask register that doesn't work
16:10chaos_princessnickchan: so, about that.
16:10chaos_princesshow exactly was "vmapple macos 12 can run with basically no isa extension" done?
16:10nickchanchaos_princess: qemu on hvf with public isa level
16:11nickchanimplies ACTLR_EL1 zeroed at that time (not true anymore for the TSO bit)
16:12nickchanmacos 12 doesn't use pv apple pac so it can run there just fine
16:12chaos_princessi am more concerned about missing uat in new vmapple kernels
16:12Sai_ has joined #asahi-dev
16:12nickchan...Userspace AT?
16:13Sai_ has quit [Remote host closed the connection]
16:13chaos_princessexcept it is not dart
16:14nickchanchaos_princess: is that not stuffed into a kext
16:15svenhas to be inside SPTM and used to be in PPL
16:15chaos_princessthat is in libT6000.os.DEVELOPMENT.a
16:15pb17 has joined #asahi-dev
16:18freetolgadoes asahi normally use raw mode?
16:20svenon m1/m2/m3 raw mode vs. apple mode doesn't really make a difference fwiw, raw mode is just more convenient
16:20svenit's m4/m5 where we lose the apple isa extensions in raw mode and can't use apple-entitled mode because we only get control after SPTM is already up and running
16:20nickchanthere's a bigger problem than gpu uat
16:21nickchannow that you talk about it i realized ans2 sart must also be handled in the same way
16:21svenmeh, at least dart and sart are simple enough
16:21chaos_princessseems that way
16:21murdakahsven: I'm struggling to tunderstand how anything readonly from a memory perspective is useful if EL1 is read-only? Unless you want to repeatedly perform the same operation\
16:21svenmurdakah: what? i don't understand that question
16:22chaos_princessmurdakah: in this case read-only means that the kernel does not change itself so we only need to patch it once
16:22freetolgathe only logical idea i have is to find some public sptm bypass for ios some kernel version and use that for reverse engineering on macos
16:22svenfreetolga: yeah, no
16:22chaos_princess"public sptm bypass"
16:22murdakahnickchan: hvc? hvf?
16:22chaos_princessi too want a million usd and a pony
16:23freetolgasven: considering i silenced much worse ideas if it existed it would work though right
16:23sven"public sptm bypass" just doesn't exist and is extremely unlikely
16:23freetolgathat part i knew before saying this
16:24svenand really, speculation here only makes sense if you have enough technical background otherwise these ideas aren't very useful
16:24nickchanit really depends on the degree of "CTRR Disable" is honored
16:24freetolgaalright im back to studying fundamentals then good luck
16:25nickchansptm bypass is unlikely but CTRR bypass is absolutely not happening
16:25svenjust to put this into context: I'd be faster and more likely to succeed in implementing GL2 virtualization *and* SPTM emulation *and* vmapple+hardware-kexts than finding a SPTM+CTRR bypass
16:27nickchanonly if SYS_IMP_APL_VM_TMR_FIQ_ENA_EL2 is available :-)
16:28svenwhy does that prevent virtualization entirely and why can't that be hacked around?
16:28sven(in m1n1, not in linux ofc)
16:28nickchanfor a hypervisor that doesn't switch guest context can get away with that
16:29Sai_ has joined #asahi-dev
16:30[KongrooParadox] has joined #asahi-dev
16:31KongrooParadox has quit [Ping timeout: 480 seconds]
16:32mattia013 has quit [Remote host closed the connection]
16:32Sai_ has quit [Remote host closed the connection]
16:33Deewiant has quit [Remote host closed the connection]
16:34mattia013 has joined #asahi-dev
16:36Deewiant has joined #asahi-dev
16:41sveneither way, i don't quite see how it would prevent virtualizing xnu and sptm both inside el1. hopefully someone at apple looks at FB21831949 though and hopefully it's possibly for them to re-configure which MSRs are read-only
16:44KongrooParadox has joined #asahi-dev
16:47[KongrooParadox] has quit [Ping timeout: 480 seconds]
16:48Sai_ has joined #asahi-dev
16:51mazsven: without this register, you can't mask the timer registers in a way that is invisible to the guest. so either you corrupt the guest state by masking the timer in the EL1 register, or you end-up with a screaming interrupt that prevents you from making forward progress.
16:51Sai_ has quit [Remote host closed the connection]
16:51mazeither way, this is shit.
17:00murdakahsven: to rephrase my earlier question, is EL1 an exception level, and EL2 sits above that. Why is it readonly, if we boot from a more privileged level? I know this is an ARM arch question, but still learning the ropes. My reasoning that if memory in EL1 is readonly, how does anything useful get done if you cannot change state?
17:02chaos_princessthe thing that was said above was a shorthand for "el1 code (not data) is treated by el1 as read-only"
17:03murdakahchaos_princess: somehow i missed your response and just read after posting again haha, thanks
17:06Sai_ has joined #asahi-dev
17:09Sai_ has quit [Remote host closed the connection]
17:10murdakahI think its pretty clear then that we don't have access EL3 at all, just wondering how apple would debug any of this, even though they have the hardware descriptors
17:11chaos_princessjtag or whatever
17:12chaos_princessyou can connect an external debugger to the chip, it is just that that feature is disabled on production ones using fuses
17:12chaos_princessand the reason we don't have access to el3 is because it does not exist at all here
17:30Rock has joined #asahi-dev
17:30Rock has quit [Remote host closed the connection]
17:35svenmaz: yes, agreed. i was asking in the context of virtualizing xnu under m1n1 where i don't mind corrupting whatever is necessary for EL1
17:39mazsven: then you should be able to hack something by setting the IMASK bit in the CNT{P,V}_CTL_EL0 registers every time you have a pending timer interrupt.
17:40mazbut you rely on the guest only checking for the STATUS bit, and not taking IMASK into account.
17:40mazwe used to do that in KVM, but that quickly led to some horrors, and we switched to the GIC active state, which is what the Apple EL2 register is replacing.
17:42svenyeah, i was thinking about something like that and in the worst case binary patching xnu to play nice. i was just confused when someone said it would prevent virtualization completely which i assume includes hacks like this
17:43sveni really hope apple can dynamically configure which msrs are read-only and will actually fix this with a firmware updaate
17:46Rock has joined #asahi-dev
17:47Rock is now known as Guest2347
17:47pb17 has quit [Ping timeout: 480 seconds]
17:47Shizmurdakah: there is no EL3 afaik :)
17:47Guest2347 has quit [Remote host closed the connection]
17:47svenyeah, there's no EL3
17:48svenapple gets access to SWD hardware debugging which they unfortunately disable for us :-(
17:52Sai_ has joined #asahi-dev
17:52Sai_ has quit [Remote host closed the connection]
18:02Koshka has joined #asahi-dev
18:02Koshka has quit []
18:08Sai_ has joined #asahi-dev
18:10pb17 has joined #asahi-dev
18:10Sai_ has quit [Remote host closed the connection]
18:18[KongrooParadox] has joined #asahi-dev
18:21KongrooParadox has quit [Ping timeout: 480 seconds]
18:24Sai_ has joined #asahi-dev
18:24Sai_ has quit [Remote host closed the connection]
18:26KongrooParadox has joined #asahi-dev
18:28[KongrooParadox] has quit [Ping timeout: 480 seconds]
18:51[KongrooParadox] has joined #asahi-dev
18:54KongrooParadox has quit [Ping timeout: 480 seconds]
18:59Rock has joined #asahi-dev
19:00Rock is now known as Guest2354
19:00Guest2354 has quit [Remote host closed the connection]
19:04freetolga has quit [Quit: Connection closed for inactivity]
19:07hdbngr has joined #asahi-dev
19:18Sai_ has joined #asahi-dev
19:20Sai_ has quit [Remote host closed the connection]
19:24murdakahsven: But its only disabled with the absence of the R0 smd components I assume?
19:24murdakah*SWD that is
19:25svencan you rephrase that?
19:25sveni don't understand that question
19:26murdakahI've frequently seen debug outputs simply be disconnected from the pits by omitting a small surface mounted device, usually a zero ohm resistor (R0)
19:26svenlol, no
19:26sventhere are some fuses deep inside the SoC that are blown
19:27murdakahAh ok so still disconnects but inside the package
19:27murdakahthat is unfortunate
19:28sventhere is also authentication these days so even if you have a device that has SWD enabled it needs to talk to apple's servers before it actually unlocks SWD afaik
19:29murdakahsven: bloody hell that is just evel, authentication on SWD, in what world
19:29svenapple is pretty damn good at securing their SoCs these days
19:31murdakahI saw a talk by a guy who got SWD working on his iPhone vir USB-C (obviously) so I wonder whats different, I don't recall it being an old iphone
19:31svenno, he didn't
19:31sventhat was misleading at best, he got a reply to the generic identify command but everything else was locked down
19:35Sai_ has joined #asahi-dev
19:35Sai_ has quit [Remote host closed the connection]
19:35murdakahWas JTAG not SWD
19:36svensame difference
19:36sveni've seen the talk, he didn't get any debug capabilities
19:36sventhe title is clickbait and misleading
19:36svenhe talked to JTAG or SWD but all that worked was the "get device id" or whatever it's called command
19:37sventhe real debug interface was ofc disabled
19:40murdakahJust scanned it again, it seems he got jtag on the USB controller not the iphone
19:52Sai_ has joined #asahi-dev
19:52Sai_ has quit [Remote host closed the connection]
20:08Rock has joined #asahi-dev
20:08Rock is now known as Guest2359
20:08Guest2359 has quit [Remote host closed the connection]
20:13hoplopf[mds] has joined #asahi-dev
20:21KongrooParadox has joined #asahi-dev
20:23[KongrooParadox] has quit [Ping timeout: 480 seconds]
20:24Sai_ has joined #asahi-dev
20:25rany has quit [Remote host closed the connection]
20:25Sai_ has quit [Remote host closed the connection]
20:26freetolga has joined #asahi-dev
20:26murdakah has quit [Quit: Page closed]
20:29rany has joined #asahi-dev
20:42Sai_ has joined #asahi-dev
20:44kaazoo has joined #asahi-dev
20:44Sai_ has quit [Remote host closed the connection]
20:50kaazoo has quit [Quit: Leaving.]
20:52pb17 has quit [Ping timeout: 480 seconds]
20:58Sai_ has joined #asahi-dev
21:01Sai_ has quit [Remote host closed the connection]
21:11nicolas17has anyone tried reversing iBoot to figure out how these registers/features get locked down in raw boot mode (or enabled in mach-o mode)?
21:13nicolas17not that it would help us bypass it, but...
21:17Rock has joined #asahi-dev
21:17Rock is now known as Guest2367
21:17Guest2367 has quit [Remote host closed the connection]
21:21pb17 has joined #asahi-dev
21:34Sai_ has joined #asahi-dev
21:35jsk has quit [Ping timeout: 480 seconds]
21:35Sai_ has quit [Remote host closed the connection]
21:46jsk has joined #asahi-dev
21:49Sai_ has joined #asahi-dev
21:52Sai_ has quit [Remote host closed the connection]
22:01Sai_ has joined #asahi-dev
22:04Sai_ has quit [Remote host closed the connection]
22:18Rock has joined #asahi-dev
22:19Rock is now known as Guest2376
22:19Guest2376 has quit [Remote host closed the connection]
22:36Sai_ has joined #asahi-dev
22:39Sai_ has quit [Remote host closed the connection]
22:54Sai_ has joined #asahi-dev
22:55[KongrooParadox] has joined #asahi-dev
22:55Sai_ has quit [Remote host closed the connection]
22:58KongrooParadox has quit [Ping timeout: 480 seconds]
23:10hdbngr has quit [Ping timeout: 480 seconds]
23:10Sai_ has joined #asahi-dev
23:12Sai_ has quit [Remote host closed the connection]
23:16freetolga has quit [Quit: Connection closed for inactivity]
23:18hdbngr has joined #asahi-dev
23:20pb17 has quit [Ping timeout: 480 seconds]
23:26hdbngr has quit [Ping timeout: 480 seconds]
23:27Rock has joined #asahi-dev
23:28Rock is now known as Guest2384
23:28Guest2384 has quit [Remote host closed the connection]
23:32Sai_ has joined #asahi-dev
23:34Sai_ has quit [Remote host closed the connection]
23:36alicela1n has joined #asahi-dev
23:43Sai_ has joined #asahi-dev
23:43alicela1n has quit [Quit: Textual IRC Client: www.textualapp.com]
23:43pb17 has joined #asahi-dev
23:43Sai_ has quit [Remote host closed the connection]
23:59Sai_ has joined #asahi-dev
…