#asahi · 2021-03-28 11:04
marcanwhich is why I keep asking about isbs :-)#asahi · 2021-03-28 11:04
marcanI will say I *used* to think the mask register did some weird edge triggered stuff, until I realized I was missing an isb after setting TGE=0, and what I was seeing it was it not taking effect until after the first exception was taken#asahi · 2021-03-28 11:03
marcanthe ISR_EL1 bit remains set (FIQ masked in DAIF)#asahi · 2021-03-28 11:03
marcanI just tried it in timer_test.py and I don't see that#asahi · 2021-03-28 11:00
marcanlike, the HV ones too?#asahi · 2021-03-28 10:59
marcan*-#asahi · 2021-03-28 10:59
marcanmaz: wait wait, are you saying that *all* the timers are *always* edge^triggered?#asahi · 2021-03-28 10:56
marcanthe guest timer masking only works with TGE=0#asahi · 2021-03-28 10:56
marcanyeah, it doesn't work in the host#asahi · 2021-03-28 10:56
marcanwith TGE=0?#asahi · 2021-03-28 10:56
marcanand with everything idle, and the timers masked, setting up a timer to fire you see it raising a FIQ in EL2?#asahi · 2021-03-28 10:55
marcanso wait, this is with FIQs trapped to EL2, right?#asahi · 2021-03-28 10:54
marcanthough we do issue an isb...#asahi · 2021-03-28 10:54
marcanare you sure it's not a synchronization issue?#asahi · 2021-03-28 10:53
marcanhuh#asahi · 2021-03-28 10:53
marcanit's good enoug to boot after a chainload.py --el1 to m1n1, with nosmp (nosmp because I don't virtualize CPU spin-up, so the secondaries come up in EL2 and that explodes)#asahi · 2021-03-28 10:52
marcanjust pushed that now#asahi · 2021-03-28 10:52
marcanfyi, I ended up adding EL1 support to the AIC driver since it turned out pretty easy (just guarding some stuff and mapping the IRQs differently in the translate function)#asahi · 2021-03-28 07:50
marcanmaybe that explains the "edge triggered" thing you saw?#asahi · 2021-03-28 07:50
marcanmaz: I did mention that the mask registers don't work if TGE=1, right? so if Linux leaves the guest timers active when context switching out of the VM, that won't work#asahi · 2021-03-27 17:57
marcanthat would make sense for subpages#asahi · 2021-03-27 15:46
marcanso our docs are better :-)#asahi · 2021-03-27 15:46
marcanfunny thing is after the "official" docs leaked a decade later, it was documented as + 0x40#asahi · 2021-03-27 15:46
marcanthat was the nand ECC syndrome calculation#asahi · 2021-03-27 15:43
marcan(one of the first things I did with what became mini and the same proxyclient stuff in m1n1 was try control bits on the Wii AES engine and discover that if you don't set encrypt/decrypt, it just does a plain copy)#asahi · 2021-03-27 15:42
marcanyeah :)#asahi · 2021-03-27 15:27
marcan< sven> kettenis: but if this worked we could essentially pretend the AES engine is a DMA engine <- I wonder where you got that idea from :-)#asahi · 2021-03-27 15:24
marcandoesn't matter if I go into el0 or el1, still nothing#asahi · 2021-03-27 15:23
marcanturning off the mask bits, resetting the timer registers and scheduling them to fire, nothing happens#asahi · 2021-03-27 15:22
marcanmaz: I'm not seeing edge-triggered behavior in m1n1#asahi · 2021-03-27 14:10
marcanheh, yeah#asahi · 2021-03-27 13:50
marcanand there's no reason to run that through DART#asahi · 2021-03-27 13:50
marcan(I think)#asahi · 2021-03-27 13:50
marcansince the doorbell addr is the same for every endpoint, but they should have different MSI ranges#asahi · 2021-03-27 13:49
marcani.e. it never hits the SoC bus#asahi · 2021-03-27 13:49
marcanmaz: if I had to guess, the PCIe endpoint handles the doorbell internally, but that's a guess#asahi · 2021-03-27 13:48
marcan(I mean even without using KVM)#asahi · 2021-03-27 13:48
marcanmaz: so that wouldn't work on M1 anyway, until I fix AIC to work in EL1#asahi · 2021-03-27 13:26
marcanI'll have to do some more tests in m1n1, this is interesting#asahi · 2021-03-27 13:24
marcanto make that register work properly#asahi · 2021-03-27 13:24
marcanI do remember we need an isb after doing things like flipping TGE#asahi · 2021-03-27 13:24
marcanwhat acks the edge in that case?#asahi · 2021-03-26 19:25
marcanoh yeah, I guess I can drop gregkh from v4 cc, right?#asahi · 2021-03-26 19:23
marcanthanks for the notes, I'll update it tomorrow and probably send v4 :)#asahi · 2021-03-26 19:23
marcanarnd: yeah, I'm hoping for a quick v4 on the mailing list to get the remaining acks#asahi · 2021-03-26 18:40
marcanthe big 64M flash should be easily dumpable once we have spi working, but I'm not going to be instantiating that driver in default device trees for safety#asahi · 2021-03-26 18:40
marcaneither way we pretty much know what's there, for the PD controller it's tricky to make sense of since it's just function hooks, not the entire firmware#asahi · 2021-03-26 18:39
marcannot sure though, there may be a working read command#asahi · 2021-03-26 18:39
marcanyou used to be able to read/write the flash directly from the host, but I got the impression that now they're doing some unlock/signing stuff#asahi · 2021-03-26 18:38
marcanit's from https://www.ifixit.com/Teardown/iPad+Pro+11-Inch+Teardown/115457