#
…

2021-11-10

00:08loki_val has joined #asahi-dev
00:11crabbedhaloablut has quit [Ping timeout: 480 seconds]
00:29marcankettenis: really? this is a genesys chip... did they just use a designware SD controller inside?
00:34yuyichao has quit [Ping timeout: 480 seconds]
02:32yuyichao has joined #asahi-dev
03:52PhilippvK has joined #asahi-dev
03:54rkt has joined #asahi-dev
03:55phiologe has quit [Ping timeout: 480 seconds]
04:59rohin2 has joined #asahi-dev
05:58rohin2 has quit [Ping timeout: 480 seconds]
06:27WhyNotHugo has quit [Read error: Connection reset by peer]
06:31d4ve has quit [Remote host closed the connection]
06:31d4ve has joined #asahi-dev
06:31WhyNotHugo has joined #asahi-dev
06:53squags_ has joined #asahi-dev
07:00squags has quit [Ping timeout: 480 seconds]
07:39marcanmaz: good news, the linux pci side doesn't actually need any changes for m1pro after all
07:40marcanthough I do think I found and fixed a bug
08:34kettenismarcan: the (usual) designware mmc controller isn't a standard SDHC one, so that is unlikely
08:35kettenisbut maybe they use the PCIe endpoint controller
08:35mazmarcan: I'll take patches for the bug!
08:38mazkettenis: I wouldn't be surprised if that was the case. that's the 'easy' way to bolt anything on PCI, leaving to SW to deal with the resulting crap.
08:49aleasto has joined #asahi-dev
10:15j_eyarnd: can m1 mba dt come in after rc1? or does it need to wait for 5.17
10:18arndj_ey: We normally don't take new material after the start of the merge window. For .dts files, there isn't much need anyway, as this can easily be shipped outside of the kernel
10:18j_eyfair, just wondering, it can wait!
10:23sventhe usb reset "fun" won't be before 5.17 anyway
10:25j_eysven: i wanted to get a j313/mba dt in, since m1n1 is checking compatible now
10:25svenfair enough :)
10:25clefter has joined #asahi-dev
10:25kettenishaving the dts in the linux repo really doesn't make a lot of sense for us
10:26ketteniswe should just have blessed device trees in the m1n1 repository since the device tree that actually gets used will come from there
10:26j_eysven: and also you need to turn disable some of the pcie stuff that's in the j274 dts otherwise it crashes on boot on the mba
10:27kettenisbut what we really need is approved pwrmgr bindings before we start curating device trees
10:28j_eykettenis: we're likely to mirror the DTs in the linux repo anyway?
10:28kettenismarcan: i think it is time for another nudge for those
10:29svenj_ey: sure, but we could e.g. add the DTs to m1n1 as soon as they've been reviewed instead of waiting for the next merge window
10:29kettenisj_ey: yes, in principle, but I think iit would be ok for m1n1 to be "ahead" of the ones in the Linux repository from time to time
10:30j_eysven: kettenis true
11:15FireFox317 has quit [Ping timeout: 480 seconds]
11:26FireFox317 has joined #asahi-dev
11:35kettenisfdisk did read the protective mbr alright
12:21Dcow has joined #asahi-dev
13:11phiologe has joined #asahi-dev
13:14PhilippvK has quit [Ping timeout: 480 seconds]
13:16bps has quit [Ping timeout: 480 seconds]
14:02marcankettenis: I think "sync" just didn't work in busybox for some reason
14:02marcanno idea why
14:11bps has joined #asahi-dev
14:55yuyichao has quit [Ping timeout: 480 seconds]
15:00kettenistraditionally alls sync(8) does is call sync(2)
15:01kettenisand sync(2) only makes the kernel push out dirty buffers to disk asynchronously
15:01kettenisthis is why you have to actually type sync three times for it to work ;)
15:02kettenisthat still doesn't guarantee the data actually lands on stable storage
15:02kettenisit might still be cached by the disk itself
15:03kettenisflushing the disk cache is typically only done upon reboot or when the device is put into a deep sleep state
15:13yuyichao has joined #asahi-dev
15:19lethalnyan has joined #asahi-dev
15:21lethalbit has quit [Remote host closed the connection]
16:01FireFox317marcan, commit 3226961a2fb679780d3672f1b970515b366b9b5c in m1n1 also includes writes some register, is this intentional? it is not mentioned in the commit message
16:20marcanfirefox317: whoops, no, fixed
16:20marcan(force pushed because it was the latest commit anyway)
16:28bps has quit [Ping timeout: 480 seconds]
16:33sveni've only seen sync fail so far on FAT32 filesystem fwiw. and that was because it didn't end up issuing the nvme flush command
16:33svenbut everytime that command was issued any changes I did were commited to the disc even when i hard-rebooted afterwards
16:34svenANS does complain about an "unclean reboot" though if you don't destroy the CQ/SQ pair
17:08marcanI *think* that is correct, at least it's what I see in the mmiotrace
17:08marcanalso I have no idea if this does anything useful, but it's another thing macos does that stood out a bit: https://github.com/AsahiLinux/linux/commit/3a623fc4d1bb996e9412f19d322703e98679077c
17:08marcanactually I say "it's what macos does" but rather, it's what I see in the mmiotrace
17:09marcan(i.e. that other bit turns on)
17:09marcanif what macos does is what the linux code says... then I wouldn't be surprised if macos is wrong :D
17:30Dcow_ has joined #asahi-dev
17:30Dcow has quit [Remote host closed the connection]
17:43X-Scale` has joined #asahi-dev
17:44balrogstill no xnu sources...
17:47marcannot like there's anything terribly interesting there these days...
17:47marcanthe moved all the interesting bits to the KDK :/
17:48X-Scale has quit [Ping timeout: 480 seconds]
17:53mazmarcan: first patch seems reasonable. it's all black magic anyway.
17:53desairc has quit [Quit: No Ping reply in 180 seconds.]
17:54riatre has joined #asahi-dev
17:55desairc has joined #asahi-dev
17:55riatre_ has quit [Remote host closed the connection]
18:04bps has joined #asahi-dev
18:13squags_might take a stab at some ANE RE bc it at least looks interesting compared to neural accelerators I've worked with before
18:14squags_just to be clear on the RE policy, logs and looking at intermediate/generated files are fair game, but disassembling disqualifies working on any Linux-end drivers?
18:17clefter has quit [Quit: Connection closed]
18:23X-Scale has joined #asahi-dev
18:27X-Scale` has quit [Ping timeout: 480 seconds]
18:34marcansquags_: basically yes. you should probably use the hypervisor to work out the hardware interface.
18:35marcandisassembling isn't entirely banned outright, but I can't blindly trust that people will know how to do that without getting into trouble
18:36marcane.g. I did some kext disasm the past two days because I was looking for very specific bits of information that I knew were not copyrightable (and would've taken me a significant detour to get with the hypervisor)
18:37squags_makes sense
18:37marcanso I ask that people don't disasm unless I am familiar with how they work, because I've been burned by that before
18:39marcanconversely, I worked out all of AIC/AICv2 without any disasm (though I might peek at the AICv2 driver a bit later only to confirm how the capability registers are interpreted; again a very specific thing that yields non-copyrightable information about the hardware)
18:40marcansquags_: I think ANS is largely fronted by an ASC, so you should be able to use the ASC tracing functionality in the hypervisor (and just write an ANS module as you learn more about it)
18:40svenit’s usually easier to just use the HV or blindly poke some registers anyway. Disassembling kexts is kinda ugly because it’s all c++ code with layers of IOkit indirections
18:41marcanyeah, especially if you want to get the big picture (which is where you run into copyright issues too)
18:42svenoh, also strongly recommended: run strings on the kext and look for _debug and then pass that to xnu as bootargs. Some drivers are incredibly verbose
18:43marcanah yeah, strings OK in my book, as you're largely just seeing log messages and such; just don't go around copying function names or something for no reason
18:43svenI hope “not blindly copying function names” is common sense ;)
18:44marcanI hope so, but you know...
18:44marcan(also, for register names that show up in strings I prefer to rewrite them too)
18:44squags_yeah my vague plan atm is to get a minimal ANE example going in MacOS, dump traces, then try getting it to run in m1n1/similar so I can fuzz out specifics
18:44kit_ty_kate has quit [Remote host closed the connection]
18:45marcanyup, that's the general plan with anything
18:45marcanyou're familiar with the existing userspace side ANE reversing?
18:45marcangeohot and some others looked at some stuff
18:45kit_ty_kate has joined #asahi-dev
18:45marcanbut nobody has looked at the ANS interface
18:45marcanthose are two fairly disconnected aspects/drivers
18:45squags_I've seen that geohot look at stuff yeah, I'm taking a look at some of the ANE Mach-O files
18:46squags_I'm just curious how granular the instruction set will end up being
18:46marcanbe particularly wary of looking at the userspace driver, as that's where you get tons of logic; we do have a hard ban on looking at the userspace GPU driver for this reason.
18:46marcanmuch safer to work out the binaries by differential analysis and such
18:49squags_my intuition is that most of the graph -> model binary stuff wouldn't be particularly useful for like, OpenCL/Tensorflow/whatever else, just need to know opcodes and DMA logistics
18:49marcanyeah, the important bit is figuring out the hardware
18:49marcanthen we can build whatever we want on top
18:50marcanwe don't *want* to emulate anything macOS does layers above that (other than at extremely general publicly documented design levels *if and only if* they make sense)
18:53svenand we already know that macOS drivers aren’t perfect and we can sometimes do better :D
18:55Retr0idmacos doesn't like working with my dell monitor over usb-c, I'm crossing my fingers and hoping that one day in the future it will Just Work under asahi
18:55j_eyRetr0id: i also have a non-working usbc monitor :<
19:15clefter has joined #asahi-dev
19:41svenMy monitor doesn’t work over DisplayPort. It only works if I put a dock with a HDMI converter in between
19:42svenI fear most of that will be issues inside the DCP firmware though :/
19:42j_eythat means its software fixable at least.. if not by "us"
19:46jannauI have an usb-c displayport adapter that doesn't work and a hdmi display which apple broke in iboot 12.0
20:01bps has quit [Ping timeout: 480 seconds]
20:07Dcow_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
20:15Dcow has joined #asahi-dev
20:22poviklet's see what's new audio-wise on the t600x...
20:45povikor not. secondary macos install has 2 hours remaining
20:45povikhow can it be that slow...
20:47j_eywhy not use the asahi installer? :P
20:48leah has joined #asahi-dev
20:50jannauI have a secondary macos install for the hypervisor
20:50povikthat skips over installing macos? TIL
20:52kaprests has joined #asahi-dev
20:53j_eypovik: yes, just downloads the fw
20:56povikj_ey: and what happens if i run the macos kernel under hypervisor? does it find the primary macos install?
20:56povikhow does macos decide where to take its rootfs from?
20:57j_eyi think uh..
20:57j_eydunno!
20:57povikme neither :)
20:58svenno idea how it knows the correct rootfs but it won’t just take the primary one
20:58povikis it in the ADT perhaps?
20:58j_eyoh, so if you want to run macos, then you might need a full install
21:00svenyou can only get away with the installer if you just want to run linux
21:00povikwould love to but we're not there yet :-p
21:03yuyichao_ has joined #asahi-dev
21:06yuyichao has quit [Ping timeout: 480 seconds]
21:17yuyichao has joined #asahi-dev
21:21yuyichao_ has quit [Ping timeout: 480 seconds]
21:22jannauthere is a boot-uuid in "/chosen" in the ADT. I guess that's the rootfs
21:23bps has joined #asahi-dev
21:34povikokay, something's different with the DMA it seems
22:01povik^ i take that back
22:02povikany guesses on what the sn012776 codec is? do you think it's an in-house apple part?
22:02povikhm, ifixit says it's texas instruments
22:03poviklet's look at datasheets then
22:09povikha, found a similar register map in the first datasheet i opened
22:09povikreset values match
22:09poviksn012776 ~ tas2764
22:12bps has quit [Ping timeout: 480 seconds]
22:15jerdnA has joined #asahi-dev
22:37clefter has quit [Ping timeout: 480 seconds]
23:00povikhow many microphones are there supposed to be on the mbp? could it be 12?
23:01povik supports-always-listening = 1
23:02povik^ what a nice property in the ADT
23:31Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
23:38King_InuYasha has quit [Remote host closed the connection]
…