#
…

2021-10-15

00:04rohin has joined #asahi
00:13jmr has joined #asahi
00:13jmr has left #asahi [#asahi]
00:14jmr2 has joined #asahi
00:18zopieux has quit [Quit: zopieux]
00:19zopieux has joined #asahi
00:31jmr2alyssa: I might be able to assist with testing on a MB Air as well - although I only have installed m1n1 so far.
00:32jmr2By the way, is it possible to use a USB 2.0 stick connected through a USB-C hub for rootfs? Or adapters only for now ?
00:37zopieux has quit [Ping timeout: 480 seconds]
00:39zopieux has joined #asahi
00:43jmr2 has quit [Remote host closed the connection]
00:53Graypup_ has quit [Quit: meow]
00:56Graypup_ has joined #asahi
01:09alyssaUSB 2.0 over USB-C works fine for rootfs, indeed that was my setup for july tweet
01:21jmr2 has joined #asahi
01:23jmr2Excellent. Thanks for the confirmation.
01:25thunfisch has quit [Remote host closed the connection]
01:25thunfisch has joined #asahi
01:27jmr2 has quit [Quit: Page closed]
01:32chadmeddamn i wish i could upload images so you could see my reaction to the insinuation that C is better than Python for GUI programming :P
01:54psykoselinks to images work
02:22phiologe has joined #asahi
02:24marcan_alice: the installer will do the distro install for you, the rootfs image way (which is popular these days anyway, see e.g. ALARM itself)
02:24marcanI just need to work out some firstboot script to copy the wifi firmware and resize the ext2fs, though we might be able to just bundle resize2fs built for mac with the installer to take care of that
02:24alicela1nwhat will the default distro be like
02:24marcanwhatever people want to maintain; I'm going to maintain ALARM
02:25marcanthere's no "default" other than, er, whatever order we show them in
02:25PhilippvK has quit [Ping timeout: 480 seconds]
02:36BlitzWorks has quit [Ping timeout: 480 seconds]
02:36jmr2 has joined #asahi
02:39kode54spamming offtopic with my wonderful troubles with not-Asahi and gaming while also in video calls
02:39chadmedthats what offtopic is for :)
02:41BlitzWorks has joined #asahi
02:41jmr2alyssa: FWIW, I'm getting compilation errors on your 20211013 branch. Possibly on my end. Details: http://paste.debian.net/plainh/8f1717d1
02:41chadmedim still trying to think of the most easily maintainable way to have a luser-proof gentoo install for these macs. im leaning towards a shell script that just grabs the latest stage3 and sets up a m1n1->uboot->grub boot chain but idk... seems a little convoluted
02:42nobodynada has quit [Quit: Lost terminal]
02:45chadmedi just like that way because it just abstracts away the mac-specific boot stuff and lets people follow the handbook pretty much word-for-word. assuming youd never want/need to update m1n1 or u-boot, you could treat the system in almost exactly the same way as any amd64 machine now
02:48chadmedplus we could just have a shell script that updates m1n1/u-boot from 1TR should it become necessary
02:49nobodynada has joined #asahi
03:00marcanchadmed: why not just do what we do for all the other distros and use an image?
03:00marcanstage3 is an image after all, the script just automates the partitioning, then you can follow the handbook from first boot
03:01marcanthe installer will have an "update my m1n1 please" option
03:01chadmedwell yeah i just meant use the stage3 as the image, rather than something like the genpi image where you get a ready-to-go system
03:02marcanwell yeah, it's gentoo, I'm assuming users will know what they're doing and know how to install the rest
03:02chadmedthe latter just doesnt seem to be in the spirit of gentoo imo
03:02chadmedyeah that
03:02marcanfor arch I'm going to do both a barebones ALARM image (same spirit) and a proper desktop
03:02marcanso people can choose
03:05marcanit would also be neat to have a "firstboot" style wizard like the macos one, so people can set up their own login/password instead of having to change a default
03:07chadmedyou could implement that as an init service that destroys itself after the first boot, theres a few SBC images that do similar things
03:08marcan(and it's 2000 lines of GTK...)
03:09marcanah, for the barebones arch image there's https://wiki.archlinux.org/title/Systemd-firstboot
03:09marcanthat sounds good
03:09marcanfor a desktop thing I might end up writing something (in Qt or PyQt maybe?) if I find some time
03:10marcanall this is going to need buildboxes, I'm looking forward to making a little cluster of M1X Mac Minis ;)
03:11marvin24 has joined #asahi
03:13chadmedyeesh that piwiz code hurts to look at
03:15marvin24_ has quit [Ping timeout: 480 seconds]
03:29kov has quit [Quit: Coyote finally caught me]
03:29kov has joined #asahi
03:34jmr2Ouch... I'm rusty... Downloading a kernel tree through github's "Download zip archive" is NOT faster than git clone... because that destroys symliinks. The 2nd error is fixed (I manually recreated some links). Still waiting for git clone to see if it fixed the 1st one too.
03:35yuyichao has joined #asahi
03:39chadmedadd --depth=1 to the clone command if youre only interested in building the kernel and wont need to walk down the repo at any point. speeds up the download significantly and doesnt break any symlinks
03:39chadmeddo not do this if for any reason you will need to revise commits older than the most recent for each file
03:47jmr2Thanks. Too late for this time, but I'll remember it.
03:54jmr2marcan: not sure if this one exists in your tree or not (I'm still on Alyssa's): drivers/soc/apple/apple-pmgr-pwrstate.c:101:6: warning: unused variable ‘ret’
04:05jmr2alyssa: Confirmed - I still have the 1st set of errors. Fixing the symlinks only fixed the second.
04:05jmr2 has quit [Quit: Page closed]
04:35rohin has quit [Quit: Konversation terminated!]
05:06chadmedare there any distros that dont ship with python by default anymore?
05:34Glanzmann has joined #asahi
05:35GlanzmannI'm taking care of Debian, if noone else who is better suited wants to do it. ;-)
05:35GlanzmannInstaller Distribution wise.
05:42psykosealpine doesn't
05:43chadmedwhat init does alpine use
05:43psykoseeventually s6 in like 2 years
05:43chadmednoooooooo aahahah i was trying to write a generalised openrc firstboot to do roughly the same thing that systemd-firstboot does
05:44psykoseplanned to use python? :p
05:44chadmedoh well whoever maintains the alpine rootfs image can just add python to it
05:44chadmednot only did i plan to use python, im basically 80% of the way done writing the thing using python :P
05:44psykoseby rootfs image you mean the installer/etc images?
05:44psykosean init.d service can use whatever you want it to
05:45psykosebut python will probably not be in any base image
05:45psykoseso... probably won't work on alpine then for firstboot ( i just now read what it is )
05:46chadmedyeah so marcan's idea was to have a barebones/desktop rootfs image for each distro people want to maintain such that the asahi installer script can just extract that to the root partition which is a popular way of "installing" distros on other ARM SBCs
05:47chadmedso i guess if someone wants to maintain an alpine image for that, they can just have python included with it which isnt any trouble
05:47psykoseif it's not a normal rootfs image, and needs user customisation, then if there is a maintainer that wants to maintain one with python in it for alpine-rootfs-m1 it should be fine
05:47nobodynada has quit [Quit: Lost terminal]
05:47psykoseit's third party after all :) upstream won't care
05:49chadmedwhat im doing isnt really even entirely necessary, its just a nice-to-have for new users who might not be comfortable being dumped to a shell with the expectation that they just know a priori that they have to change the default root pw and/or delete the default local user that is usually set up on these ARM images
05:49chadmedi likely wont even use it myself :P
05:50psykosemakes sense :)
05:50psykosedoesn't sound like a bad idea at all
05:51chadmedeventually i think marcan wants to write one in Qt to mimic the macos firstboot for desktop images which is a nice idea. uni is a few weeks from finishing here so i will have a few months free to brush up on my C++ and maybe help out with that too
06:14confusom1 has quit [Remote host closed the connection]
06:15confusomu has joined #asahi
06:24GlanzmannThis patch fixes the issue with compiling alyssas 20211013 branch.
06:26GlanzmannThere were some variables after code and some inline functions moved to a different include.
06:32aleasto has joined #asahi
06:56chadmedhttps://github.com/chadmed/openrc-firstboot alright if you want to laugh at some ugly ugly ugly code
06:58chadmedwhen i get some free time im gonna port it to C so that it works on all openrc distros without depending on python. its not like it does anything that depends on python anyway
07:22sorearthe installer is in python so it needs python available in the macOS/1TR environment where it runs, if I've understood correctly. I don't think it matters whether there is also a copy of python in the installed distro, since the installer doesn't run there?
07:23chadmedthis will be run on the first boot of the linux environment though, not from 1TR with the installer
07:23chadmedits broken anyway, useradd doesnt like being called
07:25chadmednvm fixed it by using os.system instead of subprocess.call
07:35chadmed has quit [Quit: Konversation terminated!]
07:37chadmed has joined #asahi
07:40chadmed has quit []
07:43chadmed has joined #asahi
07:44chadmed has quit []
07:47chadmed has joined #asahi
07:52chadmedok it now works fully
08:01bps has joined #asahi
08:14Glanzmannchadmed: Nice.
08:15chadmedworking on a C port now just to reduce external dependencies
09:09psykosealpine doesn't have useradd either by default :)
09:10psykosejust adduser/addgroup from busybox
09:15chadmedaaaaa youre killing me
09:16chadmedwell its MIT licensed so whoever wants to make it work with alpine can do so
09:20psykose:p don't mean to spoil the fun
09:20psykoseit's an `apk add shadow` away anyway
09:42* povikis looking into setting up a m1n1+petitboot boot chain
09:42povikfor subjective aesthetic reasons
09:43mazpovik: good luck with petitboot. we can't support kexec on M1 for now.
09:43povikreally? i thought that works
09:43mazit requires PSCI support, which requires a more privileged exception level. No EL3, no PSCI, no kexec.
09:43mazyou *could* have it under m1n1's hv though.
09:44povikthat goes over my head
09:44mazbut as far as bare metal is concerned, no way.
09:44povikwell i guess it's back to working on audio then
09:44j_eyhuh, wasnt pipcet[m] using kexec..
09:45povikyeah but he's using some frankenstein of corellium and asahi kernel AFAICT
09:45j_eyyes but that has no EL3 either :P
09:45povikgood point
09:47mazdo make that work, you'd need the kind of SMP ops that we had on 32bit so that platform can bring their own SMP bring-up crap.
09:47mazsdo/to/
09:48mazArd had an idea to implement this un EFI, but that's a long way away.
09:48svenj_ey: i think he only brought up the other cores in the final kernel he loads
09:49mazsven: so *that* would have a chance of working.
09:53j_eysven: they also added "cpu_operations cpu_apple_start_ops"
09:53j_eywhich might be the SMP ops maz mentioned?
09:54svenall i remember is that it wasn't very pretty
09:54mazj_ey: that. it has NAK written all over it.
09:55j_eybut maybe the CPU nodes in the dt can be 'disabled' for petitoboot
10:16kettenispetitboot also sucks if you try to boot something that isn't linux
10:16arbut why would you want to boot something that isn't linux? ;)
10:19chadmed has quit [Quit: Konversation terminated!]
10:21chadmed has joined #asahi
10:26psykosefreebsd supports it no? :p
10:33kettenisI believe so; they support powernv and that means petitboot must be in the loop somehow
10:39kettenisI implemented support for OpenBSD/powerpc64; basically ended up booting a special "bootloader" kernel that loads the final kernel through its own "kexec" implementation
10:41kettenisthe ELF parser in the kexec tools shipped with the stabdard firmware images is seriously broken though
10:41kettenisworking around that was fun (not)
10:45povikseems it may just work if the spin table set by m1n1 makes it all the way to the final kernel undepleted
10:45povikif this doesnt require any hacks in the final kernel then i am happy
11:27Retr0id3 has joined #asahi
11:27Retr0id has quit [Remote host closed the connection]
11:42gabuscus_ has quit [Ping timeout: 480 seconds]
12:00chadmed has quit [Quit: Konversation terminated!]
12:01chadmed has joined #asahi
12:10gabuscus has joined #asahi
12:27chadmed has quit [Remote host closed the connection]
12:27chadmed has joined #asahi
12:35X-Scale has quit [Ping timeout: 480 seconds]
12:46X-Scale has joined #asahi
12:54kovI installed m1n1 using the installer on my macbook air; I built m1n1 and linux on my Fedora VM, copied things over to my mac mini and tried to chainload m1n1, it went wrong, any ideas? http://paste.debian.net/1215497/
12:58poviki dont know whether running the proxyclient scripts under macos is tested
12:59povikcould be there are some differences in configuring the serial port
12:59sveni used from exclusively from macos
12:59povikso that should work
12:59sventhat's an serror, so something went terribly wrong
13:00j_eykov: what compiler did you use?
13:00j_eyto build m1n1
13:00povikoh right, there are m1n1 log lines there
13:01povikjust skipped over those
13:01svenTTY> L2C_ERR_ADR: 0x301000a038c7ec0 <-- that looks strange
13:02kovj_ey, clang, I think m1n1's makefile wasn't happy I was running under aarch64 and tried to use a cross-gcc
13:02j_eykov: use gcc, I had issues with m1n1 with clang too
13:02kovI guess I can try building m1n1 on my x86 laptop with gcc, that is probably the most tested setup
13:02svenugh.. i think we added clang support early on but never tested it again
13:03j_eysven: yep
13:03j_eyi got exceptions too, so switched back to gcc
13:03svenso i guess we should either fail to even build on clang or fix those :D
13:04* kovwill try that later today
13:04j_eyfix them would be better, i guess its probably an issue in the code, rather than a clang issue
13:04svenlast time one issue was that clang silently converted '\r' to 'r'
13:05j_eyescapes, who needs em
13:06svenbut another issue was that the code didn't save some register before calling a function it should have saved iirc
13:06svenso fixing them is probably a good idea and might uncover other subtle bugs
13:24krbtgtoh god, another channel i'm on proposed doing an RYF M1 system. it almost sounds possible except for the fact iBoot loads only signed firmware for the coprocessors (tho you can choose wrt the Broadcom and SEP)
13:25krbtgtif someone figured out how to exploit the ROM stage iBoot, you could probably give a lot of free software enthuiasts aneurysms from libre macs
13:27alyssakrbtgt: no no no you can't touch the firmwares, you can just pretend they don't exist, that's ryf right?
13:27alyssait worked for that laptop...
13:28krbtgtgod i just "love" how purism made a mockery of the criteria and how dumb it is
13:28nuh^ has joined #asahi
13:28krbtgtseal the proprietary software in a mask rom so you can't replace it with libre alternatives
13:42yuyichao has quit [Ping timeout: 480 seconds]
13:48chadmed has quit [Ping timeout: 480 seconds]
13:49chadmed has joined #asahi
13:54marcankrbtgt: it's not even a mask rom, in the end it was the same (updatable!) SPI flash that has the Type-C controller firmware (which is *another* blob)
13:54marcanit's just they use a secondary CPU to *load* it, so as long as you don't give cooties to the main CPU by touching it from there, it's fine!
13:55marcanI guess then the second CPU is tainted and can never be used by Libre software though
13:55marcanbut the loader code is Libre
13:55krbtgtgod what a joke
13:55marcanso maybe we do indeed have a case of infinite libre poisoning recursion
13:55marcanfun fact: that thing has the same line of PD controllers as the M1 Macs
13:56krbtgtmaybe you could rules lawyer the existing M1 setup as RYFable, considering the mockery of the rules, and the fact apple's system is arguablly pretty close to being there
13:56krbtgtof any mainstream system at least
13:58marcanyou'd have to rules lawyer all the boot stuff into somehow counting as a ROM
13:59marcanmaybe we can hack the ANS2 into only exposing the Linux partition to the OS
13:59marcanthen you wouldn't see all the iBoot stuff from there
14:01krbtgtRespects Your Fear
14:19marcankov: please run addr2line -pf -e build/m1n1.elf 0x1d6b4
14:19marcanI should add that to the exception dump screen
14:20marcanthough that exception isn't precise so that may or may not end up being useful
14:21marcanah wait, that's the m1n1 from the installer
14:22marcan$ addr2line -pf -e ../asahi-installer/m1n1/build/m1n1.elf 0x1d6b4
14:22marcandispose_chunk at /home/marcan/asahi/git/asahi-installer/m1n1/src/dlmalloc/malloc.c:4421
14:22marcanuh. that sure looks like a heap explosion.
14:25marcanthe thing is gzdec doesn't even *use* the heap... so I have no idea how this could even happen
14:26kovwith the m1n1 I built:
14:26kov> addr2line -pf -e build/m1n1.elf 0x1d6b4
14:26kovtinf_uncompress at ??:?
14:27marcanwait, was this chainloaded from a fresh boot or after a single chainload already?
14:28kovdoesn't look very useful heh
14:28marcanbecause that makes more sense at least
14:28kovno, chainloaded after a fresh boot
14:28kovno wait, maybe it was a second attempt
14:28kovlet me do a fresh one
14:29kovmarcan, this one is definitely from a fresh boot: http://paste.debian.net/1215525/
14:30marcanand you used the mrcn.st/alxsh installer?
14:30marcanor your own build?
14:31marcanif it's your own build it'd make sense
14:32kovmy own build, yeah, I'll do a reinstall with mrcn.st/alxsh then!
14:34marcanwhat compiler are you using
14:34marcantry replacing compressed_writemem with writemem in chainload.py and see if that fixes things
14:34marcanI get the feeling your build broke gzip decoding somehow, maybe there's something dodgy there or a compiler issue?
14:34marcanif you send me the binary I can try to reproduce here :)
14:35kovmarcan, let me try that, I am coming to the conclusion that my issue is basically me trying to use my Fedora VM on the M1 for my builds heh, I'll do everything from my x86 laptop
14:36marcanwell... it *should* work with a native compiler
14:36marcanit's entirely possible there's some undefined behavior in tinf or something like that
14:36marcanso I'd quite like to figure out what's up with that :)
14:36kovlet me try the change to chainload.py and I'll get the binaries all packaged up and put them somewhere after that
14:37j_eymarcan: try build with clang, if you have clang
14:37marcanalso can you addr2line 0x27fc0 ?
14:38marcanincidentally, with the uncommitted m1n1 changes I have here that SError would at least turn into a precise data abort :)
14:40kovmarcan, with iface.writemem I get an error because m1n1 wants to call aarch64-linux-gnu-gcc which I don't have on my macos, weird
14:41j_eyit's a jit!
14:42kovmarcan, you want add2line 0x27fc0 on the m1n1 I'm trying to chainload or the one from the installer? I think the one from the installer is downloaded pre-built?
14:42kovfrom the one I'm trying to chainload:
14:42kovkov@uva ~/P/A/m1n1 (main)> addr2line -pf -e build/m1n1.elf 0x27fc0
14:42kov?? at /home/kov/Projects/Asahi/m1n1/src/usb_dwc3.c:178
14:43kovlet me boot the macbook on mac os, the installer is on its vm
14:44yuyichao has joined #asahi
14:45marcankov: yeah, the proxyclient code assembles things on the fly and needs a compiler
14:45marcanask sven how he does it on macOS :)
14:45marcanwe should document how to set this up properly
14:45svenuh, just a regular gcc cross-compiler in my $PATH
14:46marcanhomebrew?
14:46svendon't think so
14:46marcanself-built? :p
14:46sveni think i downloaded it from somewhere: /Users/speter/Downloads/aarch64-unknown-linux-gnu/bin/ :D
14:46kovI looked for it on homebrew
14:46kovhah will look for that download later today
14:46_aliceWhen I was trying to use the proxyclient chainload.py, `aarch64-apple-darwin20-gcc-11` from homebrew didn't seem to work
14:47marcanwell, darwin20 sure sounds like macho
14:47marcanI wonder if I can just make this work with xcode?
14:48marcanhm, no objcopy though
14:48_aliceprobably, it's possible to bend Xcode to even make microcontroller binaries, so
14:49kovthis looks even less useful heh
14:49kovkov@couve ~/P/A/asahi-installer (main)> addr2line -pf -e m1n1/build/m1n1.elf 0x27fc0
14:49kov?? ??:0
14:49kovkov@couve ~/P/A/asahi-installer (main)> addr2line -pf -e m1n1/build/m1n1.elf 0x1d6b4
14:49kovtinf_inflate_block_data at tinflate.c:?
14:50kovmarcan, you want the installer build packaged up? what else?
14:50marcanif you can just package up the entire m1n1 directory from that, that would be useful
14:50marcan(with elf and object files)
14:52marcanI wonder if this is some kind of relocation issue
14:53marcanactually, you know what... this might actually be fixed by the same m1n1 change that I just pushed?
14:53marcanit could be CPU speculation causing this
14:54marcanthough I probably just broke dcp.py and other things :-)
14:54kovI would have to install that new m1n1 I am guessing or could I chainload it?
14:55marcanyou could chainload it without the tinf stuff, but you still need to figure out the compiler issue there
14:55kovyeah, ok
14:55marcan(that won't change regardless)
14:55kovgot a call in 5, I guess I'll just do a rebuild and reinstall after that and lunch, then
14:56marcanI wonder if I can somehow figure out the proper top of mem boundary where things are unmapped, not just what the boot args says is the top of normal RAM...
14:56marcanavoids having to manually map everything up there from now on
14:56kov(and maybe I just switch to using my x86 laptop for my testing for a bit as I really want to see the DCP and keyboard on this Air this weekend ;D)
14:58_alice has quit [Quit: irc_error]
14:58_alice has joined #asahi
15:01_alice has quit []
15:02_alice has joined #asahi
15:08nuh^ has quit [Remote host closed the connection]
15:08nuh^ has joined #asahi
15:10aleasto has quit [Quit: Konversation terminated!]
15:12aleasto has joined #asahi
15:18aleasto has quit [Quit: Konversation terminated!]
15:20aleasto has joined #asahi
15:23marcansven: umm... I can not only *read* the DCP firmware, I can *write* it too
15:23marcanand it works.
15:23marcanthe only ASC range that is protected, that I can find, is the ANS2 thing in highmem
15:23marcan(that one SErrors)
15:23marcanso I guess we can fix DCP bugs after all :D
15:24svenso why the hell is the DART locked then?
15:24marcangood question, lol
15:24svenuh. wait. is that code or the data section you wrote to?
15:24marcanpretty sure I can write to code too
15:25marcan>>> memset32(0x08001e4000, 0, 0x55ca0e)
15:25marcanthere, I just wiped the entire firmware
15:25alyssamarcan: awesome, just stick that command in m1n1 and we can get RYF after all :-p
15:25svenweird. so maybe I just tried ANS2 and misremembered? :/
15:26marcanANS2 is the one that has a big region in highmem
15:26marcan region-id-2 = [0x00000009E6E64000, 0x0000000019000000]
15:26marcanthat's the range that SErrors
15:26alyssamarcan: so uh
15:26svenhrm. i would've sworn that i tried DCP as well
15:26svenbut let me try again
15:26marcanwhich matches region-base, region-size in iop-ans-nub
15:26alyssashould I port linux to the dcp or did you want to...?
15:27alyssatreat the AP like a coprocessor, Broadcom style
15:27marcannow the thing I'm left wondering is where the heck the SEP is
15:27marcansince that sure as heck should error out
15:28svenhrm, we should be able to just read those TZ0 registers if we know where they are
15:28yuyichao_ has joined #asahi
15:29svenhrm, true. i can read/write DCP firmware as well here
15:29svenso i guess i really just tried ANS2 but for some reason thought i also tried for DCP
15:29marcanunless this changed in some update or something
15:32marcan region-id-4 = [0x00000009DAA38000, 0x0000000001D20000]
15:32marcanI bet that's it?
15:32yuyichao has quit [Ping timeout: 480 seconds]
15:32marcanyeah, that's it
15:33povikwhat about that range?
15:34aleasto has quit [Ping timeout: 480 seconds]
15:34marcanthat's SEP
15:34svenhrm, so if the TZ0 registers are at the same location as on A13 it's at 0x9dcb1f000...0x9dad90000 on my machine i think
15:34povikah, it serror's, then?
15:34marcanbasically I'm trying to figure out what ranges SError, and avoid mapping *just* those
15:35aleasto has joined #asahi
15:37marcanso far the best idea I have is "region-id-2, region-id-4, region-id-5" in the carveout map (that's ANS and the two SEP ones)... but I'm not sure if that's stable...
15:38svenyou should be able to get ANS from the SART entries as well i think
15:41svenregion-id-4 = [0x00000009DAD90000, 0x0000000001D90000] so that matches up with what i found above
15:42marcando you see ANS around that reg range?
15:42svenmarcan: so get the first SEP region 0x800000000+read32(0x2000006a0)<<12 is the start
15:42svenand 0x800000000+read32(0x2000006a4)<<12 the end i think
15:43sven6a0 is start, 6a4 is end and 6a8 is enable
15:43marcan>>> read32(0x2000006d0) << 12
15:43marcan0x1e6e64000
15:43marcanso that's ANS
15:43marcantz3 I guess?
15:43sveni guess
15:44sventhe registers are always START, END and then LOCK
15:44svenso if the third one isn't 1 you can actually reconfigure it. but they're all locked afaict
15:45marcanI guess this is arm-io/mcc.reg[1]
15:53svenso then i really don't understand why that DCP DART is locked anymore :/
16:01alyssasven: locking DCP DART might be for robustness, not security?
16:01marcansven: pushed a thing to unmap only the TZ regions
16:01svenhow would that increase robustness?
16:01marcannow dcp.py works again
16:02alyssasven: you said locking the DART locks almost all the registers (not just the ttbr one)?
16:02marcansven: I bet it's locked because on some *other* platform, iPhone or whatever, this matters and the DCP firmware is locked
16:02marcanbut not here
16:02marcanand it's just leftover
16:02svenmarcan: hah, i can totally believe that
16:02alyssasven: maybe the point was one of the other registers that gets locked, less opportunities for things to change under DCP's feet? shrug
16:02j_eycan apple give us a bug tracker so we can file issues
16:03svenalyssa: that doesn't make much sense tbh if we can overwrite the firmware as marcan figured out
16:03marcankov: so if you want to update the m1n1 submodule in your installer and rebuild that (you can just copy it over and kmutil it, see what step2.sh does; no need to rerun the whole installer), that might fix the gzip decompression thing without breaking anything else
16:03marcan(hopefully)
16:04alyssasven: I didn't say it was a /useful/ decision :-p
16:05sveni just don't think robustness makes any sense at all
16:05alyssaalso don't discount the possibility of a hw/fw/sw bug somewhere
16:05alyssaor a "i set it to locked while debugging iBoot and forgot to unset it and nobody noticed because it makes 0 difference to XNU"
16:05svenxnu has special code to deal with this behavior
16:06svenand the DT has special entries to tell XNU where the pagetables are
16:06alyssa16:02 <@marcan> sven: I bet it's locked because on some *other* platform, iPhone or whatever, this matters and the DCP firmware is locked
16:06svenyeah, that i can agree with. all i'm saying is that "robustness" doesn't make any sense to me
16:06alyssawe know apple shares code between watchOS and macOS and everything in between, that special code could have made sense in the past and not now
16:06alyssafair enough
16:06alyssa"robustness", in the way declaring things `const` in C is "robustness" ;-)
16:07alyssa(...Truly the DART lock is the moral equivalent of "const void *")
16:18yuyichao has joined #asahi
16:22kovmarcan, I can copy it to /Volumes/Linux and rerun step2.sh from there as well I guess?
16:23marcanyeah, that works, though you might need to diskutil umount / mount it since it'll probably be mounted readonly by the system
16:23yuyichao_ has quit [Ping timeout: 480 seconds]
16:23kovmarcan, got it
16:55yuyichao_ has joined #asahi
16:59yuyichao has quit [Ping timeout: 480 seconds]
17:25Nspace has joined #asahi
17:26handlerug has quit [Remote host closed the connection]
17:32handlerug has joined #asahi
17:34handlerug has quit [Remote host closed the connection]
17:34handlerug has joined #asahi
17:38handlerug has quit [Remote host closed the connection]
17:38handlerug has joined #asahi
17:39handlerug has quit [Remote host closed the connection]
17:39handlerug has joined #asahi
17:39handlerug has quit [Remote host closed the connection]
17:39handlerug has joined #asahi
17:41bps has quit [Ping timeout: 480 seconds]
17:44Raqbit4 has joined #asahi
17:47Raqbit has quit [Ping timeout: 480 seconds]
17:47Raqbit4 is now known as Raqbit
17:47kovmarcan, j_ey, sven so I installed the newly built (with clang on aarch64 linux) m1n1, and managed to chainload the macos cross-built with gcc m1n1
17:48kovhad to symlink all files to "remove" the -unknown part
17:50kovinterestingly the clang built m1n1 does not chainload, the air goes to the apple logo and the proxy client times out waiting
17:52marcankov: interesting, mind sending me the binary? wonder if we're running into some other silliness
17:53Nspace has quit [Quit: Nspace]
17:53marcanI'm going to sleep now though, will look tomorrow :)
17:54kovmarcan, sure, is email ok for that?
17:55marcanmarcan@marcan.st
17:55kovmarcan, k, good night o/
18:17thunfisch is now known as Guest3025
18:51Nspace has joined #asahi
18:52roxfan has quit [Remote host closed the connection]
18:59roxfan has joined #asahi
19:04rohin has joined #asahi
19:43Nspace has quit [Quit: Nspace]
19:50Nspace has joined #asahi
19:50yuyichao has joined #asahi
19:53gladiac is now known as Guest3035
19:53gladiac has joined #asahi
19:54yuyichao_ has quit [Ping timeout: 480 seconds]
19:59Guest3035 has quit [Ping timeout: 480 seconds]
20:01DavideCavalca[m] has joined #asahi
20:03DavideCavalca[m] is now known as dcavalca
20:04dcavalca has quit []
20:04dcavalca has joined #asahi
21:36marvin24_ has joined #asahi
21:40marvin24 has quit [Ping timeout: 480 seconds]
21:46rross101 has joined #asahi
21:49rross101Glanzmann: Your most recent instructions worked for me after a few days of slow progress. The mu-one kernel with patches got me usb keyboard or network access which I haven't had till now. I'm in the debian installer vs you copying a rootfs across - any cons to that? And not sure if I now can install onto a partition without overwriting m1n1? But mainly thanks for the help.
21:50kenjigashu has joined #asahi
21:53kenjigashu has quit []
21:53kenjigashu has joined #asahi
22:03kenjigashu has quit []
22:05kenjigashu has joined #asahi
22:08kenjigashu has quit []
22:09marvin24 has joined #asahi
22:09kenjigashu has joined #asahi
22:12marvin24_ has quit [Ping timeout: 480 seconds]
22:13yuyichao has quit [Ping timeout: 480 seconds]
22:17kenjigashu has quit [Remote host closed the connection]
22:18kenjigashu has joined #asahi
22:19alyssahmmmm do I work on DCP or something else
22:22marvin24_ has joined #asahi
22:23jnthis channel may provide slightly biased answers to this question :)
22:23alyssajn: I mean there are M1 things I could be doing
22:23alyssa(other kernel drivers, AGX userspace..)
22:25marvin24 has quit [Ping timeout: 480 seconds]
22:49jmr2 has joined #asahi
22:49alyssaGlanzmann: I have a patch "fixing" Xorg hotplug
22:52jmr2Glanzmann: success for me as well, on an MB Air. Thanks! I'm logged on the bookworm rootfs. My next step will be to get the wifi working.
22:52alyssajmr2: eh?
22:52alyssajmr2: Is this with the DCP branch?
22:53jmr2With your Oct 13 one.
22:54alyssaGood to know everything works on the macbooks as-is, the
22:54jmr2Anything specific you want me to check? At this time, I'm still on the text console (which is tiny at that resolution...)
22:55alyssapaste `dmesg` output? :)
22:55alyssaalso, # apt install weston, $ weston, open a terminal and move it around, there should be 0 tearing
22:55jmr2Sure. Will take a few minutes. I'll be back.
22:56jmr2No apt install, no networking yet.
22:56alyssaas for wi-fi, I mean, the minimal kernel side is in that branch
22:56alyssathough idk how much I recommend its use
22:56alyssaand you need to deal with firmware "fun"
22:56jmr2Yup. Just need to figure out the cpio part.
22:56alyssa(Read: Expect it to keep working since I'm testing it, but also don't expect me to help when it breaks 😉)
22:57Nspace has quit [Quit: Nspace]
22:59Nspace has joined #asahi
22:59jmr2Yeah. This channel could easily turn into a tech support one... Let me get your dmesg output.
22:59jmr2 has quit [Quit: Page closed]
23:03kenjigashu has quit []
23:08aleasto has quit [Quit: Konversation terminated!]
23:21jmr2 has joined #asahi
23:30* alyssaboots m1 to click that on the big screen :-p
23:33kenjigashu has joined #asahi
23:36alyssa[ 0.000000] Machine model: Apple Mac mini (M1, 2020)
23:36alyssa[ 2.861519] apple-dcp 231c00000.dcp: received unknown callback D406
23:36alyssaOoh, this is interesting
23:37alyssajmr2: so, no, the DCP driver is broken for you :(
23:37jnspooky ghost callbacks
23:37alyssaset_fx_prop
23:37jmr2Yeah, saw that. No one made a J313 DT yet, but the J274 works fine.
23:38jmr2Well, at least, it's good to know!
23:38nico_32[ 1.862102] usbserial: USB Serial support registered for motorola_tetra
23:39alyssa^ apply that patch, rebuild, reboot, resend dmesg please :)
23:39nico_32this .config have some strange driver builtin :)
23:39jmr2on my way :-)
23:42alyssaHmmm do I try to bang out a rfkill driver or keep getting DCP closer to mainline...
23:45nico_32dcp for the win!
23:45alyssaan rfkill driver would get us closer to wi-fi on mainline though :-p
23:47nico_32closer to the crazy world of nl80211
23:49jmr2FYI, there's also a similar "unknown callback D117" when halt'ing.
23:50alyssajmr2: "UnifiedPipeline2::is_dark_boot" uh.
23:50alyssajmr2: Try the same treatment...
23:51alyssa(well. `false`, not `nop`)
23:51nico_32looking for this var on google
23:51nico_32give you the iboot src leak
23:51nico_32so beware
23:55jmr2One thing at a time... Here's the dmesg with your NOP patch: http://paste.debian.net/plainh/033be2dd
23:55alyssanico_32: I don't touch leaked code.
23:55alyssaThis is from marcan's tracer in m1n1.
23:56alyssajmr2: [ 2.879308] apple-dcp 231c00000.dcp: RTKit: syslog message: UPTSQManager.cpp:105: IOMFB: switch to normal mode succeeded
23:56alyssathat's a great sign ^
23:57alyssathen we get stuck on D582
23:57alyssaproxyclient/hv/trace_dcp.py: "D582": "bool IOMobileFramebufferAP::create_default_fb_surface(unsigned int, unsigned int)",
23:57alyssaI guess give 582 the same treatment with dcpep_cb_true?
…