marcan changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics stack black-box RE and development (NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
<bloom> ok, next up is figuring out some of these memory allocations
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 246 seconds]
robinp has joined #asahi-gpu
wiloon has quit [Quit: Connection closed for inactivity]
<bloom> Anyone know what KERN_INVALID_ADDRESS means from IOServiceCallMethod?
<davidrysk[m]> IOServiceCallMethod?
<bloom> *Connect
<davidrysk[m]> can you repeat the whole thing?
<bloom> yes?
<davidrysk[m]> IOServiceCallMethod is what you're looking for?
<bloom> yes
<bloom> er
<bloom> ugh I'm tired
<bloom> IOConnectCallMethod
<davidrysk[m]> :(
<bloom> all the function names are starting to blend :p
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 260 seconds]
<bloom> Kext build date: Oct 31 2020 00:19:38
<bloom> Would it be too much to ask that macOS's proprietary kernel modules were reproducible? ;P
<JTL> why?
<bloom> JTL: Why what?
<JTL> > Would it be too much to ask that macOS's proprietary kernel modules were reproducible?
<JTL> Just asking why, given said modules are proprietary
<JTL> Otherwise, nevermind
<bloom> It was sardonic, hence the emotion :)
<bloom> *emoticon
<bloom> Just poking at the fact there's an IOKit call that returns, among other things, that date.
<JTL> assumed as much
<JTL> heh
* bloom pushed some code to poke iokit
<davidrysk[m]> bloom: are you still poking at IOConnectCallMethod?
<bloom> davidrysk[m]: Yes, why?
<davidrysk[m]> I started digging at trying to figure out how it does error handling but got sidetracked :)
<bloom> ^ that should reproduce the error
<bloom> clang compile with -framework IOKit ... the header selectors.h is in wrap/
<bloom> % ioreg -n AGXDeviceUserClient
<bloom> while it's running will show that it's working, i.e.
<bloom> | | | "API" = "Equestria"
<bloom> | | | "AppUsage" = ()
<bloom> | | | "IOUserClientCreator" = "pid 1183, a.out"
<bloom> [via an appropriately timed system("ioreg -n AGXDeviceUserClient") ]
ransom has joined #asahi-gpu
<davidrysk[m]> what do you normally see when AGX_SELECTOR_SET_API is used?
klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aratuk has joined #asahi-gpu
<bloom> davidrysk[m]: "Metal"
aratuk has quit [Ping timeout: 264 seconds]
wiloon has joined #asahi-gpu
rup has joined #asahi-gpu
<rup> Hello, I'm completely new to low-level graphics and reverse engineering altogether, but I wish to learn as much as I can following this project.
<rup> From what I gleaned; in hearing marcan on the Patreon video, and IRC logs here, I need, at the least, one Apple M1 machine (say, the Mac Mini) at the outset. The introductory work bloom has talked about has been on MacOS if I understood correctly. For the GPU work, at some point of time, would one need two machines: one to look at MacOS graphics internals, and one to boot the Asahi kernel and run/test a graphics driver?
<davidrysk[m]> The planned goal is to be able to dual boot, but Apple hasn't yet provided the tooling for signing a custom OS object.
<davidrysk[m]> The documentation is there, but the tooling doesn't function yet
<rup> Ok, so that is something one is blocking on Apple for: the tooling to boot a custom OS object?
<davidrysk[m]> Yeah. That's more on topic for #asahi though.
<davidrysk[m]> People here are already doing blackbox RE of the GPU
<rup> I see. Can you describe, in brief, what the workflow is like, for those of you hacking on the GPU/graphics aspect? (Everything is new to me, for example, I don't have a clear idea of 'blackbox RE', but I hope to disambiguate concepts through conversations).
<davidrysk[m]> take a look at bloom's article here: https://rosenzweig.io/blog/asahi-gpu-part-1.html
<rup> Yes, I have, once, but I need to read it several times, which I shall.
<davidrysk[m]> Basically one would compile a simple shader, intercepting the system calls that push it to the GPU, and figure out the format, instruction set, etc
<rup> Ok.
<davidrysk[m]> bloom: have you thought about adding Makefiles? :)
<rup> davidrysk[m]: thank you!
<rup> I have tons of questions to ask.
<rup> Sorry to harp on the first question: what's a recommended hardware setup for the GPU work which for me would be repeating/reproducing all your work? At least that is how I think I could make some headway.
Tokamak has quit [Ping timeout: 264 seconds]
Tokamak has joined #asahi-gpu
aratuk has joined #asahi-gpu
wiloon has quit [Quit: Connection closed for inactivity]
rup has left #asahi-gpu ["ERC (IRC client for Emacs 27.1)"]
Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aratuk has quit [Read error: Connection reset by peer]
aratuk_ has joined #asahi-gpu
aratuk has joined #asahi-gpu
ransom_ has joined #asahi-gpu
ransom has quit [Ping timeout: 246 seconds]
aratuk_ has quit [Ping timeout: 256 seconds]
rup has joined #asahi-gpu
<rup> davidrysk[m]: I got it; I didn't pay attention to the goal to dual boot. So to answer my own question: I could do with one machine; however, switching between them can soon become tedious. Now it
klaus has joined #asahi-gpu
<rup> Now it's clear why marcan mentioned two machines in the Patreon video.
rup has left #asahi-gpu ["ERC (IRC client for Emacs 27.1)"]
ds has joined #asahi-gpu
ds is now known as dhrsong
aratuk has quit [Remote host closed the connection]
dhrsong has quit [Quit: Leaving...]
icecream95 has quit [Ping timeout: 264 seconds]
ransom has joined #asahi-gpu
ransom_ has quit [Ping timeout: 240 seconds]
klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klaus has joined #asahi-gpu
klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wiloon has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 256 seconds]
<bloom> davidrysk[m]: Overestimating my ability to use anything but meson tbh
<davidrysk[m]> I can write some example makefiles
<davidrysk[m]> Im suggesting plain make at this point
<davidrysk[m]> No cmake or meson
<bloom> Oh I was just going to figure out how to get meson on macOS
<davidrysk[m]> (I tend to be partial to cmake over meson myself)
<davidrysk[m]> (But here — there’s no need, we’re not doing anything crazy)
<j`ey> bloom: meson just works on macOS
<bloom> j`ey: perfect :)
<j`ey> just clone it from git
<bloom> 👍 thank you
<davidrysk[m]> Or install using Macports or homebrew
Hexagon has left #asahi-gpu [#asahi-gpu]
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 240 seconds]
tarik02[m] has joined #asahi-gpu
wiloon has quit [Quit: Connection closed for inactivity]
<marcan> fwiw the m1n1 buildsystem is just a Makefile, but a pretty simple one
<marcan> I should learn meson...
<j`ey> marcan: did you push m1n1 anywhere?
<marcan> not yet
<marcan> I mean I'm mostly just copying and pasting bits of mini and writing some arm64 bootstrap code
<marcan> can't test it on a real M1 of course
skillfulman23[m] has joined #asahi-gpu
<davidrysk[m]> both meson and modern cmake are good... a lot of the criticisms of cmake from the meson side are due to older cmake syntax/design; modern cmake fixes most of that and is generally more flexible
<davidrysk[m]> downside of cmake is a somewhat weird domain-specific language
<marcan> I've used cmake for some projects, but that was before meson existed
bloom has left #asahi-gpu [#asahi-gpu]
robinp has quit [Read error: Connection reset by peer]
Tokamak has joined #asahi-gpu
<jn__> davidrysk[m]: how well does cross-compiling work with each of them?
robinp has joined #asahi-gpu
<dhewg> for someone feeling cozy with python meson is nice, cmake is bleh
<dhewg> dunno if cmake is really more flexible though, meson abstracts nicer and requires less platform specific bits
<davidrysk[m]> yeah that's the thing, cmake scripting is weird
Tokamak has quit [Ping timeout: 256 seconds]
Tokamak has joined #asahi-gpu
Tokamak has quit [Ping timeout: 246 seconds]
Tokamak has joined #asahi-gpu
aratuk has joined #asahi-gpu
Tokamak has quit [Ping timeout: 264 seconds]
ransom_ has joined #asahi-gpu
aratuk has quit [Ping timeout: 256 seconds]
ransom has quit [Ping timeout: 272 seconds]
ransom has joined #asahi-gpu
konrad___ has joined #asahi-gpu
Tokamak has joined #asahi-gpu
konrad__ has quit [Ping timeout: 246 seconds]
ransom_ has quit [Ping timeout: 272 seconds]
Tokamak_ has joined #asahi-gpu
Tokamak has quit [Ping timeout: 260 seconds]
Tokamak has joined #asahi-gpu
Tokamak_ has quit [Ping timeout: 272 seconds]
Tokamak has quit [Ping timeout: 264 seconds]
Tokamak has joined #asahi-gpu
<davidrysk[m]> cmake greatly improved abstraction in version 3
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 256 seconds]
konrad__ has joined #asahi-gpu
konrad___ has quit [Read error: Connection reset by peer]
konrad___ has joined #asahi-gpu
<Shiz> I'm not a fan of meson OR cmake personally
konra____ has joined #asahi-gpu
<Shiz> it seems to needlessly do stuff like this that breaks stuff, reinventing things that should be left to the toolchain
konrad__ has quit [Ping timeout: 264 seconds]
<Shiz> as for cmake, Find* scripts have always been broken on my systems a lot of the time, and i can't grok the fact that folks can't just use pkg-config
konrad___ has quit [Ping timeout: 264 seconds]
konra____ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad___ has joined #asahi-gpu
konrad__ has quit [Ping timeout: 260 seconds]
konrad__ has joined #asahi-gpu
konrad___ has quit [Ping timeout: 260 seconds]
ransom has quit [Quit: Textual IRC Client: www.textualapp.com]
<davidrysk[m]> cmake can use pkg-config -- https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
<davidrysk[m]> my opinion? plain ol' makefiles are best for simple stuff
<davidrysk[m]> cmake et al are useful for complex projects that pull in lots of dependencies and where you need to support Windows well
<davidrysk[m]> for what bloom is doing? makefiles are more than sufficient :)
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
HeN has quit [Quit: Connection closed for inactivity]
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
icecream95 has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
<neobrain> the main drawback about the PkgConfig module is that it doesn't cleanly integrate with CMake - so your dependencies now have different discovery code depending on whether you look up via pkgconfig or other means (and there's no "just try everything" solution out of the box)
<neobrain> ideally find_package would just try pkg-config automatically... I think somebody was even working on that, but that work hasn't landed yet :(
icecream95 has quit [Read error: Connection reset by peer]
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
icecream95 has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad___ has joined #asahi-gpu
konrad__ has quit [Ping timeout: 264 seconds]
konrad___ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
modwizcode has joined #asahi-gpu
konrad__ has quit [Remote host closed the connection]
konrad__ has joined #asahi-gpu
konrad__ has quit []
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 260 seconds]
bloom has joined #asahi-gpu
luzma has joined #asahi-gpu
luzma has quit [Client Quit]
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 256 seconds]
jn__ has quit [Ping timeout: 272 seconds]
jn__ has joined #asahi-gpu