#
…

2021-04-05

00:28dgb_ has quit [Quit: WeeChat 2.7.1]
00:29dgb has joined #asahi
00:43bpye has quit [Ping timeout: 240 seconds]
00:45bpye has joined #asahi
01:50brinly has quit [Ping timeout: 258 seconds]
01:51stblassitude has quit [Ping timeout: 245 seconds]
01:51kido has quit [Ping timeout: 258 seconds]
01:55stblassitude has joined #asahi
01:56kido has joined #asahi
01:56brinly has joined #asahi
02:01inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
02:06phiologe has quit [Ping timeout: 250 seconds]
02:06phiologe has joined #asahi
02:12inglor has joined #asahi
02:20marcankettenis_: just the code to apply reg/mask/val type stuff? that's fairly obvious; I don't know if we'll end up using the same format, but I don't see that particular bit being a problem
02:29marcanoh you mean the preloader code that pulls the fuses
02:30delrothmarcan: do you not receive Konrad Dybcio's emails btw? :P
02:30marcandelroth: I don't have anything by that name
02:31delroththat would explain it
02:31qncfj has joined #asahi
02:32bgianf has quit [Quit: Lost terminal]
02:32marcanhe replied to list, not reply all
02:33delrothyeah I was just figuring out the same thing
02:33marcanis... that a thing?
02:33marcanI normally expect replies to go to me :p
02:34delroththat seems like a fair expectation
02:40mjg59Communities vary on that a lot, but Cc:ing the poster is normal on kernel-related lists
02:42marcanyeah; if the ML spoofs reply-to then I expect on-list replies, but that isn't the case here
02:42marcaneither way, I can fix this in a sieve rule, probably
02:46Shizmy experience with MLs is that it's common to indicate you're not subscribed so that posters can CC you explicitly
02:48marcanI think that's the case on MLs that do that reply-to munging
02:55zkrx has quit [Ping timeout: 240 seconds]
03:07zkrx has joined #asahi
03:08marvin24 has quit [Ping timeout: 245 seconds]
03:09marvin24 has joined #asahi
03:12odmir has quit [Remote host closed the connection]
03:24bpye has quit [Ping timeout: 240 seconds]
03:29bpye has joined #asahi
04:39Nazral has quit [Ping timeout: 252 seconds]
04:40Nazral has joined #asahi
05:04mxw39 has quit [Quit: Konversation terminated!]
05:06mxw39 has joined #asahi
05:08mxw39 has quit [Remote host closed the connection]
05:09mxw39 has joined #asahi
05:10mxw39 has quit [Remote host closed the connection]
05:10mxw39 has joined #asahi
05:16mxw39 has quit [Remote host closed the connection]
05:17mxw39 has joined #asahi
05:25mxw39 has quit [Quit: Konversation terminated!]
05:25mxw39 has joined #asahi
05:49JaehyukLee[m] has joined #asahi
05:53JaehyukLee[m]Hi, Is it possible to use PMU in m1 machine? I tried to enable user access on the PMU with msr pmuserenr_el0 instruction, but system hangs right away
05:55JaehyukLee[m] is now known as Jaehyuk[m]
05:59marcanJaehyuk[m]: M1 implements apple-proprietary PMCs, not the standard ARM PMU, unfortunatelty
05:59marcan*unfortunately
06:11Jaehyuk[m]marcan: Thank for letting me know that. Does the asahi Linux have reverse-engineered PMU supports?
06:15Jaehyuk[m]or is there any on-going project to reverse engineer their PMU?
06:28marcanthe details are still fairly unknown
06:29modwizcode has quit [Remote host closed the connection]
06:31Jaehyuk[m]marcan: Wow.. I appreciate it! how those performance counters have been reverse engineered..?
06:41marcanthat info is actually from the XNU source code
06:41marcanwith some details added by me by poking around that were missing
06:41marcan(e.g. some stuff about counters 8/9)
06:45mxw39 has quit [Quit: Konversation terminated!]
06:47mxw39 has joined #asahi
06:48mxw39 has quit [Remote host closed the connection]
06:48marcankettenis_: re those fuse tunables, it's just reading some fields and poking them into registers, right? I think it's fine to use the table corellium has for that as a reference
06:49mxw39 has joined #asahi
06:51Jaehyuk[m]marcan: Ah.. good to know that!
06:51amonakovJaehyuk[m]: Dougal Johnson was using the counters to study the microarchitecture: https://dougallj.github.io/applecpu/firestorm.html
06:51Jaehyuk[m]I appreciate it.
06:52Jaehyuk[m]Ah, were those result retrieved on the asahi linux ?
06:54amonakovI believe he did the work on OS X
06:54Jaehyuk[m]yes yes ("/System/Library/PrivateFrameworks/kperf.framework/Versions/A/kperf" in the source code)
06:56Jaehyuk[m]This is a very dumb question. I didn't have a chance to install ashai linux yet and playing with the corellium's linux for several months. Does ashai linux also support booting from nvme?
06:57Jaehyuk[m]cause it seems that it requires another mac for terminal or arduino
06:59marcannvme is coming soon
06:59mxw39 has quit [Remote host closed the connection]
06:59marcanwe've been working on defining the base support, bindings, etc and upstreaming that first; expect a lot of drivers to follow very quickly now that that's almost done :)
07:00mxw39 has joined #asahi
07:02Jaehyuk[m]I see.. this is also very dumb question, why asahi linux started to implement its linux support from the scratch instead of adopting the corellium's linux ? Is it because to provide linux-like environment, booting from grub?
07:02Jaehyuk[m]Sorry to bother you
07:03mxw39 has quit [Client Quit]
07:04mxw39 has joined #asahi
07:04marcanour goal is to upstream support for the M1 into the official kernel, but corellium doesn't seem to be interested in that. they haven't replied to any of the upstreaming e-mail threads.
07:04marcana lot of their code doesn't meet upstreaming standards, and I also don't know how it was developed; I would like some answers about their development methodology before using any of it directly, but all we've gotten so far is silence
07:05marcansince they are not interacting with the community, and we cannot get any feedback on their code, it seems best to just work on it from scratch with an upstreaming mentality
07:06Jaehyuk[m]I totally understand now. Thanks a lot :D
07:17qncfj has quit [Quit: WeeChat 3.0]
07:37jeffmiw_ has joined #asahi
07:42jeffmiw_ has quit [Ping timeout: 260 seconds]
07:50Necrosporus has quit [Ping timeout: 240 seconds]
07:52bisko has joined #asahi
08:10klaus has joined #asahi
08:31furkan has quit [Ping timeout: 260 seconds]
08:32raster has joined #asahi
08:42furkan has joined #asahi
08:46flying_sausages has quit [Ping timeout: 260 seconds]
09:12furkan has quit [Ping timeout: 240 seconds]
09:13odmir has joined #asahi
09:14furkan has joined #asahi
09:17odmir has quit [Ping timeout: 240 seconds]
09:23jeffmiw_ has joined #asahi
09:24jeffmiw_ has quit [Client Quit]
09:35ephe_meral has joined #asahi
09:46ephe_meral1 has joined #asahi
09:48ephe_meral has quit [Ping timeout: 268 seconds]
09:56ephe_meral1 has quit [Ping timeout: 260 seconds]
10:10furkan has quit [Ping timeout: 240 seconds]
10:10ephe_meral1 has joined #asahi
10:17furkan has joined #asahi
10:20flying_sausages has joined #asahi
10:49furkan has quit [Ping timeout: 268 seconds]
10:55vimal has joined #asahi
10:56furkan has joined #asahi
11:11HannaM has joined #asahi
11:28_andy_t_ has joined #asahi
11:36Necrosporus has joined #asahi
11:44rjeffman has joined #asahi
12:13odmir has joined #asahi
12:17odmir has quit [Ping timeout: 240 seconds]
12:18odmir has joined #asahi
13:00kettenis_marcan: cool; i'll probably come up with a somewhat different way to express what bits should be taken and where they should be deposited
13:02kettenis_in order to apply the PCIe PHY I need to enable some clocks and take it out of reset
13:05kettenis_so the knowledge about which bits to poke and check comes from the corellium codebase as well
13:05kettenis_(but no code got copied in the process)
14:46marcankettenis_: this is for m1n1, right?
14:47marcanand yeah, that's basically fine; I'm not too worried about general poke-bits stuff and the clocks (which sven is also looking at) seem pretty simple afaik?
14:47marcanit's nontrivial driver logic where I start worrying
14:48marcangoing to look at PRs now :)
14:51kettenis_marcan: yes, I'm more or less writing the code for m1n1 that is needed to make the pcie "tunables" stick
15:02odmir has quit [Remote host closed the connection]
15:04kettenis_there are some per-port "tunables" that don't survive a PCI Express reset
15:04kettenis_these are basically PCI config space changes on the bridge devices corresponding to the three ports
15:06choozy has joined #asahi
15:07marcansounds like we're going to have to put at least *some* tunables in the DT then
15:07marcanthough those aren't the fuse ones, right?
15:07marcanso there is also the option of just embedding them in the kernel driver, which is how most other drivers do this, though obviously that is less flexible
15:09kettenis_so the tunables that start with "apcie" in the ADT can be applied in a fairly straightforward manner
15:10kettenis_the ones that start with "pcie" are the ones that tweak config space and get undone by a PCI Express reset
15:11kettenis_still need to figure out what happens to the "apcie" ones if I gate/ungate the clocks
15:23marcanrobher: how do you want to handle this kind of thing? tl;dr Apple passes lists of register addr/mask/values in their devicetree. so far the ones we care about seem to be static for any given device, not sure about if they change between devices using the same soc (hopefully not? should check that)
15:24marcanI'm not sure if this is common; I know nvidia used to do hideous stuff along these lines in their L4T tree
15:24marcanone issue is that we don't know what most of these registers are, so we can't come up with nice symbolic names for them
15:24marcanthough for config space, some of it might be totally bog standard stuff we can reverse engineer and handle at a high level sanely
15:29kettenis_some of the modified registers are in standard pcie extended capabilities
15:40odmir has joined #asahi
15:51odmir has quit [Remote host closed the connection]
15:52odmir has joined #asahi
15:56odmir has quit [Ping timeout: 260 seconds]
16:02odmir has joined #asahi
16:06odmir has quit [Ping timeout: 240 seconds]
16:20odmir has joined #asahi
16:22svenpeterMarcan: yeah, clocks are rather simple. Tl;dr: most devices have a clock gate which can be enabled by flipping some bits and some of them additional clocks with a frequency (like uart or iic).
16:23kettenis_svenpeter: can you actually set the frequency of those clocks?
16:23svenpeterThe ones with the frequency are preconfigured by iBoot and we can just pretend they are static for now. From some highly advanced strings reverse engineering I’ve done they might be mux clocks.
16:25kettenis_good, as far as I can determine all the other PCIe tunables stick even if I disable the clocks
16:40svenpeterNice! The same is true for the dart tunables at least. Though I’m not sure they are even required
16:43marcankettenis_: if you have time, you can see if the ones that don't stick can be described in terms of standard caps, and what they do exactly
16:43marcanit might be something completely bog standard or representable at a higher level, that we can turn into sensible driver logic
16:43marcanand drop that tunable entirely
16:43marcanI get the feeling Apple is using this whole "tunables" business, in part, as a lazy "eh, this is the init sequence, and we can't be arsed to put it in xnu"
16:43marcannot actual "magic" stuff
16:44marcanthings that do very specific, sensible things, that we might even want to configure or drive at a higher level
16:44marcanof course some stuff will be magic (e.g. almost certainly the fused bits), anything touching the PHY especially
16:44marcanbut I bet for stuff above that level we can, with enough effort, work out what's going on
16:45marcansince m1n1 gets the tunables from iBoot anyway, we can just apply them; but I'll be very happy if whatever we need to pass on to the kernel is understood more properly
16:45marcantrying to prevent a situation where we end up passing tunable nonsense in the DT that then in the future can go away as we understand things better, if at all possible
16:46marcanheck, for all I know some of this stuff might already have sensible DT bindings in linux; configuring root port settings sounds like something a lot of socs would need
16:48marcanand e.g. I would *love* to understand anything related to axi, memory transactions, etc since I bet we might end up having to fix bugs by tweaking stuff there
16:48Fanfwe has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
16:50Fanfwe has joined #asahi
16:53kettenis_I'll take a closer look later, but it seems they're knocking out some bits related to link power management
16:53kettenis_smells like they're workarounds for silicon bugs that they hope to fix in a future respin
16:54bisko has quit [Quit: Textual IRC Client: www.textualapp.com]
17:00Fanfwe has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
17:02Fanfwe has joined #asahi
17:26_whitelogger has joined #asahi
17:43titanous has left #asahi [#asahi]
17:51ephe_meral1 has quit [Ping timeout: 265 seconds]
18:13choozy has quit [Read error: Connection reset by peer]
18:18choozy has joined #asahi
18:28Fanfwe has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
18:29Fanfwe has joined #asahi
18:30Fanfwe has quit [Client Quit]
18:32Fanfwe has joined #asahi
19:41choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
20:05frode_0xa has joined #asahi
20:08jeffmiw_ has joined #asahi
20:26jeffmiw_ has quit [Remote host closed the connection]
20:27VinDuv has joined #asahi
20:31jeffmiw_ has joined #asahi
20:55vlixa has quit [Remote host closed the connection]
20:57vlixa has joined #asahi
21:01VinDuv has quit [Quit: Leaving.]
22:06Bublik has quit [Ping timeout: 260 seconds]
22:08Bublik has joined #asahi
22:23jeffmiw_ has quit [Remote host closed the connection]
22:52luca020400 has quit [Quit: WeeChat 3.1]
22:53luca020400 has joined #asahi
22:56luca020400 has quit [Read error: Connection reset by peer]
22:56luca020400 has joined #asahi
23:02PendulumSwinger has quit [Quit: Ping timeout (120 seconds)]
23:03PendulumSwinger has joined #asahi
23:03Fanfwe has quit [Ping timeout: 265 seconds]
23:03Fanfwe has joined #asahi
23:04milek7 has quit [Remote host closed the connection]
23:05milek7 has joined #asahi
23:07luca020400 has quit [Remote host closed the connection]
23:07luca020400 has joined #asahi
23:13jeffmiw_ has joined #asahi
23:17jeffmiw_ has quit [Ping timeout: 265 seconds]
…