#asahi-dev · 2022-02-23 12:16
svenhides is fancy but now obsolete m1 that he bought as a uart adapter#asahi-dev · 2022-02-23 12:05
svennever heard that before but i like it :-)#asahi-dev · 2022-02-23 12:04
svenglass console :D#asahi-dev · 2022-02-22 17:03
svenerm. *XNU bootarg#asahi-dev · 2022-02-22 17:03
sventhe ones with -debug are usually fun and take a "level" as an argument. generally whatever-debug=0xffff is good enough to enable everything#asahi-dev · 2022-02-22 17:03
svenhttps://f.svpe.de/c677aa8b4d557e7b99fd8c59903cf840bac3d68969ac415bb2ff53e40c77000a_xnu-bootargs.txt list of everything that probably is a usb bootarg generated by setting a breakpoint to PE_parse_boot_argn and just dumping the first string argument#asahi-dev · 2022-02-21 17:49
svenbut as a first hack it should be enough to call typec_set_orientation before the usb role switch stuff in the tipd driver :D#asahi-dev · 2022-02-21 17:48
svenonly annoying part is that we probably need to know the orientation of the plug which we can get from the tipd chip - but that subsystem is ofc separate from the usb-role-switch stuff that triggers the phy_set_mode in dwc3#asahi-dev · 2022-02-21 17:47
svenhm, looks like usb 3 actually won’t be very painful. Still needs some tunables though afaict #asahi-dev · 2022-02-21 08:31
sventhat variable actually means something like "display enabled" which is true if "verbose boot is disabled"#asahi-dev · 2022-02-21 08:30
svenj`ey: add -v to bootargs i think#asahi-dev · 2022-02-21 08:21
sventsk tsk#asahi-dev · 2022-02-20 16:50
svenDo you have an alternative then?#asahi-dev · 2022-02-20 16:40
svenit’s a proof of concept not a final patch#asahi-dev · 2022-02-20 13:15
svenand if you submit the same tag twice without that nvmmu invalidation ANS will panic#asahi-dev · 2022-02-20 13:15
sventhere also doesn't seem to be any relationship between the CQ and the NVMMU inval. I can submit commands with the same tag even without advancing the CQ as long as I invalidate the tag inbetween#asahi-dev · 2022-02-20 13:15
svenfrom looking at the ANS firmware there's a hardware FIFO behind that submission doorbell and ANS would panic if we somehow managed to overflow it. I've also written some hack in m1n1 to issues commands from all 8 cores simultaneously and everything worked as expected.#asahi-dev · 2022-02-20 13:14
svenalright, i'm out of ideas why we miss interrupts or don't start commands sometimes without the lock around the writel :/#asahi-dev · 2022-02-19 15:02
svenlooks like i just can't reproduce those missed nvme interrupts anymore (without the additional lock around command submission) no matter what i try :/#asahi-dev · 2022-02-19 11:09
sven(and axboe wanted to clean that up anyway)#asahi-dev · 2022-02-19 11:09
sventhe flush thing is a bigger hack than it needs to be but it's good enough for now#asahi-dev · 2022-02-19 11:08
svenmarcan: yeah, rtkit in there + axboe's patches are all fine#asahi-dev · 2022-02-18 14:24
svenif you're using a 4K kernel with our lovely 16K IOMMU that's not guaranteed to be true anymore#asahi-dev · 2022-02-18 14:23
svenohhh... does that thing use map_sg while assuming that it'll only get a single output?#asahi-dev · 2022-02-18 14:10
svenbut for what I believe are historic reasons there's a thing inside drm that calls itself cma_something_something but actually just uses the coherent dma api which makes everything work fine with iommus#asahi-dev · 2022-02-18 14:09
svencma is only required when you really need physically contiguous memory. once you have an iommu you can just stich discontiguous pages together for the both the CPU and the device#asahi-dev · 2022-02-18 14:08
svenyeah, i think it's probably cma-in-name-only then#asahi-dev · 2022-02-18 14:06
svenoh.. wait.. is that thing inside drm that is just called cma but actually just uses the coherent dma api?#asahi-dev · 2022-02-18 14:06
svencma sounds wrong when we have an iommu#asahi-dev · 2022-02-18 14:05
svenit calls __iommu_map_pages in a loop until it has mapped everything#asahi-dev · 2022-02-18 14:04
svenlooks like it's intended though, check e.g. __iommu_map#asahi-dev · 2022-02-18 14:03
svencould also be a bug in there. I'd ask robin and the iommu list#asahi-dev · 2022-02-18 14:02
svenpossibly. i'm just guessing from the API here :D#asahi-dev · 2022-02-18 14:02
svenI'm not sure what io-pgtbl is supposed to do but having that as an output sounds like it's not guaranteed to always map everything#asahi-dev · 2022-02-18 14:01
svenI probably don't check that#asahi-dev · 2022-02-18 14:01
sveniirc io-pgtbl writes the number of mapped pages to one of its arguments#asahi-dev · 2022-02-18 14:01
svenno, that sounds like a bug#asahi-dev · 2022-02-17 20:54
svenah, true. Just copy all commands to the queue and advance it by N elements with a single write #asahi-dev · 2022-02-17 20:44
svenvery curious actually! #asahi-dev · 2022-02-17 20:21
svenalmost the same here, 49 IOPS #asahi-dev · 2022-02-17 19:44
svenI can give it a try later#asahi-dev · 2022-02-17 18:30
svenyup :)#asahi-dev · 2022-02-17 18:29
svenaww… was worth a try though!#asahi-dev · 2022-02-17 18:05
svenalyssa: yeah, I need to take a look at what marcan did to rtkit and we need to discuss how we will upstream that together with smc#asahi-dev · 2022-02-17 18:03
svenaxboe: half the cpu usage already sounds great :)#asahi-dev · 2022-02-17 17:06
svennice!#asahi-dev · 2022-02-17 17:05
svenuh oh#asahi-dev · 2022-02-17 16:40
svenwhat could go wrong ;)#asahi-dev · 2022-02-17 16:40
svennope