#asahi-dev · 2022-08-19 21:16
svenif there is it’ll probably only work most of the time without the lock #asahi-dev · 2022-08-19 21:16
svenyou have to figure out if there a race window #asahi-dev · 2022-08-19 21:16
sventhat’s not how to decide if a lock is required #asahi-dev · 2022-08-19 21:13
sveniirc the last iteration had a possible race there though #asahi-dev · 2022-08-19 21:13
svenbut I think the lock isn’t required here because no irq will be raised anyway before he sets use_irq to 1#asahi-dev · 2022-08-19 21:12
svennope#asahi-dev · 2022-08-19 21:12
svenafter that transactions can occur #asahi-dev · 2022-08-19 21:11
sventhe common probe function registers the adapter #asahi-dev · 2022-08-19 21:11
svenand just requesting the irq handler doesn’t do anything#asahi-dev · 2022-08-19 21:11
sventhough I guess it doesn’t matter with the current code cause irqs are disabled #asahi-dev · 2022-08-19 21:09
svenyou dont want any i2c transaction when switching to irq mode I think#asahi-dev · 2022-08-19 21:09
svenyou need the lock in probe #asahi-dev · 2022-08-19 21:08
svenwhen you’re in waitready that lock should already be taken by the core #asahi-dev · 2022-08-19 21:08
sventhe bus lock is also a major issue fwiw#asahi-dev · 2022-08-19 20:48
sveni thought it was the other way around for that controller #asahi-dev · 2022-08-19 20:47
svenand you sure that 1 = interrupt disabled?#asahi-dev · 2022-08-19 20:47
sventhe irq mask Write inside the handler also looks off#asahi-dev · 2022-08-19 20:37
svenwhat is the bus locked supposed to do inside waitready?#asahi-dev · 2022-08-19 07:23
svensounds good, i'll first have to figure out a few mmio pokes for this "dpphy" thing anyway#asahi-dev · 2022-08-19 07:18
svennice, thanks!#asahi-dev · 2022-08-18 10:47
svenwith just atcphy it’s all the same so far#asahi-dev · 2022-08-18 10:46
svenI’ll already be happy if I see a difference between just running it on dcpext and running it after I brought up atcphy and dpphy and that crossbar thing #asahi-dev · 2022-08-18 10:27
svenhrm, does dcp.py currently work? i get construct.core.RangeError: Error in path (building) -> arg0 \n expected 14 elements, found 13 for mgr.update_notify_clients_dcp([0,0,0,0,0,0,1,1,1,0,1,1,1])#asahi-dev · 2022-08-17 15:09
sveni probably just have to stop it from resetting dwc3#asahi-dev · 2022-08-17 15:09
svenhrm, or i guess i could just chain load to u-boot after adding some debug prints there to confirm usb3 works#asahi-dev · 2022-08-17 15:06
svengood point, didn't even think of that. let's see if that can be (ab)used#asahi-dev · 2022-08-17 15:05
sven(and then figure out why i can't access the thunderbolt pcie controller with my horrible hacks inside linux...)#asahi-dev · 2022-08-17 15:04
svenis anyone aware of a light-weight xhci implementation that can be easily ripped out and used stand-alone? i have atc.py now and I want to test if that thing actually works for usb3 before I try to bring up an external display#asahi-dev · 2022-08-16 15:13
svenyou pass a void pointer when you request the irq and that one will be passed along to your irq handler #asahi-dev · 2022-08-16 15:12
svenyou can#asahi-dev · 2022-08-12 14:21
svensince the irq covers the entire bus you should also lock the entire bus #asahi-dev · 2022-08-12 14:21
svenyou mean inside probe when you switch from polling to irq mode?#asahi-dev · 2022-08-12 06:23
svenotherwise you can just switch to the raw iommu api and reserve the lower IOVA space so that the allocator doesn’t hand out addresses there#asahi-dev · 2022-08-12 06:22
sven*that’s#asahi-dev · 2022-08-12 06:22
svensone devices on m1 also have a weird vm-start/size in the device tree that just a hint for XNU and no actual hw limitation#asahi-dev · 2022-08-12 06:21
svenif it’s just the dart IOVA start you may be able to ignore that #asahi-dev · 2022-08-11 16:46
svenand DCP is probably the first (and maybe next to agx the only one) coprocessor where we actually get a significant number of messages #asahi-dev · 2022-08-11 16:45
svenit used to be threaded as a hack when rtkit itself didn’t defer some messages to process context #asahi-dev · 2022-08-11 16:44
svenI don’t remember if that irq is threaded, you can try disabling that#asahi-dev · 2022-08-10 18:19
svencan’t device attach then alloc the pagetable, create the mappings and then swap ttbrs? it’s been a while since I looked at the code #asahi-dev · 2022-08-10 18:17
svencan you parse the mappings in probe and stash them in the dart struct?#asahi-dev · 2022-08-10 18:16
svenhrm. are they available in the device attach callback?#asahi-dev · 2022-08-10 06:25
svensome people replaced what’s essentially a critical component of the boot process to change a theme :/#asahi-dev · 2022-08-10 06:24
svenAoke#asahi-dev · 2022-08-10 06:22
svenWe’ve seen them do things that I consider to be deliberately destructive back in the console scenes without even realizing#asahi-dev · 2022-08-10 06:21
svendon’t underestimate the stupidi… er… creativity of end users :(#asahi-dev · 2022-08-09 14:25
svenok, i'll give it a shot then#asahi-dev · 2022-08-09 13:49
svendoesn't matter much for atcphy.py but would be nice to also make the atcphy tracer aware of all register I know about#asahi-dev · 2022-08-09 13:49
svenso for ATCPHY there are essentially five or so different "logical" register ranges (for which I want a single RegMap each) that apple splits into 15+ regs entries in the ATC. is there anything to represent that in m1n1? e.g. something like REGMAPS = [ATCPhy, regmap_offset(ATCPhy, 0x200), regmap_offset(ATCPhy, 0x400), ...]?