#
…

2021-02-06

00:15mxw39 has quit [Remote host closed the connection]
00:16mxw39 has joined #asahi
00:17mxw39 has quit [Client Quit]
00:18mxw39 has joined #asahi
00:25mxw39 has quit [Quit: Konversation terminated!]
00:25maor26 has quit [Ping timeout: 246 seconds]
00:26mxw39 has joined #asahi
00:27mxw39 has quit [Client Quit]
00:28mxw39 has joined #asahi
00:38mxw39 has quit [Remote host closed the connection]
00:40gabiruh has quit [Quit: ZNC 1.7.5 - https://znc.in]
00:41mxw39 has joined #asahi
00:42gabiruh has joined #asahi
01:02dyniec[m] has joined #asahi
01:08poppoppenguin has quit [Ping timeout: 264 seconds]
01:09amw has joined #asahi
01:28amw has quit [Ping timeout: 258 seconds]
01:38amw has joined #asahi
01:39BaughnLogBot has quit [Ping timeout: 258 seconds]
01:40BaughnLogBot has joined #asahi
02:13raster has quit [Quit: Gettin' stinky!]
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:22Emantor has joined #asahi
02:24qyousef has quit [Ping timeout: 258 seconds]
02:26qyousef has joined #asahi
02:34mxw39 has quit [Quit: Konversation terminated!]
02:40mxw39 has joined #asahi
02:41mxw39 has quit [Remote host closed the connection]
02:42mxw39 has joined #asahi
02:42mxw39 has quit [Remote host closed the connection]
03:09GlanzmannWhat is known about the sound card of the m1 models?
03:24phiologe has quit [Ping timeout: 258 seconds]
03:25phiologe has joined #asahi
03:29amw has quit [Ping timeout: 246 seconds]
03:43Tokamak has quit [Ping timeout: 246 seconds]
03:50Tokamak has joined #asahi
04:03a3541 has joined #asahi
04:07marvin24 has quit [Ping timeout: 240 seconds]
04:07marvin24 has joined #asahi
04:21Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:42a3541 has quit [Remote host closed the connection]
05:00a3541 has joined #asahi
05:18amw has joined #asahi
05:26stemnic4 has joined #asahi
05:26Raqbit6 has joined #asahi
05:28stemnic has quit [Read error: Connection reset by peer]
05:28stemnic4 is now known as stemnic
05:28macc24 has quit [Ping timeout: 276 seconds]
05:28macc24 has joined #asahi
05:29qyousef has quit [Ping timeout: 276 seconds]
05:29Raqbit has quit [Ping timeout: 276 seconds]
05:29Raqbit6 is now known as Raqbit
05:29qyousef has joined #asahi
05:30amw has quit [Ping timeout: 245 seconds]
05:38a3541 has quit [Ping timeout: 240 seconds]
05:51_whitelogger has joined #asahi
05:58BaughnLogBot has quit [Ping timeout: 264 seconds]
05:59BaughnLogBot has joined #asahi
06:06Empus has quit [Ping timeout: 272 seconds]
06:11amw has joined #asahi
06:20Empus has joined #asahi
06:27amw has quit [Ping timeout: 265 seconds]
06:39Empus has quit [Changing host]
06:39Empus has joined #asahi
06:46VinDuv has joined #asahi
07:18roxfan2 has joined #asahi
07:21roxfan has quit [Ping timeout: 240 seconds]
07:31amw has joined #asahi
07:52marcanjust pushed m1n1 support for built-in payloads, for those without serial
07:52marcanbasically just `cat m1n1.macho kernel dtb initramfs > m1n1-with-stuff.macho`
07:53marcanthe kernel & initramfs should be compressed (because otherwise m1n1 can't tell where they end)
07:53marcanthere's a mach-o trick (and iBoot loading quirk) used to make this work without touching the mach-o headers, just with a simple cat
07:53marcanlet me know how it works :)
07:54marcanthe initramfs is optional of course
07:54marcankernel & dtb are required
08:10Graypup_ has joined #asahi
08:10marcanI actually haven't tested it end to end with kmutil, just via chainload.py, but my prior experiments suggest everything should work
08:10marcanso let me know if someone does :)
08:12klaus has joined #asahi
08:45maor26 has joined #asahi
08:55Glanzmannar: will try it and report back.
08:57arGlanzmann: ?
08:59GlanzmannWrong tab completion. This was for marcan.
09:00delogips[m] has quit [Quit: Idle for 30+ days]
09:00amw has quit [Ping timeout: 276 seconds]
09:02acelogic has quit [Remote host closed the connection]
10:39Glanzmannmarcan: m1n1 Debian dependencies, maybe we can mention them in the documentation: apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross device-tree-compiler imagemagick
10:40GlanzmannThis is for Debian bullseye (testing)
10:46GlanzmannAre there instructions how to build the kernel and a kernel config?
10:53GlanzmannWhat initrd do you guys use the debian installer?
10:53poppoppenguin has joined #asahi
10:59VinDuv has quit [Quit: Leaving.]
11:06VinDuv has joined #asahi
11:22marcanI just have a DIY thing with busybox
11:34Glanzmannmarcan: I was able to compile m1n1 and the kernel. However I had to turn off Firmware loading facility (FW_LOADER) [Y/n/?] (NEW) n
11:34GlanzmannWill try to boot it now and report back.
11:34marcanwait how does that break?
11:35GlanzmannI have a intel nuc running Debian bulseye (amd64) and did the crosscompile from there.
11:36GlanzmannI tried updating linux-firmware from the git repository, did not build the kernel so I disabled that.
11:36jannauit somhow misses firmware for iwlwifi. I saw the same and also just disabled FW_LOADER
11:36marcanare you're using ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- or similar?
11:36marcanjannau: no, that's intel CPU microcode...
11:36Glanzmannjannau: Did the same thing.
11:36jannaucompiling on notebook with iwlwifi
11:36Glanzmannmarcan: I did that.
11:36GlanzmannYes, my NUC has also iwlwifi.
11:36Glanzmann(nuc) [~/work/asahi/linux] dmesg | grep iwl | pbot -
11:37marcanyou used my .config?
11:37Glanzmannmarcan: Somehow the linux build infrastructure wants to put the intel firmware in the image or does need it during build process.
11:37Glanzmannmarcan: Yes.
11:37marcanyeah I don't know where this came from
11:37marcanCONFIG_EXTRA_FIRMWARE="intel-ucode/06-3a-09"
11:37marcanthat's your problem
11:37jannauerr, yes it's cpu micro code. I didn't pay enough attention
11:37GlanzmannI see, I remove that.
11:38GlanzmannAnd try again.
11:38j`eymarcan: silly, intel microcode wont work on arm64!
11:38Glanzmannmarcan: Yes, removing the two lines from your config works, than it compiles without an error.
11:39Glanzmannthe framebuffer console works, right, so when I boot the m1n1 it will show something on the display?
11:39marcanit should
11:40GlanzmannPerfect. Let's try. :-)
11:49jannauthe initramfs from the general arch linux arm arm64 tarball "works" too as in it ends up in an emergency shell
11:52GlanzmannSo I tried the following: Building m1n1, building the kernel, get the debian linux initramfs and do the following. https://pbot.rmdir.de/mzbvR6NtcccRwJJkpyM4AQ I see m1n1, but the kernel does not boot: https://ab34.de/u/IMG_20210206_125124451.jpg
11:53GlanzmannMy serial console (mac mini) is still in the mail.
11:54GlanzmannBtw. can we do the same thing that macos does regarding the boot loader? Using Linux as bootloader?
11:54GlanzmannAnd chainloading macos / other linux kernels?
11:55j`eyyou mean m1n1 -> linux -> linux?
11:55Glanzmannj`ey: Yes.
11:56j`eyyou can do it with kexec
11:56GlanzmannIf it works, it would be nice.
11:57jannauGlanzmann: I'll try if m1n1-payload.macho works with kmutil for me
12:00marcanI genuinely have no idea where that EXTRA_FIRMWARE came from... it's in several of my x86 .configs, but I cannot for the life of me find how those .configs would've ended up in my asahi linux tree, looking back at shell history
12:01marcanoh well, a mystery
12:01GlanzmannThat is what beta testers are for. :-)
12:02marcanmacos does not use macos as the bootloader
12:02marcanmacos uses macos as the *setup menu*, which is different
12:02marcanmacos never boots macos
12:02marcanwhen you pick something in the boot picker, it sets boot-related nvram variables and reboots
12:03GlanzmannThan I misunderstood you last ime.
12:06jannauGlanzmann: my m1n1-payload.macho works with `kmutil configure-boot`. it displays penguins and boot messages until init switches to the serial console
12:07GlanzmannOkay, can you rename it and upload it to me https://ab34.de/u using a browser or https://pbot.rmdir.de/FjOdiW0JvXiUoV8z_ntZ7Q than I'll try it. I'm currently resizing my macos partition and install a second macos.
12:09jannauGlanzmann: it uploaded successfully but didn't give me a url for it
12:10jannauI'll try your m1n1-payload now
12:12marcanGlanzmann: your kernel gives no serial output, so something is seriously broken about it
12:12marcan(or the fdt)
12:21jannauGlanzmann: your kernel config misses 'CONFIG_ARCH_APPLE=y', also it seems to be based on 5.11.0-rc2 instead of 5.11.0-rc6
12:21jannauare you sure you're building with the correct branch
12:22jannauscripts/extract-ikconfig is useful and even works on m1n1-payload.macho directly
12:22j`eythat sounds like master of asahilinux/linux
12:23marcanI guess I should change that, eh
12:24marcanpushed to main
12:25raster has joined #asahi
12:26jannaumarcan: still reports master as default branch
12:29GlanzmannOh I see. Thanks. I'll try again.
12:30GlanzmannSo which branch should I use from marcans tree?
12:31j`ey'main'
12:31jannaumain should be fine
12:33Glanzmannmarcan: So when someone now checks out the git repository he ends up in the right branch?
12:34j`eyGlanzmann: marcan changed the default branch, so that should work now
12:35GlanzmannPerfect, got it.
12:35GlanzmannI rebuild the kernel and try again now.
12:46GlanzmannI rebuild the kernel using the right branch, create a new https://ab34.de/u/m1n1-payload.macho, but the same thing. I see the m1n1 asahi logo but no kernel boots.
12:49marcanGlanzmann: did you put back my config?
12:49marcanusing the wrong tree will mess up your config
12:49jannauconfig looks correct now
12:49jannauI'm currently chainloading
12:51Glanzmannmarcan: Yes.
12:51GlanzmannBut probably I screwed something else up.
12:53Calchan has quit [Ping timeout: 276 seconds]
12:53macc24 has quit [Ping timeout: 276 seconds]
12:53jannauGlanzmann: your m1n1-payload boots here on a mac mini
12:54macc24 has joined #asahi
12:54GlanzmannI'm on macbook air.
12:54Glanzmannjannau: Thank you for testing.
12:55Calchan has joined #asahi
12:56GlanzmannCool, thank you.
12:58marcanweird, I can't think of what would make it not work on an Air
12:58marcanI'll try that later
13:01GlanzmannPerfect, my mini arrives soon, than I can try the mini.
13:02Glanzmannmarcan: If it works for you on the air, I can also retry.
13:03GlanzmannBtw. has someone managed to build the @corelliumhq kernel. I think the repository is up and they also have now included a kernel config.
13:04jannauGlanzmann: yes, I booted a self-built cerellium kernel last week with arch linux arm root fs
13:04Glanzmannjannau: Any idea why the init ramdisk from your paste does not show? Did I forget to enable a driver?
13:04Glanzmannjannau: Wow, do you have the instructions anywhere?
13:06Glanzmannjannau: Few days ago I put the corelliumhq stuff on my NVMe (including the ubuntu raspberry image) but I normally use debian. So probably I'll try to deb bootstrap the kernel.
13:07GlanzmannHas someone also made a asahi kernel tree with the corelliumhq drivers?
13:09jannauGlanzmann: there's more output on the framebuffer console it's missing from the serial output due to missing "console=tyySAC0,1500000". init seems to simply exit
13:11jannaufor the corellium kernel build. I extracted the config via ./scripts/extract-ikconfig in the kernel, slimmed it down and built it
13:12jannauthat gives you kernel Image and device tree to use with their preloader-m1
13:13jannaupreloader-m1 produces a linux.macho which is equivalent to m1n1-payload.macho
13:14jannauit boots without initramfs so everything for mounting the root partition needs to be built in
13:16jannauI haven't looked how the boot process with nvme works, previously the root partion was by default "/dev/sda2"
13:16GlanzmannI have the nvme boot on my m1.
13:16GlanzmannI can extract the kernel config and see how it works, but I'm currently installing macos on a second apfs volume.
13:17marcanhuh. indeed it does not boot on the air
13:17marcanno serial after the kernel (m1n1 is fine)
13:17marcanwell that's going to require some debugging
13:17GlanzmannI see. strange.
13:18Glanzmannmarcan: The first corelliumhq also did not boot on the air, only on the mini. Maybe a small quirk.
13:18marcanFDT: unsupported fb depth 65566, not enabling
13:18marcanbut no serial is weird too
13:18marcanohh right that's the "retina" flag
13:18jannauI would expect that every arm64 rootfs works with their kernel. kernel modules have to copied to the rootfs
13:23klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:26marcanGlanzmann: my kernel boots and gives serial on the mini
13:26marcaner, on the air
13:26marcanmaybe the lack of framebuffer broke something
13:26Glanzmanncan you upload to me, than I'll try on my device. https://ab34.de/u
13:27Glanzmannmarcan: You boot without framebuffer?
13:27marcanthe framebuffer was broken because m1n1 was getting confused by the retina flag
13:27marcanI just fixed that, pushing now
13:27GlanzmannOkay, than I'll retry with that.
13:28marcanwhat I don't understand is why your build did not give me serial on the air anyway, while it did on the mini
13:28GlanzmannNo idea. Strange.
13:31Glanzmannmarcan: Got the change and recompiled, have to wait an hour until macos is reinstalled.
13:31marcanwait why are you reinstalling macos?
13:32jannausecond macos install
13:32marcanbut you don't have to reinstall every time?
13:32jannauI think it's the initial install
13:33GlanzmannNo, I had previously only one macos partition. Now doing the second and maybe also do a third.
13:37marcanhttps://hub.marcan.st/t/m1n1.payload if you want to try mine. that's a busybox binary from the debian package.
13:38marcanthat one is confirmed working OK as a direct install
13:39GlanzmannPerfect, I'll try it in about an hour.
13:40Glanzmannmarcan: So m1n1 does compress the kernel, but the initrd is uncompressed by the kernel, right? Like on x86?
13:40marcanm1n1 uncompresses the initrd because it doesn't know it's an initrd until it uncompresses it
13:40marcanit's an artifact of the `cat` solution
13:40marcanbut who cares who uncompresses it, it has to happen anyway
13:41GlanzmannOh I see. So m1n1 lookas at the kernel head, determines the size, than uncompresses it notices it is an initrd and put it compressed in the RAM and batches some addresses for the kernel to find it.
13:41jannauin the linux.py loader case the initramfs is uncompressed by the kernel
13:41marcanyes, but not in payload mode
13:41marcanin payload mode it has no idea where files start and end, so for compressed files it just uncompresses until it gets to the end, only then can it start parsing the next file
13:42marcanthat's why I had to patch tinf/minlzma to support that
13:42Glanzmannmarcan: If you want you can try my own build. But it uses the debian installer arm64 ramdisk. https://ab34.de/u/m1n1-payload.macho
13:42jannauthe kernel supports more decompression algorithms than m1n1
13:44GlanzmannYeah, but I was thinking maybe my initramfs does not work because m1n1 does not have the compression algorithm. But it is probably only gzip, but I'm not sure if it is cpio.
13:45klaus has joined #asahi
13:45marcanGlanzmann: I tried booting without fb (re-introducing the bug) with my kernel and it works
13:45marcanwell, just chainloading
13:45marcanbut unless we're hitting very specific corner cases here, I think something was weird about your kernel there
13:46marcanGlanzmann: initramfs is always cpio
13:47Shizbtw, i can easily modify that lzo implementation to be compliant again, in case we wanna have lzo support in m1n1
13:48Glanzmannmarcan: Okay, I didn't know, I thought that other formats also supported, but yes, makes sense.
13:48marcanShiz: gzip is fast now, is it worth it? :p
13:48Shizmaybe for mirroring the kernel supported format list at most then 😅
13:48Shizi'll leave it up2u
13:50Glanzmannmarcan: Is this your up2date kernel config? https://marcan.st/paste/YJp4iysm.txt If not, can we update it in the wiki?
13:50raster has quit [Read error: Connection reset by peer]
13:51raster has joined #asahi
13:52marcanhttps://mrcn.st/p/z8MgPiyO is what I have right now
13:53GlanzmannI update the wiki.
13:53Shizmarcan: also, updated artwork pr :)
13:55jannauShiz: lzo compressed Image is 10% larger than gzip. the increased load time over uart will be larger than gunzip time with mmu
13:59jannauzstd would be interesting compared to gzip (slightly smaller image and expected faster decompress) but xz is more than 20% smaller and still decodes fast enough
14:08GlanzmannHmm, I rebuild m1n1, the kernel using marcans main tree; but still no framebuffer on macbook air: https://ab34.de/u/m.macho
14:08GlanzmannI see the m1n1 asahi logo, but no kernel booting up.
14:12Chainsaw has joined #asahi
14:15marcanGlanzmann: can you try my binary?
14:15Glanzmannmarcan: Your payload works.
14:15marcancan you make one without the initramfs? it takes forever to upload over serial :)
14:15Glanzmannmarcan: Can you upload me your kernel and your initrd, than I rule out one after the other. https://ab34.de/u
14:16Glanzmannmarcan: Sure, one second: https://ab34.de/u/m.macho
14:17marcanthat doesn't even boot on the mac mini
14:18marcansomething with the kernel
14:18marcan(or dtb)
14:19GlanzmannI did a make clean in m1n1 and rebuild: https://ab34.de/u/m.macho
14:19marcanthe m1n1 is fine
14:19marcanthe kernel doesn't boot
14:19GlanzmannBut building a kernel should be as simple as. git clone; copy config; run make with the crosscompiler stuff
14:21marcanyou should probably "make oldconfig" too
14:22marcandon't forget to always use the ARCH= stuff with any make invocation
14:22marcanotherwise it will clobber the config
14:22GlanzmannMaybe that's it.
14:22GlanzmannI rebuild from scratch and report back.
14:22choozy has joined #asahi
14:30GlanzmannI updaed the wiki to mention the same and rebuilding right now.
14:31VinDuv has quit [Quit: Leaving.]
14:32dhewgthat's probably where the firmware knob came from, one stream had multiple wrong invocations with that exact problem
14:33j`eymake vs make.sh
14:34marcandhewg: but why would that get turned on even on intel
14:34marcanI can't find how that would happen
14:34dhewgmaybe some ancient .config you had lying around
14:35dhewgi had that one time with some ps3 knobs
14:35dhewg(years after i stopped messing with linux on ps3)
14:36marcandhewg: yeah, I have that in the config in my /usr/src/linux and my main linux tree I clone from, which is understandable
14:36marcanbut I couldn't find how that got copied over to my asahi tree in my shell history
14:36marcansince I did a git clone --reference of the other repo, not a plain cp or anything
14:36dhewghuh well dunno, whatever, case closed :P
14:37dhewgbut that and many other related sneaky issues can be "fixed" with `git clean -fdx`, which i run every now and then in any clone for that reason
14:41dhewgwhat's the "retina flag"?
14:41GlanzmannI think I found the issue, when I switches the branch I ended up in the wrong branch again.
14:41GlanzmannSo I had not your commits in it. I'm rebuilding now and that's hopefully it.
14:43arndmarcan, dhewg: 'make oldconfig' in an empty object tree takes the defaults from /boot/config-`uname -r` rather than from the Kconfig defaults or the architecture defconfig, so cross-compiling without a .config results in a very odd configuration.
14:45arndmarcan: I don't see a patch to arch/arm64/configs/defconfig in your patch series. Can you add a patch that turns ons the minimum set of options that are needed to get a booting kernel?
14:45dhewgoh lol, how sneaky
14:46arndthat way, the instructions can just include 'make defconfig', which would be a larger kernel because it supports a few dozen other platforms, but at least it would work
14:46Glanzmannarnd: I think the instructions work almost, they just did not mention which git branch to use.
14:47GlanzmannSo I did the same mistake by accident twice. When I ran: git reset --hard HEAD; git clean -f -x -d
14:48marcanarnd: ohhh is *that* what it does
14:48marcanwell that explains it then
14:49GlanzmannNow it works, so my problem was that I had the wrong branch.
14:50Shizarnd: wait what
14:50Shizit does try `pwd`/.config before that, right
14:51Shizi was wondering if i've been miscompiling my kernel for years :)
14:51arndShiz: yes, of course. If you have a .config, it will use it
14:51GlanzmannI always to cp /boot/config-bla .config; make oldconfig
14:51arndthis is just if you use O=objdir with an empty or nonexisting directly
14:51Shizi do zcat /proc/config.gz > .conig
14:52arndI just keep one objdir per machine I want to run on
14:59GlanzmannI have a new error. I tried to boot https://ab34.de/u/m.macho (m1n1; linux, dtb, debian initramfs) and ended up with: https://ab34.de/u/IMG_20210206_155838368.jpg
14:59GlanzmannIs it too big?
14:59kettenisso my u-boot enumerates the pci bus now
15:00marcankettenis: did you port the corellium pcie driver or write your own?
15:00kettenisbut I fear I need to add some sort of DART (IOMMU) support before the usb controller can talk to usb devices
15:00marcanyeah, I was going to look at DART next
15:00marcanI wonder if there's an off bit we can just poke for now
15:00kettenisthis is a port of the corellium driver
15:00marcanif not, I was considering just making m1n1 load identity map tables on everything
15:01marcan(for now)
15:01j`eymarcan: that would be nice, like the off bit for faults :p
15:01marcanwell the fault thing is covering up problems
15:01marcanthis is just not using a feature
15:01marcandifferent things :p
15:01kettenisyes, that was my thinking as well
15:01j`eymarcan: :-)
15:01marcanDART is required from thunderbolt
15:01marcanI refuse to go *that* far without DART
15:01marcanbut until we get *there*, we don't strictly speaking need it
15:02never_releasedkettenis: please use DART since the beginning
15:02never_releasedYou can set it to bypass mode
15:02never_releasedbut please don't
15:02kettenisfor u-boot?
15:02never_releasedtakes less time overall to build it right
15:02marcannever_released: why?
15:02marcanfor a bootloader?
15:02never_releasedoverall, it takes less time to build it right since the beginning
15:03marcanI fail to see how building IOMMU support takes less time than flipping an off bit
15:03never_releasedbecause proper support has to come later
15:03never_releasedto boot from a TB drive
15:03never_releasedand the DART driver is small
15:03never_releasedit's not a big piece
15:03marcanno offense, but you guys aren't exactly doing stellar on the "build it right from the beginning" front :p
15:04never_releasedmarcan: I'm writing Windows drivers for it, not even looking at most of the linux stuff :p
15:04marcanI intend to look at DART but I'm not going to let that block everything else because if it doesn't have to
15:04j`eyturning it off seems like a good place to start, with exploring things
15:04never_releasednot a good idea for something _that_ important
15:04marcanit's important for TB
15:04raster has quit [Read error: Connection reset by peer]
15:04marcanit's nice to have for everything else
15:05marcanffs, half the x86 world still does not IOMMUs
15:05never_releaseda driver is already written
15:05kettenisand the TB ports are safe for now
15:05raster has joined #asahi
15:05never_releasedand is dual-BSD 3 clause or GPLv2
15:05kettenisthey aren't even powered up as far as I can tell
15:05marcannever_released: a driver which I won't pull until I audit it to make sure nobody copied code :)
15:05marcan(as per our policy)
15:05never_releasedif you want to go NIH that's fine
15:06never_releasedjust say that you want NIH
15:06marcanif corellium were open about their development policies and process I wouldn't have to NIH anything
15:06never_releasedyou know the product
15:06never_releasedit's a virtualisation solution
15:06marcanI know they are reading kexts to write the linux drivers
15:06marcanthat is a *fact*
15:06marcanbecause those drivers use bit names which are *impossible* to divine and which happen to match strings on those kexts
15:07marcanyes, I will, but *I* know what I'm doing and I have a policy and I'm not hiding anything; however, I've seen endless people get it wrong, including corellium employees
15:07marcanfor this approach to work you need a *lot* of confidence on the person doing it
15:07marcanand I do not have that confidence on corellium
15:08marcanand I never will if, for starters, they never *talk* to anyone
15:08never_releasedI can rephrase it another way: Corellium trusts you just as much as you trust them.
15:08marcanso you're absolutely welcome to upstream those drivers, and then it's upstream's problem, but I won't do it for you without an audit, because until that happens *I* can't vouch for those drivers under my own criteria
15:09marcanffs I streamed my linux bring-up, go watch if you want to know how I work
15:09marcanlet me know when corellium streams anything :)
15:09marcanor when they have a RE policy
15:09marcanor when anything :p
15:09marcanyou're also welcome to look for code I wrote that infringes copyright
15:10marcanbecause I can point at OSS code written by corellium employees that blatantly infringes copyright :-)
15:10marcan(but I won't publicly, but it's there)
15:11Glanzmannmarcan: That was the twitter post ... so it was about corelliumhq, because in the twitter post you said it is not. :-)
15:11marcanGlanzmann: it wasn't about their kernel
15:11marcanand it wasn't about corellium *at the time that code was written*
15:11marcanhowever, that person happens to now be a corellium employee :)
15:12Glanzmannmarcan: So you probably say, we can't submit the corelliumhq drivers as is upstream.
15:12marcanwell, I'm saying *I* won't
15:12marcannot without first some auditing
15:12marcanthis is a personal decision
15:12marcanI do not speak for upstream nor for anyone else's criteria
15:12marcanbut *I* do not feel confident vouching for that code without further scrutiny
15:13marcanI did merge two of their patches earlier (though then they had to be rewritten); those were obviously fine since they touched core linux code and couldn't have copied anything
15:13marcanobviously fine stuff is fine
15:14kettenisanayway, u-boot has zero infrastructure for IOMMU's, so bypassing the damn thing is the only real option for now
15:14marcanI'm not saying their code is tainted, I'm saying I personally would like further assurances
15:14marcanI have a blog post drafted about this (not specific to corellium), I should post it soon
15:14GlanzmannI look forward to read it.
15:15marcanbut to give you a really bad example, and something I've avoided talking about in the past too much, that burned me:
15:15kettenisso if anybody has a clue about how to do that, hints would be appreciated
15:15marcanwhen I helped start the whole wii homebrew thing, we decided to work with and contribute to libogc, a homebrew SDK for the GameCube
15:15marcanonly after we were invested in it, did I realize it had whole chunks of code blatantly decompiled from nintendo's games/SDK
15:15marcanincluding some literal chunks of assembler copied and pasted verbatim
15:16marcanby then we were too invested in that thing to do anything about it
15:16marcanand I've hated it ever since
15:16marcanI had to stop the person responsible from continuing that path for the new wii drivers
15:16marcanso most of that stuff is clean
15:16marcanbut most importantly, the GPU drivers, and a bunch of the other GameCube era drivers, are blatant decompiles
15:16marcanI do *not* want to go through that shit again
15:16marcan*especially* not with Apple, and *especially* not with the kernel
15:17marcansometimes it's blatant like that, sometimes it's accidental
15:17marcansometimes it's just lack of knowledge of how copyright law works
15:18marcanbut the point is, the only real way to know is either an annoying audit, which necessarily taints you too, as you have to basically read Apple's code and compare
15:18marcanor to just *trust* the person
15:18marcanand trust has to be earned
15:18marcanand Corellium, right now, have done everything but earn my trust
15:19marcanwhen I read vendor code, I'm building hardware documentation in my head
15:19marcanand ideally writing it out, at least as drafts, or as test code
15:19marcanand then I probe the hardware to further understand it in ways the original code doesn't make obvious
15:19marcanand *then* I use that knowledge to write my own code
15:19GlanzmannI understand the difference.
15:19marcanit results in better code, better understanding of the hardware, and avoids copyright infringement (even though it doesn't have the person-to-person barrier that textbook cleanroom approaches do)
15:20marcan(cleanroom is a legal defense, not a legal requirement)
15:20Glanzmannunderstood.
15:20marcane.g. the corellium chicken bits - there's stuff in there that is not necessary
15:20marcanit wasn't even chicken bits
15:20marcanbut that distinction was lost in their asm blobs
15:21marcanit was more obvious looking at Apple's code and comparing with open xnu, since the structure gave away those weren't part of the tunables section
15:21GlanzmannI remeber that. So there is some magic initialization noone knows where it is coming from and it is probably coming from some binary on macos.
15:21marcan*then* I mapped all the actual chicken bits back to documented header bits
15:21marcanand sorted and cleaned them up
15:21marcando we have to set the same bits? sure, otherwise the CPUs explode
15:22marcanbut I can confidently say none of Apple's expression remains in my code, other than somewhat-similar register names and the bits that are set (facts are not copyrightable, names are facts and so are bits that need to be flipped to make the hardware work)
15:22marcanand then I could use the register documentation knowledge to e.g. fix the wfi problem without that linux patch
15:22marcanalso, some of corellium's register names were just wrong :)
15:23marcanor for another example: corellium's cpustart driver sets *two* bits per core to start it, but with zero documentation as to what they do
15:23marcanI tried setting one and it worked
15:23marcanthen I later found out IRQs were broken without the other one
15:23marcanso my conclusion is the other bit is some kind of systemwide "this cpu is alive" bit or similar
15:24marcanthis is more information that can be gleaned from corellium's opaque "flip two magic bits with no register names" code
15:24marcan(in particular AIC wasn't even dispatching IRQs to its CPU aliases without the other bit, so it was clearly deeply aware of those CPUs being off)
15:24marcan(even if they were on)
15:25marcanthen I already mentioned the L2C serror reporting stuff :)
15:25marcanthat wasn't copied from apple, that was just something they cooked up presumably to hide address mapping errors in their port
15:25marcanbut again, no docs
15:25marcanso how do we know what it does?
15:26marcanso yeah, if they spent all this time reversing the SoCs, how about they share some docs instead of piles of vendor code :)
15:26GlanzmannYes, impossible to maintain it later on.
15:26modwizcodemarcan: The AIC can report multiple reason codes due to interrupt prioritization right?
15:26marcanmodwizcode: one per CPU, whatever is the highest priority
15:26modwizcodeif you are handling a lower priority interrupt and you reenable interrupts do you get preempted?
15:26marcanit's kind of like a FIFO
15:27never_releasedAIC is _simple_
15:27marcanmodwizcode: yes
15:27modwizcodeI'm trying to figure out the best way to emulate it in QEMU and have encountered a few annoyances (worked around temporarily but I need to get it right now)
15:27marcanthere is only one IRQ line
15:27never_releasedno superfluous features that can be removed imo
15:27marcanso as long as anything is pending in AIC it is active
15:27marcan(for your CPU)
15:28marcanthe correct way to emulate it is: on reason register reads, find the lowest active not-masked IRQ bit with the affinity bit for your current CPU set, then return that as the reason, and set the mask bit
15:28modwizcodeQuestion though: HW IRQ comes in, I disable IRQ mask on CPU and then am handling where I disable it again (without reading the ACK/reason register) do I get prempted again immediately? The new reason will be the same or not?
15:28modwizcodeThat's all I was going to do but I wanted to understand the semantics better
15:28marcanif you read the reason bit, that already masks the IRQ for you
15:29modwizcode doesn't help that using qemu's built in bitmap code is annoyingly not the answer since you need to access the bit words directly in 32bit units and it works only in longs.
15:29marcanso once you do that, you will not be preempted again unless you unmask it, or another IRQ was pending, or comes in
15:29modwizcode*reading the ack* sets the mask?
15:29modwizcodeOkay I need to document that and implement that
15:29marcanI did document that :)
15:29never_releaseddon't overthink AIC
15:29modwizcodeIt might not have been clear
15:29modwizcodeIn simplicity sometimes lies unexpected complexity :)
15:30modwizcodeThere's a lot of interactions that aren't obvious between the components.
15:30never_releasedlooked at old devices
15:30marcanadmittedly those docs are barebones and quite terse
15:30marcanit was more of a mental note than real docs
15:30never_releasedand seems that reg interface is stable since A5
15:30modwizcodeYeah I think it wasn't clear that reading the reason = is acked and not that "irq is acked at some point"
15:30modwizcodeI could have probably figured that out if I reread them I guess
15:31never_releasedmodwizcode: is your code available somewhere?
15:31modwizcodeI still need to figure out a not terrible path for handling the per-cpu state. For now I use a terrible hack that's definitely only safe for a single processor and even then probably not safe
15:32modwizcodeThe real question is if this code gets called in a locked context or not which happily I can't easily figure out
15:32modwizcodeIt's been public for awhile now
15:32modwizcodeIt's pretty messy, I'm publishing stuff without pretty much any cleanup. I have a lot of verbose comments to remember my thoughts on various things for fixup
15:33modwizcodeSome of which are quite outdated :p
15:34modwizcodeAlso due to licensing concerns I haven't used the register names list from M1N1 but I probably should. I'm trying to put everything I'm doing under MIT even though generally QEMU is GPLv2+, but I think M1N1 is mostly MIT
15:35choozy has quit [Ping timeout: 260 seconds]
15:35modwizcodenote that for that code to work you need to use either a patched version of m1n1 which bypasses some SMP bits that I still haven't gotten around to implementing.
15:35modwizcodeor an older version
15:39marcanoh yeah, re: the corellium cpustart driver: I have no idea why they do the coresight unlock yet, also their code doesn't even document the fact that what they're doing *is* a standard coresight unlock there; the register offset is standard
15:40marcanso: do they not *know* that (which means they're copying what apple code does without understanding it, which is a no-no in my book), or are they intentionally obfuscating their drivers to not give away too much hardware documentation because that's their business?
15:41marcan(or are they just writing bad code? :))
15:41marcaneither way, I don't like it
15:41kettenisnever attribute to malice...
15:42kettenis(so I'm going with option #3)
15:42marcankettenis: I mean, my first two interactions with corellium were first dismissal, then accusations from them, so... I may have some bias here :p
15:43poppoppenguin has quit [Ping timeout: 240 seconds]
15:44marcanone thing the Corellium CTO did *directly* claim to me was that them having won against Apple on the copyright claims in that lawsuit means their Linux code is clean... which is a complete non-sequitor and total nonsense, because the lawsuit wasn't about that, plus it was a fair use defense which depends on application, plus it doesn't mean it magically covered all code they wrote, and many other ...
15:44marcan... reasons.
15:45marcanso as you might expect I don't have a high opinion of their understanding of copyright law :)
15:45marcan*non-sequitur
15:47marcananyway, off to dinner and sleep, and i'm taking tomorrow off - I have too much other stuff neglected over the past few weeks ;)
15:48modwizcodemarcan: btw in qemu if I enable interrupt reporting sometimes I see data aborts from linux after boot, they stop once the thing is booted.
15:48marcandata aborts, like normal translation failures?
15:48marcanpresumably that's normal
15:48marcani.e. page faults
15:48modwizcodeHmm okay those might not be relevant then
15:48modwizcodethere was something else though hang on
15:48modwizcodelet me try to grab a copy
15:49modwizcodeI don't usually boot with IRQ spew on because it's an awful mess, especially if serial console comes up
15:49marcanI mean if they were a problem linux would've complained, so presumably the fact it handled them quietly means they aren't
15:50modwizcodeYeah hopefully they're nothing. ?I thought it reported MMU stuff different though
15:50modwizcodePrefetch abort
15:50marcanthat's an instruction page fault
15:51modwizcodeOkay we're good then
15:51modwizcodeMy mistake I thought it reported translation issues with a seperate MMU tag but I must be remembering something else
15:56Tokamak has joined #asahi
16:00alexanderwillner has quit [Quit: Idle for 30+ days]
16:00Jamie[m] has quit [Quit: Idle for 30+ days]
16:00ts170[m] has quit [Quit: Idle for 30+ days]
16:01Tokamak has quit [Ping timeout: 256 seconds]
16:04mndza has joined #asahi
16:33arndmarcan: regarding https://github.com/AsahiLinux/docs/wiki/HW:AIC, does that mean there is no MSI support in the AIC at all? Does it just emulate it in the pci host bridge with a shared irq line for all MSIs?
16:37roxfan2 is now known as roxfan
16:37never_releasedarnd: actually
16:37never_releasedit's MSI interrupts only
16:38kettenisbut the MSIs are handled by the pcie controller and translated into regular AIC interrupts by the looks of it
16:39kettenislookslike you can have 8 MSIs per root port
16:41never_releasedkettenis: I hope that most of the code being BSD helps you
16:41never_releasedfor some drivers, because they're derivatives of a GPLed driver, that wasn't possible
16:42arndah, so there is one MSI address per CPU in the PCIe host bridge, and presumably you could have multiple devices target each one of them
16:43never_releasedalso please change from AAPL, to apple, for devicetrees
16:43never_releasedall caps is very odd
16:43vimal has quit [Remote host closed the connection]
16:44never_releasedand there's precedent with full names being used: allwinner, amlogic for example
16:44kettenisto be honest, the license only really matters for future GPU code
16:44jixnever_released: AAPL instead of apple was an upstream request IIRC
16:45never_releasedjix: it's still a not very sane one
16:45never_releasedpushback is needed sometimes
16:45never_releasedit's unlike every other arm target
16:45kettenisour driver model is different enough that copying code straight from Linux drivers usually doesn't make sense
16:47vimal has joined #asahi
16:47kettenisarnd, it looks like you can pick one of the 32 available AIC interrupts by passing its number in the messsage
16:48arndkettenis: right: it seems I misread, and there is only a single doorbell on for all MSIs, and a very limited number of messages
16:48kettenisand I think you have to use the AIC to route that interrupt to the appropriate CPU
16:49arndit's probably fine as long as there is only one device connected to each port then, but it won't help when having multiple high-speed devices on thunderbolt
16:49jn__there is also precedent for AAPL (and SUNW for Sun Microsystems), from the old OpenFirmware days
16:50jn__i agree apple looks nicer, but the "precedent" argument needs to be balanced
16:50arndkettenis: and I wonder if the MSI delivery is racy, as is often the case with custom PCIe host bridges that come with their own MSI controller: a device might send some DMA transfer and a message to tell the CPU that the DMA is done, but that DMA might still be in progress when the MSI is forwarded to AIC and gets handled in the driver
16:51never_releasedjn__: those aren't Arm
16:51never_releasedfor all other Arm systems, a newer convention is used
16:51arndnever_released: I think we tend to use the stock ticker symbols in lowercase when their is one
16:51never_releasedhere it's uppercase even...
16:52arndwhile amlogic is publicly traded, "688099" does not make a good identifier through, so they went with the name of the company
16:52jannauAPPL is used in the kernel for powerpc
16:53never_releasedand even then
16:53never_releasedintel is used instead of intc
16:53arndI'm fine with either symbol (aapl, AAPL or apple) when merging the patches, there is just no good answer in this case
16:53never_released(in the arm code)
16:53never_releasedso it's just very arbitrary anyway
16:53modwizcodeAAPL is annoying because it is fairly unreadable if you try to use it in variable names. I made the cpu core defs use AAPL since I did those changes after the linux patches were posted but I think I'm going to change them back (all the identifiers I use use apple).
16:53kettenisand IBM uses both IBM and ibm
16:54kettenisthere just is't enough OCD around ;)
16:55modwizcodeAAPLM1CPUState :)
16:56zopieux has quit [Ping timeout: 272 seconds]
16:56jixnever_released: I agree that apple looks much nicer (but my opinion doesn't matter at all, heh) and I'm also not convinced that AAPL from ppc days should be taken as precedent for the arm stuff... I just think that discussing it here without continuing the discussion on the mailing list (where there was no pushback after the AAPL suggestion) will lead anywhere
16:57zopieux has joined #asahi
16:57arndI don't know why Intel started using "intel," for the x86 and mips SoCs but "altr," for the arm ones (post acquisition)
16:57never_releasedarnd: intel, is also used for Intel's own Arm chips
16:57sickdelan has joined #asahi
16:57arndnever_released: which ones?
16:58never_releasedarnd: intel,sa1100 for example
16:58arndah, keembay and agilex
16:58never_releasedand strongarm too
16:58never_releasedusing an all caps stock ticker unlike everyone else doesn't make so much sense
16:59kettenismergers and acquisitions should be forbidden!
16:59arndah right, so it was probably started by someone else contributing dts files, not intel
16:59arndI wonder what the original DNARD/Shark was using
16:59never_releasedNvidia chips also use nvidia, instead of nada,
17:00never_releasedwhich is the stock ticker
17:00jn__never_released: using the prefix that was already associated with Apple does make some sense to me
17:00modwizcodeheh I like the idea of Nvidia having "nada" as their stock ticker :p
17:00never_releasedjn__: it stands out compared to every other arm platform
17:01jn__whether the apple hardware in question is uses powerpc or arm based CPUs is IMHO secondary to this question
17:01jixjn__: AFAICT there is zero chance of any overlap of old PPC mac device tree stuff and new apple arm stuff, so it might be a good point to settle on something more uniform
17:01arndthe more important question is whether we want to go along with what apple use themselves, or better use something intentionally different to not have conflicting bindings, since anything they have is almost certainly incompatible
17:02jn__i (as a bystander) am ok with "apple" as the prefix, but i think the argument has to include that there's the tradition of AAPL and you're with that to follow the other tradition of using a sane prefix
17:03sickdelan has quit [Quit: Leaving]
17:03jn__jix: agreed
17:03Tokamak has joined #asahi
17:04jn__s/you're with that/you're breaking with that/
17:04arndthe whole purpose of the prefix is to make a namespace that will never conflict with whatever someone else does in their machines, so using "apple," would be less likely to conflict
17:04jannauI propose U+F8FF to paint this bikeshed
17:05arndI would personally use "pasemi,", ;-)
17:05jixarnd: given that apple uses a different device tree format, I don't see the issue with a collision to what they ship for mac os, or am I missing something here?
17:06arndjix: the risk of something actually conflicting would be extremely low, agreed
17:07arndthe only chance I can see something going wrong in practice would be if there is a portable application that can run in both Linux and MacOS and that tries to make sense of the dt
17:08Tokamak has quit [Ping timeout: 256 seconds]
17:11never_releasedarnd: Apple themselves use... hx,
17:11never_released(aka H-series processor)
17:13never_releasedor even more bizarre in general
17:13never_released<ip block name>,<version>
17:13never_releasedfor example aic,1
17:18frode_0xa has quit [Ping timeout: 240 seconds]
17:20thestr4ng3r_ has joined #asahi
17:20thestr4ng3r has quit [Ping timeout: 276 seconds]
17:38VinDuv has joined #asahi
17:49hthh_ has quit [Ping timeout: 272 seconds]
17:49hthh_ has joined #asahi
17:59Tokamak has joined #asahi
18:20rotbot9k has joined #asahi
18:36marcanarnd: the i2c is pasemi so...
18:36marcanthat's another corellium driver that's likely getting thrown away, because I contacted the i2c-pasemi author and got docs and confirmed that it *does* support IRQs and we can add that and have it tested on the pasemi platform
18:37marcannever_released: remember what I said about talking to people? :-)
18:37TheJollyRogerAhoy captain marcan. I heard you were designing a new cable, I'm excited to see what it will be like.
18:38kettenismarcon: can you share those docs?
18:39marcanunfortunately I can't
18:39marcanbut I'm sure I can look up anything we need
18:39GlanzmannTheJollyRoger: I ordered mine already: https://www.apple.com/mac-mini/
18:39GlanzmannMost expensive serial port I ever bought.
18:39marcanthat's certainly the fastest path right now :-)
18:39TheJollyRogerUsing an entire computer for a cable o.O!
18:40marcanbut yes I'll be cost-reducing it 10-20x or so at least
18:40kettenismy i2c driver on u-boot is based on the pasemi linux driver but some of the additional bits that the correllium driver sets are defenitely necessary
18:40svenGlanzmann: don't make the same mistake i did and make sure to get a real superspeed usb-c cable. the charging cable delivered with the macbook air doesn't work.
18:40marcanI need to go through a round of comparing the apple hw to the pasemi doc and seeing how much they diverge
18:41GlanzmannANd the most expensive. But I could just have gone to my soldering iron station, but after I saw marcans message in IRC I immediately ordered one.
18:41svenand now i have to wait until monday or tuesday for my serial adapter to work :)
18:41Glanzmannsven: I'll try the ones I have, if they don't work, I'll order another one. I already hearrd that the cable that ships with macbook air, does not work.
18:41marcanyeah no charging cable will work
18:41marcanthose are all USB2.0
18:41kettenisI started out with trying to get the dwc3 usb controllers to work
18:41svenGlanzmann: okay, great :)
18:42kettenisbut got stuck trying to make sense out of the i2c type-c controller chip
18:42Mary_tbh, being able to dev for a m1 on another m1 feel very comfy
18:42svenmarcan: to make things more confusing: i did check on apple.com and confused their "charging cable" with their "thunerbolt charging cable" which probably would work *sigh*
18:42sven*thunderbolt
18:43marcanheh yeah :)
18:43marcankettenis: well I've been messing with those PD controllers through the other end so...
18:43sveni should've known better with usb's history of naming things, heh
18:43marcando you have the docs for those? those are public, the related public chip's at least
18:44marcanMary_: nice rust bringup btw :)
18:44marcanvery biribiri
18:44macc24 has quit [Ping timeout: 258 seconds]
18:44Mary_Thanks ^^ say MISAKA
18:44Mary_Haven't done much yet on it tbh
18:44macc24 has joined #asahi
18:45j`eymacc24: rust bringup?
18:45j`eyerr, Mary_
18:46Mary_(Mostly reused part of my bootloader stuffs that I originaly made for the TX1)
18:47kettenismarcan: yes I found the TI docs
18:47j`eyMary_: something online?
18:50poppoppenguin has joined #asahi
18:51Mary_j`ey, I still haven't made the sources public (kind of want to at least have the mmu setup work correctly first)
18:51j`eyMary_: so it's a bootloader for the m1?
18:53Mary_Yeah and mostly a playground thing for me to experiment some stuffs ^^
18:54j`eyCool, I'll be interested to take a look when it's public
18:54etaMary_: wait does your thing use m1n1 or is it standalone
18:56Mary_eta: currently chainloading with m1n1 while keeping the mmu on but I plan to be able to make it run without m1n1
18:56etaMary_: oh right, nice
18:57poppoppenguin has quit [Quit: Leaving]
19:08choozy has joined #asahi
19:21j`eyMary_: looking on your github, I see you have a global_asm with a .macro inside and are using that from inline asm!(), I was doing that before, but it felt a bit weird, I wasnt sure if it meant to work or just worked by accident
19:29jld has quit [Ping timeout: 272 seconds]
19:29jld has joined #asahi
19:41mndza has quit [Ping timeout: 265 seconds]
19:44irl25519 has joined #asahi
20:00TheJollyRogerI wonder if anyone would like me to do a branded, 3D printable cable casing for the debugging cable...?
20:04TheJollyRogerThe only thing I'll need is I'll need to know precisely the diameter of the cable, the dimensions of what's going into it...
20:09Bublik has joined #asahi
20:09jn__TheJollyRoger: what kind of cable casing would it be? the kind that you can store a rolled-up cable in?
20:10acelogic has joined #asahi
20:11TheJollyRogerjn__: well, likely it'd just be a box, since the resin from a 3D printer is extremely fragile.
20:11jn__makes sense
20:12TheJollyRogerYeah. I improved the debugging cables I made for android handsets, I got rid of the "glue channel" and simply started gluing the cable in place, and then made them a little slimmer and lighter.
20:12TheJollyRogerI made them so overbuilt the first time around because I didn't actually have the PCBs in my hand.
20:13TheJollyRoger*I made them really overbuilt the first time.
20:14TheJollyRogerSo I made everything really thick and with generous clearances so I could file it down.
20:14TheJollyRogerOr pack material.
20:36marcanTheJollyRoger: it's not actually going to be a cable, it's going to be a board with two type C ports
20:37TheJollyRogerI could design a casing for the PCB, then.
20:37marcanwill work with normal cables, but I want to try to source special passthrough cables for the target side from china for a reasonable price, since that adds features
20:37marcan(I found at least one source so far but they're like $35)
20:38TheJollyRogerYowch, and here I thought that Anker and Aukey cables were pricey.
20:39TheJollyRogermarcan: I later improved the design of the casings on my github, after Dan let me know that the fragile littel plug was in an awkward position and hanging off the end of the phone.
20:39TheJollyRoger*little plug
20:40TheJollyRogerAnd snapped off the PCB.
20:40TheJollyRogerSo I replaced it with a female-to-female plug and since it wasn't in as much hurry as before, I could afford to wait until the boards were in my hand before I designed another.
20:50Tokamak has quit [Ping timeout: 272 seconds]
20:54Tokamak has joined #asahi
21:10amw has joined #asahi
21:12Tokamak has quit [Ping timeout: 240 seconds]
21:15Tokamak has joined #asahi
21:23Tokamak has quit [Ping timeout: 265 seconds]
21:30Mrmaxmeier has quit [Remote host closed the connection]
21:37VinDuv has quit [Quit: Leaving.]
21:41Mrmaxmeier has joined #asahi
21:53raster has quit [Read error: Connection reset by peer]
22:10Tokamak has joined #asahi
22:36irl25519 has quit [Quit: irl25519]
22:50arndnever_released, marcan: from another look at https://github.com/corellium/linux-m1/blob/master/drivers/pci/controller/pcie-apple-m1.c and the adt dump, it appears that the MSI irqchip is not physically a part of PCIe host bridge, but rather part of the AIC itself. The irqchip code in the host driver does not actually interact with any hardware registers but fakes one MSI interrupt for each AIC interrupt.
22:51ky0ko has joined #asahi
22:51arndhandling it in the aic driver directly should be much simpler
22:52arndbut it does mean that it would ideally be part of the aic DT binding from the start
22:58never_releasedarnd: thinking about how much of the PCIe code really has to be there, but uh
22:58never_releaseddepends on how much into deep sleep you want to enter
22:59never_released(because macOS so far seems to stay in an always-connected mode, never bringing down a good part of the HW)
23:01never_releasedI wonder if a true ACPI S3-like deep sleep state without connectivity is wanted, or if a more S0ix-like mode only is preferable
23:17maor26 has quit [Ping timeout: 264 seconds]
23:46Finde has quit [Quit: WeeChat 2.3]
…