#
…

2022-10-12

00:00swampertx[m] has joined #asahi-dev
00:04xorly[m] has joined #asahi-dev
00:06bluetail0 has joined #asahi-dev
00:06Kalissaac[m] has joined #asahi-dev
00:06meta[m] has joined #asahi-dev
00:07c1truz[m] has joined #asahi-dev
00:07marcan__TEXT is probably mapped via DAPF?
00:09meowcat285[m] has joined #asahi-dev
00:14emilytrausheher[m] has joined #asahi-dev
00:15emergenz[m] has joined #asahi-dev
00:17rqou_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
00:17nulltemp[m] has joined #asahi-dev
00:17AnushervonTabarov[m] has joined #asahi-dev
00:17rqou_for AVD this is actually used, but for the scaler it does not appear to be used (but the driver contains code for it)
00:18rqou_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)
00:20rqou_the memory descriptors are accessed behind a dart, which is what `mapper-avd0-piodma` appears to describe
00:25handofstand[m] has joined #asahi-dev
00:27ella-0[m] has joined #asahi-dev
00:30AdityaJS[m] has joined #asahi-dev
00:31houlton[m] has joined #asahi-dev
00:32SergioLopez[m] has joined #asahi-dev
00:32thelounge7571340 has joined #asahi-dev
00:33thelounge7571340 has quit [Remote host closed the connection]
00:38AnthonyGlyadchenko[m] has joined #asahi-dev
00:39TellowKrinkle[m] has joined #asahi-dev
00:42maxim[m] has joined #asahi-dev
00:51mathmagician_x[m] has joined #asahi-dev
00:53tensorcat[m] has joined #asahi-dev
00:54saintstellaris[m] has joined #asahi-dev
00:58catinahatisback[m] has joined #asahi-dev
01:00DragoonAethis has quit [Quit: hej-hej!]
01:00DragoonAethis has joined #asahi-dev
01:09headscracher[m] has joined #asahi-dev
01:11enchiladasconpinguino[m] has joined #asahi-dev
01:31ruby10x[m] has joined #asahi-dev
01:32ianlienfa[m] has joined #asahi-dev
01:33IanPlatt[m] has joined #asahi-dev
01:34ruffiely[m] has joined #asahi-dev
01:39RianSouzaSantos[m] has joined #asahi-dev
01:39thelounge7571340 has joined #asahi-dev
01:40thelounge7571340 has quit [Remote host closed the connection]
01:44TristenNollman[m] has joined #asahi-dev
02:03ryanmitts[m] has joined #asahi-dev
02:04SuchirMishra[m] has joined #asahi-dev
02:05ryanhrob[m] has joined #asahi-dev
02:06pedrohos[m] has joined #asahi-dev
02:08katatafjsh[m] has joined #asahi-dev
02:12hpux735[m] has joined #asahi-dev
02:20Kevy[m] has joined #asahi-dev
02:23cochaviz[m] has joined #asahi-dev
02:30mofux[m] has joined #asahi-dev
02:30deathdisco[m] has joined #asahi-dev
02:34madpro[m] has joined #asahi-dev
02:39genhack[m] has joined #asahi-dev
02:40kryptnd[m] has joined #asahi-dev
02:45princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
02:46princesszoey has joined #asahi-dev
02:46thelounge7571340 has joined #asahi-dev
02:47thelounge7571340 has quit [Remote host closed the connection]
02:54Mary has quit [Quit: The Lounge - https://thelounge.chat]
02:54Mary has joined #asahi-dev
03:02threerik[m] has joined #asahi-dev
03:07pashencija[m] has joined #asahi-dev
03:14huddy987[m] has joined #asahi-dev
03:22sunyiynus[m] has joined #asahi-dev
03:22MichaelToomim[m] has joined #asahi-dev
03:27mangobay[m] has joined #asahi-dev
03:28Eighth_Doctor has joined #asahi-dev
03:32pazyleon[m] has joined #asahi-dev
03:32pg12_ has quit []
03:33pg12 has joined #asahi-dev
03:44princesszoey5 has joined #asahi-dev
03:47milan475[m] has joined #asahi-dev
03:49pequalsnp[m] has joined #asahi-dev
03:52impurity0174[m] has joined #asahi-dev
03:53princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
03:53princesszoey5 is now known as princesszoey
03:54Soroush has joined #asahi-dev
03:58thelounge7571340 has joined #asahi-dev
03:58princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
03:59thelounge7571340 has quit [Remote host closed the connection]
03:59princesszoey has joined #asahi-dev
04:10mkwa[m] has joined #asahi-dev
04:12XProtocol[m] has joined #asahi-dev
04:20daftfrog[m] has joined #asahi-dev
04:21firox263[m] has joined #asahi-dev
04:26larabee[m] has joined #asahi-dev
04:28chadmed[m] has joined #asahi-dev
04:33badlydrawnface[m] has joined #asahi-dev
04:34polarn[m] has joined #asahi-dev
04:38zhxchen17[m] has joined #asahi-dev
04:49sanarinomi[m] has joined #asahi-dev
04:53pkrenz[m] has joined #asahi-dev
04:58PedroPortela[m] has joined #asahi-dev
04:59balrog has quit [Ping timeout: 480 seconds]
05:00thelounge7571340 has joined #asahi-dev
05:01sajattack[m] has joined #asahi-dev
05:01thelounge7571340 has quit [Read error: Connection reset by peer]
05:06bad1conscience[m] has joined #asahi-dev
05:09revokeduser[m] has joined #asahi-dev
05:13bluetail03 has joined #asahi-dev
05:15min[m] has joined #asahi-dev
05:15latosca[m] has joined #asahi-dev
05:21bluetail0 has quit [Ping timeout: 480 seconds]
05:21bluetail03 is now known as bluetail0
05:27Tsic[m] has joined #asahi-dev
05:31espo has quit [Ping timeout: 480 seconds]
05:33skoobasteeve has quit [Ping timeout: 480 seconds]
05:54ckb has quit [Ping timeout: 480 seconds]
06:01thelounge7571340 has joined #asahi-dev
06:02thelounge7571340 has quit [Remote host closed the connection]
06:23balrog has joined #asahi-dev
06:27svenyeah, __TEXT is mapped inside DAPF iirc
06:32ckb has joined #asahi-dev
06:37princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
06:38princesszoey has joined #asahi-dev
06:39pjakobsson has joined #asahi-dev
06:49princesszoey has quit [Read error: Connection reset by peer]
06:50princesszoey has joined #asahi-dev
06:59SSJ_GZ has joined #asahi-dev
07:00princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
07:02princesszoey has joined #asahi-dev
07:06svenmarcan: 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?
07:07thelounge7571340 has joined #asahi-dev
07:07thelounge7571340 has quit [Remote host closed the connection]
07:10svenoh... nvm. that happens in afk_epic_rx_ack
07:10sam_ has quit [Read error: Connection reset by peer]
07:15goldsoultheory has joined #asahi-dev
07:24sam_ has joined #asahi-dev
07:44princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
07:45princesszoey has joined #asahi-dev
08:10Alslayer[m] has joined #asahi-dev
08:14thelounge7571340 has joined #asahi-dev
08:15thelounge7571340 has quit [Remote host closed the connection]
08:19princesszoey has quit [Read error: Connection reset by peer]
08:30Major_Biscuit has joined #asahi-dev
08:33princesszoey has joined #asahi-dev
08:36princesszoey has quit [Remote host closed the connection]
08:40DarkShadow44 has quit [Quit: ZNC - https://znc.in]
08:44DarkShadow44 has joined #asahi-dev
08:45princesszoey has joined #asahi-dev
08:45DarkShadow44 has quit []
08:47DarkShadow44 has joined #asahi-dev
09:02princesszoey has quit [Remote host closed the connection]
09:07princesszoey has joined #asahi-dev
09:16thelounge7571340 has joined #asahi-dev
09:16thelounge7571340 has quit [Remote host closed the connection]
10:28thelounge7571340 has joined #asahi-dev
10:28thelounge7571340 has quit [Remote host closed the connection]
10:34princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
10:35princesszoey has joined #asahi-dev
10:40kov has quit [Quit: Coyote finally caught me]
10:43bluetail0 has quit [Ping timeout: 480 seconds]
10:47dabaum|2er0 has quit [Ping timeout: 480 seconds]
11:08rmkwell, 6.0.0+ booted with 4k page sizes...
11:08rmkhowever, I get this warning at boot:
11:08rmkDMA-API: nvme-apple 27bcc0000.nvme: mapping sg segment longer than device claims to support [len=69632] [max=65536]
11:09rmkdma_map_sg() called from apple_nvme_queue_rq()
11:10svenhuh, nvme isn't behind an iommu (well, at least from dmaapi's point of view) so that should be unrelated to the 4k patch
11:10mpsrmk: do you have patch somewhere for 4K pages
11:11rmkmps: one moment...
11:12svenmaybe that warning was only introduced in 6.0?
11:12mpsrmk: ty
11:13rmksven: possibly but I think I've seen it occasionally with 5.19 as well
11:13svenhuh, interesting. i never saw it
11:13svensounds like a bug somewhere in the nvme code then
11:14rmkor maybe its to do with the 4k iommu patch
11:14sveni'd be surprised
11:14svennvme doesn't use dma-api
11:14svenlooks like that warning is only triggered when DMA_API_DEBUG_SG is enabled
11:14svenI don't think I ever ran a kernel with that
11:16svenI guess dma_get_max_seg_size falls back to SZ_64K
11:17rmksven: it does use the DMA API
11:17svenyeah... pci.c calls dma_set_max_seg_size(dev->dev, 0xffffffff); which I must've dropped when writing apple.c by accident
11:17svenrmk: er, sorry, I meant "it doesn't use dma-iommu"
11:17kov has joined #asahi-dev
11:19rmkI have:
11:19rmk dma_set_max_seg_size(dev->dev, 0xffffffff);
11:19rmk dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1);
11:19svenyeah, sounds about right
11:20svendma_set_min_align_mask is a few lines above in pci.c
11:20svennot sure it needs that, let me check what that does
11:20rmkso I wonder why this warning is triggering
11:21sven * Either the driver forgot to set dma_parms appropriately, or
11:21sven * whoever generated the list forgot to check them.
11:21svensounds like the first issue to me ;)
11:21sven64K seems to be the default max sg list length but the nvme controlelr can do more than that
11:21svenso whenever you get a large transfer that warning will fire
11:22rmkin /sys/bus/platform/drivers/nvme-apple/27bcc0000.nvme/:
11:22rmksupplier:platform:27bc50000.iommu/
11:23vup has joined #asahi-dev
11:23svenyes, nvme is behind something called SART that vaguely resembles an iommu
11:23svenbut it doesn't use dma-iommu
11:24rmkcould it be that we're accessing the nvme before nvme_reset_work() gets run?
11:25svenI don't think that would work :D
11:25rmkthat's the theory...
11:25sveni think it's really just that missing dma_set_max_seg_size call in apple.c
11:26rmkah, it uses its own
11:26svenyes. it's not behind pcie on these SoCs
11:27svenI based apple.c on pci.c and probably just dropped that call
11:27mkurz has quit [Quit: Leaving]
11:27svenI know we don't need dma_set_min_align_mask because that's a workaround for broken nvme devices using swiotlb
11:27svenand I probably assumed the dma_set_max_seg_size is related to that workaround
11:28rmkok, building...
11:32thelounge7571340 has joined #asahi-dev
11:32thelounge7571340 has quit [Remote host closed the connection]
11:33rmksven: seems to be happy
11:36svenlooks good to me
11:38rmkyep, quite possibly
11:43rmksven: can I add a suggested-by for you for that?
11:46rmkpatch sent.
12:13bluetail0 has joined #asahi-dev
12:33thelounge7571340 has joined #asahi-dev
12:34thelounge7571340 has quit [Remote host closed the connection]
13:34thelounge7571340 has joined #asahi-dev
13:34thelounge7571340 has quit [Remote host closed the connection]
14:21the_lanetly_052 has joined #asahi-dev
14:21the_lanetly_052 has quit [Remote host closed the connection]
14:35thelounge7571340 has joined #asahi-dev
14:36thelounge7571340 has quit [Remote host closed the connection]
15:22yamii_ has joined #asahi-dev
15:22yamii has quit [Read error: Connection reset by peer]
15:26amarioguy2 has joined #asahi-dev
15:27amarioguy2marcan: 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
15:28amarioguy2but yea i'll take note of that extra boot arg when collecting sep data today
15:28amarioguy2(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)
15:38yamii_ has quit [Ping timeout: 480 seconds]
15:39thelounge7571340 has joined #asahi-dev
15:39thelounge7571340 has quit [Remote host closed the connection]
15:43dabaum|2er0 has joined #asahi-dev
15:48yamii_ has joined #asahi-dev
15:55goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:56jlco_ has joined #asahi-dev
15:58jlco has quit [Ping timeout: 480 seconds]
16:02amarioguy2 has quit [Ping timeout: 480 seconds]
16:05amarioguy2 has joined #asahi-dev
16:24goldsoultheory has joined #asahi-dev
16:26rmksven: I'll update the patch in a few days.
16:27svenNice! I do wonder if I missed anything else from pci.c that we just haven’t run into yet now though
16:31rmkcan't really diff the two drivers, because diff can't cope with the changes
16:33svenyeah, it’s diverged quite a bit. I’ll take a closer look this weekend
16:33svenit’s probably fine but I can’t shake the feeling that I overlooked something else ;)
16:34rmkis there any way we could share code between the two to reduce the probability of divergence?
16:34sventhe initial version did that but the nvme maintainers preferred to have it separate
16:35rmkok, let me put it another way then :)
16:35rmkis it worth creating a library that could be used by both drivers? :D
16:36svenit’s probably possible to share e.g. the whole dma mapping code but the nvme guys are very concerned about performance in pci.c
16:36svenso you’d need to convince them ;)
16:38Major_Biscuit has quit [Ping timeout: 480 seconds]
16:41thelounge7571340 has joined #asahi-dev
16:41zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
16:41thelounge7571340 has quit [Remote host closed the connection]
17:02amarioguy2 has quit [Ping timeout: 480 seconds]
17:06goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:07goldsoultheory has joined #asahi-dev
17:08goldsoultheory has quit []
17:08rmksven: ok, I'll take a look, thanks.
17:18goldsoultheory has joined #asahi-dev
17:50thelounge7571340 has joined #asahi-dev
17:50thelounge7571340 has quit [Remote host closed the connection]
17:51chipxxx has joined #asahi-dev
17:51chipxxx has quit [Remote host closed the connection]
17:51chipxxx has joined #asahi-dev
18:23DarkShadow44 has quit [Quit: ZNC - https://znc.in]
18:23DarkShadow44 has joined #asahi-dev
18:29DarkShadow4444 has joined #asahi-dev
18:32DarkShadow44 has quit [Ping timeout: 480 seconds]
18:45ljs has joined #asahi-dev
18:46ljsthis may be a stupid question, but how can I grab a working config file for asahi-wip?
18:49ljsj`ey: cheers, I looked in that repo but somehow missed that... :)
18:51thelounge7571340 has joined #asahi-dev
18:51thelounge7571340 has quit [Remote host closed the connection]
18:57SuperED has joined #asahi-dev
18:57SuperED has quit [Remote host closed the connection]
19:16ljs has quit [Remote host closed the connection]
19:33ljs has joined #asahi-dev
19:35ljs has quit [Remote host closed the connection]
19:36ljs has joined #asahi-dev
19:39ChaosPrincessmarcan: 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
19:49ljs has quit [Remote host closed the connection]
19:52thelounge7571340 has joined #asahi-dev
19:53thelounge7571340 has quit [Remote host closed the connection]
19:55chipxxx has quit [Read error: Connection reset by peer]
19:57chipxxx has joined #asahi-dev
19:59chipxxx has quit [Read error: Connection reset by peer]
20:05amarioguy2 has joined #asahi-dev
20:05amarioguy2 has quit [Remote host closed the connection]
20:34jluthra has quit [Remote host closed the connection]
20:35jluthra has joined #asahi-dev
20:46amarioguyalright perfect, at the login screen!
20:46amarioguy(for sep tracing i mean)
20:46amarioguywhat's the priority stuff we want to be tracing? SKS stuff?
20:54thelounge7571340 has joined #asahi-dev
20:55thelounge7571340 has quit [Remote host closed the connection]
20:58amarioguysep tracer's still broken :/
21:00ljs has joined #asahi-dev
21:01goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:09goldsoultheory has joined #asahi-dev
21:15ljs has quit [Remote host closed the connection]
21:18ljs has joined #asahi-dev
21:30ljs has quit [Remote host closed the connection]
21:34ljs has joined #asahi-dev
21:48ljs has quit [Remote host closed the connection]
21:56ljs has joined #asahi-dev
22:02goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:05ljs has quit [Remote host closed the connection]
22:09SSJ_GZ has quit [Ping timeout: 480 seconds]
22:11ljs has joined #asahi-dev
22:25thelounge7571340 has joined #asahi-dev
22:25thelounge7571340 has quit [Remote host closed the connection]
22:36ljs has quit [Remote host closed the connection]
23:17bisko has quit [Ping timeout: 480 seconds]
23:27thelounge7571340 has joined #asahi-dev
23:27thelounge7571340 has quit [Remote host closed the connection]
23:46amarioguyhuh 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
23:47amarioguygonna try changing the readmem_iova function prototype seeing what that does
23:50amarioguylooks like that did it!
23:50amarioguythe amount of tracing is well.... a lot
23:51amarioguyme thinks whether I should add a "save hv log" option to run_guest or smth because the amount of logs here is patently ridiculous
23:53amarioguythough 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?
23:53amarioguywould this be a consequence of the HV abi instability? this code was 6 months old after all
23:56amarioguyalso yes the macos desktop is rendering at about 2 frames per second :^)
…