marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
swampertx[m] has joined #asahi-dev
xorly[m] has joined #asahi-dev
bluetail0 has joined #asahi-dev
Kalissaac[m] has joined #asahi-dev
meta[m] has joined #asahi-dev
c1truz[m] has joined #asahi-dev
<marcan> __TEXT is probably mapped via DAPF?
meowcat285[m] has joined #asahi-dev
emilytrausheher[m] has joined #asahi-dev
emergenz[m] has joined #asahi-dev
<rqou_> idk if this is the same thing or just a naming clash, but "piodma" in the context of AVD and the hardware scaler refers to an actual piece of hardware that can copy data to/from hardware registers according to memory descriptors
nulltemp[m] has joined #asahi-dev
AnushervonTabarov[m] has joined #asahi-dev
<rqou_> for AVD this is actually used, but for the scaler it does not appear to be used (but the driver contains code for it)
<rqou_> i have tested the AVD one with a hardware test, but i have not personally tested the scaler one (but the "shape" of the register interface is definitely identical)
<rqou_> the memory descriptors are accessed behind a dart, which is what `mapper-avd0-piodma` appears to describe
handofstand[m] has joined #asahi-dev
ella-0[m] has joined #asahi-dev
AdityaJS[m] has joined #asahi-dev
houlton[m] has joined #asahi-dev
SergioLopez[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
AnthonyGlyadchenko[m] has joined #asahi-dev
TellowKrinkle[m] has joined #asahi-dev
maxim[m] has joined #asahi-dev
mathmagician_x[m] has joined #asahi-dev
tensorcat[m] has joined #asahi-dev
saintstellaris[m] has joined #asahi-dev
catinahatisback[m] has joined #asahi-dev
DragoonAethis has quit [Quit: hej-hej!]
DragoonAethis has joined #asahi-dev
headscracher[m] has joined #asahi-dev
enchiladasconpinguino[m] has joined #asahi-dev
ruby10x[m] has joined #asahi-dev
ianlienfa[m] has joined #asahi-dev
IanPlatt[m] has joined #asahi-dev
ruffiely[m] has joined #asahi-dev
RianSouzaSantos[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
TristenNollman[m] has joined #asahi-dev
ryanmitts[m] has joined #asahi-dev
SuchirMishra[m] has joined #asahi-dev
ryanhrob[m] has joined #asahi-dev
pedrohos[m] has joined #asahi-dev
katatafjsh[m] has joined #asahi-dev
hpux735[m] has joined #asahi-dev
Kevy[m] has joined #asahi-dev
cochaviz[m] has joined #asahi-dev
mofux[m] has joined #asahi-dev
deathdisco[m] has joined #asahi-dev
madpro[m] has joined #asahi-dev
genhack[m] has joined #asahi-dev
kryptnd[m] has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
Mary has quit [Quit: The Lounge - https://thelounge.chat]
Mary has joined #asahi-dev
threerik[m] has joined #asahi-dev
pashencija[m] has joined #asahi-dev
huddy987[m] has joined #asahi-dev
sunyiynus[m] has joined #asahi-dev
MichaelToomim[m] has joined #asahi-dev
mangobay[m] has joined #asahi-dev
Eighth_Doctor has joined #asahi-dev
pazyleon[m] has joined #asahi-dev
pg12_ has quit []
pg12 has joined #asahi-dev
princesszoey5 has joined #asahi-dev
milan475[m] has joined #asahi-dev
pequalsnp[m] has joined #asahi-dev
impurity0174[m] has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey5 is now known as princesszoey
Soroush has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
thelounge7571340 has quit [Remote host closed the connection]
princesszoey has joined #asahi-dev
mkwa[m] has joined #asahi-dev
XProtocol[m] has joined #asahi-dev
daftfrog[m] has joined #asahi-dev
firox263[m] has joined #asahi-dev
larabee[m] has joined #asahi-dev
chadmed[m] has joined #asahi-dev
badlydrawnface[m] has joined #asahi-dev
polarn[m] has joined #asahi-dev
zhxchen17[m] has joined #asahi-dev
sanarinomi[m] has joined #asahi-dev
pkrenz[m] has joined #asahi-dev
PedroPortela[m] has joined #asahi-dev
balrog has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
sajattack[m] has joined #asahi-dev
thelounge7571340 has quit [Read error: Connection reset by peer]
bad1conscience[m] has joined #asahi-dev
revokeduser[m] has joined #asahi-dev
bluetail03 has joined #asahi-dev
min[m] has joined #asahi-dev
latosca[m] has joined #asahi-dev
bluetail0 has quit [Ping timeout: 480 seconds]
bluetail03 is now known as bluetail0
Tsic[m] has joined #asahi-dev
espo has quit [Ping timeout: 480 seconds]
skoobasteeve has quit [Ping timeout: 480 seconds]
ckb has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
balrog has joined #asahi-dev
<sven> yeah, __TEXT is mapped inside DAPF iirc
ckb has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
pjakobsson has joined #asahi-dev
princesszoey has quit [Read error: Connection reset by peer]
princesszoey has joined #asahi-dev
SSJ_GZ has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
<sven> marcan: https://github.com/AsahiLinux/m1n1/blob/main/src/afk.c#L257 i'm a bit confused by that code. shouldn't it always update rptr and not only when the buffer wraps around?
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<sven> oh... nvm. that happens in afk_epic_rx_ack
sam_ has quit [Read error: Connection reset by peer]
goldsoultheory has joined #asahi-dev
sam_ has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
Alslayer[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
princesszoey has quit [Read error: Connection reset by peer]
Major_Biscuit has joined #asahi-dev
princesszoey has joined #asahi-dev
princesszoey has quit [Remote host closed the connection]
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
princesszoey has joined #asahi-dev
DarkShadow44 has quit []
DarkShadow44 has joined #asahi-dev
princesszoey has quit [Remote host closed the connection]
princesszoey has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
kov has quit [Quit: Coyote finally caught me]
bluetail0 has quit [Ping timeout: 480 seconds]
dabaum|2er0 has quit [Ping timeout: 480 seconds]
<rmk> well, 6.0.0+ booted with 4k page sizes...
<rmk> however, I get this warning at boot:
<rmk> DMA-API: nvme-apple 27bcc0000.nvme: mapping sg segment longer than device claims to support [len=69632] [max=65536]
<rmk> dma_map_sg() called from apple_nvme_queue_rq()
<sven> huh, nvme isn't behind an iommu (well, at least from dmaapi's point of view) so that should be unrelated to the 4k patch
<mps> rmk: do you have patch somewhere for 4K pages
<rmk> mps: one moment...
<sven> maybe that warning was only introduced in 6.0?
<mps> rmk: ty
<rmk> sven: possibly but I think I've seen it occasionally with 5.19 as well
<sven> huh, interesting. i never saw it
<sven> sounds like a bug somewhere in the nvme code then
<rmk> or maybe its to do with the 4k iommu patch
<sven> i'd be surprised
<sven> nvme doesn't use dma-api
<sven> looks like that warning is only triggered when DMA_API_DEBUG_SG is enabled
<sven> I don't think I ever ran a kernel with that
<sven> I guess dma_get_max_seg_size falls back to SZ_64K
<rmk> sven: it does use the DMA API
<sven> yeah... pci.c calls dma_set_max_seg_size(dev->dev, 0xffffffff); which I must've dropped when writing apple.c by accident
<sven> rmk: er, sorry, I meant "it doesn't use dma-iommu"
<rmk> ah
kov has joined #asahi-dev
<rmk> I have:
<rmk> dma_set_max_seg_size(dev->dev, 0xffffffff);
<rmk> dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1);
<sven> yeah, sounds about right
<sven> dma_set_min_align_mask is a few lines above in pci.c
<sven> not sure it needs that, let me check what that does
<rmk> so I wonder why this warning is triggering
<sven> * Either the driver forgot to set dma_parms appropriately, or
<sven> * whoever generated the list forgot to check them.
<sven> sounds like the first issue to me ;)
<sven> 64K seems to be the default max sg list length but the nvme controlelr can do more than that
<sven> so whenever you get a large transfer that warning will fire
<rmk> hmm.
<rmk> in /sys/bus/platform/drivers/nvme-apple/27bcc0000.nvme/:
<rmk> supplier:platform:27bc50000.iommu/
vup has joined #asahi-dev
<sven> yes, nvme is behind something called SART that vaguely resembles an iommu
<sven> but it doesn't use dma-iommu
<rmk> ok
<rmk> could it be that we're accessing the nvme before nvme_reset_work() gets run?
<sven> I don't think that would work :D
<rmk> that's the theory...
<sven> i think it's really just that missing dma_set_max_seg_size call in apple.c
<rmk> ah, it uses its own
<sven> yes. it's not behind pcie on these SoCs
<sven> I based apple.c on pci.c and probably just dropped that call
mkurz has quit [Quit: Leaving]
<sven> I know we don't need dma_set_min_align_mask because that's a workaround for broken nvme devices using swiotlb
<sven> and I probably assumed the dma_set_max_seg_size is related to that workaround
<rmk> ok, building...
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<rmk> sven: seems to be happy
<sven> looks good to me
<Dcow[m]> rmk: source link is broken http://www.home.armlinux.org.uk/~rmk/src/highlight.c
<rmk> yep, quite possibly
<rmk> sven: can I add a suggested-by for you for that?
<sven> sure
<rmk> patch sent.
bluetail0 has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
the_lanetly_052 has joined #asahi-dev
the_lanetly_052 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
yamii_ has joined #asahi-dev
yamii has quit [Read error: Connection reset by peer]
amarioguy2 has joined #asahi-dev
<amarioguy2> marcan: just saw your response, lol i completely didn't realize i was enabling syscall hooks (i needed them for firmware dev which was why i had them on) when booting XNU
<amarioguy2> but yea i'll take note of that extra boot arg when collecting sep data today
<amarioguy2> (2 at the end of my name because my main username is taken by my desktop and I'm not at my desktop for a while)
yamii_ has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
dabaum|2er0 has joined #asahi-dev
yamii_ has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jlco_ has joined #asahi-dev
jlco has quit [Ping timeout: 480 seconds]
amarioguy2 has quit [Ping timeout: 480 seconds]
amarioguy2 has joined #asahi-dev
goldsoultheory has joined #asahi-dev
<rmk> sven: I'll update the patch in a few days.
<sven> Nice! I do wonder if I missed anything else from pci.c that we just haven’t run into yet now though
<rmk> can't really diff the two drivers, because diff can't cope with the changes
<sven> yeah, it’s diverged quite a bit. I’ll take a closer look this weekend
<sven> it’s probably fine but I can’t shake the feeling that I overlooked something else ;)
<rmk> is there any way we could share code between the two to reduce the probability of divergence?
<sven> the initial version did that but the nvme maintainers preferred to have it separate
<rmk> ok, let me put it another way then :)
<rmk> is it worth creating a library that could be used by both drivers? :D
<sven> it’s probably possible to share e.g. the whole dma mapping code but the nvme guys are very concerned about performance in pci.c
<sven> so you’d need to convince them ;)
<sven> that was the initial discussion fwiw, https://lore.kernel.org/linux-nvme/YRE7vCyn9d1ClhRm@infradead.org/
Major_Biscuit has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
thelounge7571340 has quit [Remote host closed the connection]
amarioguy2 has quit [Ping timeout: 480 seconds]
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goldsoultheory has joined #asahi-dev
goldsoultheory has quit []
<rmk> sven: ok, I'll take a look, thanks.
goldsoultheory has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
chipxxx has joined #asahi-dev
chipxxx has quit [Remote host closed the connection]
chipxxx has joined #asahi-dev
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
DarkShadow4444 has joined #asahi-dev
DarkShadow44 has quit [Ping timeout: 480 seconds]
ljs has joined #asahi-dev
<ljs> this may be a stupid question, but how can I grab a working config file for asahi-wip?
<ljs> j`ey: cheers, I looked in that repo but somehow missed that... :)
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
SuperED has joined #asahi-dev
SuperED has quit [Remote host closed the connection]
ljs has quit [Remote host closed the connection]
ljs has joined #asahi-dev
ljs has quit [Remote host closed the connection]
ljs has joined #asahi-dev
<ChaosPrincess> marcan: hey, since you already have the spi nvram working on m1 pro/max, can you tell me the output of ` hexdump -C path/to/nvram | grep nvram` on those machines? i want to check some offsets that do not seem to be encoded in the adt
ljs has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
chipxxx has quit [Read error: Connection reset by peer]
chipxxx has joined #asahi-dev
chipxxx has quit [Read error: Connection reset by peer]
amarioguy2 has joined #asahi-dev
amarioguy2 has quit [Remote host closed the connection]
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
<amarioguy> alright perfect, at the login screen!
<amarioguy> (for sep tracing i mean)
<amarioguy> what's the priority stuff we want to be tracing? SKS stuff?
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<amarioguy> sep tracer's still broken :/
ljs has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goldsoultheory has joined #asahi-dev
ljs has quit [Remote host closed the connection]
ljs has joined #asahi-dev
ljs has quit [Remote host closed the connection]
ljs has joined #asahi-dev
ljs has quit [Remote host closed the connection]
ljs has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ljs has quit [Remote host closed the connection]
SSJ_GZ has quit [Ping timeout: 480 seconds]
ljs has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
ljs has quit [Remote host closed the connection]
bisko has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<amarioguy> huh seems like when the call to iomon.poll is taken, seems like the readmem call inside that poll call is taking 3 args when it only can handle 2
<amarioguy> gonna try changing the readmem_iova function prototype seeing what that does
<amarioguy> looks like that did it!
<amarioguy> the amount of tracing is well.... a lot
<amarioguy> me thinks whether I should add a "save hv log" option to run_guest or smth because the amount of logs here is patently ridiculous
<amarioguy> though admittedly part of me is slightly unsatisfied not knowing why the iomon.poll method was passing in 3 arguments (the third being "readfn" which is unnecessary as the sep tracer already defines readmem_iova?
<amarioguy> would this be a consequence of the HV abi instability? this code was 6 months old after all
<amarioguy> also yes the macos desktop is rendering at about 2 frames per second :^)