2021-12-20
00:07Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:27os has quit [Quit: The Lounge - https://thelounge.chat]
00:31os has joined #asahi-dev
00:34os has quit []
00:35os has joined #asahi-dev
01:15chadmed has joined #asahi-dev
01:49Dcow has joined #asahi-dev
01:49chadmed has quit [Ping timeout: 480 seconds]
01:51_jannau_ has quit [Ping timeout: 480 seconds]
01:52jannau has quit [Ping timeout: 480 seconds]
02:09chadmed has joined #asahi-dev
02:10Dcow has quit [Ping timeout: 480 seconds]
02:30_jannau_ has joined #asahi-dev
02:30jannau has joined #asahi-dev
02:42_jannau_ has quit [Ping timeout: 480 seconds]
02:44jannau has quit [Ping timeout: 480 seconds]
02:56_jannau_ has joined #asahi-dev
02:57jannau has joined #asahi-dev
03:42kov has quit [Quit: Coyote finally caught me]
03:54phiologe has joined #asahi-dev
04:10amarioguy has left #asahi-dev [#asahi-dev]
04:14marcanthis is kind of cute: https://amboar.github.io/notes/2021/09/16/history-preserving-fork-maintenance-with-git.html
04:15marcanit sounds like it might work for when I bump asahi to new linux-next or -rc bases, and as a side effect preserves the old state in the history so you could dig up "what asahi looked like on top of that -rc in the past".
04:16marcantl;dr it basically creates a dummy merge from asahi into the next base, but discards all changes; then re-applies all the patches on top
04:16marcanOTOH I probably don't want to do that for my usual rebasing/squashing/fixup cycle when working with downstream commits, so those would still be force pushes (but less painful to rebase on top of)
04:31nabaiste^ has joined #asahi-dev
04:33Jamie[m]1downloading a file in safari under the m1n1 hypervisor seems to be reliably causing AGX-related kernel panics lol
04:33Jamie[m]1(presumably related to the animation of the file flying across the screen into the download button when a download starts?)
04:43tpw_ruleskettenis: i've finally released all my work. i made two patches to u-boot i'd like to get upstreamed in some manner
04:44tpw_rulesthe first is some minor tweaks to make sysboot boots work properly: https://github.com/tpwrules/nixos-m1/blob/main/nix/u-boot/0001-add-extlinux-vars.patch . i don't like having u-boot search all the partitions, but i think that's something we can remove once the asahi installer matures
04:46tpw_rulesthe second is code which massages device trees u-boot loads to incorporate the tweaks m1n1 makes: https://github.com/tpwrules/nixos-m1/blob/main/nix/u-boot/0001-m1n1-fdt-compat.patch this way distros can specify arbitrary device trees and have them work properly. this also means users don't have to involve kmutil to update device trees.
04:46tpw_rulestheoretically this will not work if the distro device tree has more hardware than u-boot because m1n1 won't have massaged those parts. but it prints out a warning in that case and that shouldn't really happen in practice
04:47tpw_rulesi'm going to sleep soon, but i would be grateful if you could help me get that second one upstreamed officially somehow instead of just taking the ideas
04:54marcantpw_rules: I'm not sure that DT massaging approach is useful; precisely what we'd want new DTs for is adding new hardware
04:55marcangiven the direction things seem headed in, and that it looks like I need to add RTKit to m1n1 anyway, it's starting to sound like the future is m1n1 chainloading itself from the EFI system partition. once we have RTKit, a dumb NVMe driver shouldn't be too hard, and I'm used to throwing fatfs everywhere...
04:56marcan(funny how originally I wanted to add storage to m1n1, then I ditched that and left it to U-Boot, and now it's sounding like it might make sense again...)
05:02tpw_rulesbuilding a new u-boot for each device tree wouldn't really work for nixos, but the nixos on arm vision is to have the platform (i.e. u-boot or m1n1) provide a complete device tree and just use uefi. lots of other distros are certainly device tree centric though. but it's fine if that ends up not being useful, i just want credit if it does :) and it does work well for now. it will only encounter problems if there are
05:02tpw_rulesand again, thank you and kettenis for actually making all the hard bits go. i couldn't have gotten this done in a week without it
05:03marcanremember one of the goals of the way we're doing the kernel stuff is that hopefully we can add partial support for new platforms without any kernel changes at all
05:04marcanas far as I'm concerned the only problem with the current approach is updating m1n1+dt+u-boot is mildly inconvenient
05:04marcanand the solution for that isn't DT merging, it's m1n1 chainloading itself, since it's not just about the DT; we want to be able to update m1n1 too, it goes together with it
05:05tpw_rulesnixos (and I) agree with the vision of the bootloader providing the DT too. but i'm not sure how practical that is. but as long as m1n1 becomes UEFI compatible, or that's all u-boot does, i would be happy.
05:06marcanwe've already proven that m1n1 chainloading is extremely effective during development; I very, *very* rarely have updated my installed m1n1
05:07marcanu-boot already has UEFI support; people are using GRUB on top of it. that's always been the plan
05:08marcanin addition, m1n1 will have to start providing PSCI services to everything down the chain at some point, with a new mechanism we'll have to invent :-)
05:09tpw_rulesmy imagination for the asahi installer is it would eventually just set up an EFI system partition, with an option to download Asahi's own rootfs and grub for convenience. then once the kernel stuff gets upstreamed people can just use the official UEFI installers of the distro of their choice
05:10tpw_rulesalright. i'd be delighted to bang on it and update stuff i've written as soon as it's ready
05:10marcanI want to offer a list of pre-baked images (we'll do the Arch ones, other distros can maintain others) so users have that convenience, plus an option to just create a blank EFI partition and leave it to an installer
05:10marcanwe could also offer some kind of mechanism to stage a netinstall image for first boot or something like that
05:12marcanyeah, tbh I'd be very grateful if you could get it working with uefi+grub since that is the direction we're going to be moving towards, and I'd rather someone document that one
05:13marcanthat will also let us find out how well existing distro installers work (if we just replace the kernels)
05:14marcanif you are using the HV you need to use the same exact kernel as was present in the underlying macOS
05:14tpw_rulesmarcan: alright, i'll look at that tomorrow. should be straightforward. but it's my bedtime here
06:25Jamie[m]1that kinda foils my plan of "i don't need to RE anything about the dart since others already have" lol
06:26zsxh has joined #asahi-dev
06:32monn has joined #asahi-dev
06:35marcanjust do something with AVD, break and dump the DART with the existing tools; any changes should be fairly evident
06:37marcanJamie[m]1: apciec, you had me scared there for a second with "ACPI Embedded Controller" :p
06:42monn has quit [Remote host closed the connection]
07:31monn has joined #asahi-dev
07:35jannaumarcan: installing grub and asahi as distro kernel was enough for u-boot to boot the system when I tried in summer
07:37jannauchainloading m1n1 from nvme also requires adding signing and verification into m1n1 for secure boot
07:45monn has quit [Read error: Connection reset by peer]
07:51thunfisch has quit [Read error: Permission denied]
07:51thunfisch has joined #asahi-dev
08:18MajorBiscuit has joined #asahi-dev
08:49Redecorating[m] has joined #asahi-dev
09:15kettenistpw_rules: those patches facilitate exactly what I don't want to do in u-boot: letting u-boot somehow load a DTB that didn't come from m1n1
09:17nabaiste^ has quit [Ping timeout: 480 seconds]
09:17marcanit smells like an auth failure, but as far as I can tell the PMK passed from the driver is correct...
09:29nabaiste^ has joined #asahi-dev
10:01matthewayers[m]marcan: I wonder if it’s something like an incompatibility with the spec?
10:03matthewayers[m]I meant the wifi specs for security
10:06marcanso normally the Linux driver sends the hashed PSK in hex form, which is one common way to represent it in contexts where a plain passphrase is accepted
10:14marcanthe problem is that now I don't know if this method works for all broadcom cards, or I need some kind of feature flag for this too
10:16marcanand with this silly patch tacked on, wifi works on the M1 Pro/Max: https://mrcn.st/p/NQoDO2et
10:17FireFox317marcan, congrats :)
10:21svenso what you’re saying is I should just never submit another version of that 4K patch for the good of the entire internet? :p
10:21FireFox317firefox works for me with a defconfig kernel and the usual config options for m1 stuff (16k pages etc).
10:21FireFox317on alarm btw
10:22FireFox317yep, had to launch firefox through the terminal tho, also this was like 3 weeks ago or something
10:23FireFox317marcan, havent tested lately
10:23Redecorating[m]marcan: the patch you sent changing how the password is done works on bcm4364 MacBookPro16,1
10:26riker77 has quit [Quit: Quitting IRC - gone for good...]
10:30marcanI wonder what chain of fail led to both the mainline driver and that Android one I found doing the hex dance for no reason
10:33marcankettenis: do you know if the driver does a reset of the D11/802.11 cores on init/around firmware upload, or only of the ARM core?
10:33marcanj`ey: yeah, I feel like someone knew about the passphrase interface but not the raw one for some reason, and then guessed (right) that the standard-ish hex passphrase form would work, and rolled with it
10:34marcanI'd say this is a Broadcom person so they should know better... but this is Broadcom we're talking about here
10:35Jamie[m]1fingers crossed: https://www.bloomberg.com/news/articles/2021-12-16/apple-builds-team-in-new-office-to-bring-wireless-chips-in-house
10:36marcanthe other driver I found does not do the reset, so a priori I'm just going to special case *all* the chips I add in this patch series and not do it either on those
10:36bluerise has joined #asahi-dev
10:36Glanzmann has joined #asahi-dev
10:36marcanat least on 4387 the ARM firmware resets the D11 cores (and presumably does it in a way that works, not what Linux does)
10:36Glanzmannmarcan: xorg works for me with modsetting on debian testing on top of simpledrm. I can open firefox.
10:37marcanJamie[m]1: I'd say "ugh, another big driver to reverse engineer", but honestly knowing Apple they might actually come up with one of the sanest wifi chipset ifaces out there...
10:38riker77 has joined #asahi-dev
10:38Glanzmannmarcan: Also the modesetting driver in xorg which blazingly fast compared to 'fbdev' xorg. You can alread tell when you move the mouse.
10:39bluerisemarcan: I think it depends on which ARM core we're using. For CA7 and CR4 we definitely also reset the 802.11 cores
10:41marcanthis is CR4, so yeah, I expect openbsd to run into the firmware explosion on 4387 (the telltale that things are about to go wrong is if the first line of the console log complains about reset_status)
10:41marcanif it *doesn't* then that would be very interesting and might lead to a fix for the reset sequence on linux :-)
10:42marcanI tried a bunch of stuff with the reset sequence, including a workaround I found in that android driver, but nothing worked
10:43marcandoing the resets just causes something to go horribly wrong with the AXI interfaces, and 1 second after boot it almost always crashes hard with AXI errors
10:44marcanI get weird fault addresses, sometimes small, sometimes starting with ff and such, and the blocks they hit also change (sometimes the CR4, sometimes PCIe, sometimes something else)
10:49chengsun has quit [Quit: Quit]
10:49chengsun has joined #asahi-dev
10:52marcanbluerise: so apparently the cores are *already* in reset on cold startup... and it's *releasing* reset that breaks it
10:56marcanthe question again here is, is this a thing that was wrong all along, or do we actually need to release reset for older chipsets
11:25bluerisemarcan: "OpenBSD does it this way" in bwfm(4) might just be a "that's how Linux did it 2-3 years ago" lol
11:26bluerisealso regarding the core disable loop: at least the diff I saw made sure that each step in a disable is done for each core. so not for (chip) disable, but for (chip); part 1; for (chip); part 2
11:32zimsneexh has quit [Ping timeout: 480 seconds]
11:50marcanif we must we *could* ship two different builds and have the installer pick... but then you get to join Apple in the I-don't-know-how-to-build-universal-kernels hall of shame ;)
11:52kettenisit should be possible to make it work; my code that switches things around runs before the MMU gets enabled
11:56kettenisprintf works at the point where things go wrong, so I *should* be able to figure this out...
12:25aleasto has joined #asahi-dev
12:34fetsorn[m] has joined #asahi-dev
13:05Glanzmann has quit [Quit: leaving]
13:08mavericks has joined #asahi-dev
13:08mavericks has left #asahi-dev [The Lounge - https://thelounge.chat]
13:50aleasto has quit [Quit: Konversation terminated!]
13:52aleasto has joined #asahi-dev
13:59ryanhrob1[m] has joined #asahi-dev
14:05chadmed has quit [Quit: Konversation terminated!]
14:05chengsun has quit [Quit: Quit]
14:06chengsun has joined #asahi-dev
14:10tpw_rulesdo the iSC and 1TR partitions have to be the first and last numerically, or even on disk?
14:28Glanzmann has joined #asahi-dev
14:29Glanzmanntpw_rules: Alignment, yes I noticed that too when I tried to create a partion on linux with parted -a optimal and about the 1tr. I have a partition number which is higher than 1tr on my macbook air and 1tr still works (power button press and select options ...)
14:31Glanzmann has quit []
14:36yuyichao has quit [Ping timeout: 480 seconds]
14:41svenmarcan: i'm on a train and can't test it right now but https://github.com/AsahiLinux/linux/tree/asahi-with-new-nvme should be the asahi branch without the old and with the new nvme driver
14:45FireFox317marcan, i think jannau also has a new hid driver, which is ready for testing? (jannau is that correct?)
14:58bps has joined #asahi-dev
15:03_jannau_sven: should work on t6001, replacing nvme support resulted only in MAINTAINERS conflicts and needed t6001.dtsi updates
15:03yuyichao has joined #asahi-dev
15:04_jannau_i expect it to be the same as my attempts in https://github.com/jannau/linux/tree/exp/asahi-nvme-2021-12-19 except for the updated hid/kbd/tp patches
15:06_jannau_marcan: updated spi hid is in https://github.com/jannau/linux/tree/dev/spi-hid-apple replacing keyboard/tp support in asahi
15:09skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
15:13skoobasteeve has joined #asahi-dev
15:40Dcow has joined #asahi-dev
15:42Dcow has quit []
16:00Dcow has joined #asahi-dev
16:31jbowen has quit [Quit: leaving]
16:35tpw_rulesso it looks like you can have partitions after 1TR, but it confuses diskutil if they are not sorted
16:52tpw_ruleskettenis: does the UEFI boot path do anything funky with the watchdog? it takes 30 seconds or so to reboot when booted via UEFI
16:58kettenisnot sure if Linux tries to reboot using EFI runtime services, or if it resets using the watchdog driver
17:04kettenisactually the same is true for upstream since my watchdog driver for u-boot hasn't been merged yet
17:05Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:07_jannau_tpw_rules: rebooting linux after lot of IO can take some time (I presume due to the nvme flush issue)
17:07Dcow has joined #asahi-dev
17:08tpw_rulesso unless my previous hax actually stopped it from flushing, i think there might be something else
17:15_jannau_I haven't really looked into it. nothing to see on the display and I've haven't checked the serial
17:15tpw_rulesrtkit prints something like "NVMe shutdown start" then "saveCtx took 80ms" before hanging
17:21svenah, i've seen that before. it for some reason took ages to delete the submission and completion queues
17:21svenwithout deleting those it'll complain about an "unclean shutdown" and how it needs to "recover something" on the next boot
17:31Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:33Dcow has joined #asahi-dev
17:35nabaiste^ has quit [Ping timeout: 480 seconds]
17:45nabaiste^ has joined #asahi-dev
17:48skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
17:49skoobasteeve has joined #asahi-dev
17:50skoobasteeve has quit []
17:51skoobasteeve has joined #asahi-dev
17:59bps2 has joined #asahi-dev
18:06bps has quit [Ping timeout: 480 seconds]
18:35MajorBiscuit has quit [Ping timeout: 480 seconds]
19:07kettenismarcan: do you already have a diff for m1n1 to populate the wifi instance/antenna properties?
19:08marcannot yet, but the instance just goes in the DT since it's not dynamic, and the antenna doesn't actually matter for any current platform, so I just have some dummy thing in the DT for now
19:09kettenisjust in case Apple decides to source a different module at some point for a particular model
19:10marcanif apple does something weird in a future platform/update we just update m1n1 anyway, which we'd probably have to either way
19:11marcanI suspect the reason for the island codenames is just so broadcom doesn't know anything about what machines apple is working on
19:14jannausven: did you already spot the missing "apple,asc-mailbox" base compatible in t8103.dtsi?
19:20jannausven: I took the dtsi change from nvme/dev and there it's missing. asahi has "apple,asc-mailbox"
19:46MajorBiscuit has joined #asahi-dev
19:49Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:03okt has quit [Write error: connection closed]
20:03okt has joined #asahi-dev
20:03WhyNotHugo has quit [Read error: Connection reset by peer]
20:03coder_kalyan has quit [Read error: Connection reset by peer]
20:03WhyNotHugo has joined #asahi-dev
20:03coder_kalyan has joined #asahi-dev
20:11jannaukettenis: no issues chainloading f2eac15 (main) over f2eac15 or 73180e2 (27th October) using uart instead of usb
20:16yuyichao_ has joined #asahi-dev
20:17kettenisthe m1n1 I have is c2c6da3 from August, so I guess it is getting a bit long in the tooth
20:18bps2 has quit [Ping timeout: 480 seconds]
20:19yuyichao has quit [Ping timeout: 480 seconds]
20:22aleasto has quit [Remote host closed the connection]
20:29bps2 has joined #asahi-dev
20:31tpw_ruleskettenis: is u-boot set up for persistent EFI vars yet? efibootmgr is giving me input/output error. i don't need them but it would be good to know
20:33kettenisshould be possible to set them from u-boot itself or from an EFI bootloader, but I haven't tested that yet
20:34MajorBiscuit has quit [Ping timeout: 480 seconds]
21:29suricato has joined #asahi-dev
21:31joe[_]D has joined #asahi-dev
21:31suricato_ has quit [Ping timeout: 480 seconds]
21:47MajorBiscuit has joined #asahi-dev
23:00bps2 has quit [Ping timeout: 480 seconds]
23:08bmrgz has joined #asahi-dev
23:10tbodt_ is now known as tbodt
23:11bmrgzYou can set the efi variables with efidebug in u-boot. It stores them in a file in the efi partition by default.
23:11tbodt has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
23:11tbodt has joined #asahi-dev
23:55MajorBiscuit has quit [Ping timeout: 480 seconds]