2021-05-31
00:15klltkr has joined #asahi
00:15klltkr has quit []
01:18kettenis has quit [Ping timeout: 480 seconds]
01:20Nspace has joined #asahi
01:58TheJollyRoger has quit [Remote host closed the connection]
01:59TheJollyRoger has joined #asahi
02:01inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
02:13inglor has joined #asahi
02:21phiologe has joined #asahi
02:25PhilippvK has quit [Ping timeout: 480 seconds]
03:12bgb has joined #asahi
03:13marvin24_ has joined #asahi
03:16marvin24 has quit [Ping timeout: 480 seconds]
03:50bgb_ has joined #asahi
03:51bgb_ has quit []
03:51bgb has quit [Ping timeout: 480 seconds]
03:51bgb_ has joined #asahi
03:57bgb_Emantor: following your SW:Hypervisor, got errors at step 5 : Error Domain=KMErrorDomain Code=71 "Could not find: kernel mach-o at kernel.development.t8101"
04:16apinski has joined #asahi
04:16pinskia has quit [Read error: Connection reset by peer]
04:17apinski is now known as pinskia
04:21apinski has joined #asahi
04:22bgb_ has quit [Ping timeout: 480 seconds]
04:25pinskia has quit [Ping timeout: 480 seconds]
04:45apinski is now known as pinskia
05:30pinskia has quit [Remote host closed the connection]
05:32pinskia has joined #asahi
05:33VinDuv has joined #asahi
05:45robinp_ is now known as robinp
05:55aquijoule_ has joined #asahi
06:18VinDuv has quit [Quit: Leaving.]
07:13e9 has joined #asahi
07:13emptynine has quit [Ping timeout: 480 seconds]
07:13e9 is now known as emptynine
07:15EER has joined #asahi
07:23MagMell[m] has joined #asahi
07:24MagMell[m]Hi everyone, I tried to start the Linux kernel on my Mac mini M1 with m1n1, and I found that my init did not move after booting (the cursor was still moving)
07:25* MagMell[m]uploaded an image: (137KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/DlnZbRdpPKYgDnxnHnGMGRuV/photo_2021-05-31_15-11-23.jpg >
07:25MagMell[m]My init:
07:25MagMell[m]#!/bin/sh
07:25MagMell[m]exec /bin/sh
07:25bisko has joined #asahi
07:25MagMell[m]What should I do next?
07:27MagMell[m]I use this initrd: wget https://deb.debian.org/debian/dists/buster/main/installer-arm64/current/images/netboot/debian-installer/arm64/initrd.gz
07:27riatre_ has joined #asahi
07:28riatre has quit [Read error: Connection reset by peer]
07:35EmantorMagMell[m]: AFAIK the framebuffer won't provide a login console, which wouldn't be useful anyway since the current kernel does not support USB yet, so no USB Keyboard.
07:35Emantora console is only available on the debug UART on the left most USB port next to the power connector on the mac mini, which requires additional hardware.
07:37Emantorhttps://github.com/AsahiLinux/docs/wiki/Developer-Quickstart#getting-a-serial-console has the instructions on how to access the debug UART, either with another M1 mac, or through arduino+FUSB302+1.2V uart.
07:41MagMell[m]oh thanls
07:41kettenis has joined #asahi
07:46bgb_ has joined #asahi
07:53MingcongBai[m] has joined #asahi
07:54MingcongBai[m]Joining in with Mag Mell here... We were able to get framebuffer via HDMI
07:54MingcongBai[m]And we saw a prompt "Run /init as init process," but the cursor just kept blinking at this point
07:54* MingcongBai[m]< https://matrix.org/_matrix/media/r0/download/matrix.org/nbYVYfcgScZmKvelHqsrilaA/message.txt >
07:56* MingcongBai[m]uploaded an image: (137KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/BEwOclFTGXhodfbBmegERvqG/photo_2021-05-31_00-11-23.jpg >
07:58bgb_ has quit [Quit: WeeChat 3.0.1]
07:59bgb has joined #asahi
08:00EmantorAs said above, please read https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart#getting-a-serial-console, Linux currently works only on the debug UART. All other peripherals are currently not supported.
08:02MingcongBai[m]<Emantor "As said above, please read https"> I understand that, but I just don't quite get the idea about how the login prompt "won't display," is the framebuffer unloaded at some point?
08:03MingcongBai[m]<pipcet[m] "no, or the cursor wouldn't blink"> That's right, and I should probably clarify as well - we are only running an initrd, so no getty involved here
08:04MingcongBai[m]We were only trying to get to a shell via initrd, which has an init script as mentioned above
08:17bgb has quit [Ping timeout: 480 seconds]
08:18bgb has joined #asahi
08:20_jannau_https://github.com/AsahiLinux/m1n1/pull/65 + https://github.com/AsahiLinux/linux/tree/dart/dev has work in process USB support for the USB-C ports
08:33svenpeter[m]Yeah, i just need to get pcie up and running with the Frankenstein device tree I have now and then I can hopefully also submit that upstream soonish
08:52pugguu has joined #asahi
08:53pugguu has quit [Read error: Connection reset by peer]
08:53pugguu has joined #asahi
09:01MingcongBai[m]<marcan "a getty wouldn't help you anyway"> True that
09:05pugguu has quit [Remote host closed the connection]
09:07pugguu has joined #asahi
09:26pugguu has quit [Remote host closed the connection]
09:26pugguu has joined #asahi
09:31bgb has quit [Ping timeout: 480 seconds]
09:36MagMell[m]Hi everyone, I'd like to ask about the "USB gadget mode using a standard USB cable" message. It seems that I'm using a normal USB-C cable here to connect my ThinkPad X230 to the USB-C port on the Mac mini M1 closest to the power source. But I don't see any output from the X230's dmesg, is this not supported by m1n1 yet?
09:39sveni'm currently playing with maz' hack/m1-pcie-WIP to see if i can get that to work with my current DART code
09:39svenand i'm just making it worse. right now i have two pcie nodes in there: one for uboot and one for linux
09:41EmantorCan't wait to port barebox to the Mac Mini, I have no interest in struggling with U-Boot :-) But I am biased anyway.
09:41kettenisif you're using the latest apple-m1-m1n1-nvme branch you can probably just use the pcie node from that
09:41marcanMagMell[m]: if you mean m1n1, it should bring up usb gadget on both ports (the framebuffer should have logs to that effect)
09:41marcannote that reconnection does not work, you have to boot with it connected, because we don't currently handle the type C controller chip to make that work
09:44pugguu has quit [Read error: Connection reset by peer]
09:44pugguu has joined #asahi
09:47svenyeah, i think i'm at the point where pcie works in uboot now and i have to actually understand maz' pcie code now and see what's still missing
09:49pugguu has quit [Read error: Connection reset by peer]
09:49kettenishttps://cvsweb.openbsd.org/src/sys/arch/arm64/dev/aplpcie.c?rev=1.2&content-type=text/x-cvsweb-markup
09:49bgb has joined #asahi
09:49pugguu has joined #asahi
09:50kettenisI haven't committed the switchover to "msi-ranges" there yet, but it shows you how to program the MSI-related registers
10:07kettenissven: another thing is that you need to set up the requestor ID to stream ID mapping in the host bridge
10:08kettenisit seems that if there is no RID to SID mapping set up for a device, stream ID 0 gets used
10:09MagMell[m]<marcan "Mag Mell: if you mean m1n1, it s"> It seems that the USB-C cable is not recognized even after reboot, is there a special condition for the USB-C cable?
10:20EmantorMagMell[m]: any USB 2.0 compliant C-to-C or C-to-A cable should work. any dmesg output on your development host?
10:31MagMell[m]My dmesg: http://fars.ee/EM56 (I don't seem to see any relevant information), As well as I use Anker's C-C charging cable, and oppo's C-A phone charging cable, dmesg does not output the relevant information
10:41bgb has quit [Ping timeout: 480 seconds]
10:55* MagMell[m]uploaded an image: (154KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/qOYJOlENmKAjQbbLlpglbNaz/photo_2021-05-31_18-54-05.jpg >
10:55* MagMell[m]uploaded an image: (81KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/KHMvRdIMfWqKkvnsgPJPHidG/photo_2021-05-31_18-54-04.jpg >
10:55MagMell[m]My setup (xiaomi C to C cable + C-A)
10:57MagMell[m] * My setup (xiaomi C to C cable + C-A adapters)
10:57MagMell[m] * My setup (xiaomi C to C cable + UGREEN C-A adapters)
11:01robinpa lot of charging cables have only minimal pins connected - your best off getting a cable that is marked USB 3 or SuperSpeed. See "Important Note" on https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart
11:15bgb has joined #asahi
11:21svenbut ethernet at least works without that. [ 8.298277] tg3 0000:03:00.0 eth0: Link is up at 1000 Mbps, full duplex
11:23choozy has joined #asahi
11:46sventhis is mostly kettenis' and maz' work fwiw. i'm just making sure pcie plays nicely with my dart iommu driver ;)
11:58Erus_Iluvatar has joined #asahi
12:02choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
12:09bgb has quit [Ping timeout: 480 seconds]
12:32svenat least something requests a MSI, unmasks a AIC interrupt but that interrupt then never fires
12:33svenit also fails to setup this INTx thing because there's no code for it. so maybe that's just missing :D
12:33svenj_ey: that sounds like effort. you'd also only get to watch me reading linux code which is not very interesting
12:35EmantorCommon misconception seems to be that because marcans streams are good, every other developer also does good streams. IMO marcan is the exception with his prior streaming experience :-)
12:36amwSorrry, was just trying to say Thanks to marcan for m1n1 youtube, I'm learning so much from trying to follow along, on Python classes, ARM hardware and so on.
12:39marcanI did some re-broadcast DJ streams for a formerly physical event that shifted to streams because covid, but juggling RTMP feeds while trying to coordinate transition times and MCing in a radio voice doesn't really have much of a skillset overlap with, er, coding on a stream
12:40bgb has joined #asahi
12:41Emantormarcan: okay, than I misunderstood sorry. But having at least some OBS/Jack experience lowers the barrier to entry.
12:43marcanI'm weird and use two computers with networked audio and HDMI to capture card video and a bunch of audio filters and stuff like that because me
12:45marcanI don't know if my streams are good, but I'm pretty sure the content matters the most and none of that has anything to do with my audio shenanigans :-)
12:46marcan(if anyone wants my carla patch though, happy to share. I'm kinda proud of discovering the multiband compressor trick to reduce high-frequency noise)
12:50EmantorSure, I wouldn't say no. I played with carla and pipewire since it eliminates the whole "setting up Jack"-problem. Worked mostly fine.
12:57_jannau_no, not as M1N1DEVICE. open it directly with terminal emulator like picocom, screen, minicom, ...
13:03Mi has joined #asahi
13:17Mi has quit [Quit: Leaving]
13:33bgb has quit [Ping timeout: 480 seconds]
14:33bgb has joined #asahi
14:41bgb has quit [Ping timeout: 480 seconds]
14:41svenkettenis: i just briefly looked at the DART kext to confirm that we can't switch page sizes and stumbled across a method called "dartSupportsFullBypass". looks like bypass mode is only supported if bit 0 in register 0x04 is set
14:52marcanif we can get the kernel to play nicely with the diverging page sizes *somehow* that's fine by me, but no static bypass hacks for external interfaces
15:10klaus has joined #asahi
15:14svenand we could also hack this by creating a fake-bypass mode with static pagetables + swiotlb
15:23pugguu has quit [Read error: Connection reset by peer]
15:23pugguu has joined #asahi
15:45thunfischmarcan: re stream, if nothing else, the stream is awesome for watching you work and all the little shortcuts used. picked up a few tricks and reminders (e.g. to use git commit --patch more). didn't understand too much of what was going on, but seeing you get the iommu hv up and runnig was actually quite exciting entertainment ;)
15:54pugguu has quit [Remote host closed the connection]
15:54pugguu has joined #asahi
16:00kettenisbloom: the problem with 16k iommu pages with 4k cpu pages is that you end up exposing more bits of memory to the devices than you really want
16:02kettenisso I just pushed a changes that renames the "ecam" reg-names name to "config" as requested by robh
16:02Andalu30 has joined #asahi
16:03pugguu has quit [Ping timeout: 480 seconds]
16:04pugguu has joined #asahi
16:07pugguu has quit [Read error: Connection reset by peer]
16:09kettenisah, something to look at before I consider enabling pcie passthrough on the thunderbolt ports in OpenBSD
16:09sveniirc in the PTE bit 1 needs to be cleared and then the top bits become [12 bit start offset][12 bit end offset] or something like that
16:09svenhaven't figured out the exact details because using usb to look into the iova space is a little bit annoying
16:11pugguu has joined #asahi
16:11svenbut i think the issue is that the top level api in linux so far guarantees that you can map any page-aligned things to any page aligned iova
16:13svenor, well. not really. we could map 4k aligned pages to one of [iova],[iova+4k],[iova+8k],[iova_12k] or something like that
16:13svenbut the linux iommu api manages the entire iova space. the dart driver just gets told "please map iova range [x,x+sz] to paddr range [y,y+sz]
16:19kettenisOpenBSD's bus_dma API has an API that just says "map this range of physmem and return the device address you mapped it at"
16:21sveni'm not sure the maintainers would be very happy with me if i replace that with some special-case DART code though ;)
16:27svenhm. now that i'm reading that code again it shouldn't be too hard to just make it work with a different granule
16:56pugguu has quit [Read error: Connection reset by peer]
16:56pugguu has joined #asahi
16:57pugguu has quit [Remote host closed the connection]
16:58pugguu has joined #asahi
17:05klaus_ has joined #asahi
17:05klaus has quit [Read error: Connection reset by peer]
17:06SunWuKung has joined #asahi
17:07VinDuv has joined #asahi
17:16linuxgemini has quit [Remote host closed the connection]
17:16ave has quit [Remote host closed the connection]
17:17linuxgemini has joined #asahi
17:17ave has joined #asahi
17:18pugguu has quit [Read error: Connection reset by peer]
17:19pugguu has joined #asahi
17:41svenpanic(cpu 0 caller 0xfffffe00143af0f8): "ApplePMGR: virtual void ApplePMGR::initDriver(IOService *):1557 REQUIRE failed: id != kIDReserved"
17:45pugguu has quit [Read error: Connection reset by peer]
17:45pugguu has joined #asahi
18:09SunWuKung has quit [Remote host closed the connection]
18:09xerpi[m] has joined #asahi
18:14Andalu30 has quit [Read error: Connection reset by peer]
18:14Andalu30 has joined #asahi
18:55pugguu has quit [Read error: Connection reset by peer]
18:56pugguu has joined #asahi
18:58me_ has joined #asahi
19:04CristianMgheruan-Stanciu[m] has joined #asahi
19:13me_ has quit [Quit: Leaving]
19:13Andalu30 has quit [Ping timeout: 480 seconds]
19:30djsrv has joined #asahi
19:35pugguu has quit [Read error: Connection reset by peer]
19:36pugguu has joined #asahi
20:00svenugh.. i forgot that i have to recompile essentially the entire kernel when switching page sizes
20:18r0ni has joined #asahi
20:29svenwell.. that static pagetable hack works. looks like we theoretically can boot 4k kernels as well for now
20:29sveni still need to change the device tree between isolation mode and translated mode but i'll see if i can fix that tomorrow
20:37VinDuv has quit [Quit: Leaving.]
20:37Chainsaw has quit [Quit: Switching client.]
20:37Chainsaw has joined #asahi
20:40pugguu has quit [Ping timeout: 480 seconds]
20:54choozy has joined #asahi
21:15j_eyreading https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart "M1 machines cannot boot from external storage." "These machines cannot boot macOS kernels from external storage, ever, at least using current firmware."
21:17agrafj_ey: it means that even if you install m1n1 on external storage, the internal firmware will first copy m1n1 to the local ssd before it can boot it
21:20agrafj_ey: you can always go back to the local macOS install. The location external boot files get copied to is on special partitions
21:21arndj_ey: I tried with my coworker's help and they couldn't do it with their credentials either
21:22arndwe could install a regular macos to a thunderbolt drive, but installing two separate macos installations to different partitions always failed, and the same happened when trying to replace the macos kernel on the external drive with m1n1
21:22agrafarnd: but there's a good chance the "boot selector" thing doesn't set the hash that allows you to run 3rd party binaries
21:23agrafarnd: those were 2 separate installations on the same external drive, but different partitions?
21:23arndagraf: yes. installing a second (or third) macos using the credentials from the internal drive works, but makes all other external partitions unbootable
21:25j_eyah "When an OS from external media is booted via 1TR, its boot files (everything under /(uuid)/boot) are copied from the Preboot volume to this partition under the same path. This is how Apple Silicon macs can "boot" from external media, even though iBoot itself cannot."
21:27arndI think there is also a difference between booting through recovery mode and booting through the normal "pick default OS" (whichever that is called) setting
21:28agrafarnd: like look at the LocalPolicy files before/after, validate signatures, see if maybe the OIK ownership was changed/revoked
21:29arndUSB drives can only be booted using recovery mode by long-pressing the power button, but I did not try that at all. The method I used was with a thunderbolt drive, because some part of the boot loader apparently treats that as an internal drive. My best guess is that it breaks down after that, since this is not really a supported configuration
21:31arndagraf: there was some cryptic error message I got when I tried to install m1n1 onto the thunderbolt drive, which I think was related.
21:41swb has joined #asahi
21:44d4ve has joined #asahi
21:48swb has quit [Quit: WeeChat 3.1]
22:03tsida has quit [Remote host closed the connection]
22:45esden has quit [Remote host closed the connection]
22:45leifm has quit [Read error: Connection reset by peer]
22:45tom-w has quit [Read error: Connection reset by peer]
22:45rann has quit [Read error: Connection reset by peer]
22:45arnd has quit [Read error: Connection reset by peer]
22:46austriancoder has quit [Read error: Connection reset by peer]
22:46whynothugo has quit [Read error: Connection reset by peer]
22:51arnd has joined #asahi
22:51rann has joined #asahi
22:51austriancoder has joined #asahi
22:52whynothugo has joined #asahi
22:56esden has joined #asahi
22:56leifm has joined #asahi
22:58tom-w has joined #asahi
23:52StupidYui has joined #asahi