#asahi-dev · 2025-08-12 10:21
mazbreak?*#asahi-dev · 2025-08-12 10:21
mazdoes anything actually rbeak?#asahi-dev · 2025-08-12 10:21
jannauthat results unexpected PCI bus numbers. the device tree expects a gap but Linux' PCI subsystem assigns continuous bus numbers#asahi-dev · 2025-08-12 10:19
jannauI'm looking at devices with unused pcie ports (M1 imac with 2 USB-C ports, M2 Pro Mac mini). both have an unused port in the middle#asahi-dev · 2025-08-12 10:17
jannauis "bus-range" in PCI bridge device tree nodes descriptive or normative?#asahi-dev · 2025-08-12 08:51
chadmedokay i think my idea to remove offsets from the rust side API might work#asahi-dev · 2025-08-11 12:12
jannauthe joys of running make dtbs_check on the t602x device trees#asahi-dev · 2025-08-11 11:14
chadmedthe runtime cost should be negligible though #asahi-dev · 2025-08-11 11:13
chadmedokay i have an idea for getting rid of offsets entirely but it will require some glue code for the C binding#asahi-dev · 2025-08-11 10:40
nickchan-Technically I should go and patch Linux's upmc handling too but there's not much incentive to do so right now... since the bootloader will silence the registers already#asahi-dev · 2025-08-11 10:39
nickchan-updated two pre-m1 prs the armv8-a one now compiles the asm and hv code as armv8.2-a (all other c file armv8-a), and the requested changes for the uncore pmc handling one#asahi-dev · 2025-08-11 09:27
chadmedbut then we're doing that twice, since we still need to do that to get the reference to the node in the first place...#asahi-dev · 2025-08-11 09:26
chadmedi wonder then if its better to simply do get_reg(ADTNode *node, int reg_index) then internally build the tree and not expose path_offset_trace at all #asahi-dev · 2025-08-11 09:06
jannauget_reg needs to walk the tree to do "ranges" based address translation#asahi-dev · 2025-08-11 08:58
chadmedtook saas/cloud like 15 years to get to the same point :P #asahi-dev · 2025-08-11 08:57
chadmedwe're out of the blitzscaling phase and into the "haha whatre you gonna do, not use it?" phase #asahi-dev · 2025-08-11 08:57
chaos_princessit is such a hilarious shitshow, they focused more on coding, but according to slop enjoyers, claude is still better, and now they have people who used 4o as a "friend replacement" whining at them for changing the personality they got used to#asahi-dev · 2025-08-11 08:56
svenwhere it was some copilot model, dunno which one #asahi-dev · 2025-08-11 08:56
svenI tried it for the atcphy dt bindings a few weeks ago. it created two subtle errors that took me longer to fix that just writing the entire thing myself :/#asahi-dev · 2025-08-11 08:55
chadmedi tried gpt-5 at work the other day out of curiosity and its honestly worse than i expected it to be #asahi-dev · 2025-08-11 08:55
svenjust ask your favorite slop generator to do the rewrite /s#asahi-dev · 2025-08-11 08:54
chaos_princesswe do not care about offset invalidation, so newtype the offsets for rust and keep them as ints for c api#asahi-dev · 2025-08-11 08:54
chadmedi dont feel like rewriting like 30% of m1n1 before i go on holiday though#asahi-dev · 2025-08-11 08:53
chadmedyeah#asahi-dev · 2025-08-11 08:52
chaos_princessi think we can rip out 99% of the offset stuff then#asahi-dev · 2025-08-11 08:52
chadmedor we return AdtError::BadLength#asahi-dev · 2025-08-11 08:52
chadmednah they have to be the same size#asahi-dev · 2025-08-11 08:52
chaos_princessand does that shift things around?#asahi-dev · 2025-08-11 08:51
chaos_princesscan you set a prop to a bigger value?#asahi-dev · 2025-08-11 08:51
chadmedit cant add/remove nodes or properties#asahi-dev · 2025-08-11 08:50
chadmedchaos_princess: the API is incapable of making any changes though apart from setting the value of some property#asahi-dev · 2025-08-11 08:50
svenand the offset stuff shouldn’t be exposed to the API level, that’s imho an implementation detail #asahi-dev · 2025-08-11 08:50
chaos_princessisn't it because of the offsets, you constantly need to re-walk the data structure if you have done any changes#asahi-dev · 2025-08-11 08:50
svenyeah, something like that #asahi-dev · 2025-08-11 08:49
chadmedimo it should just be get_reg(*ADTNode node, int reg_index) #asahi-dev · 2025-08-11 08:48
chadmedthats why i didnt touch it and just copied it 1:1#asahi-dev · 2025-08-11 08:48
chadmedim not sure why get_reg needs to iterate over an entire absolute path though#asahi-dev · 2025-08-11 08:48
chadmedyeah the idea was to copy what fdt does but its not very ergonomic#asahi-dev · 2025-08-11 08:48
svenI think it all comes from the fdt api which feels like a very thin wrapper around the fdt format #asahi-dev · 2025-08-11 08:47
svenand yeah, getting the reg container is also, uh, interesting #asahi-dev · 2025-08-11 08:47
svenall this node offset stuff always feels weird to me #asahi-dev · 2025-08-11 08:42
chadmedwhat do you consider awkward about it? i personally think the way you get a reg container is a bit insane but idk if thats constrained by how the ADT works or what#asahi-dev · 2025-08-11 08:38
sventrue :D#asahi-dev · 2025-08-11 08:31
chadmedthere are soooo many consumers #asahi-dev · 2025-08-11 08:31
chadmeddo we have coccinelle? :P#asahi-dev · 2025-08-11 08:07
svenalso happy to change the C API completely, the current one is bit awkward #asahi-dev · 2025-08-11 08:07
svenfine with me#asahi-dev · 2025-08-11 06:49
chadmedgetting rid of them will allow the Rust side to be more sound by default#asahi-dev · 2025-08-11 06:48
chadmedthoughts on dropping unused parts of the ADT API? the original design was meant to be 1:1 with libfdt readonly but there are a few methods that are actually unused anywhere in m1n1 #asahi-dev · 2025-08-09 17:33
svenack