#
…

2022-01-10

00:18skipwich has joined #asahi
00:20skipwich_ has joined #asahi
00:20skipwich has quit [Read error: Connection reset by peer]
00:20skipwich_ is now known as skipwich
00:40aleasto has quit [Quit: Konversation terminated!]
01:03Gaelan has quit [Quit: ZNC 1.8.2 - https://znc.in]
01:04Gaelan has joined #asahi
01:12Gaelan has quit [Quit: ZNC 1.8.2 - https://znc.in]
01:12Gaelan has joined #asahi
02:16yrlf has joined #asahi
03:33darkapex3 has joined #asahi
03:37phiologe has joined #asahi
03:38darkapex2 has quit [Ping timeout: 480 seconds]
03:40PhilippvK has quit [Ping timeout: 480 seconds]
04:30Graypup_ has quit [Quit: meow]
04:30Graypup_ has joined #asahi
04:48Glanzmannj`ey: Perfect. :-)
04:49Graypup_ has quit [Quit: meow]
04:50Graypup_ has joined #asahi
05:01marvin24 has joined #asahi
05:04marvin24_ has quit [Ping timeout: 480 seconds]
05:52zimsneexh has quit [Ping timeout: 480 seconds]
06:30rkjnsn[m]Hmm… it looks like the firmware in the Apple driver for the Broadcom 43602 rev. 1 expects a different bring-up sequence than the Linux driver uses.
06:30rkjnsn[m]Looking at vfio traces, the Linux driver polls region2+0x26fffc (the last four bytes of the card's RAM), expecting the firmware to set it to a pointer to a shared memory region once it has booted. The Monterey driver, however, polls region2+0x26f0a8, which appears to merely change from a 0 to a 1 when the firmware is ready.
06:36Glanzmann has quit [Quit: EOF]
06:41rkjnsn[m]The Apple driver also puts the nvram data in a different spot, starting at region2+0x26a0a4, rather than at the end of RAM.
07:07darkapex3 has quit [Ping timeout: 480 seconds]
07:25jeffmiw has quit [Ping timeout: 480 seconds]
07:27eroux has joined #asahi
07:36darkapex has joined #asahi
08:34MajorBiscuit has joined #asahi
08:45chadmed has joined #asahi
08:46rkjnsn[m]I guess we're fortunate that the firmware for the T2 and M1 cards uses the same approach as the Linux driver expects. I wonder why the ABI Apple uses for the older cards is so different.
09:12jannauis 'kmutil configure-boot --raw' supposed to work with macos 11? It does not with 11.4 and 11.5 installer stubs or a full 11.6 system. Main macos is 12.2 beta, on a mac mini
09:19the_lanetly_052__ has joined #asahi
09:23rkjnsn[m]I might be misremembering the earlier discussion, but I seem to recall that I read for that combination the trick was to use --raw to make kmutil happy, but actually give it the macho and not the bin, as the iBoot for 11 doesn't support raw, and will parse it as a macho regardless of the --raw option.
09:25jannauI'll try that, thanks
09:25jannauI forward ported Alyssa's DCP driver to linux-asahi: https://github.com/jannau/linux/tree/asahi-dcp
09:27jannauso far only minimal testing with the 11.5 firmware, which more or less pointless since that has a working framebuffer
09:49jannauit doesn't work with --lowest-virtual-address 0 --entry-point 2048, I have hoped those are ignored with a macho payload
09:53jannaunot sure if it's worth spending time on this. I have a working dcp driver and it has to be updated to the 12.0/12.1 ABI anyway to be useful
10:03rkjnsn[m]Yeah, I thought marcan had said those were ignored by older iBoot versions, but I'm not sure if there was anything else special one needed to do to make it work.
10:05Glanzmann has joined #asahi
10:05Glanzmannjannau: Have you managed to get the mini with hdmi output working again?
10:11_jannau_Glanzmann: it works for me with the 11.5 installer stub on a mac mini which was not updated to 12.1
10:20Glanzmannjannau: I see. I have already updated.
10:27aleasto has joined #asahi
10:45GlanzmannFor me the old one was working, until I deleted the stub partition ...
10:49_jannau_I think HDMI output should work with any macos 11 stub but I don't know how to configure a custom boot object for that from the 12.2 (and probably 12.1) recovery
10:59the_lanetly_052___ has joined #asahi
11:05the_lanetly_052__ has quit [Ping timeout: 480 seconds]
11:21svenjannau: nice!
11:23darkapex1 has joined #asahi
11:23j`eydoes anyone else get: ieee80211: phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0x5, action 0x4
11:27darkapex has quit [Ping timeout: 480 seconds]
11:32j`eyI need SIMEPLDRM for x11 right, simeplfb doesnt work?
11:34_jannau_sven: do you know what is on endpoint 8? I need to start EP8 as well to get StartSyslogACK from dcp
11:35_jannau_is it expeted that I need to call apple_rtkit_wake()
11:35sveniirc another syslog
11:35svenoslog or something like that
11:36eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:36_jannau_j`ey: I think so
11:36svenwake isn’t required for all coprocs but I also think it doesn’t hurt
11:36svenit is required for DCP though since iboot puts it into hibernation instead of deep sleep
11:37kettenisI switched OpenBSD to sending wakeup unconditionally and it works fine for nvme at least
11:38svenyeah, I think we can just always send it
11:38_jannau_ok, I don't think it's problem to use apple_rtkit_wake instead of apple_rtkit_boot in dcp only though
11:39_jannau_I was merely wondering why it was not needed for the nvme
11:39svensince you’ve already spent some time with DCP.. wanna give proper locked dart support a shot? :>
11:39j`ey_jannau_: ty, rebuilding now
11:43MajorBiscuit has quit [Ping timeout: 480 seconds]
11:44off^ has joined #asahi
11:48marcanfwiw I'm looking into the iBoot DCP endpoint business
11:48marcanwhich is, as usual, overcomplicated in its own right (but not as bad as dcpep)
11:49marcanI think I understand it well enough to try writing a tracer and client now, at least the upper layers
11:49j`eymarcan: is that what the AFKServices thing was?
11:49marcanalso apparently RTKit is just the RTOS, the actual mailbox business is called AFK (Apple Firmware Kit?)
11:49j`eytracer? but i thought it was all over before we could do anything?
11:49marcanthe upper layers are shared with all the other non-dcpep endpoints of DCP
11:49marcanactually macOS even initializes the iboot endpoint, it just doesn't do anything with it
11:50marcanso I still need the tracer to work out what all the other EPs are doing
11:50_jannau_sven: how would that differ from Alyssa's locked dart support already in the tree? it doesn't look completely unreasonable to me
11:50marcan*lower layers
11:50j`eymarcan: have you seen "ieee80211: phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0x5, action 0x4"?
11:51marcandon't think so, but also I thought p2p was broken alright?
11:51sven_jannau_: it unfortunately is. I can write some more details later
11:51marcansven: so maybe the rtkit stuff in linux should be called afk? :p
11:51svenakf you mean?
11:52svenhuh, where did that come from?
11:52marcan$ strings DCP.bin|grep Builtin
11:52marcanAFKBuiltinAPMailboxEndpoint
11:52svenah, heh
11:52marcanthose are the low endpoints
11:52marcan(the ones we call rtkit)
11:52svenfine with me :D
11:53kettenisthe name rtkit is already entrenched in OpenBSD ;)
11:53svenrtkit it is then :D
11:53marcankettenis: see this is why y'all are too fast :D
11:54svenknowing apple it may also be called both :D
11:55svenbecause iirc there’s also RTBuddySysogEndpoint and stuff like that
11:56marcanactually, you know what
11:56marcanonly DCP talks about AFK
11:56marcan... did they rewrite the entire thing for DCP?
11:56marcanI swear I'm getting the feeling everything elses uses RTKit and is written in C
11:57marcanwhile DCP is a giant pile of C++ including all the "rtkit" endpoint support
11:58svenRtbuddy should implement the system endpoints fwiw
11:58svenand that’s used for everything I looked at
11:58marcanwell, rtbuddy is the macos side isn't it?
11:58marcanso I think there are two implementations IOP-side lol
11:58marcanof at least part of it anyway
12:00ChaosPrincessmarcan: as someone who mostly comes from x86_64 experience, are there rmw instructions on aarch64, is it possible that one is used to target spi mmio, and does the hypervisor support emulating them?
12:00marcansven: https://mrcn.st/p/7xpTEcVG tell me it doesn't look like that :D
12:01ChaosPrincesscause i tried tracing one of the spi mmios and i get an error from a function named `readModifyWrite`
12:01svenOh god
12:01marcanChaosPrincess: yes there are rmw instructions (atomics), I doubt they are used to target spi though, that feels wrong
12:01svenjust why :/
12:01marcanit is more likely it's a normal instruction that just isn't emulated yet
12:01ChaosPrincessoh, so not all load/stores are emulated by the hv, right?
12:01marcanI add them as they come up
12:02ChaosPrincessokay, thanks
12:03kettenisemulating mmio is not as messy as on x86, but there still are more load.store instructions that one would like ;)
12:04ChaosPrincessx86 is just a mess in general, i once wrote a generic library to divert functions and i dont think im doing that ever again :P
12:04j`eyChaosPrincess: im assuming the error from `readModifyWrite` was from the xnu logs?
12:05j`eybecause the HV prints if it couldnt emulate something
12:05marcanthe hv will trap if it fails to emulate
12:05Glanzmannjannau: That is also my problem.
12:05ChaosPrincessinject an interrupt?
12:06j`eygo to the HV repl
12:16chadmed has quit [Remote host closed the connection]
13:35MajorBiscuit has joined #asahi
13:40off^ has quit [Ping timeout: 480 seconds]
13:41off^ has joined #asahi
13:56the_lanetly_052___ has quit [Remote host closed the connection]
14:09j`eyfor those using X11, did you do anythin with resolution/scaling?
14:14the_lanetly_052 has joined #asahi
14:20mpsj`ey: with simpledrm?
14:20Glanzmannj`ey: In Firefox I zoom.
14:20Glanzmannj`ey: In xterm I use 20 pixel font.
14:20GlanzmannThat's it.
14:21mpsah in applications? I set DPI in .Xresources
14:23j`eymps: with simplledrm yes
14:24j`eyGlanzmann: i set that, still too small for me :(
14:24mpsj`ey: I have this `echo 'Xft.dpi: 192' | xrdb -merge` in .xinitrc
14:25mpsdefault DPI is 96
14:26j`eymps: will give that a go
14:27mpsthis is 'bug' in old xorg which was fixed in 21.1.0 and a lot of people cried because they have workarounds for bug, and then fix is reverted to be old bug in 21.1.1
14:27mpsfun with open source :)
14:30Misthiosit became a feature
14:31mpsMisthios: 'bug is feature' moto
14:34Dcow has joined #asahi
14:42yuyichao has quit [Ping timeout: 480 seconds]
15:01aleasto has quit [Quit: Konversation terminated!]
15:04aleasto has joined #asahi
15:07aleasto has quit []
15:08aleasto has joined #asahi
15:12aleasto has quit []
15:13aleasto has joined #asahi
15:13aleasto has quit []
15:13aleasto has joined #asahi
15:15yuyichao has joined #asahi
15:19aleasto has quit [Remote host closed the connection]
15:23aleasto has joined #asahi
16:55Glanzmannj`ey: That is -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
17:11j`eyGlanzmann: the screenshot is readable on my other laptop. I tried with xterm*font: 10x20, which I believe is that font you said, but it's still quite small
17:11j`eyjannau: btw are you testing your spi stuff with linux.py or with hv?
17:12j`eyjannau: Ive gotten that SPI boot failure a few times, even with your patch
17:25jmr2 has joined #asahi
17:27j`eyjannau: changing the waiting jiffies to 1000 from 500 seems to have helped, will reboot a few more times
17:29kettenistiming wil be a bit off under the hv
17:31j`eyyup, and it's probably fine to bump that number a bit anyway
17:32kettenisgiving it a wee bit more margin shouldn't hurt
17:55Glanzmannj`ey: This was a fullscreen screenshot on my macbook air so if you open that in firefox and press f11 you get the same look & feel.
17:57jannauj`ey: I test mostly with chainloading m1n1 + linux image payload. it's much faster here than the timeouts but bumping the timeouts up should not be a problem. it will make a unsuccessful probe take longer in the worst case
18:01j`eyGlanzmann: ok, I will have to install some kinda image viewer at some point then (or ff)
18:03j`eyjannau: with !smp it seemed fine, but as you say, it's only unsuccessful probes that will be effected
18:04jannauHV without tracing is not even close at timing out on my mbp14
18:04j`eyit seemed fine and then it timed out 2-3 times in a row
18:05jannaudo we stop the guest time with !smp?
18:06j`eyim not sure what happened with the guest time stuff, i think it was turned off at some point?
18:06j`eybuild times for kernel: x86 desktop: -j70 1min, macbook air: -j12 2min6s
18:07j`eythat's.. pretty good, and the m1 is under the hv
18:11Glanzmannwith 2ghz.
18:11jannauis the -j70 close to the number of smt threads? a significant amount of the 1min will be the final linking of the kernel image though. test with touching a single file and rebuild
18:11j`eyjannau: I have 55 threads I think it is
18:11Glanzmannj`ey: What kind of desktop do you have? I compile on 16 core ryzen 5950X. It takes like 2 minutes, but I'm building a debian package.
18:12the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:12j`eyit's a Lenovo p720 maybe? something like that, it's my work machine
18:13j`eywas mainly just a rough test, since I just got everything working enough to try it out :)
18:14j`eyjannau: uh, just failed for me with linux.py and the 1000 timeout :/
18:14GlanzmannOkay, If I push my ryzen, I get: real 0m17.643s
18:15Glanzmannfor time eatmydata make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j64 Image.gz modules dtbs
18:15j`ey17s from scratch seems.. too fast?
18:15Glanzmannj`ey: Let me check if ccache was involved.
18:18j`eyjannau: raised the timeout to 5000, and still fails
18:18jannauj`ey: I suspect the packet the driver is waiting for doesn't arrive at all
18:18Glanzmannj`ey: That was ccache helping me, without it I get 2m18.636s on the ryzen.
18:19jmr3 has joined #asahi
18:19jannauj`ey: please uncomment the '#define DEBUG 2' at the top of the file and append 'debug' to the kernel command line
18:19j`eyGlanzmann: on your air, you use the m1n1 proxy + linux.py to boot right?
18:21jmr2 has quit [Ping timeout: 480 seconds]
18:22j`eyjannau: only problem is getting logs.. since I dont have uart
18:23Glanzmannj`ey: Sometime, but at the moment I mostly use m1n1+u-boot -> grub -> linux + initrd.
18:23GlanzmannSometimes*
18:23MajorBiscuit has quit [Quit: WeeChat 3.3]
18:24jannauj`ey: `dmesg | grep spi` after booting if you have ssh
18:24j`eyjannau: oh right, i forgot I had wifi now :D
18:31jmr3 is now known as jmr2
18:31jmr2 has quit [Quit: Konversation terminated!]
18:31jmr2 has joined #asahi
18:42jmr2 has quit [Quit: Konversation terminated!]
18:43jmr2 has joined #asahi
18:47jannauj`ey: increase SPIHID_DEF_WAIT to 100 ms or so
18:51j`eyjannau: will report later tonight
19:08jeffmiw has joined #asahi
19:35j`eyjannau: 100ms SPIHID_DEF_WAIT works
19:41off^ has quit [Ping timeout: 480 seconds]
19:41off^ has joined #asahi
19:41j`eyhm, I guess m1n1 is good at getting out of the way in general, no noticable difference when building a kernel without hv
19:42j`eyI suddenly seem to have issues with the wifi though, I thought it was related to low battery.. but I charged and it's happening :/
19:43j`eyit seems to just drop, and then randomly work again
19:51jeffmiw has quit [Ping timeout: 480 seconds]
19:52Glanzmannj`ey: The wifi for me is rock stable.
19:52GlanzmannBut I never used the hv.
19:53Glanzmannj`ey: Even when moving multiple GB per data. And I once did a 24 hour stress test, not one iperf3 meassurement was not giving the expected performance.
19:53j`eyGlanzmann: yeah, that's why i'm confused :) Im going to leave ping running a bit, see if it drops again
19:54Glanzmannj`ey: I ran this for 24 hours: tg.st/u/wifitest.sh Results: tg.st/u/wifi.log.gz
19:55j`eyGlanzmann: Im just running: while 1 ; date ; ping google ; sleep 30 ; done
19:55j`eyshould be enough
19:56j`eyyup, it died
19:56j`eyonly took 3mins
19:56Glanzmannj`ey: Drop the hv.
19:57j`eyit came back again!
19:57j`eyI did get that brcmf_p2p_send error again, so it could be something weird with my wifi or setup or something
19:59j`eyand it dropped off again, and I saw that p2p error again..
20:13jmr2 has quit [Quit: Konversation terminated!]
20:13jmr3 has joined #asahi
20:57j`eyI can't seem to reproduce it again, pinging away for 30mins+ without any issues :/
21:16jeffmiw has joined #asahi
21:41Dcow_ has joined #asahi
21:45Dcow has quit [Ping timeout: 480 seconds]
21:59DragoonAethis has quit [Quit: hej-hej!]
22:00DragoonAethis has joined #asahi
22:19jmr3 is now known as jmr2
22:42m42uko has quit [Quit: Leaving.]
22:42m42uko has joined #asahi
23:56kov has joined #asahi
…