#
…

2021-12-03

00:19dcowich[m] has joined #asahi-dev
00:20dcowich[m] is now known as Dcow[m]
01:06FireFox317 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
01:06FireFox317 has joined #asahi-dev
01:34yuyichao has quit [Ping timeout: 480 seconds]
02:33yuyichao has joined #asahi-dev
03:26kov has quit [Quit: Coyote finally caught me]
03:27kov has joined #asahi-dev
04:03PhilippvK has joined #asahi-dev
04:06phiologe has quit [Ping timeout: 480 seconds]
09:47aleasto has joined #asahi-dev
12:46chadmed has joined #asahi-dev
12:52chadmed has quit [Remote host closed the connection]
12:53chadmed has joined #asahi-dev
13:12matthewayers[m] has joined #asahi-dev
13:15yuyichao has quit [Ping timeout: 480 seconds]
13:30Gaspare has joined #asahi-dev
13:33yuyichao has joined #asahi-dev
13:38casperes1996[m] has joined #asahi-dev
13:51svenfwiw, all the DCP DART entries that are left over from iBoot are present in the "segment-ranges" property in the ADT
14:27yuyichao_ has joined #asahi-dev
14:30marcanI like the kernel test robot, it catches a lot of silly stuff in the asahi tree
14:31marcanthank you to whoever added us to that :)
14:31svenyup, that thing is great :D
14:31yuyichao has quit [Ping timeout: 480 seconds]
14:31svenit runs on all branches of that repo as well
14:39the_lanetly_052 has joined #asahi-dev
14:48yuyichao has joined #asahi-dev
14:52yuyichao_ has quit [Ping timeout: 480 seconds]
14:54yuyichao_ has joined #asahi-dev
14:58yuyichao has quit [Ping timeout: 480 seconds]
15:02_jannau_it might have pick the repository up from MAINTAINERS
15:09Gaspare has quit [Quit: Gaspare]
15:19povikhow does it decide who to send emails to? MAINTAINERS again?
15:21j_eysven wasnt emailed, but hes a MAINTAINER
15:22svenpretty sure someone added the github repo manually
15:22svenand it takes the email from the commit author (+ tags if available)
15:31sven[ 1.023592] apple-pmgr-pwrstate 23b700000.power-management:power-controller@3f0: PS 0x3f0: assert reset
15:31sven[ 1.027570] apple-pmgr-pwrstate 23b700000.power-management:power-controller@3f0: PS 0x3f0: deassert reset
15:31svenmarcan: ^-- that should mean the reset was successful, right?
15:31svenbecause afterwards ANS2 still has the CPU_RUN flag in that register set and i can't restart it
16:29marcansven: can you hvtrace it to make sure I don't fail it with the regmap stuff?
16:33svenhrm, trace_range(range(0x23b700000, 0x23b700000+0x4000)) should work, right?
16:33svenah yes, it does
16:38svenmarcan: ^-- that should be the relevant part
16:38sven(that also includes some additional debug reads)
16:44marcansven: hm, I'll have to look into that
16:44marcanit did work with PMP IIRC
16:45svenhm, strange
16:47svendoing it manually from shell.py doesn't seem to clear the running flag either
16:49svenit's a pity we can't see what iBoot does to reset ANS completely
16:56marcansven: it does work for me, found the old code
16:56svenokay, wtf
16:56svenlet me try that code
16:58svenhrm, it hangs
16:58svenoh.. SART probably
16:59svenokay, why the hell does that work
17:00marcanyeah, it's not doing SART
17:00marcanbut the reset works
17:00marcanI need to get some sleep, but I hope that leads you somewhere :)
17:01sveni'm just more confused WTF is going on :D
17:01sveni can run that thing twice and it seems to work
17:01svenbut i manually poke that PMGR reg from shell it doesn't?!
17:01sventhis is clearly something very dumb
17:02marcansven: oh, the reset doesn't clear the bit
17:02marcanbut it still works
17:02marcannote that the m1n1 asc code does 0->1->0 on that cpu run bit
17:03svenoh, urgh.
17:03marcanbut even if you just make it a set32 to only write 1, it still works
17:03svenlet's see
17:03marcaneven if it's already 1 (as long as you reset)
17:03svenhrm, so i do that in linux and that apparently didn't work
17:05marcanwell, to be specific, just this is enough: self.asc.CPU_CONTROL.set(RUN=1)
17:05svensee [cpu5][0xffff80001054cee4] MMIO: W.4 0x277400044 (ans[0], offset 0x44) = 0x10 in the HV trace :/
17:05kettenisso RUN is really RESET?
17:05marcanactually, as long as the bit is 1 and left at 1 it works :D
17:05marcanif it's 0 it doesn't boot after a pmgr reset
17:05marcanif 1 it does
17:06marcanso it looks like it's a cpu_run flag or whatever
17:06marcansven: I have an idea
17:06marcanif it's left at 1, the thing will boot on its own
17:06marcanmaybe you're dropping the mailbox message in that case?
17:07marcanso, make sure that bit is 0, *then* reset, *then* set it to 1
17:07marcanand that way you know when it's booting
17:07marcanmaybe trace the mailbox too
17:07marcan(well, the whole asc)
17:09svensetting it to 0 before the reset doesn't seem to help. let me try tracing everything
17:10marcanalso, if the mailbox driver relies on IRQs and it's already initialized by now, maybe that config is lost
17:10marcanmaybe check the mailbox status manually
17:10marcanm1n1 polls of course
17:12marcanI gotta sleep, have fun :)
17:12sventhe ans mailbox shouldn't need any irq configuration
17:12sventhat's just the thunderbolt ones which have that slightly braindead secondary irq configuration. but let's see
17:13sven'night
17:16svenmarcan: it doesn't work anymore if ANS has been fully booted once apparently
17:16marcanmaybe something else needs resetting
17:16marcanapcie_st specifically
17:16svenlet's see
17:16svenso i added this to the ans script and then i can only run it once as well
17:16svensart_base = 0x27bc50000
17:16svenp.write32(sart_base+6*4, 0xffffffff)
17:16svenp.write32(sart_base+0x40+6*4, 0x800000000>>12)
17:21marcanhmm, yeah...
17:21marcanI'll have to look into this
17:21marcanwonder if we can get any debug as to what these ASCs are doing
17:22marcanalso, this could be something dumb
17:22marcanI've always wondered how the .data section is reset when you reboot an ASC
17:22marcanmaybe it isn't
17:22marcanmaybe iBoot loads it and that's all you get
17:22marcanthat would mean we can't actually do clean resets
17:22svenhmmm..
17:22sventhat would be annoying
17:23marcanI tried PMP earlier and it didn't work; might try manually resetting .data since that one is not locked later
17:23marcananyway, 'night :)
17:23marcan(unfortunately NVMe is...)
17:23svenyeah :/
17:23svengoodnight!
17:26svenresetting APCIE_ST doesn't seem to do anything
17:39the_lanetly_052__ has joined #asahi-dev
17:45the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:00Gaspare has joined #asahi-dev
18:08svennope, can't get it to reset after it was fully booted once :/
18:21kettenisso that means I wouldn't be able to do so from u-boot either isn't it?
18:23svenyou can still send 0x60000000000010 (and possibly even 0x60000000000002 for an even lower power state)
18:23sventhen the next stage needs to wake it up again with 0x60000000000020 or so
18:24kettenisdoes it renegotiate the syslog/crashlog memory addresses in that case?
18:30landscape15[m]kettenis: I know it’s a simple question but, do you really need u-boot to run Linux? You can directly run the Linux kernel right?
18:31j_eylandscape15[m]: yes if you want to be able to update kernels
18:33landscape15[m]j_ey: ok, so for debugging purposes it seems better, but the end user will still prefer a friendly EFI boot menu.
18:33j_eylandscape15[m]: u-boot will likely load GRUB on most distros
18:34landscape15[m]Ok fine. How long does it take to complete the boot chain (before loading the kernel)?
18:36j_eyim sure u-boot won't add much time
18:37svenhah, got it to reset successfully i think
18:37svenso it looks like we need to send 0xb0000000000010 followed by 0x60000000000001 to shut it down cleanly
18:37svenand only then does the reset work :/
18:39landscape15[m]j_ey: ok thanks
18:45the_lanetly_052__ has quit [Ping timeout: 480 seconds]
18:46Gaspare has quit [Ping timeout: 480 seconds]
18:57maor26 has joined #asahi-dev
20:15aleasto has quit [Remote host closed the connection]
20:43Gaspare has joined #asahi-dev
22:03Gaspare has quit [Quit: Gaspare]
22:55Gaspare has joined #asahi-dev
22:58mini has quit [Quit: ZNC closing...]
23:00VinDuv has quit [Ping timeout: 480 seconds]
23:04Gaspare has quit [Quit: Gaspare]
23:59maor26 has quit [Ping timeout: 480 seconds]
…