#
…

2021-05-12

00:08zkrx has quit [Ping timeout: 246 seconds]
00:22zkrx has joined #asahi
00:32kettenis has joined #asahi
02:05mort has quit [Quit: Ping timeout (120 seconds)]
02:06mort has joined #asahi
02:37Calchan has quit [Ping timeout: 260 seconds]
02:44PhilippvK has joined #asahi
02:44phiologe has quit [Ping timeout: 276 seconds]
02:44Calchan has joined #asahi
02:51phire"N4 process that will enter risk production later this year and will be used for mass production in 2022."
02:52phireSo way too late for the A15, but could be used for a M-series SoC early next year
02:53phireand from other rumours: "Apple has already booked the initial capacity of TSMC's N4 for its new-generation Mac series, the sources indicated."
03:38marvin24 has quit [Ping timeout: 276 seconds]
03:38marvin24_ has joined #asahi
04:13jeffmiw has joined #asahi
04:17jeffmiw has quit [Ping timeout: 246 seconds]
04:42r0ni has joined #asahi
05:25VinDuv has joined #asahi
06:04lennylxx[m] has joined #asahi
06:17VinDuv has quit [Quit: Leaving.]
07:08phire has quit [*.net *.split]
07:23scubasteve has quit [Ping timeout: 260 seconds]
07:30frotizzz has joined #asahi
07:40scubasteve has joined #asahi
07:45Bublik has joined #asahi
07:45frotizzz has quit [Quit: frotizzz]
08:22herbas has joined #asahi
08:23phire has joined #asahi
08:30raster has joined #asahi
08:37herbas has quit [Quit: herbas]
08:53klaus has quit [Quit: Lost terminal]
08:54klaus has joined #asahi
09:00M1f4a9[m] has quit [Quit: Idle for 30+ days]
09:31robinp has quit [Read error: Connection reset by peer]
10:04Lightsword has quit [Quit: ZNC]
10:05Lightsword has joined #asahi
10:08akemin_dayo has quit [Ping timeout: 240 seconds]
10:55_andy_t_kettenis: Have you tried netbooting from U-Boot? I have a usb nic attached and have updated the config so I can use it, but it's very slow when used by an efi application.
10:58_andy_t_As far as I can tell it's because running the timers is slow in the transmit path
11:02kettenis_andy_t: no I haven't, but maz did at some point
11:02kettenisyou mentioning timers rings a bell though
11:03kettenisthe 5 second timeout at the OpenBSD bootloader prompt takes much longer than 5 seconds to expire
11:04jeffmiw has joined #asahi
11:04snalty has quit [Quit: ZNC 1.8.2 - https://znc.in]
11:06bpye has quit [Ping timeout: 268 seconds]
11:08jeffmiw has quit [Ping timeout: 260 seconds]
11:09_andy_t_Within u-boot the network is good, it can load the efi bootloader fast enough, it's just from within this bootloader I have issues
11:10ketteniswhich bootloader are you using?
11:10_andy_t_I have a local patch to switch from an efi timer to the virtual counter for time
11:10_andy_t_The FreeBSD loader
11:10_andy_t_Using the arm counter is better, but there's still a problem
11:13bpye has joined #asahi
11:13kettenisthe efi boot services code uses the same underlying drivers as u-boot itself
11:15raster has quit [Read error: Connection reset by peer]
11:16raster has joined #asahi
11:20_andy_t_I've seen efi_net_transmit take over a second to complete. The call to efi_timer_check seems to be the problem.
11:30kettenisu-boot doesn't use interrupts so if the bootloader doesn't make frequent EFI bootservices calls, timeouts may be delayed
11:34_rjeffman has joined #asahi
11:36rjeffman has quit [Ping timeout: 260 seconds]
11:36_rjeffman is now known as rjeffman
11:37rjeffman has quit [Client Quit]
11:38rjeffman has joined #asahi
11:41_rjeffman has joined #asahi
11:42_andy_t_This is in the middle of loading a few files from NFS, so there was a lot of network requests for the timers to be called
11:44rjeffman has quit [Ping timeout: 260 seconds]
11:57snalty has joined #asahi
12:00j`eymarcan: when's the next stream?
12:00marcanprobably tomorrow; wanted to do one today but ended up busy this morning
12:00marcanhad some errands
12:01marcan(just got back home)
12:01j`eycool, hope i catch it then
12:05j`eymarcan: can you just give a quick recap of what the current status of loading macOS was. I watched some bits with patching macOS to turn (I think genter) into hvc. and then the last bit I watched was to try make hacr_el2 more finegrained to make the hv faster
12:05mort has quit [Changing host]
12:05mort has joined #asahi
12:07marcanj`ey: sprr/gxf is an issue; I already knew the gxf instructions cannot be trapped but it seems the sprr registers can not be trapped fine-grained. given that it's not trivial to emulate, so my next approach will be to just do it the "right" way and run m1n1 with SPRR enabled (and possibly partly or wholly in GL2), which allows the guest to do so too
12:07j`eyThanks! I'll go read up on sprr then
12:07marcanread sven's blog :)
12:07marcana priori it just means extending the pagetable code to properly support mapping at 16k granularity (right now we only do block maps in memory.c) so that we can properly map .text as r-x and .data as rw- (W^X which is enforced with SPRR on)
12:08marcanthen gxf is more interesting; it's not clear exactly what it entails, but hopefully it won't be very hard. I'm thinking stuff like pointing the gxf exception base to the regular location; perhaps some registers need to be accessed differently and such
12:08marcanthe details aren't clear but I think it should be easier than trying to trap and emulate the whole thing
12:08j`eyah, I didnt realise gxf also had a different exception table
12:09marcananother approach would be to just patch macos to not use this (there may be some global vars you can just poke to trivially make it bypass it), but I want to avoid any dependencies on such mechanisms
12:10marcannothing is patched in macos right now (I had a patching attempt but gave up, too many false positives to do statically; was considering doing it dynamically but I feel it'll be more work than just doing it right, and more brittle)
12:10marcanexcept the exception vectors get dynamically patched into hvcs, just so I can monitor guest exceptions
12:10marcansince it's the ony way to get any feedback on early problems
12:10marcanbut I want to stop doing that
12:10marcan(which implies making sprr/gxf work, since those cannot be properly trapped from EL2)
12:10j`eyyeah, I thought that the patching didnt seem to clean
12:11j`eyah right, you trap access to VBAR, I remember seeing that bit too (I assume so you can find the address to patch hvcs)
12:11marcanI don't (I can't)
12:11marcaninstead I trap other stuff and then just read VBAR and see if it changed
12:11marcanthen patch
12:11marcanit's ugly
12:11marcanrelies on some other trap firing before a crash happens
12:12jabashque has quit [Quit: Connection closed for inactivity]
12:12marcanOTOH, since I have symbols now, it makes a lot more sense to just ditch that and statically patch the exception tables, which are at two well-known symbols
12:12marcanand then just stop doing that once things get far along enough
12:12marcanwhich they might already - serial works
12:12marcanso panics hopefully can go there
12:12marcan(originally I wasn't getting that far before a crash)
12:12j`eyare the symbols resolved by python or the m1?
12:13marcanthat was last stream, all the fileset voodoo to get all the addresses fixed up and symbols loaded
12:13marcanso I have symbolized backtraces and such now
12:13pipcet[m]where are those streams? it sounds really interesting!
12:13marcanyoutube.com/marcan42
12:14marcanI only have symbols for the core kernel (which is ~95% open source, except the "secret" m1 and gxf/etc bits)
12:14marcanso kexts will just show as name+offset, but at least I can still know what kext I'm in, even though I don't have more details
12:14marcanstill better than no visibility
12:15marcanpipcet[m]: by the way, chainload.py smp works fine now, though I haven't committed/pushed that yet
12:16pipcet[m]I tried the latest version you pushed, no luck here. Glad it's working for you :-)
12:16pipcet[m]looking forward to ditching that hack
12:17pipcet[m](currently installing the macos CC so I can communicate between the linux kernel I have running on CPU7 and the macos system on CPU0. Turns out if you only give macos 4 GB of RAM installation takes forever)
12:25mazkettenis: I've seen the same issues as _andy_t_. booting the kernel as an EFI application from the kernel is fine. booting an intermediate bootloader (such as ... err... grub) results is something horribly slow and unreliable.
12:25pipcet[m]ah, that makes sense. I wonder why iboot didn't do that for us.
12:25mazkettenis: I parked that for the moment, specially given that I'm out of cycles...
12:30balrogmarcan: the KDK comes with symbols for a handful of kexts but not the interesting ones
12:42Chainsaw has joined #asahi
12:45vimal has quit [Quit: Leaving]
12:59Lightsword has quit [Quit: ZNC]
12:59Lightsword has joined #asahi
13:02kettenisI fear the u-boot usb stack isn't great
13:02choozy has joined #asahi
13:03kettenisbut if performance is worse than on other arm64 boards that use u-boot, this is something I should look into
13:20pipcet[m]hehe. I have a useful Linux system with no IRQs. It just reads /dev/mem, waits for commands that I put there from macos, and executes them, allowing me to access physical memory locations that I wouldn't otherwise get at.
13:21_rjeffman is now known as rjeffman
13:25pipcet[m]marcan: I can confirm that SMP works here with your latest code :-)
13:25ephe_meral1 has joined #asahi
13:29akemin_dayo has joined #asahi
13:35mazkettenis: I don't think this is related to the USB stack. it is definitely good enough to load stuff from the network pretty quickly.
13:35mazkettenis: the slowdown happens if running an EFI app under u-boot.
13:36mazand I don't see this with other systems that use u-boot.
13:36mazmy bet is on a screaming interrupt.
13:37Izumoo has quit [Quit: Konversation terminated!]
13:45grange_c has quit [Quit: Ping timeout (120 seconds)]
13:45grange_c has joined #asahi
13:47Hexagon has quit [Remote host closed the connection]
13:48Hexagon has joined #asahi
13:52kettenishmm, the default irq and fiq handers in u-boot print stuff
13:53kettenisso unless i'm missing something, it can't be interrupts
13:57mazkettenis: I'll try and trace things a bit next week (that's what holidays are for...)
13:59ketteniswonder if it is the bounce buffer implementation that may be used for the EFI calls
14:12_andy_t_I've added timing info to u-boot & found r8152_eth_recv can be slow
14:15mazhow slow?
14:15_andy_t_It can take over 1s
14:16mazhuh...
14:16mazI'm using a vintage AX88772, which works well enough... r8152 is awfully modern compared to it.
14:17_andy_t_It seems to be spending time in usb_ether_receive
14:50m0drobert is now known as modrobert
14:58Bublik has quit [Ping timeout: 240 seconds]
15:00Bublik has joined #asahi
15:19KindOne has quit [Ping timeout: 240 seconds]
16:53VinDuv has joined #asahi
17:01ephe_meral1 has quit [Ping timeout: 240 seconds]
17:20yrlf has left #asahi ["The Lounge - https://thelounge.chat"]
17:45jeffmiw has joined #asahi
17:49jeffmiw has quit [Ping timeout: 240 seconds]
19:16lethalbit has quit [Ping timeout: 240 seconds]
19:16lethalbit has joined #asahi
19:21maknho___ has joined #asahi
19:21pthariensflame has joined #asahi
19:22pthariensflame has quit [Client Quit]
19:23maknho__ has quit [Ping timeout: 240 seconds]
19:41zopieux has quit [Ping timeout: 260 seconds]
19:42zopieux has joined #asahi
19:51DarkShadow44 has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
19:51DarkShadow44 has joined #asahi
20:18jeffmiw has joined #asahi
20:30Calchan has quit [Ping timeout: 265 seconds]
20:31Calchan has joined #asahi
20:53VinDuv has quit [Quit: Leaving.]
21:40jeffmiw has quit [Remote host closed the connection]
21:56kettenis has quit [Ping timeout: 265 seconds]
21:57kettenis has joined #asahi
21:58choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
21:58KindOne has joined #asahi
22:14jeffmiw has joined #asahi
22:18jeffmiw has quit [Ping timeout: 252 seconds]
22:42modrobert has quit [Read error: Connection reset by peer]
22:43modrobert has joined #asahi
23:08taziden has quit [Ping timeout: 276 seconds]
23:24yrlf has joined #asahi
23:39KindOne is now known as C[_]
23:42C[_] is now known as KindOne
…