2021-11-18
00:21aidenfoxivey has joined #asahi
00:21aidenfoxivey has left #asahi [#asahi]
00:23radnicRight, i thought it does because I did not see it anymore in the location I curled it to originally.
00:25radnicSo, I am poking around, out of curiousity, as to why I get that hpm0 issue, and the funny part is that it seems intial communication is OK with the chip, it only fails after it sends the SSPS command.
00:31marcanmaybe see if you can narrow down exactly where it fails, and also try adding some delays (delays aren't the solution but they might help reveal the nature of the problem)
00:32marcan< radnic> Is there a simple way to update the m1n1 without thw whone tiersome boot cycle/curl/update? <- on disk no, for testing live, chainload.py
00:33radnicIt goes: ps6598x_command(dev, "SSPS", &data, 1, NULL, 0); and inside there it goes to read back the command and that is where it fails, it seems.
00:34marcanlast time we had this problem it was an issue with not waiting for the read transaction to finish properly, someone added some delays and that "fixed" it (then I found the real cause)
00:36marcanport 0 only matters if you want serial (from another mac or a custom interface) or to DFU
00:38marcanI actually have the hardware spec for it but it's not publicly available and I can't share it, unfortunately
00:57radnicIt's interesting also that the I2C seems to answer with unexpected length. that is funny.
01:04Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
01:10yuyichao has quit [Ping timeout: 480 seconds]
01:59c10l has joined #asahi
02:03c10l has quit []
02:04c10l has joined #asahi
02:49yuyichao has joined #asahi
03:14bgb has joined #asahi
03:19bgb_ has joined #asahi
03:25bgb has quit [Ping timeout: 480 seconds]
03:34bgb_ has quit [Quit: WeeChat 3.3]
03:43phiologe has joined #asahi
03:47PhilippvK has quit [Ping timeout: 480 seconds]
04:48marvin24 has joined #asahi
04:51marvin24_ has quit [Ping timeout: 480 seconds]
05:09phiologe has quit [Ping timeout: 480 seconds]
06:11sailorek1234 has joined #asahi
06:40chamomile has quit [Ping timeout: 480 seconds]
07:54chamomile has joined #asahi
08:08chamomile has quit [Ping timeout: 480 seconds]
08:13mpsmarcan: no, I didn't run step2.sh script. didn't know it exists and need to be run. I found it after boot to macos when looked at Linux partition and thought it was run automatically
08:16easontek has joined #asahi
08:18easontek has quit []
09:39bps has joined #asahi
09:40c10l has quit [Remote host closed the connection]
09:47marcanmps: when the installer tells you to choose the boot volume in the picker, after you do so it tells you about step2 and the steps needed to complete the installation
09:50mpsmarcan: I'm not sure that I saw this, maybe I didn't read all text carefully. at the end script told that everything is finished and I rebooted it
09:50Glanzmann has joined #asahi
09:50Glanzmannmarcan: I had the very same problem. I did only saw the notice for step2.sh after it rebooted, because the boot picker covered it up and rebooted afterwards.
09:50radnic@sven. I think it was the TPS_REG_CMD1 but it was like... just the once. most of the times, it does not say that. It seems to be inconsistent. This is why I suspect the device state is not always the same when we enter m1n1.
09:52FireFox317radnic, i had the same problem yesterday, and i'm trying to reproduce the issue but it is indeed really inconsistent. The m1n1 installed on my macbook is kinda old, so that could be a problem too.
09:53marcanit's not supposed to do that, we do an (ugly) race to kill the boot picker before it reboots, assuming you didn't kill the installer
09:53svenfirefox317: marcan did fix some bug that resulted in the same issue a while ago so an old m1n1 would explain that
09:56mpsmarcan: ok, I will try again later today when I finish with my $day_job and look more carefully at the process
09:58FireFox317okay, i managed to get the error message again. however its super inconsistent
09:58mps(my free time is 'eaten' by preparing some fixes and upgrades for next alpine linux release which will happen in a few days)
09:58marcanyes but if there is a shared register pointer, SMC could sneak in between our two transactions and change the register pointer
09:58radnicI can't reproduce it at the moment to confirm it 100% but basically, it fails when it reads back the TPS_REG_CMD1. I added extra prints, so the messages are not what you would expect.
09:58FireFox317its also only ever hpm0 that fails
10:00radnicNot sure if insisting on this issue is clever on my part though. I mean, most people don't have the issue and I can still connect on the other port, and maybe I'm stealing useful resources from somewhere else.
10:00FireFox317radnic, it fails consistently for you?
10:05c10l has joined #asahi
10:19FireFox317sven, with an updated m1n1 is failing much more consistently. it looks like the same issue as radnic, i'm trying marcan s fix now
10:20palmer_ has joined #asahi
10:22palmer_ has quit [Remote host closed the connection]
10:23FireFox317marcan, with your change both hpm0 and hpm1 fail to init
10:26FireFox317oh interesting, the connection with my linux box works fine, also when hpm0/1 init fails
10:37kov has joined #asahi
10:48Glanzmann has quit [Quit: EOF]
10:51Dcow has joined #asahi
10:51Dcow has quit []
11:04palmer_ has joined #asahi
11:05palmer_ has quit [Remote host closed the connection]
11:10bpalmer4[m] has joined #asahi
11:11palmer_ has joined #asahi
11:11palmer_ has quit [Remote host closed the connection]
11:11palmer_ has joined #asahi
11:12palmer_ has quit [Remote host closed the connection]
11:14FireFox317kode54, you can install m1n1 with u-boot or linux as a payload, and in that case m1n1 just acts as a bootloader and immediately loads the next stage.
11:19radnicUhh, is there a way I can persuade it to enumareate consistenly as a ACM device with the same index?
11:19FireFox317radnic, latest m1n1 with the patch that marcan send? and are you on a macbook air m1 (j313)?
11:23FireFox317m1n1 also prints it iirc
11:28FireFox317radnic, correct.
11:30Dcow has joined #asahi
11:37radnicSooo, interestin. now I updated the m1n1 fo' real with the fix from marcan... and... I don't see it anymore.
11:45Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
11:46bgb has joined #asahi
11:50radnicBut, I am confused _why_ I checked the datasheet for the chip and it says that it kind of expects the stop byte. The one that was removed. So... how come it works then?
11:51Dcow has joined #asahi
11:51radnicThat removes the stop bit sending when telling it where you want to read data off the I2C device.
11:59marcanmy hypothesis was that the chip handles i2c transactions on both i2c ports with the *same* pointer register (and of course they are interlocked, so it will clock stretch transactions on one port while another one is busy)
12:03kettenis_ is now known as kettenis
12:04FireFox317i can just go into 1tr and use kmutil configure-boot to update m1n1 right?
12:16FireFox317With the change from marcan applied I get the following output on a Macbook Air (j313): https://paste.debian.net/1219923
12:16FireFox317With only one usb c-a cable connected to my linux box
12:18FireFox317marcan, i2c.c:131 should be 'if (i2c_xfer_write(dev, addr, 1, 0, ®, 1))' right?
12:20FireFox317marcan, did you install the latest m1n1? or are you just chainloading?
12:20FireFox317because it seems to matter
12:23FireFox317radnic, extra prints in the i2c code might add some delays and change the behavior maybe?
12:29FireFox317with 20x boots do you mean chainloading 20 times, or rebooting manually?
12:32FireFox317yeah timing issues are super annoying, and this is definitely a timing issue :(
12:33FireFox317marcan, fortunately you can repro the issue now right?
12:41danielsif only there was some convenient kernel helper you could use to poll a value with a timeout!
12:43FireFox317that helper is even in m1n1 :p
12:43marcanthe kernel helper is a macro, the m1n1 helper is a function that does *not* return the register value
12:43FireFox317ahh i see, my bad
12:46X-Scale` has joined #asahi
12:46marcanradnic: okay, that delay makes it work and I don't know why. time to stick a scope on the i2c pins
12:51X-Scale has quit [Ping timeout: 480 seconds]
12:52FireFox317yeah the mdelay(100) also works on my machine
13:13radnic(thankfully there is a magic USB-PD command to put those on the type C pins...) that is soo cool, so you can see the i2c off a split cable? :))
13:19slicey has joined #asahi
13:21marcandepends on whether firmware is involved in that path, which it probably is (at least time to first byte)
13:23marcanI think the repeat-start thing made it happen more often (after I patched it to always send the command, which was my way of reproing with chainload) because that gets rid of the wait for the stop condition, so it makes the timing of the polling even tighter
13:25svenhrm, looks like the linux driver also does the tight command completion polling loop even though there is an interrupt it could use
13:26FireFox317yep for me it also breaks
13:27FireFox317I just reinstalled the new m1n1 on my m1 air (j313)
13:29FireFox317yeah it seems to timeout really fast
13:34FireFox317It works :D
13:42marcanarguably that could be rewritten as while cmd_status == cmd or whatever instead, and then check for 0/INVALID/unknown at the end
13:45radnicBut I see no case when you woudl reaiterate. Either you try once and it's OK or you exit,
13:46dottedmag has left #asahi [#asahi]
13:59aleasto has joined #asahi
14:02Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
14:13sailorek1234 has quit []
14:24Dcow has joined #asahi
14:53slicey has quit [Quit: cya]
14:57FireFox317do i have to enable a specific kernel option such that it recognizes the boot args when running under the hypervisor i.e. with run_guest.py?
14:57FireFox317it doesnt seem to recocnize the boot args that i specifiy
15:09FireFox317i guess i can just put them in the dts for now
15:46phiologe has joined #asahi
15:47sailorek1234 has joined #asahi
15:49yuyichao has quit [Ping timeout: 480 seconds]
15:51gladiac is now known as Guest6204
15:51gladiac has joined #asahi
15:55Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
15:56Guest6204 has quit [Ping timeout: 480 seconds]
16:03sailorek1234 has quit []
16:03FireFox317j_ey, with run_guest.py you can specify bootargs after the payload. I tried to use that. However I also looked at the m1n1 code and it looks like it only changes the bootargs in the adt, not in the fdt.
16:05Dcow has joined #asahi
16:07yuyichao has joined #asahi
16:13mort_it's literally the same CPU except for the memory bandwidth (which is already more than high enough for CPU-only stuff on the Pro)
16:14_jannau_the second ane doesn't exists. I doubt anyone has drivers or uses a M1 pro/max in way that the differences would be noticeable
16:16mini(I've been using an app that uses it on macOS, and there's no performance difference at all between a M1 mac mini and a M1 Max 14" MBP)
16:22FireFox317marcan, yeah thanks for the clarification, i figured that out xd
16:23Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
16:24Dcow has joined #asahi
16:27_jannau_that's what I ment. it is currently not useable under linux even ignoring the non-existing driver
16:37neobrain has quit [Remote host closed the connection]
16:37neobrain has joined #asahi
16:39cptcobalt has quit [Read error: Connection reset by peer]
16:39nkaretnikov has quit [Read error: Connection reset by peer]
16:39brinly has quit [Read error: Connection reset by peer]
16:39tom-w has quit [Remote host closed the connection]
16:39rann has quit [Read error: Connection reset by peer]
16:39jkkm has quit [Remote host closed the connection]
16:39Chainsaw has quit [Remote host closed the connection]
16:39sjg1 has quit [Read error: Connection reset by peer]
16:39Vaughn has quit [Remote host closed the connection]
16:39arnd_ has quit [Remote host closed the connection]
16:39robher has quit [Remote host closed the connection]
16:39ovf has quit [Read error: Connection reset by peer]
16:39stblassitude has quit [Read error: Connection reset by peer]
16:39eichin has quit [Read error: Connection reset by peer]
16:39austriancoder_ has quit [Read error: Connection reset by peer]
16:39steev has quit [Read error: Connection reset by peer]
16:43Vaughn has joined #asahi
16:48eichin has joined #asahi
16:48sjg1 has joined #asahi
16:49ovf has joined #asahi
16:50stblassitude has joined #asahi
16:50tom-w has joined #asahi
16:51robher has joined #asahi
16:54leah has quit [Quit: WeeChat 3.3]
16:57yuyichao_ has joined #asahi
16:58steev has joined #asahi
16:58arnd_ has joined #asahi
16:58cptcobalt has joined #asahi
16:58austriancoder_ has joined #asahi
17:00jkkm has joined #asahi
17:00Chainsaw has joined #asahi
17:00yuyichao has quit [Ping timeout: 480 seconds]
17:00rann has joined #asahi
17:04brinly has joined #asahi
17:07boardwalkTried to do an online resize2fs on my root partition on nvme (and on t6001) and it threw some errors: https://ersatsz.com/~boardwalk/resize2fs.jpeg
17:07yuyichao has joined #asahi
17:08nkaretnikov has joined #asahi
17:10boardwalkAlso haven’t been able to get pcie to not report “link didn’t come up”. Increased the timeout from 1/10s to 1s from where that log is generated, and now USB comes up (wasn’t before), but I still get “link didn’t come up”. And lspci only shows the pci bridges.
17:11yuyichao_ has quit [Ping timeout: 480 seconds]
17:30Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
17:31Dcow has joined #asahi
17:40Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
17:42Dcow has joined #asahi
18:08svenHmmm… those nvme errors look odd. I know that the normal error handling doesn’t work too well with ANS. We’re there any errors before that or is that timeout the first one?
18:14svenMakes more sense now. Some command timed out and then it dies because the normal error recovery just doesn’t work
18:19PhilippvK has joined #asahi
18:23boardwalkt6000-bringup-work. And I don’t see any other errors in the logs (I have everything up to ‘resizing…’ in the journal, which is in that pic).
18:23phiologe has quit [Ping timeout: 480 seconds]
18:24svenAh, yes, so maybe ans does support the normal abort command after all. I just accidentally send them to the IO instead of the admin queue. Whoops.
18:29svenso I think this fails so badly because some command times out and then the error recovery path just doesn’t work correctly for ANS
18:47bgb_ has joined #asahi
18:53bgb has quit [Ping timeout: 480 seconds]
19:07X-Scale has joined #asahi
19:10[X-Scale] has joined #asahi
19:12X-Scale` has quit [Ping timeout: 480 seconds]
19:16X-Scale has quit [Ping timeout: 480 seconds]
19:18chamomile has joined #asahi
19:42Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
20:11___nick___ has joined #asahi
20:13___nick___ has quit []
20:14___nick___ has joined #asahi
20:27aleasto has quit [Remote host closed the connection]
20:50helltraum has joined #asahi
20:51helltraum has quit [Remote host closed the connection]
20:54helltraum has joined #asahi
20:55helltraum has quit [Remote host closed the connection]
20:58helltraum has joined #asahi
20:59helltraum has quit [Remote host closed the connection]
21:03boardwalksven: I can try and track down what times out (not sure how much of an exception circumstance it is, if you have any debugging tips would be helpful). Would implementing the recovery path difficult? (i.e. Would it be reasonable for a kernel newb to try or is it not done for a good reason?)
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:11PhilippvK has quit [Quit: No Ping reply in 180 seconds.]
21:12phiologe has joined #asahi
21:41torstenvl has joined #asahi
22:07palmer_ has joined #asahi
22:07palmer_ has quit [Remote host closed the connection]
22:12torstenv_ has joined #asahi
22:17torstenvl has quit [Read error: No route to host]
22:24torstenv_ has quit [Ping timeout: 480 seconds]
22:49radnic is now known as RealityVoid
23:40RealityVoidSo, I'm tryin gto build the kernel and when I try to run the build... config restarts for some reason.
23:40RealityVoidIs that normal?
23:41RealityVoidDoing something wrong?
23:45RealityVoidI just ran this:
23:45RealityVoidmake ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- oldconfig
23:45RealityVoidand the .config is the one from thewiki page, I placed it in the root of the linux folder
23:47RealityVoidWell, did not let it do that, because it asked me a bunch of configuration questions. Did not seem right.
23:47RealityVoidJust enter enter enter?
23:48RealityVoidNaah, not building, besides, at the end it says that .config was overwritten.
23:50j_eyor just make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, or only the one with 'oldconfig'?
23:50RealityVoidI tried both of these:make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- oldconfig
23:50RealityVoidmake ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 Image dtbs
23:50RealityVoidbut bpth overwrite the config.
23:50RealityVoid*both
23:55RealityVoidWhen building.
23:57RealityVoidFound it. Thanks.
23:58RealityVoidYes, stupid of me, sorry.