#
…

2021-05-16

00:01niv has joined #asahi
00:05DarkShadow44 has joined #asahi
00:07zkrx has quit [Ping timeout: 240 seconds]
00:15maknho___ has joined #asahi
00:17maknho__ has quit [Ping timeout: 240 seconds]
00:31jeffmiw has joined #asahi
00:35jeffmiw has quit [Ping timeout: 268 seconds]
00:39zkrx has joined #asahi
00:54jottr has quit [Ping timeout: 245 seconds]
01:08odmir has joined #asahi
01:12odmir has quit [Ping timeout: 268 seconds]
02:12jottr has joined #asahi
02:17jottr has quit [Ping timeout: 245 seconds]
02:29TheJollyRoger has quit [Quit: TheJollyRoger]
02:38phiologe has quit [Ping timeout: 245 seconds]
02:39phiologe has joined #asahi
02:49jottr has joined #asahi
03:25odmir has joined #asahi
03:30odmir has quit [Ping timeout: 260 seconds]
03:33marvin24 has quit [Ping timeout: 245 seconds]
03:34m0drobert is now known as modrobert
03:34marvin24 has joined #asahi
03:37amwsvenpeter: I'm trying to follow your blog - can you say where ucontext_t I assume from ucontext.h is on MacOS ?
03:57adamcstephens has quit [Quit: The Lounge - https://thelounge.chat]
04:20adamcstephens has joined #asahi
04:31jabashque has joined #asahi
05:09maknho____ has joined #asahi
05:12maknho___ has quit [Ping timeout: 252 seconds]
06:10VinDuv has joined #asahi
06:36Nazral has quit [Read error: Connection reset by peer]
06:45Graypup_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
06:47Graypup_ has joined #asahi
06:54rjeffman has quit [Remote host closed the connection]
06:54rjeffman has joined #asahi
07:04roxfan2 has joined #asahi
07:06roxfan has quit [Ping timeout: 240 seconds]
07:15mixfix41 has quit [Ping timeout: 240 seconds]
07:17mixfix41 has joined #asahi
08:14jeffmiw has joined #asahi
08:20kit_ty_kate has quit [Quit: WeeChat 2.9]
08:30jannauI must have missed something when redoing the MMIO trace setup from the stream. I get UartChecksumErrors after a while
08:30jannau"Event checksum error: Expected 0x00000000, got 0xfabd736b"
08:31jannaubut the address lookup from the ADT seems to work:
08:31jannau[0x000000081aa4f0f0] MMIO: W 0x23d2b001c (wdt, offset 0x1c) = 0x0
08:35jeffmiw has quit [Remote host closed the connection]
08:43pipcet[m]jannau: I see checksum errors a lot, too, thought it was a bad usb stack on the other side (I sometimes have to restart the Linux box's usb stack in order to see m1n1 at all)
08:54VinDuvthe “expected 0x00000000” is pretty suspicious… maybe there’s a case where the sender does not correctly put the checksum in the message?
08:54marcanI haven't seen any checksum errors yet, but that 00000000 thing is definitely a python bug
08:55marcanit's not calculating the *expected* checksum properly
08:55marcanthat means the checksum function got passed an empty buffer
08:55marcanwhich should not happen
08:56marcanoh wait no, the other way around
08:57marcanjannau, pipcet[m]: you probably want to print reply.hex() along with that message and see what that's about, or turn on debug
09:02svenpeteramw: no idea, but the whole source code for that user land jit stuff is in the post
09:08jeffmiw has joined #asahi
09:12jeffmiw has quit [Ping timeout: 245 seconds]
09:23jannaureply looks broken. two event headers: b'ff55aa0520000100ff55aa05200001000'...
09:24jannauafter dumping the full event in uartproxy_send_event the broken data is different
09:28marcan has quit [Quit: Now where's my screwdriver...]
09:30marcan has joined #asahi
09:31marcan has quit [Client Quit]
09:34marcan has joined #asahi
09:35marcanwell that was a nice dumb way to break my IRC bouncer
09:37JTLlol what did you do?
09:38marcanbroke authentication yesterday, didn't noticed today until I tried connecting another client first
09:38marcanjust a botched setting I didn't understand
09:38JTLbeen there done that
09:39marcanjannau: I'd say use usbmon and take a trace of the data on the wire, to narrow it down to python or C
09:43jannauit is at least not a problem of m1n1's USB dwc3 driver. I see the same problem over serial
09:45marcando you have a traceback of the error?
09:48marcanwait hold on, you say over serial it does this; is this with vuart for the guest?
09:48marcanand are you sure you're not doing something weird like running the hv twice? does this happen from a clean reboot>chainload.py>run_guest.py?
09:51marcanalso I'm dumb :-)
10:05adamcstephens6 has joined #asahi
10:05adamcstephens has quit [Ping timeout: 252 seconds]
10:05adamcstephens6 is now known as adamcstephens
10:05marcanjannau: see if what I just pushed fixed it
10:05marcanuartproxy_send_event was overflowing the stack hard
10:06marcan(I intended to have that be a static buffer, but since we already have giant ring buffers I instead did it properly and got rid of it entirely)
10:10jannauusing a recent m1n1 (with usb support) as blessed kernel and using linux instead of mac os as client seems to have fixed
10:11marcanwonder if it's a bug in the macos acm driver?
10:11marcanor even pyserial on macos
10:12jannauI'll move back to mac os to check if the client change fixed it
10:12marcanwhat I pushed was a C side change fwiw
10:12jannaupossibly also a different usb-c cacle
10:13marcanvery doubtful it's the cable
10:13marcanthis sounds a lot like a buffering thing in pyserial or even macos, now that you mentioned that
10:14marcananyway, off to do other stuff; more tomorrow :)
10:17jannauproblem still there on mac os
10:19marcanjannau: maybe dump the data received inside the inner loop of readfull(); if the dupes show up there I'm inclined to blame pyserial and/or macos
10:19marcanthen feel free to dig deeper into those I guess
10:19VinDuv has quit [Quit: Leaving.]
10:28VinDuv has joined #asahi
10:48amwsvenpeter: Thanks - found it - had to click open that right sections
11:02kit_ty_kate has joined #asahi
11:11jeffmiw has joined #asahi
11:15jeffmiw has quit [Ping timeout: 252 seconds]
11:30amwI've just loaded the latest m1n1 and now get *two* ACM ttys on my one USB-A <-> C cable - Yeah!
11:31amwNow can I use it to boot Linux with serial console?
11:32jannaunot yet. the virtualized uart is currently output only
11:33amwOk - I'm currently getting this python exception - https://paste.debian.net/1197758/
11:35amwJust for the record it took me three tries to install the latest m1n1, I had to do csrutil clear, reboot, csrutil disable a few times before it took!
11:36amwMy loaded Linux still runs - just proxyclient/linux.py gets the exception because it isn't getting output?
12:16inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
12:17inglor has joined #asahi
12:22choozy has joined #asahi
12:27jannaulol, it looks like python is just too slow on the mac mini.if I buffer the serial data in python I get an constantly growing buffer and a python process using 100% CPU
12:33jn__hm, sounds like some sort of flow control / pushback would be userful
12:33jn__useful*
12:34raster has joined #asahi
12:34VinDuvamw: The proxy is supposed to get a reply to the kboot_boot command and receive the “Preparing to run next stage at …” message before m1n1 shuts down USB (and starts Linux), so it’s a bit weird that it doesn’t receive the reply… maybe something isn’t flushed properly
12:55svenanyone with access to m1n1 and a mac around? i think i can reduce the checksum to a few numpy ops but i'm on a train and can't test anything right now
12:56jannausven: sure, although the checksum doesn't seem to cause the slowness I see
12:56jannauI already commented it out
12:56svenoh, it doesn't?
12:56sventurns out that my stupid numpy code is also slower than the pure python code :D
13:04marcanjn__: USB has flow control
13:11zkrx has quit [Ping timeout: 265 seconds]
13:23svenjannau: https://f.svpe.de/60643d23cac86f10491e5fcc4c8c1291ff82b54c760bfee731a7c04651ed1608_np_chksum2.py that one should be ~10x faster and maybe still produce the same checksums
13:26raster has quit [Quit: Gettin' stinky!]
13:26jannaureading from the serial and/or my naive buffer handling seems to be slow
13:27jannauprofile readfull 45056 calls took 88.323540 s
13:31jannauit's my buffer handling
13:36boooooooo has joined #asahi
13:36boooooooo has quit [Excess Flood]
13:42zkrx has joined #asahi
13:51jannausven: doesn't seem to make much of a difference here. I get following warning:
13:51jannau"RuntimeWarning: overflow encountered in long_scalars base = 0xDEADBEEF * numpy.power(31337, len(data))"
13:52svenpeterAh, yea. I got that once but couldn’t reproduce it then
13:53svenpeterIt doesn’t matter since the checksum is done mod 2**32 anyway
13:53svenpeterIt’s just annoying :)
13:53adamcstephens has quit [Quit: The Lounge - https://thelounge.chat]
13:54adamcstephens has joined #asahi
14:02kettenis has quit [Ping timeout: 252 seconds]
14:04kettenis has joined #asahi
14:16jannauprocessing 1000 MMIO trace event takes 41 ms without printing. my linux notebook looks even slower but seems to have a infinite buffer
14:17jannauI guess tracing most of memory was not a good idea
14:26raster has joined #asahi
14:43dougall has quit [Ping timeout: 240 seconds]
14:48choozy has quit [Ping timeout: 240 seconds]
14:50dougall has joined #asahi
15:01kettenis has quit [Ping timeout: 265 seconds]
15:02kettenis has joined #asahi
15:17jottr has quit [Quit: WeeChat 3.1]
15:29kettenis has quit [Ping timeout: 246 seconds]
15:31kettenis has joined #asahi
15:42pugguu[m]And how come the task list hasn't been updated
16:00w0lfhead[m] has quit [Quit: Idle for 30+ days]
16:00d4ve[m]1 has quit [Quit: Idle for 30+ days]
16:10jeffmiw has joined #asahi
16:15jeffmiw has quit [Remote host closed the connection]
16:37jeffmiw has joined #asahi
16:44jeffmiw has quit [Remote host closed the connection]
16:44jeffmiw has joined #asahi
16:46jeffmiw has quit [Remote host closed the connection]
16:47choozy has joined #asahi
16:59jeffmiw has joined #asahi
17:00jeffmiw has quit [Remote host closed the connection]
17:22odmir has joined #asahi
17:32choozy has quit [Ping timeout: 245 seconds]
17:34jeffmiw has joined #asahi
17:35roxfan2 is now known as roxfan
17:38jeffmiw has quit [Ping timeout: 265 seconds]
17:50choozy has joined #asahi
18:10TheJollyRoger has joined #asahi
18:11rjeffman has quit [Ping timeout: 260 seconds]
19:14KindOne has quit [Ping timeout: 260 seconds]
19:16KindOne has joined #asahi
19:29VinDuv has quit [Quit: Leaving.]
20:28odmir has quit [Remote host closed the connection]
20:29odmir has joined #asahi
20:33odmir has quit [Ping timeout: 245 seconds]
20:38marcanamw: if you do csrutil then bputil, the bputil will *override* csrutil.
20:38marcanyou always need to run csrutil second
20:39marcanand if kmutil or bputil have been complaining, you might not have been holding down the power button properly :-)
20:39marcan(if you press it twice, it goes into an alt recovery that doesn't qualify as true 1TR)
20:40marcansvenpeter: that was my idea with numpy, except precomputing a chunk of powers and doing it in blocks
20:42marcanjannau: you're tracing *memory*, not just MMIO? that's... not exactly supported, I don't support anything but the basic load/stores expected to be used for MMIO :)
20:44jannauno, just tracing the whole mmio space. the USB device was generating tons of reads at 0x50228c40c
20:44marcanoh, secondary USB device?
20:45marcan40c is the event reg, isn't it?
20:45marcanoh you mean m1n1 on m1n1
20:45marcanyes that would spam like that :)
20:45odmir has joined #asahi
20:45marcanit's a tight poll loop
20:45marcangiven CPU speculation, probably very tight
20:45marcanI have a huge scrollback on my konsole and it still eats through it in seconds
20:46marcanand this is without packet coalescing!
20:46marcandisable sync mode for even more throughput :)
20:46marcanthe good thing is the tracing granularity is 32 bits, so you can punch single-register holes you ignore
20:46marcanor choose to trace only writes, not reads
20:46marcanall on 32bit boundaries
20:47marcanso spam like this is manageable
20:49odmir has quit [Ping timeout: 240 seconds]
21:01odmir has joined #asahi
21:06odmir has quit [Ping timeout: 268 seconds]
21:19odmir has joined #asahi
21:20kettenisok, first attempt at pcie bindings sent to the linux lists
21:22kettenistogether with a v2 of the pinctrl bindings
21:27odmir has quit [Ping timeout: 260 seconds]
21:28raster has quit [Quit: Gettin' stinky!]
21:34amw marcan I never used bputil, only kmutil for the m1n1 install and csrutil to fix errors reported when kmutil failed
21:40odmir has joined #asahi
21:41odmir has quit [Remote host closed the connection]
21:41odmir has joined #asahi
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:01amwmarcan: Can't find "alt Recovery" but https://eclecticlight.co/2020/11/28/startup-modes-for-m1-macs/ lists "Fallback Recovery Mode" on double power button presses
22:02amwApparently you can distinguish this via missing "Start Security Utility" under Utilities
22:03zkrx has quit [Ping timeout: 252 seconds]
22:08zkrx has joined #asahi
22:09jeffmiw has joined #asahi
22:13jeffmiw has quit [Ping timeout: 268 seconds]
22:43modrobert has quit [Read error: Connection reset by peer]
22:43m0drobert has joined #asahi
23:11taziden has quit [Ping timeout: 260 seconds]
23:18raster has joined #asahi
23:21vimal has quit [Ping timeout: 260 seconds]
23:34vimal has joined #asahi
23:42taziden has joined #asahi
23:53odmir has quit [Remote host closed the connection]
23:54odmir has joined #asahi
23:58odmir has quit [Ping timeout: 240 seconds]
…