#
…

2021-01-13

00:02bloomok, next up is figuring out some of these memory allocations
00:04aratuk has joined #asahi-gpu
00:08aratuk has quit [Ping timeout: 246 seconds]
00:21robinp has joined #asahi-gpu
00:28wiloon has quit [Quit: Connection closed for inactivity]
00:59bloomAnyone know what KERN_INVALID_ADDRESS means from IOServiceCallMethod?
01:00davidrysk[m]IOServiceCallMethod?
01:01bloom*Connect
01:08davidrysk[m]can you repeat the whole thing?
01:08davidrysk[m]IOServiceCallMethod is what you're looking for?
01:09bloomugh I'm tired
01:09bloomIOConnectCallMethod
01:09bloomall the function names are starting to blend :p
01:30aratuk has joined #asahi-gpu
01:35aratuk has quit [Ping timeout: 260 seconds]
01:43bloomKext build date: Oct 31 2020 00:19:38
01:44bloomWould it be too much to ask that macOS's proprietary kernel modules were reproducible? ;P
02:07bloomJTL: Why what?
02:08JTL> Would it be too much to ask that macOS's proprietary kernel modules were reproducible?
02:08JTLJust asking why, given said modules are proprietary
02:08JTLOtherwise, nevermind
02:08bloomIt was sardonic, hence the emotion :)
02:08bloom*emoticon
02:09bloomJust poking at the fact there's an IOKit call that returns, among other things, that date.
02:11JTLassumed as much
02:12* bloompushed some code to poke iokit
02:31davidrysk[m]bloom: are you still poking at IOConnectCallMethod?
02:32bloomdavidrysk[m]: Yes, why?
02:33davidrysk[m]I started digging at trying to figure out how it does error handling but got sidetracked :)
02:33bloom^ that should reproduce the error
02:34bloomclang compile with -framework IOKit ... the header selectors.h is in wrap/
02:34bloom% ioreg -n AGXDeviceUserClient
02:34bloomwhile it's running will show that it's working, i.e.
02:35bloom | | | "API" = "Equestria"
02:35bloom | | | "AppUsage" = ()
02:35bloom | | | "IOUserClientCreator" = "pid 1183, a.out"
02:36bloom[via an appropriately timed system("ioreg -n AGXDeviceUserClient") ]
02:54ransom has joined #asahi-gpu
03:04davidrysk[m]what do you normally see when AGX_SELECTOR_SET_API is used?
03:29klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:31aratuk has joined #asahi-gpu
03:33bloomdavidrysk[m]: "Metal"
03:36aratuk has quit [Ping timeout: 264 seconds]
03:47wiloon has joined #asahi-gpu
04:21rup has joined #asahi-gpu
04:23rupHello, 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.
04:29rupFrom 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?
04:33davidrysk[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.
04:33davidrysk[m]The documentation is there, but the tooling doesn't function yet
04:35rupOk, so that is something one is blocking on Apple for: the tooling to boot a custom OS object?
04:36davidrysk[m]Yeah. That's more on topic for #asahi though.
04:36davidrysk[m]People here are already doing blackbox RE of the GPU
04:39rupI 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).
04:40rupYes, I have, once, but I need to read it several times, which I shall.
04:41davidrysk[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
04:41davidrysk[m]bloom: have you thought about adding Makefiles? :)
04:47rupdavidrysk[m]: thank you!
04:48rupI have tons of questions to ask.
04:52rupSorry 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.
04:56Tokamak has quit [Ping timeout: 264 seconds]
04:59Tokamak has joined #asahi-gpu
05:54aratuk has joined #asahi-gpu
06:06wiloon has quit [Quit: Connection closed for inactivity]
06:55rup has left #asahi-gpu ["ERC (IRC client for Emacs 27.1)"]
06:56Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:03aratuk has quit [Read error: Connection reset by peer]
07:03aratuk_ has joined #asahi-gpu
07:28aratuk has joined #asahi-gpu
07:28ransom_ has joined #asahi-gpu
07:31ransom has quit [Ping timeout: 246 seconds]
07:31aratuk_ has quit [Ping timeout: 256 seconds]
07:53rup has joined #asahi-gpu
07:57rupdavidrysk[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
07:58klaus has joined #asahi-gpu
07:58rupNow it's clear why marcan mentioned two machines in the Patreon video.
08:15rup has left #asahi-gpu ["ERC (IRC client for Emacs 27.1)"]
08:25ds has joined #asahi-gpu
08:25ds is now known as dhrsong
08:41aratuk has quit [Remote host closed the connection]
08:50dhrsong has quit [Quit: Leaving...]
09:14icecream95 has quit [Ping timeout: 264 seconds]
09:19ransom has joined #asahi-gpu
09:20ransom_ has quit [Ping timeout: 240 seconds]
09:37klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:40klaus has joined #asahi-gpu
10:02klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:33wiloon has joined #asahi-gpu
12:42aratuk has joined #asahi-gpu
12:46aratuk has quit [Ping timeout: 256 seconds]
13:08bloomdavidrysk[m]: Overestimating my ability to use anything but meson tbh
13:08davidrysk[m]I can write some example makefiles
13:08davidrysk[m]Im suggesting plain make at this point
13:09davidrysk[m]No cmake or meson
13:09bloomOh I was just going to figure out how to get meson on macOS
13:09davidrysk[m](I tend to be partial to cmake over meson myself)
13:09davidrysk[m](But here — there’s no need, we’re not doing anything crazy)
13:09j`eybloom: meson just works on macOS
13:10bloomj`ey: perfect :)
13:10j`eyjust clone it from git
13:10bloom👍 thank you
13:10davidrysk[m]Or install using Macports or homebrew
13:16Hexagon has left #asahi-gpu [#asahi-gpu]
14:00aratuk has joined #asahi-gpu
14:04aratuk has quit [Ping timeout: 240 seconds]
14:15tarik02[m] has joined #asahi-gpu
14:43wiloon has quit [Quit: Connection closed for inactivity]
14:44marcanfwiw the m1n1 buildsystem is just a Makefile, but a pretty simple one
14:44marcanI should learn meson...
14:46j`eymarcan: did you push m1n1 anywhere?
14:47marcanI mean I'm mostly just copying and pasting bits of mini and writing some arm64 bootstrap code
14:47marcancan't test it on a real M1 of course
15:00skillfulman23[m] has joined #asahi-gpu
15:23davidrysk[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
15:23davidrysk[m]downside of cmake is a somewhat weird domain-specific language
15:24marcanI've used cmake for some projects, but that was before meson existed
15:24bloom has left #asahi-gpu [#asahi-gpu]
15:25robinp has quit [Read error: Connection reset by peer]
15:29Tokamak has joined #asahi-gpu
15:30jn__davidrysk[m]: how well does cross-compiling work with each of them?
15:30robinp has joined #asahi-gpu
15:31dhewgfor someone feeling cozy with python meson is nice, cmake is bleh
15:33dhewgdunno if cmake is really more flexible though, meson abstracts nicer and requires less platform specific bits
15:37davidrysk[m]yeah that's the thing, cmake scripting is weird
15:45Tokamak has quit [Ping timeout: 256 seconds]
15:49Tokamak has joined #asahi-gpu
15:55Tokamak has quit [Ping timeout: 246 seconds]
15:57Tokamak has joined #asahi-gpu
16:01aratuk has joined #asahi-gpu
16:02Tokamak has quit [Ping timeout: 264 seconds]
16:05ransom_ has joined #asahi-gpu
16:05aratuk has quit [Ping timeout: 256 seconds]
16:09ransom has quit [Ping timeout: 272 seconds]
16:17ransom has joined #asahi-gpu
16:18konrad___ has joined #asahi-gpu
16:19Tokamak has joined #asahi-gpu
16:19konrad__ has quit [Ping timeout: 246 seconds]
16:20ransom_ has quit [Ping timeout: 272 seconds]
16:28Tokamak_ has joined #asahi-gpu
16:29Tokamak has quit [Ping timeout: 260 seconds]
16:33Tokamak has joined #asahi-gpu
16:37Tokamak_ has quit [Ping timeout: 272 seconds]
16:42Tokamak has quit [Ping timeout: 264 seconds]
16:42Tokamak has joined #asahi-gpu
16:53davidrysk[m]cmake greatly improved abstraction in version 3
17:00aratuk has joined #asahi-gpu
17:05aratuk has quit [Ping timeout: 256 seconds]
17:35konrad__ has joined #asahi-gpu
17:35konrad___ has quit [Read error: Connection reset by peer]
17:35konrad___ has joined #asahi-gpu
17:36ShizI'm not a fan of meson OR cmake personally
17:37konra____ has joined #asahi-gpu
17:37Shizit seems to needlessly do stuff like this that breaks stuff, reinventing things that should be left to the toolchain
17:39konrad__ has quit [Ping timeout: 264 seconds]
17:39Shizas 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
17:41konrad___ has quit [Ping timeout: 264 seconds]
17:51konra____ has quit [Remote host closed the connection]
17:51konrad__ has joined #asahi-gpu
17:52konrad___ has joined #asahi-gpu
17:56konrad__ has quit [Ping timeout: 260 seconds]
17:58konrad__ has joined #asahi-gpu
18:01konrad___ has quit [Ping timeout: 260 seconds]
18:08ransom has quit [Quit: Textual IRC Client: www.textualapp.com]
18:32davidrysk[m]my opinion? plain ol' makefiles are best for simple stuff
18:36davidrysk[m]cmake et al are useful for complex projects that pull in lots of dependencies and where you need to support Windows well
18:36davidrysk[m]for what bloom is doing? makefiles are more than sufficient :)
18:49konrad__ has quit [Remote host closed the connection]
18:49konrad__ has joined #asahi-gpu
19:04konrad__ has quit [Remote host closed the connection]
19:05konrad__ has joined #asahi-gpu
19:06konrad__ has quit [Remote host closed the connection]
19:06konrad__ has joined #asahi-gpu
19:06konrad__ has quit [Remote host closed the connection]
19:07konrad__ has joined #asahi-gpu
19:08konrad__ has quit [Remote host closed the connection]
19:08konrad__ has joined #asahi-gpu
19:11konrad__ has quit [Remote host closed the connection]
19:12konrad__ has joined #asahi-gpu
19:15konrad__ has quit [Remote host closed the connection]
19:15konrad__ has joined #asahi-gpu
19:18konrad__ has quit [Remote host closed the connection]
19:19konrad__ has joined #asahi-gpu
19:20HeN has quit [Quit: Connection closed for inactivity]
19:21konrad__ has quit [Remote host closed the connection]
19:21konrad__ has joined #asahi-gpu
19:22konrad__ has quit [Remote host closed the connection]
19:22konrad__ has joined #asahi-gpu
19:23konrad__ has quit [Remote host closed the connection]
19:23konrad__ has joined #asahi-gpu
19:23konrad__ has quit [Remote host closed the connection]
19:24konrad__ has joined #asahi-gpu
19:24konrad__ has quit [Remote host closed the connection]
19:24konrad__ has joined #asahi-gpu
19:24konrad__ has quit [Remote host closed the connection]
19:25konrad__ has joined #asahi-gpu
19:25konrad__ has quit [Remote host closed the connection]
19:25konrad__ has joined #asahi-gpu
19:25konrad__ has quit [Remote host closed the connection]
19:26konrad__ has joined #asahi-gpu
19:26konrad__ has quit [Remote host closed the connection]
19:27konrad__ has joined #asahi-gpu
19:27konrad__ has quit [Remote host closed the connection]
19:27konrad__ has joined #asahi-gpu
19:28konrad__ has quit [Remote host closed the connection]
19:28konrad__ has joined #asahi-gpu
19:28konrad__ has quit [Remote host closed the connection]
19:29konrad__ has joined #asahi-gpu
19:29konrad__ has quit [Remote host closed the connection]
19:30konrad__ has joined #asahi-gpu
19:30konrad__ has quit [Remote host closed the connection]
19:30konrad__ has joined #asahi-gpu
19:31konrad__ has quit [Remote host closed the connection]
19:32konrad__ has joined #asahi-gpu
19:32icecream95 has joined #asahi-gpu
19:32konrad__ has quit [Remote host closed the connection]
19:33konrad__ has joined #asahi-gpu
19:33konrad__ has quit [Remote host closed the connection]
19:33konrad__ has joined #asahi-gpu
19:34konrad__ has quit [Remote host closed the connection]
19:34konrad__ has joined #asahi-gpu
19:36konrad__ has quit [Remote host closed the connection]
19:36konrad__ has joined #asahi-gpu
19:37konrad__ has quit [Remote host closed the connection]
19:37konrad__ has joined #asahi-gpu
19:38neobrainthe 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)
19:39neobrainideally find_package would just try pkg-config automatically... I think somebody was even working on that, but that work hasn't landed yet :(
19:40icecream95 has quit [Read error: Connection reset by peer]
19:40konrad__ has quit [Remote host closed the connection]
19:41konrad__ has joined #asahi-gpu
19:42icecream95 has joined #asahi-gpu
19:43konrad__ has quit [Remote host closed the connection]
19:43konrad__ has joined #asahi-gpu
19:44konrad__ has quit [Remote host closed the connection]
19:44konrad__ has joined #asahi-gpu
19:45konrad__ has quit [Remote host closed the connection]
19:46konrad__ has joined #asahi-gpu
19:46konrad__ has quit [Remote host closed the connection]
19:47konrad__ has joined #asahi-gpu
19:47konrad__ has quit [Remote host closed the connection]
19:47konrad__ has joined #asahi-gpu
19:48konrad__ has quit [Remote host closed the connection]
19:48konrad__ has joined #asahi-gpu
20:04konrad___ has joined #asahi-gpu
20:08konrad__ has quit [Ping timeout: 264 seconds]
20:11konrad___ has quit [Remote host closed the connection]
20:11konrad__ has joined #asahi-gpu
20:12konrad__ has quit [Remote host closed the connection]
20:12konrad__ has joined #asahi-gpu
20:13konrad__ has quit [Remote host closed the connection]
20:13konrad__ has joined #asahi-gpu
20:15modwizcode has joined #asahi-gpu
20:16konrad__ has quit [Remote host closed the connection]
20:16konrad__ has joined #asahi-gpu
20:22konrad__ has quit []
21:02aratuk has joined #asahi-gpu
21:06aratuk has quit [Ping timeout: 260 seconds]
22:01bloom has joined #asahi-gpu
22:47luzma has joined #asahi-gpu
22:48luzma has quit [Client Quit]
23:02aratuk has joined #asahi-gpu
23:07aratuk has quit [Ping timeout: 256 seconds]
23:20jn__ has quit [Ping timeout: 272 seconds]
23:22jn__ has joined #asahi-gpu
…