#
…

2022-10-07

00:40goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:41goldsoultheory has joined #asahi-re
00:42goldsoultheory has quit []
01:29amarioguy has quit [Remote host closed the connection]
01:39off^ has joined #asahi-re
06:00illenialhackerm has quit [Remote host closed the connection]
06:19off^ has quit [Remote host closed the connection]
06:22HardWallzz has quit [Read error: Connection reset by peer]
06:56MajorBiscuit has joined #asahi-re
07:21millenialhacker has joined #asahi-re
07:22goldsoultheory has joined #asahi-re
07:41bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:57goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:07goldsoultheory has joined #asahi-re
08:29inkos[m] has joined #asahi-re
08:30inkos[m]Hi! I want to update asahi linux. Can someone help me, please?
08:36ChaosPrincesspacman -Syu and thats more of a question that belongs in #asahi
08:47rqou_pieces seem to really be falling together a bit wrt my understanding of AVD
08:48rqou_afaict the firmware generates a command stream (of unknown format) that it then writes into a fifo at addresses around 0x4010001c
08:48rqou_which should be the "real" hardware decoder commands
08:48rqou_(it spits this out once i actually plug in piodma emulation into my emulator)
08:52Jamie[m]oo awesome
09:06Jamie[m]is it avc video? it'd make sense that there's a block of 9 fifos there starting at 401000c and you're writing to the one at [4], following the general pattern of 4 HEVC then 4 AVC then 1 longhorn, but it'd be odd then that there's a 10th one at 40100030
09:07Jamie[m]which the code around the pc implies there is
09:08Jamie[m]oh yeah nah that doesn't add up, all those 401000xx regs are accessed by isrs for all the different codcs
09:13dottedmagIs the right USB port on mbpro m1 max connected differently than the left USB ports? I see it regularly stops detecting newly connected devices under macos, while left ports continue to work properly. reboot "fixes" it
09:18Jamie[m]ah nice the copy of 236 words (0x3b0 bytes) from 0x00000724 lines up with the fact that i saw a repeating block every 0x3b4 bytes starting 0x00000724, once for each slice in the frame
09:26_jannau_dottedmag: based on the ADT all three ports are identical. usb is just cursed, especially on this platform. ask s v e n
09:33Jamie[m]hmm although data_40100030 is special actually, it's accessed from way more places
09:33Jamie[m]so maybe the ones before that ARE 9, one for each codec
09:36rqou_i am guessing (once again based on insufficient evidence) that coded "10" is the fairplay engine
09:39nicolas17 has joined #asahi-re
09:51hir0pro has joined #asahi-re
10:03hir0pro has quit [Ping timeout: 480 seconds]
10:07Jamie[m]rqou_: think the word count in your understanding of piodma could be off by one? the things at 0x8b504 repeat every 11 words and are loaded into an array of 11-word structs, while your log says it's copying 10 words
10:07Jamie[m](as with the copy of 236 words of per-slice stuff, when it repeats every 237)
10:09rqou_yeah, uh, i noticed that too
10:10rqou_but i have a hardware test of the piodma, so ???
10:10bisko has joined #asahi-re
10:10rqou_(it's a mess, sorry)
10:11rqou_it might be a firmware bug?
10:12Jamie[m]weird haha
10:14Jamie[m]in both cases the extra word is all zeros so no big deal either way i guess
10:14Jamie[m](in my dumps at least)
10:23nicolas17 has quit [Quit: Konversation terminated!]
10:35chengsun_ has joined #asahi-re
10:37chengsun has quit [Ping timeout: 480 seconds]
10:50chengsun has joined #asahi-re
10:54chengsun_ has quit [Ping timeout: 480 seconds]
10:55chengsun has quit [Quit: Quit]
10:57chengsun has joined #asahi-re
11:03chengsun_ has joined #asahi-re
11:05chengsun has quit [Ping timeout: 480 seconds]
11:19SSJ_GZ has joined #asahi-re
11:21Jamie[m]rqou_: i recommend you m3_read(0xe0001000)
11:21Jamie[m]we have a watchpoint unit :3
11:22Jamie[m]("0x4F000000 if four comparators for watchpoints only are present")
11:23Jamie[m]so maybe no need for emulation if we want to trace firmware's peripheral access
11:27Jamie[m]a BPU too
11:47Jamie[m]C_DEBUGEN "can only be set to 1 from the DAP, it cannot be set to 1 under software control"
11:48Jamie[m]and writes to it don't stick using m3_write, so i guess that counts as software control
11:48Jamie[m](I am writing it alongside DBGKEY, don't think that's the issue)
11:49Jamie[m]however we should still be able to patch the firmware to add in a DebugMonitor exception handler
11:49Jamie[m]and handle things that way
12:08goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:28Jamie[m]oh duh of course it counts as under software control, i misread how the function was implemented, thought you had found mem read/write functionality in cm3_ctrl lmao
12:40chengsun_ has quit [Ping timeout: 480 seconds]
12:42goldsoultheory has joined #asahi-re
13:06Jamie[m]alright i built a firmware patcher that tacks on an extra function that runs before start
13:07Jamie[m]currently it writes to the log buffer, it's working correctly under your emulator
13:07Jamie[m]but i'll make it write to demcr to enable monitor debugging
13:08Jamie[m]and add in a debug exception handler
13:09Jamie[m]to trace peripheral acces
13:10Jamie[m]could just append to the existing log ringbuffer, as long as macos doesn't choke seeing unexpected stuff there
13:10Jamie[m]and then i guess poll it from a second thread in m1n1, a la the i2c logic analyzer
13:12Jamie[m]guess i should test this one on real hardware before going further
13:36goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:37goldsoultheory has joined #asahi-re
13:37goldsoultheory has quit []
13:39nsklaus has joined #asahi-re
13:41goldsoultheory has joined #asahi-re
13:42Jamie[m]what's the process for reloading a tracer? i get the impression my current "hard shutdown the mac, pick an alternate boot option, re-chainload, reboot macos" workflow isn't quite optional haha
13:44nsklaus_ has quit [Ping timeout: 480 seconds]
13:48dottedmagI use reboot.sh to reboot. You can select the default boot disk, I've done that from macOS's System Preferences -> Startup Disk
13:48Jamie[m]oh if i get rid of all the newlines i can paste it into the hypervisor repl haha
13:49Jamie[m]dottedmag: nice
13:49Jamie[m]i'm pretty sure there's tracer-reloading functionality though, i can see all sorts of plumbing to make it work
13:49Jamie[m]but idk what the entrypoint to trigger it is
13:49Jamie[m]might be generic python knowledge i'm lacking
13:49Jamie[m](i.e. a generic python module/class-reloading feature)
14:20Jamie[m]ah, i think there might be a timeout on firmware loading
14:20chengsun has joined #asahi-re
14:20Jamie[m]oh it took like 10 tries to do it it but it worked eventually
14:28chengsun has quit [Ping timeout: 480 seconds]
14:33Jamie[m]noo my usb has stopped working
14:33Jamie[m]proxy keeps dying with repeated usb-dwc3@b02280000: Host cleared EP 0x82 stall :(
14:34Jamie[m]i think there's something cursed about usb signal integrity on my desktop
14:34chadmed[m]are you using an apple usb-c charge cable
14:35chadmed[m]mine was super flaky (that is moments before my dev machine died altogether so maybe that had more to do with it)
14:35Jamie[m]would that be good or bad? don't have one in any case since this mac came with magsafe
14:36chadmed[m]it was actually pretty reliable via one and only one usb-c port on my dev machine, and refused to work via any others or via my tb3 dock
14:36chadmed[m]theyre just cheap usb 2.0 cables
14:36Jamie[m]i haven't changed anything
14:36Jamie[m]except maybe the mac battery got more full
14:36Jamie[m]and the room got more cold
14:38chadmed[m]usb truly is the greatest thing ever
14:39Jamie[m]it's not normally this bad i swear
14:39Jamie[m]oh good now i'm getting errors from dmesg as well
14:39Jamie[m]nooo it happened again
14:41Jamie[m]ugh i don't now how to continue working lol
14:41Jamie[m]what could i have possibly changed to break this
14:42Jamie[m]the cable i just switched to is thunderbolt rated
14:43Jamie[m]which hopefully rules out cable issues
14:43Jamie[m]yeah i think the host is just cursed
14:44Jamie[m]real solution here is for the shop to ship my AM5 motherboard
14:44chadmed[m]do any of those have thunderbolt on board yet
14:44Jamie[m]anyway right before this issue i'm 99% sure i successfully booted my patched firmware
14:44Jamie[m]and decoded a video
15:02Jamie[m]noo host reboot didnt fix it
15:05amarioguy has joined #asahi-re
15:06Jamie[m]ayy got it unbroken somehow
15:06Jamie[m](i changed nothing)
15:06Jamie[m]ok it's definitely booting the custom firmware and running the pre-init code
15:06Jamie[m]oo i was just about to say "but it isn't decoding video properly"
15:06Jamie[m]but then it started decoding video properly!
15:07Jamie[m]must be running up against a timeout of some sort then
15:07Jamie[m](it's slow because i'm hooking the firmware writes, so it takes like 5-10 seconds to write the firmware)
15:25amarioguy has quit [Remote host closed the connection]
16:04chengsun has joined #asahi-re
16:16chengsun_ has joined #asahi-re
16:16chengsun has quit [Remote host closed the connection]
16:29MajorBiscuit has quit [Quit: WeeChat 3.5]
17:33fmstrat has quit [Ping timeout: 480 seconds]
17:41goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:42fmstrat has joined #asahi-re
17:59amarioguy has joined #asahi-re
18:04amarioguybtw going to start collecting logs from using the sep tracer?
18:05amarioguywhat os version should i be tracing sep accesses from?
18:05amarioguy(macOS version that is)
21:08goldsoultheory has joined #asahi-re
21:25SSJ_GZ has quit [Ping timeout: 480 seconds]
22:42goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:48goldsoultheory has joined #asahi-re
…