#
…

2026-07-20

00:12voidah has quit [Ping timeout: 480 seconds]
00:14voidah has joined #asahi-dev
00:43debtquity has quit [Ping timeout: 480 seconds]
00:48nela has quit [Quit: Ping timeout (120 seconds)]
00:49debtquity has joined #asahi-dev
00:49nela has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
03:13runxiyu has quit [Quit: updating weechat]
03:15SlShahafLevi[m]1 has joined #asahi-dev
03:24runxiyu_ has joined #asahi-dev
03:41nora has joined #asahi-dev
03:43nora_ has quit [Ping timeout: 480 seconds]
03:51nela has quit [Quit: Ping timeout (120 seconds)]
03:51nela has joined #asahi-dev
04:47voidah has quit [Ping timeout: 480 seconds]
04:55voidah has joined #asahi-dev
04:55mattia013 has quit [Remote host closed the connection]
05:03voidah has quit [Ping timeout: 480 seconds]
05:11voidah has joined #asahi-dev
05:20voidah has quit [Ping timeout: 480 seconds]
05:29voidah has joined #asahi-dev
05:37voidah has quit [Ping timeout: 480 seconds]
05:46voidah has joined #asahi-dev
05:54voidah has quit [Ping timeout: 480 seconds]
06:03voidah has joined #asahi-dev
06:18voidah has quit [Ping timeout: 480 seconds]
06:21dj has joined #asahi-dev
06:25voidah has joined #asahi-dev
06:34voidah has quit [Ping timeout: 480 seconds]
06:39voidah has joined #asahi-dev
06:47voidah has quit [Ping timeout: 480 seconds]
06:56voidah has joined #asahi-dev
07:04voidah has quit [Ping timeout: 480 seconds]
07:06runxiyu_ has quit [Remote host closed the connection]
07:06Stary has quit [Ping timeout: 480 seconds]
07:07runxiyu_ has joined #asahi-dev
07:10chadmed_ has joined #asahi-dev
07:10chadmed has quit [Read error: Connection reset by peer]
07:12voidah has joined #asahi-dev
07:14djvery cool work on T6050 recently, i was reading the logs here and tried it out on my m5 pro machine. got m1n1 proxy working and basic shell loaded with keyboard
07:14djtried starting other cores few ways, but its just not responding. excited to tinker more with it tomorrow though
07:15Stary has joined #asahi-dev
07:16yukacool that you were able to reproduce it :)
07:19hardy94 has joined #asahi-dev
07:21voidah has quit [Ping timeout: 480 seconds]
07:29voidah has joined #asahi-dev
07:33hardy1994 has joined #asahi-dev
07:37voidah has quit [Ping timeout: 480 seconds]
07:38hardy94 has quit [Ping timeout: 480 seconds]
07:38hardy1994 is now known as hardy94
07:39runxiyu_ has quit [Ping timeout: 480 seconds]
07:46chadmed_ is now known as chadmed
07:47voidah has joined #asahi-dev
07:56voidah has quit [Ping timeout: 480 seconds]
08:05voidah has joined #asahi-dev
08:06runxiyu_ has joined #asahi-dev
08:07chaos_princessusb is awesome, i managed to somehow wedge the usb stack on host machine with an atc tracer
08:07yukaoh you're working on M3 atcphy? :>
08:09chaos_princesschanges for now - need a mwait or an interrupt wait after the spmi wake, spmi regmap is broken for reads of >16bytes (typo).
08:13voidah has quit [Ping timeout: 480 seconds]
08:21voidah has joined #asahi-dev
08:29voidah has quit [Ping timeout: 480 seconds]
08:37voidah has joined #asahi-dev
08:46voidah has quit [Ping timeout: 480 seconds]
08:54voidah has joined #asahi-dev
08:56ddxtanx has quit [Ping timeout: 480 seconds]
08:57ddxtanx has joined #asahi-dev
09:02voidah has quit [Ping timeout: 480 seconds]
09:10voidah has joined #asahi-dev
09:12marvin24 has quit [Ping timeout: 480 seconds]
09:18voidah has quit [Ping timeout: 480 seconds]
09:25voidah has joined #asahi-dev
09:34voidah has quit [Ping timeout: 480 seconds]
09:43voidah has joined #asahi-dev
09:45sofushmm, im trying to plan how to "prettify" the avd driver. rkvdec's approach seem unfeasable for avd, if anyone knows a better approach than define+genmask+field_prep (for register like things) please let me know!
09:47sofusim also bad at names, so having to define more than 200 things kinda scares me :(
09:49LarstiQ200 different kind of things, or v_0 ... v_199?
09:50sofusdifferent things, and they are shared between codecs, but have slighly different meanings
09:51voidah has quit [Ping timeout: 480 seconds]
09:51sofus200 is a guess, if i dont make them shared it will be around 400
09:59JamesCalligeros[m]sofus: that approach seems sane enough for registers etc. if it was variants of functions id say to use a function table/avd_ops struct and tie that to the compatible or something like that
09:59voidah has joined #asahi-dev
09:59JamesCalligeros[m]If there are a silly amount of register differences between variants just put each variant in its own header
10:01sofusthankfully i dont know of any differences
10:01sofusthis is mostly for the instruction stream definitions
10:01JamesCalligeros[m]You could do something like dcp :p
10:01JamesCalligeros[m](Do NOT do this)
10:03sofusi dont really get how dcp's macros work, like how does it know what version to build with?
10:03JamesCalligeros[m]Evil evil evil crimes against the preprocessor
10:03JamesCalligeros[m](It builds both lmfao)
10:05chaos_princesshttps://en.wikipedia.org/wiki/X_macro - something like a derivative of this technique
10:07voidah has quit [Ping timeout: 480 seconds]
10:15sofusthats cool! This is only for for generating the iomfb things right?
10:15voidah has joined #asahi-dev
10:16JamesCalligeros[m]Yeah the abi-sensitive stuff
10:16JamesCalligeros[m]The functions kms calls into are wrappers that call the real function based on the fw abi detected by m1n1
10:18sofusWe cant really get rid of this because of devices with never versions right? Whats the plan to upstream this? (if there is one)
10:21JamesCalligeros[m]Refer to the m1n1 pr and kernel branch i posted last night :p
10:22JamesCalligeros[m]We will get rid of the 12.x fw and potentially 13.x and keep 14.x once it actually works, and then any future ones as required
10:22JamesCalligeros[m]There was some talk of a rust rewrite ages ago to make this easier
10:24voidah has quit [Ping timeout: 480 seconds]
10:24sven“Claude, rewrite this DCP driver in rust please” /s
10:25JamesCalligeros[m]No way, only fine artisanal barely-functional slop :p
10:26sofusJamesCalligeros[m]: i meant mostly in regards to the macros, but i suppose its fine
10:27JamesCalligeros[m]Eh, its unavoidable. We are at Apple’s mercy, and they do stupid shit like move EPIC tags by +/- 1 with each fw release
10:27JamesCalligeros[m]Theyve added like 0x230 extra bytes of 0xaa to the swap/page flip command buffer
10:28JamesCalligeros[m]It doesnt actually seem to do anything, but the swap request will be rejected if the buffer is not the right size
10:29sofusyeah thats kinda the same as avd rev3 with its extra 0 commands
10:29Sobek[m]<JamesCalligeros[m]> "We will get rid of the 12.x fw..." <- How in practice will you deploy this ?
10:29Sobek[m]What does a macOS stub update requires ? (Round trip to recovery ? To normal macOS ?)
10:29pb17 has quit [Ping timeout: 480 seconds]
10:29chaos_princessfor 12.x - reinstall
10:29chaos_princessthere should be next to no installs left on it
10:29JamesCalligeros[m]No one should be using 12.x so reinstall. For 13.x installs, tbd but hopefully we can work something out that does not require a trip to macos. Maybe.
10:30chaos_princessit probably will, unless you want to write a rw apfs driver
10:33voidah has joined #asahi-dev
10:33Sobek[m]sven: I'm sorry Sven, but I can't do that.
10:33Sobek[m](Have you put the Agents.md file in that driver too, to protect against slop agents ?)
10:33svenwe’ll only
10:34sven*we’ll only place one in m1n1
10:37JamesCalligeros[m]The nice thing is that there’s scant prior art on this subject that isn’t our own
10:38JamesCalligeros[m]Which makes our slopdar’s job very easy
10:38pb17 has joined #asahi-dev
10:44voidah has quit [Ping timeout: 480 seconds]
10:52voidah has joined #asahi-dev
10:57sofusre the avd rewrite, im also debating if i should make the instruction generation into a shared function and use function tables for the codec specifik things
10:58sofusthe instruction sequence looks kinda like hdr -> codec_flags -> codec_bufs -> output -> ref_buffers -> slices/tiles
11:00voidah has quit [Ping timeout: 480 seconds]
11:04sofusmaybe making shared functions for the common stuff is simpler
11:07chadmedi think i suggested that a while ago, and i think it makes the most sense and makes it easier to reason about the code and add new variants
11:07chadmedavd->ops->generate_stream(...) where you then just set .generate_stream=avd_v*_generate_stream on probe
11:09voidah has joined #asahi-dev
11:10sofusah, you are thinking about the addresses right? i would rather do ops->set_addr for that
11:10fl0_idchaos_princess the rw apfs driver might be feasible, but getting the key isn't... right?
11:11chadmednot necessarily, the approach can be extended to cover whatever
11:11sofusbut like the differences between variants are at most 3 if statments, i dont think thats enough for a seperate function
11:12chadmedmaybe just switch (avd->variant): case AVD_VARIANT_V2:... where necessary then?
11:13chadmedmy preference is typically toward generic/extensible solutions in most cases especially when we cannot know what horrors we will be subjected to by apple in the future
11:17voidah has quit [Ping timeout: 480 seconds]
11:22fl0_idchaos_princess well isn't the apfs part of the drive encrypted, even without filevault? that's at least what my experiments apfs-fuse and paragon apfs suggest. That they worked on drives I created manually, but not on system. There was also an error about sth sth keybag, so I assumed it was related to encryption that cannot be accessed from linux.
11:22chaos_princessright, you will need that too.
11:25voidah has joined #asahi-dev
11:26sofuschadmed: will do my best to make it generic, although based on changes between rev3 and rev4 im not really worried
11:29chadmedyeah ultimately it does not _really_ matter as long as it's readable and reasonably easy to add new variants
11:29sofusis there a reason i should not fill the variant structs at probe time?
11:29sofus... rust would have been nice for this
11:31chadmedsaves some cycles by having some of the stuff prefilled (e.g. statically allocate the ops for each variant, then once youve devm_kzalloced your driver data struct just avd->ops = &avd_v*_ops or whatever which is the usual pattern)
11:31leiothe v4l2-request bridge to vaapi worked btw?
11:32leiowhere I'm heading is, do we want a vulkan video driver (written in rust) still?
11:33sofusleio: yes, although i kinda suspect its at least partially slop
11:33chadmedits probably not as urgent, especially if the bridge can be made seamless and not janky
11:33chadmedbut vk video is where desktop video offload is going so it's gonna have to happen at some point
11:34sofusim kinda thinking i should fix the og one
11:35chadmedand im sure some vaapi-to-vkv thing will end up in mesa or some such however we are then relying on two translation layers to DTRT
11:35chadmedyeah, the bootlin one might be nicer idk
11:35chadmedits already shipped in fedora even though it's abandoned. we may need to fork it
11:37sofusfrom the little i tested the vaapi brigde thing it did not seem like it used much more power
11:38chadmedyeah im not concerned about that, its the kind of workload the scheduler will force on to the ecores anyway
11:39sofusi would rather make a vk translation layer as i suspect other people would be interested in that
11:39sofusie. we would not have to make it ourselfs
11:40voidah has quit [Ping timeout: 480 seconds]
11:42chadmedthis works in the opposite direction
11:42chadmedwhich is why i would very much like an actual vk video driver
11:42chadmedwe would not have to do or maintain anything else after that
11:49voidah has joined #asahi-dev
11:57voidah has quit [Ping timeout: 480 seconds]
12:03hookyoung has quit [Quit: Connection closed for inactivity]
12:03fl0_idchaos_princess do you know if it would in principle be possible to access this encryption, or not, as it is part of the os / security separation and is something one might not want to mess with?
12:04leiofwiw, the NVK rust vulkan video driver draft MR was at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31867
12:04chaos_princessit is possible to access it, kinda. you order sep to load specific keys into the nvme controller, and then magic happens
12:04leiowhich should take care of some of the rust bindings
12:06voidah has joined #asahi-dev
12:08djoooh, got the trackpad working on m5 pro. power protocol is diff and so is the dart mapping
12:10fl0_idchaos_princess thx, thought it must be sth like that
12:15voidah has quit [Ping timeout: 480 seconds]
12:18mira_ has quit [Ping timeout: 480 seconds]
12:23voidah has joined #asahi-dev
12:28sofusvk video does not seem to expose all the things we need. We would need to parse the bitstream
12:28sofus(we would need to do this for vaapi/vk translation layer anyway)
12:32voidah has quit [Ping timeout: 480 seconds]
12:32sofusmaybe im missing something, this is mainly for the slices/tiles
12:36voidah has joined #asahi-dev
12:38sofusleio: am i missing something? It looks like the bindings are only for nouveau?
12:39leioI haven't looked, I assumed most rust stuff you need from mesa generic stuff would be in that PR at least
12:39JamesCalligeros[m]Its all nvk specific stuff
12:41leioso there was no bindings to C stuff needed? That works too, I guess
12:45voidah has quit [Ping timeout: 480 seconds]
12:45leiosofus: I knew the application is expected to be parsing the bitstream and passes you lower level stuff already?
12:46leioerr, VV
12:52sofusleio: unless i missed something its not enough (its the same as vaapi)
12:52voidah has joined #asahi-dev
12:55leiovaapi is slice based, VV is frame based, or so I've been told by people that know both
12:56leiobut I'm on work call rn, so I'm probably talking nonsense while I can't look
12:56sofusno that makes sense, avd is very much slice based
12:58leiothat sounds like that would make a straight up VAAPI driver most convenient instead?
13:01voidah has quit [Ping timeout: 480 seconds]
13:01sofusvaapi is also missing a few things, but its not as bad
13:02sofusbut i think the work required would be the same
13:03leioVAAPI would give the most widespread support in apps now, while VV is the future
13:10voidah has joined #asahi-dev
13:13sofusi think we should do VV if we dont do v4l2
13:18voidah has quit [Ping timeout: 480 seconds]
13:27voidah has joined #asahi-dev
13:29leiosofus: btw, could the bitstream parsing be something that the CM3 might be capable to handle?
13:32sofusyeah, in theory we could let the cm3 do everything
13:33sofusbut it would be slower and more error prone
13:36voidah has quit [Ping timeout: 480 seconds]
13:37voidah has joined #asahi-dev
13:43ndufresne has joined #asahi-dev
13:45ndufresnehi sofus, at linux kernel level, the V4L2 stateless API supports both slice and frame based decoders, this is because Allwinner CPU access codecs are slice based, but most other are frame based
13:46voidah has quit [Ping timeout: 480 seconds]
13:46ndufresneOn HEVC we have a third mode, frame based with slices, this allow for batching in slice based HEVC decoder, or for less capable frame based decoders
13:47ndufresneWe are working on introduce VV specific (HW specific) drivers in the long term to slim down the software, and more some bits to userspace in the long run
13:48ndufresneBut its not really a thing today, I talks to about it to the Linux Media group already, have lined up a talk at Linux Plumber in Prague this year, and we have a encoder (kernel side in Rust as a bonus) in the development for the RK3588 chips
13:49ndufresneThis does not help the dilema of VV vs V4L2 ... though VV is frame based in its flow
13:49ndufresnestill think VV is a long term direction to take
13:50sofusndufresne: nice, thanks! It looks our driver will be the "most slicebased one"
13:52sofusto me the question of VV vs v4l2 is kinda more where we put code, and who is responsible
13:52ndufresne has left #asahi-dev [User left]
13:52sofusif we do v4l2, its only submitting parameters to the HW we are "responsible for"
13:53sofuswith VV (right now at least) we would also be "responsible" for parsing bitstream stuff
13:55voidah has joined #asahi-dev
13:57ndufesne has joined #asahi-dev
13:57ndufesne(sorry, back)
13:57ndufesneSo, in both VV and V4L2 case, on Linux, you will need a kernel side
13:58ndufesne(of course you can do VV on top of V4L2, its not ideal/optimal)
13:59ndufesneWith V4L2, the kernel API you need here is that stateless codec one, and its more of less the final API implemented by the kernel, so you can already guess that the kernel side is bigger
13:59ndufesneThe general long term idea, is that with HW specific driver + user space driver (aka in mesa), through VV standard API, you can move the hard work into userspace
14:00sofusndufesne: fwiw i have made kernel side for h26{4,5} and vp9
14:00ndufesneyou mean V4L2 stateless ?
14:00ndufesne(using request)
14:01sofusyes, im only missing av1
14:02ndufesneOk, so to me you should continue that direction
14:02sofusthe driver is very simple and should be easy to port to whatever
14:03ndufesneOk, that's good to know
14:03ndufesneI suppose you are already familiar with https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847 (needed for Firefox support), that you can enable support for Chromium directly and that gstreamer supports that too
14:04sofusim still not sure firefox actually supports the v4l2 stateless
14:05sofusand either gstreamer or the pr has bugs because our driver only works with gstreamer
14:05sofus(mostly related to slice sizes)
14:06ndufesneno, Firefox support ffmpeg HW contexts
14:06ndufesnethis path was used to enable Vulkan Recently, and the request stuff is mimicing that
14:07ndufesneThough, firefox is not supper good at using 2 devices
14:07sofushuh, i was never able to enable it
14:08cy8aerFF 153 has an official support for Vulkan. Already downloadable and available tomorrow.
14:08jannauI don't think firefox has patched ffmpeg. so https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847 still has to be released and merged in firefox ffmpeg copy
14:09sofuswhen building firefox does it not use the system ffmpeg?
14:10jannaugentoo might have an use flag but I think firefox vendors ffmpeg
14:13ndufesneJust general info, this could be interesting to follow: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14987
14:13ndufesneThere is also a (vide coded :-S) proto driver of VV on V4L2 Stateless https://gitlab.freedesktop.org/sree/mesa/-/tree/v4l2-vulkan-video
14:14sofusthis would imply firefox does not use v4l2 request
14:15ndufesneThis is because v4l2 request is not yet upstream ffmpeg
14:16sofusi think i misunderstood something sorry
14:16ndufesneI didn't mean its would just work, but the stateful plumbing should be the same as the stateless one, from user point of view, there is no difference
14:17ndufesneRPi have the addition issue that they produce a weird pixel format (column tiling)
14:21ndufesne has left #asahi-dev [User left]
14:22ndufesne has joined #asahi-dev
14:22sofusthanks, one thing i never understod is what the kernel driver should do / expose when using VV
14:22ndufesne(sorry for the in/out, trying to avoid having two channels IRC/Matrix)
14:24ndufesneSo, a VV kernel driver is going to look like a GPU driver. Assuming you have an IOMMU, the driver don't need to protect against operation that would cause an decode error, or would try to read passed the allocated memory. You can let the mmu do its job.
14:25ndufesneSo if you have a command based hw, you can expose a kernel uAPI that match your command interface, if its CPU accessed (aka mmio interface), you can likely expose a submission queue, and have some of the register data just memcpy
14:26ndufesneIts quite likely you driver won't need to know a lot about the specific codec, that knowledge will be in the userspace driver
14:28ndufesneThis will of course clarify itself as we make drivers that way, and we'll be building common block, as codecs HW are quite alike
14:29sofusthanks a lot, i can kinda imagine how our driver would look with something like that
14:29ndufesneIn contrast, in V4L2, you don't really queue commands, but buffers, the request are just object that holds on controls data (the decode parameters), and that kernel driver completely validate the data to prevent any form of overflow, because tradionally in v4l2, the mmus are optional, you can outcompile them
14:31ndufesneSo it is always a little ackward, since you basically build a "command", the is wrapped by a request, yet the driver does not process the request in their queued order ....
14:32ndufesnedon't read me wrong though, both works, and both a great performance
14:33ndufesnev4l2 stateless is something you could start upstreaming today, and hit 7.3 or 7.4
14:33ndufesnethe second is probably going to take a year or two
14:35chaos_princessjust smuggle it via drm/accel
14:35sofusa very large chunk of our driver is rkvdec copy paste, so im kinda hoping upstreaming is not to hard
14:35sofusyear or two to get the VV kernel side upstreamed??
14:36sofusor did that include mesa
14:38sofusthanks a lot for the help! Based on what you have said, my plan is to continue v4l2, but design it such that porting to VV would be easy
14:43ndufesnechaos_princessyes, its drm/accel like
14:43chaos_princesssofus: from what i understand the idea is to design a "correct" kernel api for vv, with you being one of the trailblazers for that. So, a year makes ssense
14:43ndufesneAnd with the idea to share some code from there
14:43ndufesnesofusyou can't upstream this type of driver without a ready to use open source counterpart
14:43voidah has quit [Ping timeout: 480 seconds]
14:44ndufesneso yeah, you need kernel and mesa at the same time more or less
14:44chaos_princessndufesne: its more of a slight dig at x86 people with gpu-integrated media engines that can throw it in together with their gpu api. and also at drm/accel being kinda the gpu-like-things-except-for-graphics-part
14:45rodmac has joined #asahi-dev
14:45ndufesnecurrent status is that drm tree won't take drivers that don't have a GPU, accel tree is just a jungle, so that's less interesting. Linux Media have had some opening to accept this type of driver (which would be easy for me, as I already maintain the v4l2 side of codecs/m2m), but I'm very open to where this thing will live
14:48ndufesnein the end, I think its giving future dev a very valid choice, plus fence based programming, which is not available in v4l2
14:51voidah has joined #asahi-dev
14:52ndufesnesofus btw, very happy to ear the progress you made, and really looking forward seeing your driver on the ML!
14:53sofusndufesne: thanks! and thanks again for the help!
15:01voidah has quit [Remote host closed the connection]
15:01voidah has joined #asahi-dev
15:40ralim8 has quit [Ping timeout: 480 seconds]
15:44ralim8 has joined #asahi-dev
15:46rodmac has quit [Quit: leaving]
15:59voidah has quit [Ping timeout: 480 seconds]
16:06mattia013 has joined #asahi-dev
16:09voidah has joined #asahi-dev
16:17voidah has quit [Ping timeout: 480 seconds]
16:25voidah has joined #asahi-dev
16:33chaos_princessBus 001 Device 002: ID 05ac:12a8 Apple, Inc. iPhone 5/5C/5S/6/SE/7/8/X/XR
16:33chaos_princessthat's a start i guess
16:34voidah has quit [Ping timeout: 480 seconds]
16:41voidah has joined #asahi-dev
16:44rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:44enick_381 has quit [Quit: Bridge terminating on SIGTERM]
16:48Jamie has joined #asahi-dev
16:49Jamie is now known as Guest13793
16:49voidah has quit [Ping timeout: 480 seconds]
16:49rhysmdnz has joined #asahi-dev
16:57NickChan[m] has joined #asahi-dev
16:57chaos_princessm3max, so spmi tipd
16:58voidah has joined #asahi-dev
16:58yukaare you using the patches from mildsunrise and me as a base or did you start from scratch?
17:00chaos_princessyours + my fixes + i intend to change regmap_spmi more
17:06voidah has quit [Ping timeout: 480 seconds]
17:08yukaAh fair
17:09yukathere are no t602x pcie docs are there?
17:09yukabesides the code
17:14voidah has joined #asahi-dev
17:18lethalbit|wut has joined #asahi-dev
17:23voidah has quit [Ping timeout: 480 seconds]
17:27voidah has joined #asahi-dev
17:35voidah has quit [Ping timeout: 480 seconds]
17:44voidah has joined #asahi-dev
17:52voidah has quit [Ping timeout: 480 seconds]
17:59nst has quit [Quit: WeeChat 4.7.2]
18:00voidah has joined #asahi-dev
18:04nst has joined #asahi-dev
18:08voidah has quit [Ping timeout: 480 seconds]
18:17voidah has joined #asahi-dev
18:26voidah has quit [Ping timeout: 480 seconds]
18:28voidah has joined #asahi-dev
18:36voidah has quit [Ping timeout: 480 seconds]
18:42runxiyu_ has quit [Remote host closed the connection]
18:44runxiyu_ has joined #asahi-dev
18:44voidah has joined #asahi-dev
18:45gargantua has joined #asahi-dev
18:53voidah has quit [Ping timeout: 480 seconds]
18:57voidah has joined #asahi-dev
19:05voidah has quit [Ping timeout: 480 seconds]
19:13nela has quit [Quit: Ping timeout (120 seconds)]
19:13nela has joined #asahi-dev
19:14voidah has joined #asahi-dev
19:23voidah has quit [Ping timeout: 480 seconds]
19:25Lyude has quit [Quit: Bouncer restarting]
19:28ddxtanx has quit [Read error: Connection reset by peer]
19:28ddxtanx has joined #asahi-dev
19:29voidah has joined #asahi-dev
19:37voidah has quit [Ping timeout: 480 seconds]
19:38ddxtanx has quit [Remote host closed the connection]
19:45voidah has joined #asahi-dev
19:54voidah has quit [Ping timeout: 480 seconds]
20:03voidah has joined #asahi-dev
20:04Lyude has joined #asahi-dev
20:25voidah has quit [Ping timeout: 480 seconds]
20:25djinteresting, so cores do start on t6050 but pc doesn’t change but when I did a half read at pc I did see the pc it was just stuck at start
20:26yukayou mean you put something directly _at_ rvbar which you can detect?
20:30voidah has joined #asahi-dev
20:35averne has joined #asahi-dev
20:35djthe cores are released and pc changes from 0 to rvbar+0x200. 32 bit utt read exposes the real low pc. 64 bit read for some reason says 0
20:36djso maybe theyre not stuck in the reset start only?
20:38voidah has quit [Ping timeout: 480 seconds]
20:47voidah has joined #asahi-dev
20:56voidah has quit [Ping timeout: 480 seconds]
21:04voidah has joined #asahi-dev
21:13JamesCalligeros[m]yuka: docs kinda fell by the wayside by the time we got to t6020 unfortunately. Contributions welcome :3
21:13yukawhoops
21:15yukadj: I don't really understand this: "I did see the pc it was just stuck at start" <- how do you see this?
21:18Yushi has quit [Remote host closed the connection]
21:19Yushi has joined #asahi-dev
21:24yukacan you observe the pc of the secondary from the boot core?
21:29core[m]yuka: core
21:29gargantua has quit [Ping timeout: 480 seconds]
21:29djI’m reading the per-core uttdebug. read32(cpu-uttdbg-reg + 0x90). Sampling both halves I got the exact pc. I’m decently new to this, could be very off lol
21:30djdid same for cpu0 to verify and it is a reliable way to get stable pc
21:31yukahuh, amazing
21:31djmy guess was it was getting into an exception state soon as you start it but I’m losing progress on that end, doesn’t seem to hold up..
21:32yukais +0x200 what we expect though?
21:32yukaI I thought it was 0x800
21:34djit’s the exception vector slot where it stops at
21:34dj0x800 is expected indeed, that would be _start
21:34yukaso the question is where it does initially start
21:35yukaor what happens if we place something at 0x200
21:35yukaor maybe it's just borked and will always go into exception
21:35djwait can we just place something else there like that
21:35djI think it’s the reset routine which faults -> ends up in exception
21:37yukayou could try to make an endless loop
21:37yukaplace it at the expected entrypoint
21:37yukathen observe if the pc still goes to the exception
21:37chaos_princessor nop slide the entire suspected area?
21:38yukayes but it seems 0x200 is indeed already something else, I don't know if that can be relocated just like that
21:40djI can’t get to read the pc first few cycles before it’s at +0x200, initial read was completely 0 but starting at rvbar+0 (reset) it ends up at exception vector. I’ll try making it an endless loop
21:42djI had tried to replace +0 before but it still ended up at 0x200 as if the replacement didn’t work is it cause it’s chain loaded?
21:56mattia013 has quit [Quit: mattia013]
22:03sckova[m] has joined #asahi-dev
22:05djok the replacement def lands - verified it via read back but it just ends up at +0x200. tried to update held bit from +0 but it just seems like core never executes it and the pc read hack just reports +0x200 on the third sample. so loop and nop both didn’t work
22:05lkoledic has joined #asahi-dev
22:10sckova[m] is now known as kovahehim[m]
22:16djok, what if it doesn’t execute anything at all because the fetch is failing and it faults
22:20djsomething related to per-core execution/memory ownership state - is there anything like that which rings a bell?
22:21yukachickens
22:21djooh okay perfect - thank you
22:22djlemme look into that
22:29djit seems highly likely that it’s just the chickens preset which is botched for m5 pro/max
22:31djm4 pro cores load all fine right?
22:34lkoledic has quit [Remote host closed the connection]
22:57djquick question is it ok to disassemble the kernel to see how its handling the cpu init
22:58JamesCalligeros[m]xnu is source-available
22:58JamesCalligeros[m]but i think youll need to look at iboot and/or sptm for your machine too
23:01djyeah that’s what I was looking at so I can check the soc specific code
23:02JamesCalligeros[m]you can do so but keep the chat to #asahi-re and know that you wont be able to contribute m1n1 or kernel code directly if you do so
23:03djfair enough won’t post anything about it in this chat, thanks for the heads up
23:08djI can provide documentation through disasm, and someone else can implement it - am I getting it right?
23:12JamesCalligeros[m]pretty much yeah
23:20chaos_princessit is unlikely that you will succeed
23:20chaos_princessthe relevant bits are in iboot, and you can't change it
23:22djhmm, let’s see. I’ll give it a full shot cause it’s fun. so far I have found hints of m5 pro config/init being quite diff from previous gen
…