#
✕ nick:marcan
#asahi-dev · 2021-03-12 09:06
marcan-t
#asahi-dev · 2021-03-12 09:06
marcansven: if you're bored, we're also goingt to need spinlocks in m1n1 :>
#asahi-dev · 2021-03-12 09:06
marcanprobably will just make stuff dog slow if it's the GPU, but I wonder if there are timeouts
#asahi-dev · 2021-03-12 09:06
marcanwe'll see I guess
#asahi-dev · 2021-03-12 09:06
marcankinda curious how macOS will react to me randomly stalling MMIO writes when my buffers are full
#asahi-dev · 2021-03-12 09:05
marcanyeah, should be fine for mmiotrace as long as you plug it in *before* launching the guest of course
#asahi-dev · 2021-03-12 08:54
marcaneither way my protocol is mostly synchronous on the host->device side so it doesn't really matter
#asahi-dev · 2021-03-12 08:54
marcan(i.e. actual data transfers)
#asahi-dev · 2021-03-12 08:54
marcanI'm thinking for things like CDC-ACM the host should ~never time out then, right?
#asahi-dev · 2021-03-12 08:53
marcanexcellent
#asahi-dev · 2021-03-12 08:45
marcan(I hope the hardware handles that...)
#asahi-dev · 2021-03-12 08:44
marcandoes it need to be called to NAK, or does the hardware handle that?
#asahi-dev · 2021-03-12 08:44
marcancool
#asahi-dev · 2021-03-12 08:41
marcansven: you don't use IRQs, right? ideally I want the USB thing to be a polled loop, so the whole thing can run in IRQ/exception context too
#asahi-dev · 2021-03-12 08:40
marcanlooking forward to uploading kernels at 40MB/s :>
#asahi-dev · 2021-03-12 08:15
marcanI'm going to poke around that and USB once I wrap up the v3 comments
#asahi-dev · 2021-03-12 08:15
marcanake: those, and some initialization stuff. I haven't looked at it yet, but kettenis has it in u-boot
#asahi-dev · 2021-03-12 08:00
marcanake: yes, the PHY needs a bunch of initialization
#asahi-dev · 2021-03-11 08:03
marcanthis is why m1n1 sets the /memory node to only the usable portion
#asahi-dev · 2021-03-11 08:03
marcankettenis: yeah, the top of RAM is reserved for the SEP, so you can't touch it (and the CPU is allowed to speculate, so it has to be unmapped)
#asahi-dev · 2021-03-09 17:04
marcankettenis: updated the docs here a bit: https://github.com/AsahiLinux/docs/wiki/HW:ARM-System-Registers#sys_apl_l2c_err_sts_el1
#asahi-dev · 2021-03-09 16:53
marcanI think this bus interface only allows 32-bit writes
#asahi-dev · 2021-03-09 16:53
marcan2C is UFRACVAL supposedly
#asahi-dev · 2021-03-09 16:51
marcanI get that for 16-bit or 8-bit writes to that register
#asahi-dev · 2021-03-09 16:51
marcanah, I just repro'd
#asahi-dev · 2021-03-09 16:51
marcanthe top bits in ADR are what I see for writes
#asahi-dev · 2021-03-09 16:50
marcanL2C_ERR_INF 2 I'm not sure about
#asahi-dev · 2021-03-09 16:50
marcanI *think* 82 means recursive fault, but maybe it doesn't
#asahi-dev · 2021-03-09 16:47
marcanI was just running some tests to update the docs
#asahi-dev · 2021-03-09 16:47
marcanmight be useful, yeah
#asahi-dev · 2021-03-09 16:31
marcanI'll take the chance to document those registers a bit more, now that I have more tools to experiment with
#asahi-dev · 2021-03-09 16:30
marcannp! let me know how it goes
#asahi-dev · 2021-03-09 16:27
marcanshould work then
#asahi-dev · 2021-03-09 16:26
marcaneither way, let me know what values you get, I can do a quick experiment to confirm what they mean
#asahi-dev · 2021-03-09 16:25
marcanif so you have a 50/50 chance depending on the cpu :)
#asahi-dev · 2021-03-09 16:24
marcanthough I think that one is per cluster
#asahi-dev · 2021-03-09 16:24
marcanah, but that won't do it for SMP secondaries
#asahi-dev · 2021-03-09 16:24
marcanbut it might help confirm we're not dealing with something else here
#asahi-dev · 2021-03-09 16:24
marcanthat's what preloader does, which just shoves all those errors under the carpet
#asahi-dev · 2021-03-09 16:24
marcanfwiw, you can do msr((3, 3, 15, 8, 0), 0) with shell.py before chainloading u-boot
#asahi-dev · 2021-03-09 16:23
marcan:)
#asahi-dev · 2021-03-09 16:20
marcanADR has the physical address (with some stuff in the top bits)
#asahi-dev · 2021-03-09 16:20
marcanthose will tell you what kind of fault happened
#asahi-dev · 2021-03-09 16:20
marcanhttps://github.com/AsahiLinux/m1n1/blob/main/src/exception.c#L136 those three
#asahi-dev · 2021-03-09 16:20
marcanyou want to print the apple bus exception related registers
#asahi-dev · 2021-03-09 16:19
marcanare you mapping the PCIe BARs as nGnRE?
#asahi-dev · 2021-03-09 16:19
marcanthis tells me they are doing something wrong
#asahi-dev · 2021-03-09 16:19
marcanmacos does not
#asahi-dev · 2021-03-09 16:19
marcankettenis: corellium disable SError bus issues wholesale
#asahi-dev · 2021-03-08 19:45
marcanbut tbh at this point I'm more interested in the CDC ACM version

plus ›