#asahi-dev · 2023-09-10 14:25
marcansame story here it looks like#asahi-dev · 2023-09-10 14:25
marcanthey do this weirdo thing with USB where certain requests go through different DARTs#asahi-dev · 2023-09-10 14:25
marcanapple handles it by mirroring DART registers, we just instantiate multiple IOMMUs#asahi-dev · 2023-09-10 14:24
marcaneiln: isn't this multi DART business the same old thing from USB?#asahi-dev · 2023-09-10 14:21
marcanah no it's just the dumper is weird#asahi-dev · 2023-09-10 14:20
marcanthat ininital DART map looks off by a page#asahi-dev · 2023-09-10 14:19
marcanhm wait something is weird here#asahi-dev · 2023-09-10 14:19
marcanthat just looks like a fault after the driver gives up, not the problem#asahi-dev · 2023-09-10 14:18
marcanwhy that late though#asahi-dev · 2023-09-10 14:18
marcanhmm#asahi-dev · 2023-09-10 14:18
marcan[ 22.841068] apple-dart 3860e8000.iommu: translation fault: status:0x80000404 stream:0 code:0x404 (unknown) at 0x3045c00#asahi-dev · 2023-09-10 14:17
marcangets further now#asahi-dev · 2023-09-10 14:17
marcan[ 4.004636] apple-isp 384000000.isp: [isp_firmware_boot] failed to start command processor: -62#asahi-dev · 2023-09-10 14:17
marcan[ 4.001998] apple-isp 384000000.isp: IO: failed to send OPCODE 0x0004: [0xe0f140, 0xc, 0xc]#asahi-dev · 2023-09-10 14:17
marcan[ 3.999982] apple-isp 384000000.isp: IO: timed out on request [0xe0f140, 0xc, 0xc]#asahi-dev · 2023-09-10 14:17
marcan[ 0.960551] apple-isp 384000000.isp: [isp_enable_irq] about to enable interrupts...#asahi-dev · 2023-09-10 14:17
marcan[ 0.957991] apple-isp 384000000.isp: [isp_firmware_boot_stage3] firmware booted!#asahi-dev · 2023-09-10 14:16
marcanah wait, I'm not initializing DAPF...#asahi-dev · 2023-09-10 14:15
marcannot exactly, but if that were wrong I'd expect a DART fault and I don't see that...#asahi-dev · 2023-09-10 14:14
marcan ==> ( 896): ... 00e04000 -> 00000107cf250000 size: 0012c000#asahi-dev · 2023-09-10 14:14
marcan page ( 821): 00cd4000 ... 00cd8000 -> 00000107cf128000 [11]#asahi-dev · 2023-09-10 14:14
marcan ==> ( 821): ... 00cd8000 -> 0000010001d20000 size: 0031c000#asahi-dev · 2023-09-10 14:14
marcan page ( 622): 009b8000 ... 009bc000 -> 0000010001a08000 [11]#asahi-dev · 2023-09-10 14:14
marcan ==> ( 622): ... 009bc000 -> 00000100013cc000 size: 009b8000#asahi-dev · 2023-09-10 14:14
marcan page ( 0): 00000000 ... 00004000 -> 0000010000a18000 [11]#asahi-dev · 2023-09-10 14:14
marcanI dumped the DART from m1n1, it gets mapped#asahi-dev · 2023-09-10 14:10
marcanI mean what I pushed worked for me on t8103?#asahi-dev · 2023-09-10 14:08
marcansame as we do for the GPU#asahi-dev · 2023-09-10 14:08
marcanthe heap is supposed to be linked statically in the DT, I added that to my t6000 one#asahi-dev · 2023-09-10 14:07
marcaneiln: which patch? (I'm still on my branches as is)#asahi-dev · 2023-09-10 14:02
marcanwhat's the status of this one? is it supposed to work? should I start looking through macOS traces? :p#asahi-dev · 2023-09-10 14:01
marcan[ 1.939041] apple-isp 384000000.isp: [isp_firmware_boot] failed firmware boot stage 1: -19#asahi-dev · 2023-09-10 14:01
marcan[ 1.937063] apple-isp 384000000.isp: [isp_firmware_boot_stage1] never received first magic number from firmware#asahi-dev · 2023-09-10 14:01
marcan[ 0.933946] apple-isp 384000000.isp: [isp_coproc_ready] 0: coproc in WFI (status: 0x2a)#asahi-dev · 2023-09-10 14:01
marcaneiln: so on t6000 12.3 I get:#asahi-dev · 2023-09-10 12:47
marcanwe're going to have downstream kernels for hwe anyway, and I'm not sure maintaining a kernel patchset vs a module with an unstable API/ABI makes much difference, and for users it also doesn't really make a difference whether they install a module or a whole separate kernel...#asahi-dev · 2023-09-10 12:46
marcanthough honestly, I'm not sure a module buys us much#asahi-dev · 2023-09-10 12:45
marcanif the IMPDEF state is in a module, keep in mind we also need somewhere to *save* that state#asahi-dev · 2023-09-10 12:45
marcansure, either option would work for AIDR#asahi-dev · 2023-09-10 12:22
marcan... all that as long as we don't migrate, and the state stays in the kernel?#asahi-dev · 2023-09-10 12:22
marcanmaz: anyway, I need to get dinner, but I assume we're not going to have a straight answer for this all anyway at this point so... let's say I want to just implement this in KVM the "apple way" with the features and context switching and everything. re context switching, does this affect the userspace interface and/or how hard is it to add to that without breaking the world? or can I just ignore ...#asahi-dev · 2023-09-10 12:20
marcanlook I know this sucks for everyone involved but I'm just trying to make this all work in the least shitty way for everyone involved#asahi-dev · 2023-09-10 12:19
marcanoh come on :p#asahi-dev · 2023-09-10 12:19
marcanwell yes, but if you're claiming to be a specific CPU and then not supporting its features, that's kind of broken isn't it :)#asahi-dev · 2023-09-10 12:18
marcanat the very least we need to zero out AIDR_EL1 in KVM to make the current state of things not weirdly broken...#asahi-dev · 2023-09-10 12:18
marcanthat means my ACTLR code right now will... actually break. because KVM is claiming to be an Apple CPU that supports Apple IMPDEF features, but it doesn't.#asahi-dev · 2023-09-10 12:17
marcanand from what I see in the code, that includes AIDR_EL1#asahi-dev · 2023-09-10 12:16
marcanI mean what does KVM do right now?#asahi-dev · 2023-09-10 12:15
marcanah, so that isn't trapped?#asahi-dev · 2023-09-10 12:14
marcanhow are CPU implementors passed to the guest right now? is there passthrough mode or is it always some qemu thing?