ChanServ changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
skipwich has joined #asahi
riker77_ has joined #asahi
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
yuyichao has quit [Ping timeout: 480 seconds]
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi
tasild[m] has joined #asahi
Andalu30 has joined #asahi
bps has joined #asahi
jeffmiw has joined #asahi
balrog has quit [Quit: Bye]
jkkm has quit [Read error: Connection reset by peer]
balrog has joined #asahi
jkkm has joined #asahi
rcombs has quit [Quit: ZNC - http://znc.in/ZNC]
hspak6 has joined #asahi
TheJollyRoger has quit [Remote host closed the connection]
austriancoder_ has joined #asahi
hspak has quit [Read error: Connection reset by peer]
hspak6 is now known as hspak
rcombs has joined #asahi
austriancoder has quit [Ping timeout: 480 seconds]
austriancoder_ has quit []
austriancoder_ has joined #asahi
austriancoder_ is now known as austriancoder
austriancoder has quit []
austriancoder has joined #asahi
<j_ey> jannau: do you understand the sizes of the gpio/pinctrl controllers? they seem way bigger than anything that looks like it is accessed
<sven> that's pretty common in the ADT fwiw
<sven> there's also one DART that has a size of 0x20000 or so but is really just the same 16k repeated over and over
<j_ey> as in accessing reg + 0 is the same as reg + 16k?
<sven> yeah
<j_ey> this has size 0x100000, that's 1mb, waste of ram!!
<sven> what probably happens internally is that the address decoding/muxing logic uses the upper $whatever bits and some of the lower address lines either just aren't connected or are ignored by the gpio/pinctrl hw block
<j_ey> sven: is there any reason to use that size though?
<j_ey> or can we just map 1 page for it
<sven> you can just map a single page
<j_ey> (also I assume if I put 0x1000 there, it's rounded up to PAGE_SIZ)
<sven> it'll certainly map the size rounded up to the next PAGE_SIZE, but accessing anything past 0x1000 is probably undefined then :)
<pipcet[m]> so our theory is the ADT contains the entire decoded range, not the actually accessible range? That makes sense from a HW POV, I guess...
Andalu30 has quit [Quit: Konversation terminated!]
<marcan> it's not consistent
<marcan> the ADT is written by humans
<marcan> we should try to be more consistent than them and declare only the real ranges
<marcan> no mirrors
<j_ey> marcan: is this wrong: python3.9 proxyclient/tools/run_guest.py -m proxyclient/m1n1/trace/gpio.py m1n1-payload.macho ?
<j_ey> I'm getting 'ImportError: attempted relative import with no known parent package'
<marcan> sounds like it should work
<marcan> uhm
<marcan> where?
<j_ey> File "proxyclient/m1n1/trace/gpio.py", line 3, in <module>
<j_ey> from ..hv import TraceMode
<marcan> oh wait
<marcan> hv/trace_gpio.py, not m1n1/trace/gpio.py
<marcan> the hv scripts are all in hv/
<j_ey> thanks, that works!
<cgv[m]> has anyone played with perf counters in M1? I'm trying to use m1n1 to run microbenchmarks (setting up the counters and env from python), but I'm having some issues. e.g. evt=0x1 (retired uops) only seem to work in PMC1, I'm not able to set it up in PMC2, but evt=0x2 (cycle count) works well with any PMC
<dougall> heh, yeah, i have
<cgv[m]> dougall: i saw your repo :) did you experience anything like the above? just to be sure whether it's expected or if i'm doing something stupid
<cgv[m]> probably the later, since i don't seem to be able to observe many events :(
<dougall> so, I'm a little confused as I didn't think PMC1 was configurable? but yes - there are a number of events that only work on a subset of PMCs, e.g. retired uops (1) I can only use on PMC7
<cgv[m]> no, it's not, but i was trying to count the same event with another counter; ok, that make sense, i will check what-works-where, thx
<dougall> yeah - I've been working on that a bit - the difficulty is finding ways to trigger the events so I can see which PMCs support them, but I had some luck. Let me know if there's anything specific you're wondering about, or I'll try to put together some updated notes soon. For the officially documented ones /usr/share/kpep/a14.plist has the info
<dougall> (no idea if you're a mac user, but i use `plutil -convert json -o - /usr/share/kpep/a14.plist` to get it as json, and the "counters_mask" has bit (1<<n) set for PMCn iirc)
<cgv[m]> thanks, I'll start from that and see if I manage to count more events
<cgv[m]> event and PMCs where I observe changes (i'm not yet exercising all of them)
<dougall> nice! can i ask what you're working on/towards? just exploring? (there is a fun edge-case to watch out for with inst_int_store (0x96) and INST_LDST (0x9b) counting fused AMX instructions differently on PMC7, which counts instructions, vs PMC5/6, which count fused ops)
<cgv[m]> just exploring, i want to get a nice low-noise environment to quickly run snippets in different contexts, after that i guess some idea will popup
<cgv[m]> at some point i was tempted to port nanobench to arm, maybe m1n1 could be a good env for that?
<pipcet[m]> cgv: rr support for M1 would be really nice, or at least evaluating whether it's possible (https://github.com/rr-debugger/rr)
<dougall> sounds gret :) yeah - last i heard m1n1 doesn't do frequency scaling, so it'd be convenient in that respect - I haven't got around to setting it up myself, but I've been meaning to do that and try to reproduce something like Sushi Roll (https://gamozolabs.github.io/metrology/2019/08/19/sushi_roll.html) at some point
<cgv[m]> that would be super cool
<milek7> rr doesn't work on arm
<pipcet[m]> there's some aarch64 code in the tree now, only recalled that...
<milek7> ah, I didn't know it
yuyichao has quit [Ping timeout: 480 seconds]
skipwich has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
bps has joined #asahi
Andalu30 has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
Andalu30 has quit [Remote host closed the connection]
thunfisch has quit [Quit: frrrp!]
jbowen has joined #asahi
thunfisch has joined #asahi
artemist has quit [Quit: artemist]
artemist has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
Ziemas has quit [Server closed connection]
Ziemas has joined #asahi
segher has quit [Server closed connection]
<sven> uh... i just realized something weird about the nvme iommu. so the normal io queue is created using an admin io queue command with the dma specified in one of the fields. that dma address is whitelisted using the nvmmu. so far so good
<sven> but then the nvmmu entry is deleted but ANS can still access the io queue dma buffer just fine. so where exactly is it still whitelisted?!
<alyssa> dougall: there's a cpufreq driving floating around, dunno if it's functional
<alyssa> sven: 🤔
<sven> and weird, the shutdown process looks like a normal nvme shutdown process. so why doesn't it complain about an uncleanReboot only when macOS does it? :.
<sven> *:/
<alyssa> sven: Any side channel interactions (e.g. with SMC)?
vup has quit [Server closed connection]
<sven> nothing on the ANS mailbox, but i should also trace the SMC mailbox.
<alyssa> nod
<roxfan> differential debugging
<sven> i'm still confuse about the io queue dma buffer :/
<sven> i'd claim that what we call NVMMU actually isn't an IOMMU-like block, but it's handled inside PPL which is usually reserve for stuff like iommus
<roxfan> aren't we all
<sven> *reserved
nyuhu has quit [Server closed connection]
nyuhu has joined #asahi
<alyssa> sven: where does the name NVMMU come from?
<roxfan> from nvme?
kettenis_ has quit [Ping timeout: 480 seconds]
kettenis has joined #asahi
Andalu30 has joined #asahi
vup has joined #asahi
Shiz has quit [Server closed connection]
Shiz has joined #asahi
Andalu30 has quit [Remote host closed the connection]
citizen1[m] has joined #asahi
eta has quit [Server closed connection]