2021-02-17
02:02qyousef has quit [Ping timeout: 256 seconds]
02:03riker77_ has joined #asahi-dev
02:04qyousef has joined #asahi-dev
02:04riker77 has quit [Ping timeout: 264 seconds]
02:04riker77_ is now known as riker77
03:12phiologe has quit [Ping timeout: 260 seconds]
03:12phiologe has joined #asahi-dev
06:10VinDuv has joined #asahi-dev
07:33VinDuv has quit [Quit: Leaving.]
08:00maor26 has joined #asahi-dev
08:06amw has joined #asahi-dev
08:25never_releasedmodwizcode: There are two IPIs methods
08:25never_releasedthe AIC IPIs over IRQs
08:25never_releasedand the fast IPIs over FIQs
08:32M0_osx[m] is now known as osxre
08:33osxre is now known as M0_osx[m]
08:57amw has quit [Ping timeout: 246 seconds]
08:59bisko has quit [Ping timeout: 240 seconds]
09:00redbluescreen[m] has quit [Quit: Idle for 30+ days]
09:00rockinrobstar[m] has quit [Quit: Idle for 30+ days]
09:00crafteck[m] has quit [Quit: Idle for 30+ days]
09:46bisko has joined #asahi-dev
10:38amw has joined #asahi-dev
10:42amw has quit [Ping timeout: 256 seconds]
11:00marcanI'm sorry, I can't trust someone who plasters *decompiler output* all over their repo in a *target repo*
11:25bisko_ has joined #asahi-dev
11:26bisko has quit [Read error: Connection reset by peer]
12:00w3a has joined #asahi-dev
12:03w3a has quit [Read error: Connection reset by peer]
12:06JTL has quit [Ping timeout: 246 seconds]
12:14JTL has joined #asahi-dev
12:31bisko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:00odmir has quit [Remote host closed the connection]
16:00bisko has joined #asahi-dev
16:01odmir has joined #asahi-dev
16:16modwizcodeYeah I noticed that it's pretty yikes
16:17modwizcodeThe point still stands that as far as I know what they call the "deferred" ipis are currently not documented on our AIC page
16:26odmir has quit []
16:27jato_ is now known as jato
16:28modwizcodeI think it's fair that someone using a repo as a storage place might keep notes in the comments to explain their code. They make some really weird implementation choices overall though.
16:37yrlfmodwizcode: sure, but as I understand it, a public fork of a GPL project most likely counts as distribution, so adding decompiler output _anywhere_ in that repo is questionable at best from a copyright perspective
16:59odmir has joined #asahi-dev
17:09modwizcodeThat's... probably a good point
17:10modwizcodeAlthough I think you could probably use the argument that technically distribution as a public github repo doesn't imply licensing others to actually use the code.
17:10modwizcodeBut even that is nullified by the fact that they put the GPL license header at the top of the additional files with the copyrighted code decompiled in it
17:21marcanmodwizcode: distribution of any kind triggers the GPL rules, and putting something up on github absolutely counts as distribution
17:30vimal has joined #asahi-dev
17:38VinDuv has joined #asahi-dev
17:49vimal has quit [Remote host closed the connection]
18:05arekm has quit [Ping timeout: 264 seconds]
18:07arekm has joined #asahi-dev
18:17bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:18svenhttps://github.com/AsahiLinux/m1n1/pull/30/files alright.. that's probably everything I can figure out by poking dart mmios and playing with the framebuffer.
18:19svennow I need to somehow bring up something that lets me see the memory space from the device-side :)
18:50modwizcodeOpen up the soc and poke some probes in c;
18:52Namidairo has quit [Read error: Connection reset by peer]
18:54Namidairo has joined #asahi-dev
18:58svenkettenis: so I assume that there needs to be a "bypass base address" and some "bypass enable" flag. I wasn't able to find them though and doing it just with the frame buffer is a little bit inconvenient because I can't control the device address
19:01svenmy best guesses for the bypass enable: 1) the enable/disable flag is in 0xfc, 2) some bit in what I call TCR, 3) somewhere in the 0x140...0x200 range which I haven't spent much time with yet
19:03svenI haven't looked at what corellium does yet though because I wanted to approach this without any assumptions. maybe they have that bypass flag in their tree.
19:05never_releasedfor the DART
19:05never_releasedbypass-only as currently implemented in pongoOS
19:10never_releaseddid you convert the pointer?
19:10never_releasedto the proper base
19:11kettenisthe problem with the framebuffer is that the graphics hardware will be using a translation
19:11svenset32(0x231304000+0x100, (8<<16)|0x100); <-- that should disable translation (by clearing 0x80) and enable bypass mode with a base at the start of RAM
19:12svenand I know where the display engine expects the frame buffer to be at and I wrote 0xff's to the start of ram plus that address
19:20sventhere are more things mapped, but I just recreated the mapping and only mapped that frame buffer. still works then
19:20vimal has joined #asahi-dev
19:23never_releasedwill ask, might be that you'd have to avoid touching the DISP0 DART
19:23never_releasedfor now
19:26vimal has quit [Ping timeout: 272 seconds]
19:31kettenisaccording to the corellium driver you need to write a bitmask of the devices on which to operate in one of those
19:33svenso I've poked that register before and couldn't really see anything. there's a second block of memory in the device tree (for disp0 0x4000 bytes before) and after 0x2000 there is some kinda of pagetable cache
19:45vimal has joined #asahi-dev
19:48svenoh... interesting. writing zero to that register does set bit 0x4 for a brief moment though
19:48modwizcodesven: can you post up a full dump of dart space values somewhere?
19:51svenI always did write32(reg, something); read32(reg); from python. kinda obvious that I couldn't see that busy flag :)
19:51modwizcodeMaybe an op to write and immediately read would be helpful
19:53modwizcodeheh I don't think I've ever heard that one
19:54modwizcodeProbably unlikely but is there any chance there's even just minor overlap with SMMU concepts?
19:56kettenisnot familliar with SMMU, but in the end it's just a page table of sorts and some registers to poke to flush cached translation entries
19:57svenmodwizcode: http://f.svpe.de/fc3a59dd5503abafc94fa5710fd442e2b69fd422619ffc056b8b7a45ca02e625_disp0-dart.txt
19:57modwizcodethanks sven
19:58modwizcodeLots of zeros in the 0x3000 range
20:17kettenisanyway, I'll probably get to the point where I can play with bypass mode for the PCIe devices in a few days
20:19odmir has quit []
20:37brandas[m]1 has joined #asahi-dev
20:47rockinrobstar[m] has joined #asahi-dev
20:51odmir has joined #asahi-dev
20:53brandas[m]1 has left #asahi-dev ["User left"]
20:58modwizcodesven: any progress on bypass mapping the display?
21:04sventhe whole top_byte<<16 | 0x100 would fit though since I can only set 0xff1bdf and that lines up nicely
21:21modwizcodesven: Is the dart device for the display #0? It looks like there's multiple entries in that register set
21:22modwizcodeI meant like there's the #16ish entries or ids or whatever
21:22modwizcodeI love arbitrary numeric identifiers
21:23modwizcodeI got quite mad when I realized that for all the dynamic stuff of pcie, you still have to know what each BAR represents :p
21:23modwizcodeinteresting
21:29svenmodwizcode: https://files.svenpeter.dev/02ac2b93c4421bf45784972abc8c6272f08aecefe9067a167dd308f37db889d4-disp0-dart-mappings.txt those are left over from iboot
21:29modwizcodewhat is this?
21:36adamcstephens has joined #asahi-dev
21:42modwizcodeI'm trying to make sense of those mappings
21:42VinDuv has quit [Quit: Leaving.]
21:45modwizcodesven: did you mess with the mappings before that dump was taken?
21:47modwizcodeweird... why is your fb base at such a strange address...?
21:47modwizcodeEven the mappings don't make sense to me, assuming that the first dev there is the fb mappings, those are different virtual mappings than I would expect
21:47adamcstephens has left #asahi-dev ["The Lounge - https://thelounge.chat"]
21:49sventhe beginning makes sense I think. it's mapping the frame buffer starting from vaddr 0423c000
21:53modwizcoderight but why is your fb from the boot arguments set to what appears to be the physical address?
21:54modwizcodeOh are those backwards?
21:54modwizcode(i.e. device->host)
21:55modwizcodebackwards from what I was thinking
21:56modwizcodewait what type of device are you using sven?
21:57modwizcodewhat model of mac
21:57modwizcodeokay
21:57modwizcodethat doesn't help then :/
21:57modwizcodeI'm confused because your address for the framebuffer is very different from what I was seeing in marcan'
21:57modwizcodemarcan's streams
21:58modwizcodeand it's not like a nice round number too
22:12kubes has quit [Quit: Leaving]
23:28maor26 has quit [Ping timeout: 256 seconds]
23:53zopieux has quit [Ping timeout: 272 seconds]
23:54zopieux has joined #asahi-dev