#
✕ nick:chadmed
#asahi-dev · 2025-02-08 10:38
chadmed^
#asahi-dev · 2025-02-08 10:35
chadmedwe have testers, theyre called users
#asahi-dev · 2025-02-08 10:34
chadmed\o/ from m1n1 with a bunch of adt logic rewritten in rust (we love testing in prod)
#asahi-dev · 2025-02-08 08:31
chadmedoh yeah...
#asahi-dev · 2025-02-08 08:30
chadmedcan we just grab the device tree size from the c land boot args
#asahi-dev · 2025-02-08 08:29
chadmedand i feel like given she _can_ do that, doing it the old fashioned way is just a waste of time
#asahi-dev · 2025-02-08 08:28
chadmedyeah. to rewrite all the logic Properly(tm) we also need the boot args, and i cant figure out how lina did the agx struct versioning magic
#asahi-dev · 2025-02-08 08:23
chadmedfixed, thanks
#asahi-dev · 2025-02-08 08:22
chadmedi rewrote check_node to play nicer with everything else and didnt change check_header :p
#asahi-dev · 2025-02-08 08:21
chadmedoh wait what lmfao i cast it
#asahi-dev · 2025-02-08 08:20
chadmedits using 0 as the offset argument into check_node
#asahi-dev · 2025-02-08 08:20
chadmedj`ey: the adt header is just a "normal" node at the base address given to us by iboot
#asahi-dev · 2025-02-08 08:02
chadmedoh its in the boot args
#asahi-dev · 2025-02-08 08:00
chadmedone thing im not too sure on is the ADT_MAX_SIZE stuff. surely theres a way we can get the actual adt size. how does the dumper know where to stop?
#asahi-dev · 2025-02-08 07:28
chadmedthe last bindings i did were glib<->Lua so this is kinda alien
#asahi-dev · 2025-02-08 07:27
chadmedhttps://github.com/chadmed/m1n1/blob/bindings/adt/rust/src/adt.rs am i on the right track here
#asahi-dev · 2025-02-08 01:54
chadmedis there any point to writing wrappers for some of these adt routines that are only ever called internally?
#asahi-dev · 2025-02-07 11:13
chadmedits been a long day
#asahi-dev · 2025-02-07 11:13
chadmedi had the "size" member of the struct literally highlighted in kate...
#asahi-dev · 2025-02-07 11:13
chadmedlmfao the reason i asked about vec in the first place is because i thought "oh we dont know the size of this array"
#asahi-dev · 2025-02-07 10:54
chadmedso just like value: &'static[u8]
#asahi-dev · 2025-02-07 10:52
chadmedi was tempted to just get the pointer to it but that seems wrong and sus
#asahi-dev · 2025-02-07 10:51
chadmedadt bindings but im not sure on the best way to express adt_property->value, which is a u8[] in C land
#asahi-dev · 2025-02-07 10:45
chadmedoh cool that simplifies things a bit
#asahi-dev · 2025-02-07 10:05
chadmedim assuming we cant use alloc::vec::Vec in m1n1 right
#asahi-dev · 2025-02-06 11:24
chadmedwhy is that set? does the boot cpu not have its fpu initialised?
#asahi-dev · 2025-02-06 11:09
chadmedyeah
#asahi-dev · 2025-02-06 11:08
chadmedlooks like new_zeroed_alloc is still unstable
#asahi-dev · 2025-02-06 11:05
chadmedso it can probably just get yeeted
#asahi-dev · 2025-02-06 11:05
chadmed1.84 is now stable
#asahi-dev · 2025-02-06 11:05
chadmedthats just gating something for 1.82 though by the looks of it
#asahi-dev · 2025-02-06 11:03
chadmedi wanted to start looking at it as an experiment anyway but i dont trust myself to write bindings that arent ass :p
#asahi-dev · 2025-02-06 11:02
chadmednostd works fine with normal rustc right?
#asahi-dev · 2025-02-06 10:39
chadmednickchan: well we're not really gonna get a functional rust rewrite soon, its a pretty big piece of work
#asahi-dev · 2025-02-05 11:18
chadmedeither way we will need c bindings all over the place for some time
#asahi-dev · 2025-02-05 11:18
chadmedi thought m arcan wanted to eventually port the whole thing, especially after last week's dcp init bug
#asahi-dev · 2025-02-05 11:06
chadmedhave we got a strategy for RIIRing m1n1? i would assume rust logic with C bindings gradually replacing the C logic but theres a lot of entanglement on the C side that would make that a bit daunting to do in a piecemeal/modular way
#asahi-dev · 2025-02-03 21:24
chadmednah i think they just need enabling in the DT
#asahi-dev · 2025-02-03 21:22
chadmedflokli: audacity
#asahi-dev · 2025-02-03 13:04
chadmedyeah i turned off a bunch when i was looking at touch id a couple of years ago but it was still pretty awful
#asahi-dev · 2025-02-03 13:03
chadmedand then each endpoint/subdevice has its own nuances
#asahi-dev · 2025-02-03 13:03
chadmedthe interface is mostly the same as other apple coprocessors. it's hard in part because macos tries to talk to it 100 billion trillion times a second and tracing it grinds the system to a halt
#asahi-dev · 2025-02-03 13:00
chadmedonce again what chaos_princess said :p
#asahi-dev · 2025-02-03 13:00
chadmedall of that is done via sep. the application processors basically just forward encrypted buffers between the two components
#asahi-dev · 2025-02-03 12:58
chadmedSEP is really a bunch of subdevices and we've only really got two working at all - the RNG and the mic hardware switch
#asahi-dev · 2025-02-03 12:54
chadmedrequires SEP and SIO, buffers are encrypted
#asahi-dev · 2025-02-03 12:36
chadmed(there's almost certainly a lot that can be improved)
#asahi-dev · 2025-02-03 12:36
chadmedif youre well versed in DSP youre welcome to check out https://github.com/chadmed/triforce and see if theres anything that can be improved
#asahi-dev · 2025-02-03 12:35
chadmedwhat chaos_princess said
#asahi-dev · 2025-02-03 12:35
chadmedintrestor: theres not a lot else to do

plus ›