#
…

2022-04-07

00:14al3xtjames has quit [Read error: Connection reset by peer]
00:14al3xtjames has joined #asahi-dev
00:28bps3 has quit [Remote host closed the connection]
00:29bps3 has joined #asahi-dev
00:38bps3 has quit [Ping timeout: 480 seconds]
00:43c10l7 has joined #asahi-dev
00:48c10l has quit [Ping timeout: 480 seconds]
00:49amw has joined #asahi-dev
01:20chadmed has quit [Remote host closed the connection]
01:26yuyichao has quit [Ping timeout: 480 seconds]
01:28chadmed has joined #asahi-dev
02:34yuyichao has joined #asahi-dev
02:56PhilippvK has joined #asahi-dev
03:00phiologe has quit [Ping timeout: 480 seconds]
03:29nicolas17 has quit [Quit: Konversation terminated!]
03:38nametable[m]Can someone point me in the right direction as far as how to use the existing documentation. For example, lets say I'm interested in turning the backlight on/off (and then researching to figure out how dimming works). Where in the documentation that is available so far can I find the register address which corresponds to m1 macbook air backlight?
03:53kov has quit [Quit: Coyote finally caught me]
05:28jannaurqou_: problem seems to be "nvme-apple 393cc0000.nvme: ANS did not boot". I've seen nvme (and usb) failures with broken DCP but never looked closely at them since the problem was clearly DCP. Although I'm still wondering how DCP can break nvme
05:30jannaunametable[m]: there is no documention. I'm not sure if anyone has checked but the expectation is that backlight is controlled through DCP
05:31jannauto inestigate that further you have to look at dcp traces (hv/trace_dcp.py) from running macos under m1n1's hypervisor
05:35rqou_huh i'm definitely surprised that DCP can break nvme, but i guess it's "fine" for now
05:35rqou_my workaround seems to consistently win the race condition
05:36rqou_just something to note for further investigation
05:40rqou_is there somewhere where i can keep track of ongoing work that's too experimental to even make it into the https://github.com/AsahiLinux/linux/tree/asahi/ branch?
05:40chadmedm1n1 experiments?
05:40rqou_no, i mean things like "sven's 4k patch" or "sven's atcphy"
05:41rqou_or the DCP driver
05:41rqou_rn i have my own branch that's an ad-hoc merging of features i've tried out
05:42jannaunot in a central place
05:45jannaurqou_: it's entirely possible that it is the same race and broken dcp results in strange looking rtkit behavior for dcp but still unsure how that can break nvme
05:46rqou_yeah i dunno
05:48rqou_i definitely observed e.g. m1n1 hypervisor debug printing affecting the race
06:13svenDCP needs to move to the raw iommu api
06:13sventhat fixes the usage of that weird function
06:14svenother than that, the nvme bug is that ANS fails to boot and then my error handling apparently sucks
06:14svenI don’t understand why it would fail to boot though just because DCP does something
06:51MajorBiscuit has joined #asahi-dev
06:53Major_Biscuit has joined #asahi-dev
07:00MajorBiscuit has quit [Ping timeout: 480 seconds]
07:12jato has quit [Quit: ZNC - https://znc.in]
07:12jato has joined #asahi-dev
07:20jaalsa has joined #asahi-dev
07:20jaalsa has quit []
07:21jaalsa has joined #asahi-dev
07:37marcanis SMC a common point there?
07:37marcanmaybe something is wrong, DCP does something that crashes SMC, then NVMe fails to boot because of that?
07:37svenoh, true. didn't even think of that
07:38svenI don't think the normal SMC message handler does anything fancy but I never looked into if ANS also talks to SMC during boot
07:39jluthra has quit [Remote host closed the connection]
07:39jluthra has joined #asahi-dev
07:40kettenis_u-boot doesn't touch SMC, so it is possible to bring up NVMe without "starting" SMC
07:41kettenis_ is now known as kettenis
07:41svenSMC is still alive though at that point I think, it just doesn't talk to the AP
07:41marcanwe know that, the backdoor SMC channels are not dependent on the main one
07:41marcanSMC is always alive
07:42marcanit does a ton of critical stuff like battery charge management
07:42marcan(and if it dies the machine watchdog reboots a few seconds later)
07:49_jannau_I don't think I saw smc watchdog resets in the error cases. linux was idle waiting for the root fs (using rootwait)
07:51_jannau_is "nvme nvme0: Reset failure status: -62" just after the "did not boot" coming from pmgr?
08:03___nick___ has joined #asahi-dev
08:09sventhat's inside nvme_reset_work or however it's called
08:09svenand the nvmmu inval stuff is because I forgot to initialize cq_phase when originally allocating the queues
08:22the_lanetly_052___ has quit [Remote host closed the connection]
08:23the_lanetly_052___ has joined #asahi-dev
08:37___nick___ has quit []
08:39___nick___ has joined #asahi-dev
08:41___nick___ has quit []
08:43___nick___ has joined #asahi-dev
09:06rqou_i've been exercising my t8110 dart code enough that i'm confident enough to send a PR: https://github.com/AsahiLinux/m1n1/pull/190
09:06rqou_also one for a ProRes experiment, but that's much more incomplete: https://github.com/AsahiLinux/m1n1/pull/191
09:10asocialblade has quit [Ping timeout: 480 seconds]
09:30veloek has quit [Quit: leaving]
09:32veloek has joined #asahi-dev
09:42bps3 has joined #asahi-dev
10:28gladiac is now known as Guest1391
10:28gladiac has joined #asahi-dev
10:34Guest1391 has quit [Ping timeout: 480 seconds]
10:34chadmed has quit [Read error: Connection reset by peer]
10:38Dcow[m]1where is t8110 dart used ?
10:39kov has joined #asahi-dev
10:40sventhunderbolt and some other things on the t600x
10:41Dcow[m]1but not in regular M1 ?
10:42svenotherwise I would’ve already written support for it ;)
10:42Dcow[m]1do you have only regular M1 devices?
10:43Dcow[m]1do you have github sponsors?)
10:43svenno, and that’s quite intentional :)
10:43svenonce people start paying money to me it feels like a day job and I already have one of those :)
10:45Dcow[m]1nah, that's the night one xD
10:47jannausven: any progress on getting the t6000-dart merged in linux? would it help to ping the patch? we should try to get it into 5.19 together with basic t600x device trees
10:48svenhaven’t heard anything from the last time I pinged robin
10:49svenwe should also figure out if the bit that used to be “disable subpage protection” actually is “mark this page as uncachable”
10:49jannauok, I'll ping it tonight
10:55jannauit appears t6000 and t8110 share the same PTE layout assuming the offset mask 37,10 in the kernel patch is correct and the 39,10 offset in m1n1 is an oversight
10:57svengiven that "disable subpage protection" no longer works I'm willing to bet that bit means uncachable as well
10:57svenwould still be good to confirm that somehow
10:57svenand then fix the kernel patch to not set that for everything.. but ugh...
10:57the_lanetly_052___ has quit [Ping timeout: 480 seconds]
10:58svenmight be too many differences to the arm pagetable format at that point for robin
11:00jannauthe ARM_MALI_LPAE page table format seems to have also a different use for BIT1)
11:01svenah, good
11:02jannauread write protection bits also differ between between t8110 and the defines for t8103 in the kernel
11:02svenhrm... if that bit is indeed uncachable but the same page is mapped as normal memory for the CPU shouldn't that break horribly?
11:02svenunless the cache somehow snoops those DART transactions I guess
11:06Jamie[m]1fyi rqou_ I'm getting sane results with that t8110 implementation from the AVD
11:07Jamie[m]1and i now understand 1% more of the avd interface :P
11:24chadmed has joined #asahi-dev
11:42jonaburg[m] has joined #asahi-dev
12:13tardyp has quit [Read error: Connection reset by peer]
12:13tardyp has joined #asahi-dev
12:29caef^ has quit [Remote host closed the connection]
13:06kettenissven: you mean the cache would still snoop DART transactions, but DART transaction would no longer consult the cache?
13:07svenyes, but dunno if a setup like that would make sense
13:07kettenisdoesn't make sense to me, but that doesn't carry much weight ;)
13:08kettenisnote that our device trees don't have dma-coherent attributes, which I think that Linux does all the appropriate cache flushing and invalidation
13:09svenat least for dma_alloc_coherent buffers it shouldn't do any cache maintenance
13:09svenbut let me check again
13:10kettenisby allocating those as non-cached in the first place?
13:11svenlast time I looked into this I convinced myself that for devices with an iommu those would just be normal memory
13:11svenbut let me check that again because it's been a while
13:14kettenisthat's effectively what I do for OpenBSD (force the flag that tells the core code DMA is cache coherent in the DART driver)
13:15kettenisbut nvme doesn't use the DART for example
13:19bisko has joined #asahi-dev
13:42yuyichao has quit [Ping timeout: 480 seconds]
13:48emilytrau[m]Hey devs! I'm working on adding Asahi linux support to the NixOS installer. What would be a reliable way to detect if we're on an Asahi system? So we can include support in the generated config
13:52j`eyemilytrau[m]: you should talk to tpw_rules
13:53atsalyuk has joined #asahi-dev
13:53emilytrau[m]We're trying to get upstreamed. Using his amazing work as the base!
13:53emilytrau[m]*upstreamed into nixpkgs
13:54kettenissven: On OpenBSD I couldn't really detect any performance benefits of skipping the cache flushes, but that may just be because the CPUs are too fast
13:55kettenisstill, I think we need to sprinkle some dma-coherent properties into the device trees
13:55svenyeah, agreed
13:56kettenisfor OpenBSD a single one on the /soc node would be enough, but I'm not sure that works for Linux
13:57svenI think it should, I remember seeing some of_ code that just tried walking up to the root to look for dma-coherent
13:57mazkettenis: if the system is always coherent (which is likely since the CPUs implement FWB), then the CMOs may well be implemented as NOPs.
14:00yuyichao has joined #asahi-dev
14:07j`eyemilytrau[m]: you could use `strings /proc/device-tree/{model,compatible}`, not sure if there is a standard interface for that
14:08kettenisthe "compatible" property should be the definitve answer
14:30atsalyuk has quit [Ping timeout: 480 seconds]
14:42linuxgemini9 has quit [Remote host closed the connection]
14:42linuxgemini9 has joined #asahi-dev
14:48atsalyuk has joined #asahi-dev
14:52doggkruse has joined #asahi-dev
14:53linuxgemini95 has joined #asahi-dev
14:57linuxgemini9 has quit [Ping timeout: 480 seconds]
15:01nicolas17 has joined #asahi-dev
15:32svenlooks like pcie hotplug is actually pretty simple: when a LINK_UP interrupt is received tell the pci subsystem to re-scan, when LINK_DOWN is received remove the devices and finally poke that LSSMCTL bit again to be able to catch the next LINK_UP
15:33sventhe "tell the pci subsystem to re-scan" is a big hack right now but seems to work. let's hope thunderbolt is just the same: https://f.svpe.de/7c144fb92e09845e75b4cd9d8e1e63a336217fe28e2a2e86e061c3fc0eea6583_pcie-hotplug.txt
15:41doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:58doggkruse has joined #asahi-dev
16:12atsalyuk has quit [Remote host closed the connection]
16:12atsalyuk has joined #asahi-dev
16:36mazsven: triggering a PME event on the PCI side should result in a scan.
16:37mazit could be that we need to tell the root port to generate that event on LINK_*.
16:47sikkileo[m] is now known as sikkiladho[m]
17:35Major_Biscuit has quit [Ping timeout: 480 seconds]
17:57svenright now i just blindly copy/pasted whatever pciehp_configure_device does
19:31doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:55atsalyuk has quit [Ping timeout: 480 seconds]
19:56atsalyuk has joined #asahi-dev
20:08___nick___ has quit [Ping timeout: 480 seconds]
20:08atsalyuk has quit [Ping timeout: 480 seconds]
21:06atsalyuk has joined #asahi-dev
21:09f14h has joined #asahi-dev
21:16atsalyuk has quit [Ping timeout: 480 seconds]
21:17f14h has quit [Quit: f14h]
21:20f14h has joined #asahi-dev
21:27f14h has quit [Remote host closed the connection]
21:34wanderfull has joined #asahi-dev
22:05alexsv has quit [Ping timeout: 480 seconds]
22:06f14h has joined #asahi-dev
22:06f14h has quit [Remote host closed the connection]
22:06f14h has joined #asahi-dev
22:12f14h has quit [Remote host closed the connection]
22:48jaalsa has quit [Remote host closed the connection]
23:50bps3 has quit [Ping timeout: 480 seconds]
…