#
#asahi-re · 2021-01-23 04:15
davidrysk[m]are there other instructions than those?
#asahi-re · 2021-01-23 04:14
davidrysk[m]but yeah more likely that the hardware does
#asahi-re · 2021-01-23 04:14
davidrysk[m]it's possible that the runtime populates them as needed
#asahi-re · 2021-01-23 03:43
hthh_yeah, i think that's how it works - the SRx names are from mtl-gpu-asmcheck, and the other names are my attempt at mapping the attributes in the metal shading language back to them - not sure if it actually stands for "special register" though
#asahi-re · 2021-01-23 03:07
davidrysk[m]I would not be surprised if they're used for that, e.g. threadgroup_position_in_grid.x always returns the appropriate value for the block in which you are currently executing in
#asahi-re · 2021-01-23 03:06
davidrysk[m]hthh_: those special registers seem similar to the grid/thread/block stuff that cuda and other gpu compute frameworks use
#asahi-re · 2021-01-23 01:06
hthh_i started looking at documenting the GPU ISA (note this is based on mtl-gpu-asmcheck): https://hthh.github.io/m1-gpu-re/
#asahi-re · 2021-01-22 22:05
danb91roxfan will look for that. thanks!
#asahi-re · 2021-01-22 22:01
roxfaniirc someone here made device tree dumper
#asahi-re · 2021-01-22 21:58
roxfanafaik nothing specific yet, but you can probably find some info in ioreg output or device tree
#asahi-re · 2021-01-22 21:44
danb91hi all, i've just started following asahi and I’ve been looking through the GPU code and bloom’s articles (congrats on getting the triangle up!). Do we know yet how IOConnectCallMethod is sending data to the GPU (i.e. what MMIO addresses, etc)?
#asahi-re · 2021-01-22 20:19
modwizcodeAh that's the note I was looking for
#asahi-re · 2021-01-22 20:19
never_releasedno more details
#asahi-re · 2021-01-22 20:19
never_releasedinstruction must not cause a loss of memory coherency.
#asahi-re · 2021-01-22 20:19
never_released> The architecture does not define the exact nature of the low-power state, except that the execution of a WFI
#asahi-re · 2021-01-22 20:17
never_releasedopticron: explicitly not covered.
#asahi-re · 2021-01-22 20:12
opticronyeah, I don't remember reading about register state when I read about WFI, but I could have glossed over it
#asahi-re · 2021-01-22 20:11
modwizcodeYeah I think it's standardized (at least that it can happen) although I cannot find the part where it talked about losing register state but I know I saw a thing about that too.
#asahi-re · 2021-01-22 20:08
never_releasedwhat Apple does is within the spec
#asahi-re · 2021-01-22 20:08
never_releasedwell at least _some_ of them
#asahi-re · 2021-01-22 20:08
never_releasedjix: other cores do
#asahi-re · 2021-01-22 20:08
opticronpretty sure it applies to the A53 as well
#asahi-re · 2021-01-22 20:03
modwizcodeYeah the A57 TRM talks about it that's where I read about it in the first place
#asahi-re · 2021-01-22 19:58
jixdo other arm cores even implement optional power down via wfi at all, or is that an apple only thing?
#asahi-re · 2021-01-22 19:53
modwizcodeoh sorry I thought you meant it's an ARM default to be in that state which didn't make sense to me.
#asahi-re · 2021-01-22 19:45
sven(at least for now)
#asahi-re · 2021-01-22 19:45
svenwe could probably just set it to clockgate only in pongoos/m1n1/whatever bootloader we end up using
#asahi-re · 2021-01-22 19:45
svenbecause apple only has to care about xnu :)
#asahi-re · 2021-01-22 19:42
modwizcodeis there a reason that's the default?
#asahi-re · 2021-01-22 19:06
never_releaseddavidrysk[m]: iBoot has it at the destroy-state-on-WFI default
#asahi-re · 2021-01-22 16:47
davidrysk[m]Bluerise: I'm wondering if iBoot leaves the power control register in the enabled state
#asahi-re · 2021-01-22 16:25
marcanwith the appropriate register saving
#asahi-re · 2021-01-22 16:25
marcanthen in a cpuidle driver, when we need to go into deeper sleep, flip the bit, wfi, flip back
#asahi-re · 2021-01-22 16:25
marcanset the register to only clockgate on wfi
#asahi-re · 2021-01-22 16:24
marcanagraf suggested this too
#asahi-re · 2021-01-22 16:24
marcanI already told never_released that we should go that way
#asahi-re · 2021-01-22 16:24
marcanBluerise: this is why there is a register for this
#asahi-re · 2021-01-22 16:19
Bluerise'if it power collapses, the resume mechanism may be 'interesting''
#asahi-re · 2021-01-22 16:19
Bluerise'the issue is that WFI is not expected to power collapse unless an external register (power control) enables it.'
#asahi-re · 2021-01-22 16:19
Bluerise'during power collapse, WFI could remove all register contents.'
#asahi-re · 2021-01-22 16:19
Bluerisemarcan: from a friend who works on arm stuff:
#asahi-re · 2021-01-22 15:07
davidrysk[m]yeah but fabric cache is closer to L3-level while RAM is RAM
#asahi-re · 2021-01-22 15:07
davidrysk[m]never_released: 16MB cache, interesting
#asahi-re · 2021-01-22 08:24
never_releasedand then RAM is common to all the SoC
#asahi-re · 2021-01-22 08:24
never_releaseddavidrysk[m]: fabric has a 16MB cache
#asahi-re · 2021-01-21 22:35
davidrysk[m](also, Apple has never told us how much shared memory is present inside the SoC)
#asahi-re · 2021-01-21 22:35
davidrysk[m]never_released: btw I am very curious as to how Apple's "fabric" works, especially considering this testing: https://lemire.me/blog/2021/01/06/memory-access-on-the-apple-m1-processor/
#asahi-re · 2021-01-21 14:44
Shizwow
#asahi-re · 2021-01-21 14:14
yrlfnever_released: that is batshit insane
#asahi-re · 2021-01-21 13:43
never_releasedbasically: use nGnRnE and everything on SoC works, but PCIe MMIO gets blackholed, use nGnRE and PCIe works but everything on SoC gets to nowhere

plus ›