#
✕ nick:eiln
#asahi-dev · 2023-09-21 08:56
eilnmarcan: just thought it was relevant :)
#asahi-dev · 2023-09-21 08:51
eilnmarcan: https://github.com/eiln/ane/issues/3
#asahi-dev · 2023-09-19 10:55
eilnpatched tracer I've been meaning to clean up https://pastebin.com/TejGDw60 all opcodes https://pastebin.com/vCkN21Sn
#asahi-dev · 2023-09-19 10:55
eilnJ414cAP/J416cAP (1080p) I suspect are both 558s again. bootargs/init soc data, you can probably do it with your eyes closed
#asahi-dev · 2023-09-19 10:55
eilnlina: I was watching your shader exploit stream yesterday!
#asahi-dev · 2023-09-19 10:55
eilnstill setting up new setup. installed windows for my boss and got his old laptop in return (??) was morally obligated to sneak ublock in there, sigh
#asahi-dev · 2023-09-19 00:26
eilnshutdown as in rpm device init/exit, not system
#asahi-dev · 2023-09-19 00:24
eilnnot on my machine rn, will reply later
#asahi-dev · 2023-09-19 00:24
eilnisp also has sensor/lens temperature monitors https://gist.github.com/eiln/c2d140d8a0376bd25f2f31ed7a7d9dc8. I can expose a ioctl if needed, don't think it's worth doing that in v4l2 though
#asahi-dev · 2023-09-19 00:24
eilnchadmed: ane/isp/ave/avd voltage/temps are +0x8000, just above axi2af. they are always read after shutdown, and can be traced with a simple trace_device(). I can try to see how those reads turn into macos powertop values if needed, but they're mapped and accessed by the pmgr driver, independent of device
#asahi-dev · 2023-09-16 23:38
eilngood ol 'log show --last 1m --info --debug --color=always'
#asahi-dev · 2023-09-16 23:35
eilnChaosPrincess: spits out the fw struct in 13.5. or were you already getting those?
#asahi-dev · 2023-09-16 23:35
eiln> VTEncoderXPCService: (AppleVideoEncoder) 4319906591 46 AVE VERB: H264FrameRec: insert slice_size 823 slice_size_fig 819 slice # 0 &p_in[0] 0x1000000
#asahi-dev · 2023-09-16 23:35
eiln> VTEncoderXPCService: (AppleVideoEncoder) 4319867810 64 AVE WARN: used log config file is at /tmp/ave_log.cfg 1694906712191446
#asahi-dev · 2023-09-16 23:35
eilnecho "1 2 hello" > /tmp/ave_log.cfg
#asahi-dev · 2023-09-16 23:03
eiln"tracer" it just mon.poll()'s periodically
#asahi-dev · 2023-09-16 23:03
eilnydalton: in dart stream 1?
#asahi-dev · 2023-09-16 22:45
eilnoh wait no it's something with the reference frame
#asahi-dev · 2023-09-16 22:19
eilnI am really not the best person for this
#asahi-dev · 2023-09-16 22:18
eilnI started with h264 but there was some funny SPS/PPS stuff, like you mentioned. also scaling. I'm doing vp9 rn
#asahi-dev · 2023-09-16 22:18
eilnjannau: thanks :D
#asahi-dev · 2023-09-16 22:07
eilnjannau: I slightly misunderstood. the headers *are* chained (the second & onward headers do much less than the first), but it might be just an optimization. either way I can only decode one frame right now.
#asahi-dev · 2023-09-16 21:50
eilnneither bit is in the moronic m3 blob, so we have to do it regardless
#asahi-dev · 2023-09-16 21:49
eilnfyi it cannot be stateless as I'd hoped. we need a basic syntax parser to generate a 4K ish header. so far I've figured out height/width/stride. we also need to un-tile the output, and I'm really not sure if we want to do that in the kernel.
#asahi-dev · 2023-09-16 20:30
eilnnow to RE those ~200 magic registers (they're actually dma'd *to* the registers from iova space).. per codec..
#asahi-dev · 2023-09-16 20:30
eilnavd has given a frame :) https://pasteboard.co/NrAGXqJ06wle.png
#asahi-dev · 2023-09-16 20:29
eiln5am, you know it's something good
#asahi-dev · 2023-09-14 15:11
eilnI'm not sure I understand though. unless I got something wrong, it only copies 36 bytes (from dart stream 1 -> registers). and a very peculiar setup consisting of three layers of indirection is needed to do this
#asahi-dev · 2023-09-14 15:11
eilnavd piodma is now under my control har har https://pasteboard.co/cOjxSbl0WcCE.png
#asahi-dev · 2023-09-14 09:30
eilnmarcan: j413ap calls CISP_CMD_SET_DSID_CLR_REG_BASE2 then CISP_CMD_SET_DSID_CLR_BC_REG_BASE, the latter N/A for t8103/t6000. if it errs I'll send a tracer script to fetch those structs. sensor is the same old 558, so should be a smooth sail from there on.
#asahi-dev · 2023-09-12 12:36
eilnthat's the iphone 15 max sensor hehe
#asahi-dev · 2023-09-12 12:36
eilnimx913 calib file was added between 12.3 and 13.5
#asahi-dev · 2023-09-12 08:47
eilniiuc unk4 is platform_type (t8103: 0x1, t6000: 0x3) and pad_40[1]/pad_40[3]/pad_7c[3] are required? pad_7c[3]=0x3b54000 looks like the ANE-IPC endpoint (I hate that I know this by heart), can you try removing that? pad_40[1]=0x3128000/pad_40[3]=0x48000 look like u64 iova/size for some other heap, not sure what though. we don't allocate any differently
#asahi-dev · 2023-09-12 08:46
eilnalso can you test with the calib files and ensure the frames are Apple Quality i.e. we don't have to adjust filter params. also can you re-send all the dmesg struct hexdumps so I can better fill those fields out. alsoalsoalso t8112 calls a different dsid function, we will need to look into that
#asahi-dev · 2023-09-12 08:46
eilnmarcan: ohh you declared the heap in the dt like uat. I added it to asc-mem phandle so we don't even have to acknowledge its existence, only passing ctrr_size for aperture/bootargs (I thought of passing it as vm_base). is it not fit as a reserved mem too?
#asahi-dev · 2023-09-10 17:38
eilnthere's a firmware bug causing an irq hang (preventing more logs). It should be as chatty as ISP. I was trying to patch the instruction, but apparently since ventura we can't write to segment-ranges anymore, hence I was downgrading earlier
#asahi-dev · 2023-09-10 17:35
eilnalso echo "1 2 hi" > /tmp/ave_log.cfg gets the userspace driver to talk a lot. I'm fairly certain this is a scanf CVE
#asahi-dev · 2023-09-10 17:35
eilnthey handle memory really, really weird. the firmware iova starts at ipc_iova and is masked by 0x80000000.
#asahi-dev · 2023-09-10 17:34
eilntrash code, but https://pastebin.com/yrXQvf61
#asahi-dev · 2023-09-10 17:30
eilnChaosPrincess: you built on the isp stuff right? the ipc code can nearly be shared. the TERMINAL channel outputs the logs w/o having to memdiff
#asahi-dev · 2023-09-10 17:30
eilnI went to dim my computer, but I should reply
#asahi-dev · 2023-09-10 17:09
eilnI should, sigh. not enough time in the day..
#asahi-dev · 2023-09-10 17:09
eilnhere's a really proto extraction script if you want better video https://pastebin.com/j0LpYLWv
#asahi-dev · 2023-09-10 17:07
eilnive got work tomorrow (today actually)
#asahi-dev · 2023-09-10 17:06
eilnyes..
#asahi-dev · 2023-09-10 17:06
eilnheck yeah!!!
#asahi-dev · 2023-09-10 17:04
eilnthe 558 preset should be right i think
#asahi-dev · 2023-09-10 17:01
eilnmarcan: found it, ipc_iova is offsetted by a page
#asahi-dev · 2023-09-10 16:52
eilncan you get it from heap_top? i.e. 0xf00000 the struct cuts off
#asahi-dev · 2023-09-10 16:16
eilnit should have a 0x1c000, that's constant

plus ›