ChanServ changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - Logs https://oftc.irclog.whitequark.org/panfrost - <macc24> i have been here before it was popular
anholt has quit [Ping timeout: 480 seconds]
jambalaya has joined #panfrost
derzahl has quit [Ping timeout: 480 seconds]
megi has quit [Quit: WeeChat 3.5]
Daanct12 has joined #panfrost
megi has joined #panfrost
alpernebbi has joined #panfrost
anholt has joined #panfrost
tchebb_ has joined #panfrost
davidlt_ has joined #panfrost
<hanetzer> so, about panwrap. is there any info on the general technique?
<hanetzer> I'm working on some ip cores that have blob kmods and blob userspace libs (in a sane world they'd be v4l2 devices) so I don't even have the courtesy of vendorware kernel module source.
Daanct12 has quit [Ping timeout: 480 seconds]
Daanct12 has joined #panfrost
davidlt_ has quit [Ping timeout: 480 seconds]
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #panfrost
Daanct12 has quit [Quit: Leaving]
<robclark> general technique is LD_PRELOAD ;-)
nlhowell has joined #panfrost
Daanct12 has joined #panfrost
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #panfrost
Daaanct12 has joined #panfrost
davidlt_ has joined #panfrost
Daanct12 has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #panfrost
guillaume_g has joined #panfrost
rasterman has joined #panfrost
robmur01 has joined #panfrost
alpernebbi has quit [Remote host closed the connection]
alpernebbi has joined #panfrost
<jenneron[m]> alyssa: hi, i'm thinking that i can ask alpine maintainers to carry the patch to enable t628 in mesa, so it'd work in postmarketOS on peach-pit and peach-pi chromebooks. i want to know your opinion about this, since it may cause users to report T628 issues to upstream mesa which could be annoying i guess
wolfshappen_ has joined #panfrost
davidlt_ has quit [Ping timeout: 480 seconds]
rkanwal has joined #panfrost
<jenneron[m]> also, I got access to hardware, I don't see xorg issues which I have been reported about
Moe_Icenowy has joined #panfrost
MoeIcenowy has quit [Read error: Connection reset by peer]
alpernebbi has quit [Quit: alpernebbi]
<hanetzer> robclark: I mean crafting the LD_PRELOAD'd lib
<icecream95> hanetzer: You could just read the panwrap source, panwrap-syscall.c is only about 250 LOC
rkanwal has quit [Ping timeout: 480 seconds]
alpernebbi has joined #panfrost
<icecream95> The first three CSF instructions from a Free userspace have been run!
<icecream95> Now to fix the bugs and see if I get something more impressive than 'mov x72, #0x1234'
<icecream95> "GPU ID: v10.8 r6p7 (Mali-G710)." I was *sure* that it would be 0xa002, not 0xa867
<robmur01> r6p7 is definitely not right ;)
<icecream95> robmur01: Blame kbase for sticking a wrong value in the KBASE_GPUPROP_PRODUCT_ID field then
<icecream95> Unless they've changed the field format again
atler has joined #panfrost
<hanetzer> icecream95: yeah, that actually looks fairly simple. but here's a question; what about hooking small internal helper functions in the library? for example, this lib has a public facing api, but internally uses JPEG_HDEC_{ReadReg,WriteReg,Cpy2Mem,Cpy2Regs} to do a lot of the 'real work'. These are never meant to be called by the end user, and even if you did, well, you don't know the
nlhowell has quit [Ping timeout: 480 seconds]
<hanetzer> magic regs and such
<hanetzer> so, instead of hooking the public JPG_HDEC_DecodeJpg or so I'd like to hook the func it calls from the above list, to trace those.
<icecream95> If you just want to dump arguments and don't mind if the function breaks, I guess you could dlsym the functions, mprotect to gain write access, and stick in some instructions to jump to your own function
<icecream95> If you consider disassembling the first one or two instructions in a function to not be "binary r/e", you could then make your own function do what they did and jump back
<icecream95> Recently I've found Valgrind to be a very powerful tool for instrumentation: When you get a BB, check if the address matches the function you want to trace, then insert a call to an external function and do whatever you want
<icecream95> "Coherency mode: 0x1f (None)" :(
Daaanct12 has quit [Remote host closed the connection]
<icecream95> The stream feature mask here is 0x7085f, and the "global interface version" is 0x1010000
<icecream95> I guess the feature mask is like the texture features register, a mask of natively-supported commands to run on iterators?
<hanetzer> valgrind on arm is pain, never got it to work lmao
<robmur01> icecream95: the revision isn't part of the product ID though? At least we have separate properties for them in Mesa :/
<icecream95> So that would be 0-4, 6, 11, 16-18 if zero-based, which seems wrong. It must have some other meaning then
<icecream95> robmur01: mali_kbase_gpu_id.h confuses me, but it appears ARCH_REV == 6 and PRODUCT_MAJOR == 7 at least
<hanetzer> also this jpeg decoder is funny. the userspace lib is almost entirely jpeg6b with the hw stuff tacked on (they provide both a shared and static library, so listing the object files in the latter helped determine that)
<icecream95> Which seems correct because PRODUCT_MAJOR == 7 is LODX
<icecream95> I was confused because the blob prints that it wants 0xa002 in a debug message
<robmur01> 7 should be G610
<robmur01> but wither way it's unrelated to rXpY, so whoever's printing that is just wrong
<icecream95> Okay, I'll fix that code then
<icecream95> hanetzer: Is this ARMv7 or AArch64? I remember having problems with Valgrind but I think that was 32-bit ARM, while it's been very reliable on 64-bit, except for missing a couple of dc instructions
<hanetzer> icecream95: armv7, cortex-a7 specifically.
<hanetzer> but yeah. if I'm reading the kmod in ghidra right, it doesn't *do* much except handle interrupts
rkanwal has joined #panfrost
<robmur01> FWIW I don't imagine ARCH_MINOR and ARCH_REV are of much interest
icecream95 has quit [Ping timeout: 480 seconds]
<hanetzer> yeh until the revbump it for some hw errata :P
<robmur01> nah, that's what the VERSION_* fields are for
ggardet has joined #panfrost
guillaume_g has quit [Ping timeout: 480 seconds]
Moe_Icenowy is now known as MoeIcenowy
falk689_ has quit []
falk689 has joined #panfrost
MoeIcenowy is now known as Moe_Icenowy
falk689 has quit [Quit: So Long, and Thanks for All the Fish.]
falk689 has joined #panfrost
Moe_Icenowy is now known as MoeIcenowy
falk689 has quit []
falk689 has joined #panfrost
nlhowell has joined #panfrost
guillaume_g has joined #panfrost
ggardet has quit [Ping timeout: 480 seconds]
camus has quit []
nlhowell has quit [Ping timeout: 480 seconds]
ggardet has joined #panfrost
guillaume_g has quit [Ping timeout: 480 seconds]
falk689 has quit [Remote host closed the connection]
falk689 has joined #panfrost
MajorBiscuit has quit [Quit: WeeChat 3.5]
ggardet has quit []
erle has quit [Ping timeout: 480 seconds]
derzahl has joined #panfrost
rcf has joined #panfrost
erle has joined #panfrost
rkanwal has quit [Ping timeout: 480 seconds]
derzahl has quit [Ping timeout: 480 seconds]
icecream95 has joined #panfrost
<icecream95> Hmm, the stream feature mask has register definitions in kbase
<icecream95> G610 has a register count of 0x5f, so "mov x96, #0xf00" and possibly "mov x95, #0x00f" should fault, I think
<daniels> hanetzer: it wasn't great on A7, but a lot of things weren't great 15 years ago
<hanetzer> true, but I'm also limited to using uclibc because that's all the vendor 'provided' (read: got lucky and found it on the internet)
alarumbe has joined #panfrost
rasterman has quit [Quit: Gettin' stinky!]