#
✕ nick:marcan
#asahi-dev · 2021-11-26 11:50
marcanI tried random values, zero, etc, and nothing broke (in fact I got better performance with zero, which presumably turns off all the PM stuff altogether)
#asahi-dev · 2021-11-26 11:50
marcanI don't think it changes any characteristics of the interface, it just changes how eagerly it goes into lower power modes (to reduce cache miss latency when the CPUs are busy)
#asahi-dev · 2021-11-26 11:49
marcannah, I don't think so. they're power management timers.
#asahi-dev · 2021-11-26 11:33
marcanthough I think other parts of MCC are more stable between SoCs, e.g. we should implement error control
#asahi-dev · 2021-11-26 11:32
marcanyes, it isn't, as long as cpufreq doesn't fail poorly without it
#asahi-dev · 2021-11-26 07:29
marcanthough right now apple uses the same values for everything in the MCC case, so alternatively this could all be hardcoded in the driver and driven by the SoC compatible
#asahi-dev · 2021-11-26 07:29
marcanI figure if we're putting magic reg values in the DT at all, we might as well put the reg addresses too and make it forward-compatible
#asahi-dev · 2021-11-26 07:29
marcanin fact, given what Apple did with t6000 in the memory controller, if this kind of thing is acceptable I'm tempted to use it for the mcc OPP table too, since t8103 needs two pokes and t6000 only one (to a different place) for the performance switching, but they're otherwise identical in high-level construction (number of channels differs but that was a variable already)
#asahi-dev · 2021-11-26 07:27
marcanI think if we're doing this it's not worth trying to hardcode the offsets
#asahi-dev · 2021-11-26 07:27
marcanjannau: usually the written values, but sometimes there's an extra reg or a whole tunable is missing/empty
#asahi-dev · 2021-11-26 07:26
marcanyes, it's along similar lines though
#asahi-dev · 2021-11-26 06:16
marcan(which is what we have)
#asahi-dev · 2021-11-26 06:15
marcanI don't know if there's anything that's a list of registers to write and values/masks
#asahi-dev · 2021-11-26 06:15
marcanI see there's some precedent in stuff like qcom,ath10k-pre-calibration-data, but those are opaque blobs
#asahi-dev · 2021-11-26 06:10
marcanlol, soc/fsl/cpm_qe/qe.txt apparently puts an entire *firmware* blob in the devicetree? :D
#asahi-dev · 2021-11-26 06:09
marcanI think this has come up a few times before in vendor trees, but I don't know if any mainlined driver does this kind of thing?
#asahi-dev · 2021-11-26 06:08
marcanso we can't just throw it into the driver :/
#asahi-dev · 2021-11-26 06:08
marcanI checked and they do indeed differ between different devices using the same SoC, though only slightly (not sure if they differ between different units of the same device)
#asahi-dev · 2021-11-26 06:08
marcanrobher_: to revisit the "tunables" issue, what are your thoughts on blobs in the DT? Apple puts a pile of register pokes in the DT to configure the USB3/Thunderbolt/DP PHYs... and in this case AIUI they have to be applied at runtime depending on what's connected
#asahi-dev · 2021-11-26 04:59
marcanjevinskie[m]: fixed, thanks :)
#asahi-dev · 2021-11-26 04:57
marcanjevinskie[m]: yes it is, ha
#asahi-dev · 2021-11-24 16:17
marcanthere's a RAM readback command, so that should be easy to check
#asahi-dev · 2021-11-24 16:16
marcanarrives today, I love Japan shipping ;)
#asahi-dev · 2021-11-24 16:15
marcanI'll buy a random 3142 PCIe card so I can validate how to tell whether the firmware is loaded or not, and that I don't break the Flash-ful ones
#asahi-dev · 2021-11-24 16:14
marcanyeah, quite likely
#asahi-dev · 2021-11-24 16:13
marcanapparently this likely *is* a 3142, because the 3142 and the 2142... have the same PCI ID. lovely.
#asahi-dev · 2021-11-24 16:13
marcanhttps://zakinco.hatenablog.com/entry/2019/01/28/165201
#asahi-dev · 2021-11-24 16:09
marcanah, I see why they used this one instead of the fresco, because this one actually does proper TypeC/Gen2/10G
#asahi-dev · 2021-11-24 16:06
marcanbut whatever, who cares if we have to load some firmwares out of the recovery dmg and some out of the kernelcache in the installer >_>
#asahi-dev · 2021-11-24 16:06
marcanI already found out I have to do that for AVD M3 firmware so...
#asahi-dev · 2021-11-24 16:05
marcanand that'll involve writing firmware extractors into the installer
#asahi-dev · 2021-11-24 16:05
marcanI think I'm going to put this on the back burner and revisit it when I get to wifi, which also involves firmware nonsense...
#asahi-dev · 2021-11-24 16:02
marcanyes, really.
#asahi-dev · 2021-11-24 16:02
marcanthe firmware load procedure involves writing the memory address to a PCI config register, then writing 16 bits of data from firmware offset 0 and the top 16 bits coming from firmware offset 8000, to a BAR.
#asahi-dev · 2021-11-24 16:01
marcanflash ROMs, I mean
#asahi-dev · 2021-11-24 16:01
marcanthey want as much stuff securebooted as possible, and firmware inside macOS implicitly is
#asahi-dev · 2021-11-24 16:01
marcannah, I think they do this because they don't like ROMs because they are places you can hide a backdoor
#asahi-dev · 2021-11-24 15:56
marcanevents work though!
#asahi-dev · 2021-11-24 15:56
marcanno wonder it didn't process commands with no firmware
#asahi-dev · 2021-11-24 15:56
marcanmaz: tl;dr the goddamn thing has RAM firmware, embedded in Apple's *global XHCI driver* of all places
#asahi-dev · 2021-11-24 11:58
marcanouch :/
#asahi-dev · 2021-11-24 09:44
marcanhah.
#asahi-dev · 2021-11-24 09:44
marcan(I wrote the original version of the QEMU virtual xHCI...)
#asahi-dev · 2021-11-24 09:44
marcanwhat did they do? (besides have a secret handshake for their windows driver...)
#asahi-dev · 2021-11-24 09:43
marcanwhich one?
#asahi-dev · 2021-11-24 09:42
marcandinner first, though
#asahi-dev · 2021-11-24 09:42
marcanwell, it's been years since I had to fight xHCI... I guess it was about time it reared its ugly head again.
#asahi-dev · 2021-11-24 09:42
marcanyeah, heh
#asahi-dev · 2021-11-24 09:40
marcannope, still fails the same way
#asahi-dev · 2021-11-24 09:39
marcanthis controller already has quirks in xhci-pci, so...

plus ›