#
…

2021-10-27

00:06user982492 has joined #asahi-dev
00:07yuyichao has joined #asahi-dev
00:20alexstore06 has joined #asahi-dev
00:22bps has quit [Remote host closed the connection]
00:26alexstor_ has quit [Ping timeout: 480 seconds]
00:36StupidYui has quit [Ping timeout: 480 seconds]
00:40StupidYui has joined #asahi-dev
01:40marcanthis is bringing back memories of the Xbox (original) gamepads...
01:40marcan(those were HID-without-the-descriptor)
01:41krbtgtHIDeous!
02:09phiologe has joined #asahi-dev
02:13PhilippvK has quit [Ping timeout: 480 seconds]
03:16alexstore06 has quit [Remote host closed the connection]
03:24alexstore06 has joined #asahi-dev
03:32alexstore06 has quit [Ping timeout: 480 seconds]
03:33alexstore06 has joined #asahi-dev
03:35kov has quit [Quit: Coyote finally caught me]
03:35kov has joined #asahi-dev
03:44rohin2 has joined #asahi-dev
03:53rkt has left #asahi-dev [#asahi-dev]
04:10alexstore06 has quit [Ping timeout: 480 seconds]
04:25alexstore06 has joined #asahi-dev
05:00user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:12rohin2 has quit [Ping timeout: 480 seconds]
05:28alexstore06 has quit [Ping timeout: 480 seconds]
05:39user982492 has joined #asahi-dev
05:43alexstore06 has joined #asahi-dev
05:53jeffmiw has quit [Ping timeout: 480 seconds]
06:43marcansven: I looked a bit at DAPF: https://mrcn.st/p/sxJQcz7k
06:47marcanit's pretty dumb, the only thing I don't really understand is that mode field
06:48marcanI also found the DAPF lockbit
07:11marcanhttps://mrcn.st/p/aAl2q6jA this seems to be the actual translation logic
07:15marcanso basically the DAPF always behaves like it has an implicit allow of the bottom 4GiB at the end (but this can be overridden with a USE_DART=0 entry, and since the bottom 4G on these SoCs always faults AIUI, that means you can disable that entire range)
07:16marcanand then, if USE_DART=1 (or it's the implicit allow), then resolution continues through the DART if enabled, otherwise it falls through to passthrough if allowed, otherwise it gets dropped
07:21marcanyou can technically do wonky things with DAPF; you could have a range go 1:1 to physmem for reads and to DART for writes, which means you could have memory that points somewhere different for reads and writes...
07:21marcan(wonder how that interacts with caches... my guess is not well...)
07:49aleasto has joined #asahi-dev
07:53aleasto has quit []
07:54aleasto has joined #asahi-dev
07:54rkjnsn[m]hid_apple is also used for the internal keyboard on my 2015 MBP.
07:56aleasto has quit [Remote host closed the connection]
07:57aleasto has joined #asahi-dev
08:00kettenisyes, the
08:01kettenisyes, it looks like it will handle the quirk for the Fn key in the HID on the M1 macbook
08:01kettenisthe whole thing makes sense since the keyboard is just the same as for the last generations of intel laptops
08:02kettenisand some of those supported the keyboard over usb
08:02alexstor_ has joined #asahi-dev
08:03kettenisthose machines probably just had a microcontroller in front of the SPU bus
08:04j_eykettenis: does openbsd support any older intel macs?
08:06marcankettenis: s/microcontroller/T2/
08:07marcanthe T2 has a virtual USB Host controller thing going (which is its own snafu to support)
08:07marcanand it exposes the keyboard over that; internally I'm sure it's the same exact SPI thing behind the T2
08:07marcanmeanwhile, lol Kali Linux are apparently listing their AArch64 ISO images as "Apple M1" ?!
08:07marcanno wonder some people are confused
08:08marcan(AFAICT the only use for those is doing VM installs, and maaybe some bare metal platforms, but definitely not the M1)
08:09alexstore06 has quit [Ping timeout: 480 seconds]
08:11marcankettenis: do you have a one-line TL;DR on what u-boot repo/build I should be looking at? it's about time I start looking into bundling that in the installer...
08:11marcanthanks :)
08:12marcanI've also been wondering about how we should handle EFI partitions
08:13j_eyapple_m1_defconfig
08:14marcanwe have a bit of a nested OS problem; in principle, you could have multiple m1n1 installs each wrapping one OS, which would mean a separate EFI partition. This might become particularly important once we start using the SEP, to provide strong isolation between different OSes (otherwise they would at the very least end up sharing user databases and such)
08:15marcanso I'm wondering if we should have some magic to be able to have multiple EFI partitions and tell u-boot which one to use, perhaps as a m1n1 arg built into it at install time, or perhaps via automagic search based on partition order (since the ADT tells us what APFS volume group UUID we booted from, we could search for that and look for the subsequent EFI partition)
08:15marcanthough that adds even more pitfalls since you can in principle have multiple installs per APFS container (though we don't currently support that)
08:16marcanso maybe it makes more sense to either hardcode the EFI partition UUID in m1n1 at install time, or to just have a flag file in the EFI partitions saying what VGID they belong to, so they can be scanned for
08:16marcan(of course distro installers may be very confused by multiple EFI partitions, but what can you do about that...)
08:17marcan(evil hack: have u-boot change the partition IDs to only mark the current one as a real EFI partition...)
08:18marcanapple deals with this by putting everything in their EFI-partition-equivalent (Preboot) under a folder named after the VGUUID of the OS in question...
08:19marcanin principle it's desirable to let users boot different m1n1-based OSes from the Apple boot picker, not just due to the SEP stuff but also because it's more user friendly than nested bootloaders and also supports accessibility
08:19user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:21marcanhm, the GPT partition name field fits an ASCII UUID *exactly*. maybe that's the easiest way to bind them to a VGUUID.
08:22marcan(could also take the dashes out and go with EFI:<uuid> or something)
08:32j_eywhichever is the cleanest, and hopefully doesnt involve hardcoding things in m1n1 or u-boot
08:32marcanwell, "hardcoding" can be done via the vars mechanism I added
08:32marcani.e. just cat stuff into the binary
08:33marcan(for those who missed it: for run_guest and such, you can now append "boot-args=foo bar baz" as newline-terminated ASCII to m1n1.macho to set the linux bootargs statically)
08:34j_eyoh, yeah, neat, thats not so bad
09:10alexstor_ has quit [Ping timeout: 480 seconds]
09:15d4ve has quit [Remote host closed the connection]
09:16d4ve has joined #asahi-dev
09:34gabuscus_ has quit [Read error: Connection reset by peer]
09:35gabuscus has joined #asahi-dev
09:36robinp_ has joined #asahi-dev
09:43robinp has quit [Ping timeout: 480 seconds]
09:47kettenismarcan: looks like I didn't push the compatible changes for the power domains yet
09:48kettenisbut otherwise, yes, it should just be a matter of:
09:48kettenismake apple_m1_defconfig
09:48kettenismake mrproper
09:48ketteniserh, probably:
09:48kettenismake mrproper
09:48kettenismake apple_m1_defconfig
09:49kettenisthen use u-boot-nodtb.bin as the payload
09:50kettenis(it currently errors out after building that so that isn't a problem)
09:50d4ve has quit [Remote host closed the connection]
09:50d4ve has joined #asahi-dev
09:58d4ve has quit [Remote host closed the connection]
09:58d4ve has joined #asahi-dev
10:06gladiac has quit [Read error: No route to host]
10:06gladiac has joined #asahi-dev
10:15jacoxon has joined #asahi-dev
10:20alexstore06 has joined #asahi-dev
10:29boardwalk9 has joined #asahi-dev
10:33boardwalk has quit [Ping timeout: 480 seconds]
10:33boardwalk9 is now known as boardwalk
10:40jacoxon has quit []
10:41jacoxon has joined #asahi-dev
10:55jacoxon has quit []
10:56jacoxon has joined #asahi-dev
10:57jacoxon has quit []
11:00alexstore06 has quit [Ping timeout: 480 seconds]
11:27alexstore06 has joined #asahi-dev
11:35alexstor_ has joined #asahi-dev
11:39alexstore06 has quit [Ping timeout: 480 seconds]
11:46alexstor_ has quit [Remote host closed the connection]
12:24al3xtjames3 has joined #asahi-dev
12:25al3xtjames has quit [Read error: Connection reset by peer]
12:25al3xtjames3 is now known as al3xtjames
12:59jacoxon has joined #asahi-dev
13:54kettenismarcan: UEFI allows multiple ESPs
13:54marcanheh, didn't know that
13:55marcando linux installers/etc handle it though?
13:55kettenisWithin a single ESP the standard suggests that bootloaders should live in a directory with a vendor-specific name
13:56kettenisnot sure how linux distros handle that, but I do believe they use their own directory
13:56marcanyeah, but if there are multiple ESPs, how do they pick?
13:56marcanI can see that getting very confusing
13:56kettenisbut in the end if you want truly separate installs, you'll have to have separate variable stores
13:56mazdebian creates a 'debian' directory, for example.
13:57marcanwe don't even have a variable store right now, do we? :)
13:57marcanwe'd have to do something to put that in the ESP or s
13:57* alyssastill chainloads her kernels over USB 😅
13:57marcanalyssa: yes, tell that to end users :p
13:57kettenisfor something resembling secure boot the variable store needs to be"secure"
13:57* maztrying to move over to u-boot...
13:58kettenisI suspect that would involve interaction with the SEP somehow?
13:58marcankettenis: eh, we can just add SEP support to u-boot and sign it with machine-derived keys
13:59alyssamarcan: what are those? 🙃
13:59kettenisEFI variables are used for boot options and each boot options indicates a full device path that includes the partition GUID if I'm not mistaken
14:00kettenisbut in the end I think we want to try to stick to a single ESP per disk
14:01kettenisI have no particular interest in secure boot stuff, so I'll leave anu y-boot support for that to someone who does ;)
14:01ketteniss/y-boot/u-boot/
14:02marcanI care about that eventually, but not right now
14:02kettenismaz: there may be handoff issues where u-boot leaves hardware in a state unexpected by the OS
14:03kettenisI can teach u-boot to clean things up when ExitBootServices() gets called
14:03kettenisbut right now that would break OpenBSD
14:04mazkettenis: yup, that's one of the reasons why I want to have a look.
14:05yuyichao has quit [Ping timeout: 480 seconds]
14:05mazthere was at least a report yesterday of PCIe needing some additional love and care to issue a PERST#.
14:09jacoxon has quit []
14:09jacoxon has joined #asahi-dev
14:13kettenisI suppose I should figure out how one builds a Linux kernel these days...
14:13jacoxon has quit []
14:14jacoxon has joined #asahi-dev
14:18kettenisok, pushed the changes that align the power domain bindings with marcan's
14:18kettenisalso includes some nodes for spi and keyboard
14:22j_eyinterrupts-extended?
14:22j_eyoh, that is a standard thing..
14:25alyssamaz: btw, what's the story with rescanning on link up interrupts?
14:26alyssawhen I tried adding the obvious 1 line patch it didn't work but what's obvious to me is likely completely wrong here :)
14:27alyssa(and I figure if you omitted it, it was nontrivial for some reason? I guess the 3 ports on one root is unusual and might need more surgery on the subsystem so rescanning one port doesn't disrupt the others?)
14:29mazalyssa: you need to go and tell the core to perform the rescan. effectively, we need to treat that as a hotplug.
14:30mazI was thinking of injecting a PCIe hotplug event, but I need to try and see how that work. which means I need to look into the wifi ugliness...
14:31alyssaI have a patch to bring up the wifi, at least up to getting a link up interrupt
14:31alyssaand you don't need the brcmfmac patches just to get wifi on the lspci ofc
14:31mazkettenis: I'm installing openbsd in a guest for the first time. surprisingly painless so far!
14:31kettenisj_ey: yes, it's useful for a single interrupt with a non-default parent
14:32kettenismaz: our take on a user-friendly installer is that you just press enter ;)
14:32mazalyssa: right. I'll have a look next week if I have a bit of time ($work is ultra busy atm).
14:33alyssathe top 3 patches on mu-one/linux:rfkill should get you link up interrupts anyway
14:33mazkettenis: ACPI didn't quite work, but switching to a DT instead gave me a working guest (on the M1, btw..)
14:34alyssaIIRC disabling wifi was broken (link down would come, but then wouldn't get another link up ever again. Need someone to go kext dumpsterdiving,)
14:35alyssabut it should be enough to exercise the pcie driver
14:35mazalyssa: good stuff. I guess that in order of priority, I have booting from u-boot, wifi, and PMU. fun... ;-)
14:36alyssaI do feel pretty firmly the Right way to deal with wifi is to just teach pcie-apple hotplug and have a mandatory rfkill driver managing the SMC gpio
14:36kettenisbut I'm not convinced ;)
14:36alyssaas opposed to hacking in rfkill details into the pcie driver like the corellium driver did
14:37alyssaYou need an rfkill driver /anyway/, and the rfkill core does an enable on boot if that's the appropriate policy /anyway/, so this really has nothing to do with PCIe
14:38yuyichao has joined #asahi-dev
14:40kettenismost rfkill implementations don't power down the entire wifi device though
14:47mazthis is PCIe, so hotplug is more or less baked in the root port. rfkill should be fundamentally independent.
14:52kettenisis rfkill still a thing?
14:53kettenisit used to be that hardware did have a real physical switch or at least a physical switch toggled by a GPIO
14:53kettenisbut that doesn't seem to be the case anymore
14:54kettenisjust need a way to tell the hardware to stop transmitting
14:54aleasto has quit [Quit: Konversation terminated!]
14:58aleasto has joined #asahi-dev
15:01aleasto has quit [Remote host closed the connection]
15:05mazkettenis: does openbsd have support for GICv3 ITS? it says "virtio33[0]: couldn't establish msix interrupt", and falls back to INTx instead...
15:06aleasto has joined #asahi-dev
15:07jacoxon has quit []
15:11kettenisshould be there, but support might be incomplete
15:13kettenisthe whole GICv3 spec is a bit baroque if you ask me...
15:13mazbaroque doesn't quite describe it. more like a sick, twisted fsck.
15:13kettenisI was trying to be nice ;)
15:13mazyou should have seen the engineering spec!
15:14mazyou can't be nice to the GICv3 spec. you just want to burn it.
15:14* kettenislights a match
15:14maz(800 pages, will keep you warm for a while...)
15:16jn800 pages for an interrupt controller, whew
15:16j_eymaz: are you using qemu?
15:20jbowen has joined #asahi-dev
15:20mazj_ey: as the VMM? yes.
15:20j_ey(ignore that, the issue im seeing is TCG only I think)
15:21mazjn: it's not really an interrupt controller. it is the CPU, the OS, and more. what you call the CPU is just a toy on the side.. :D
15:21mazjust like emacs is the real operating system.
15:24jbowen has quit []
15:35jacoxon has joined #asahi-dev
15:35jacoxon has quit []
15:36jacoxon has joined #asahi-dev
15:44jacoxon has quit []
16:12alexstore06 has joined #asahi-dev
16:13alexstore06 has quit [Remote host closed the connection]
16:14alexstore06 has joined #asahi-dev
16:22alexstore06 has quit [Ping timeout: 480 seconds]
16:27alexstore06 has joined #asahi-dev
16:43alexstore06 has quit [Remote host closed the connection]
16:44alexstore06 has joined #asahi-dev
16:48alexstore06 has quit []
16:58blzd has quit [Remote host closed the connection]
17:03blzd has joined #asahi-dev
17:15blzd has quit [Read error: Connection reset by peer]
17:15blzd has joined #asahi-dev
17:19robinp_ has quit [Ping timeout: 480 seconds]
17:26X-Scale` has joined #asahi-dev
17:32X-Scale has quit [Ping timeout: 480 seconds]
17:47___nick___ has joined #asahi-dev
17:48___nick___ has quit []
17:49___nick___ has joined #asahi-dev
17:52blzd has quit [Read error: Connection reset by peer]
17:52user982492 has joined #asahi-dev
17:57blzd has joined #asahi-dev
18:01jacoxon has joined #asahi-dev
18:05blzd has quit [Read error: Connection reset by peer]
18:11blzd has joined #asahi-dev
18:17blzd has quit [Read error: Connection reset by peer]
18:22blzd has joined #asahi-dev
18:27blzd has quit [Read error: Connection reset by peer]
18:28blzd has joined #asahi-dev
18:36blzd has quit [Read error: Connection reset by peer]
18:36blzd has joined #asahi-dev
18:39roxfan has joined #asahi-dev
18:44roxfan2 has quit [Ping timeout: 480 seconds]
18:47blzd has quit [Read error: Connection reset by peer]
18:52blzd has joined #asahi-dev
18:57skipwich has joined #asahi-dev
18:59blzd has quit [Read error: Connection reset by peer]
18:59blzd has joined #asahi-dev
18:59blzd has quit [Read error: Connection reset by peer]
19:03jacoxon has quit []
19:03jacoxon has joined #asahi-dev
19:04blzd has joined #asahi-dev
19:08jacoxon has quit []
19:08jacoxon has joined #asahi-dev
19:08blzd has quit [Read error: Connection reset by peer]
19:09blzd has joined #asahi-dev
19:09blzd has quit [Read error: Connection reset by peer]
19:14blzd has joined #asahi-dev
19:14blzd has quit [Read error: Connection reset by peer]
19:15X-Scale has joined #asahi-dev
19:15user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:19blzd has joined #asahi-dev
19:20X-Scale` has quit [Ping timeout: 480 seconds]
19:20blzd has quit [Read error: Connection reset by peer]
19:21user982492 has joined #asahi-dev
19:24blzd has joined #asahi-dev
19:26blzd has quit [Read error: Connection reset by peer]
19:31blzd has joined #asahi-dev
19:33m6wiq has joined #asahi-dev
19:38jeffmiw has joined #asahi-dev
19:51rohin has joined #asahi-dev
19:52blzd/win 3
19:58m6wiq1 has joined #asahi-dev
20:01m6wiq1 has quit []
20:02m6wiq has quit [Ping timeout: 480 seconds]
20:08___nick___ has quit [Ping timeout: 480 seconds]
21:06jeffmiw has quit [Ping timeout: 480 seconds]
21:14user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:27alexstore06 has joined #asahi-dev
21:40alexstor_ has joined #asahi-dev
21:46alexstore06 has quit [Ping timeout: 480 seconds]
21:48user982492 has joined #asahi-dev
21:57aleasto has quit [Quit: Konversation terminated!]
22:02alexstor_ has quit [Remote host closed the connection]
22:04yuyichao_ has joined #asahi-dev
22:04alexstore06 has joined #asahi-dev
22:07yuyichao has quit [Ping timeout: 480 seconds]
22:09prohin[m] has joined #asahi-dev
22:12yuyichao has joined #asahi-dev
22:15yuyichao_ has quit [Read error: No route to host]
22:18yuyichao_ has joined #asahi-dev
22:22yuyichao has quit [Ping timeout: 480 seconds]
22:28jacoxon has quit []
22:28Chinese_soup has joined #asahi-dev
22:33yuyichao has joined #asahi-dev
22:33yuyichao_ has quit [Read error: No route to host]
22:37yuyichao_ has joined #asahi-dev
22:41yuyichao has quit [Ping timeout: 480 seconds]
22:56yuyichao_ has quit [Ping timeout: 480 seconds]
23:00alexstore06 has quit [Remote host closed the connection]
23:16alexstore06 has joined #asahi-dev
23:19user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:38thunfisch has quit [Ping timeout: 480 seconds]
23:39robinp has joined #asahi-dev
23:42prohin[m] is now known as rohin[m]
23:47thunfisch has joined #asahi-dev
…