#
…

2021-08-03

01:03chadmedmarcan: late to the party but yeah DCP is probably more important at this stage than an install script. imo the kind of people who would want to play around with the WIP stuff (i.e. people who dont mind that they cant boot a live usb and look at plasma desktop just yet) dont mind the extra work required to set it up at this stage, so getting everything working is a better use of time than making what is done more
01:03chadmedaccessible
01:06amwI can't link the Linux code names with the relevant ARM64 Exception terms - e.g. e1h_64_error -> is that Hypervisor exception, PL1 ?
01:07amwLinux code has an esr register - what should I look at in the ARM manual to decode that?
01:08amwPSTATE is clear enough - but is that exception because it accessed a bad address, illegal (PAN active?) address and if so what address?
01:24chadmedEL2 is the hypervisor exception level
01:25chadmedby the looks of it its the mbox driver thats causing a bad interrupt
01:31amwGreat - is there a way to point to how I can learn how to decode this - the disconnect of the linux info from the ARM manuals is very frustrating
01:31quarkyalice has quit [Ping timeout: 480 seconds]
01:32quarkyalice has joined #asahi
01:38chadmedlooking at the stack dump it seems like apple_mbox_hw_can_send is what is offending the system. serrors are caused by illegal memory access so if the error is infinitely reproducible the easiest way would be to just trace the stack while you let it happen and see what the mbox driver is trying to do. kdebug maybe?
01:40chadmedsince serrors are asynchorous theres no easy way to tell exactly when it occurs either
02:24amwchadmed: Thanks - my ARM64 manual doesn't have the term SERROR in it at all - but google found another ARM document on Exception types that says it is an System Error -> memory system
02:25amwIt's very reproducible so that's my way in - at least now thanks to you I have some idea of what it is complaining about
02:25phiologe has joined #asahi
02:28PhilippvK has quit [Ping timeout: 480 seconds]
02:36chadmedno problems mate. id love to be able to help out with debug work but we're locked down right now and i dont have access to hardware
02:36chadmedenvy of the world to laughingstock in under a year :)
02:43alyssachadmed: AU?
02:54chadmedyeah, queensland. we had life basically back to normal for most of 2020 and into this year too, but because the federal government (here responsible for procuring and administering vaccines) did not procure or administer vaccines because its full of anti vaxxers we are currently at 16% vax rate and having Delta outbreaks everywhere
03:08marcanamw: I think SPI is another smasung derivative, needs some digging to see if we already have a driver for similar enough hardware
03:08marcan(as we did for serial, and i2c)
03:09marcanamw: re SError, unfortunately there's no useful info there. Usually SError is a fabric error on M1, and to decode that you need a dump of some proprietary registers
03:09marcanI should add a patch for that to a branch somewhere, probably won't ever get merged but we should be running it for debugging
03:10marcanthe proprietary registers tell you exactly what address and access type caused the SError
03:14amwmarcan: So I'm ok to patch another (Samsung based?) spi driver et cetera based on my readings of corellium code
03:14amwPerhaps similarly with the SError register info
03:21marvin24_ has joined #asahi
03:21marcanamw: the question is whether such driver exists and how close it is to this hardware
03:22marcancorellium wrote their own uart driver which was dumb, as linux already had a samsung uart driver we could adapt
03:22marcanso I suspect the same might be true for SPI but I haven't looked at it yet
03:23marcanthey also did that for i2c which again was silly, we know there's a driver that is nearly identical already :p
03:23marcanthe SError stuff is another story, that's core arch code and I don't know if there is any precedent for having SoC-specific syndrome register dumps in there
03:25marvin24 has quit [Ping timeout: 480 seconds]
03:25marcanthe reason why I usually avoid reading corellium code is not because I hate them, it's because it's often wrong and would lead to red herrings or point toward the wrong approach
03:28marcanI would treat it as license-incompatible out of an abundance of caution, but reading it is not banned or anything
03:28marcanI'm more worried about it leading people down wrong paths than about the licensing question
04:01quarkyalice has quit [Remote host closed the connection]
04:02quarkyalice has joined #asahi
04:03roxfan has quit [Read error: Connection reset by peer]
04:04roxfan has joined #asahi
04:11marcanoh and if you meant reading corellium code for the SError stuff: I don't know if they have that at all, but it's in m1n1's exception handler, so use that as a reference (the L2C_* registers)
04:11marcanthe field descriptions are on the docs wiki (as far as I figured out)
04:12marcanI don't think they cared about SErrors, seeing as they actually disabled them, presumably to work around driver bugs ;)
04:13marcanok, I'm going to do a cleanup pass on the DCP commits then spend a day or two looking into an install script. worth giving it that much time.
04:15boardwalk has joined #asahi
04:23amwI think I might try and get this error under the hypervisor as it might be a much better way to debug exceptions
04:29marcanthe hypervisor does not forward SErrors, so yes, you'll get the m1n1 dump in that case with the L2C registers
04:30marcanactually, it'll throw you into the python handler, let me check if the L2C regs are dumped there
04:31marcanbut if they aren't, you're in a shell so you can just mrs() them anyway
04:31marcanah yeah, not in the handler
04:31marcanbut easy enough to get as I said
04:33marcanjust mrs(L2C_ERR_STS_EL1) and L2C_ERR_ADR_EL1 and L2C_ERR_INF_EL1
04:34amwok - will have a go and report back. I think I need to disable the first USB port in the device tree so m1n1 can use it
04:36marcanand run with 1 cpu only of course
04:37amwNo special kernel cmdline for 1 cpu? Just a edited ds
04:39marcansmp=off should work
04:40marcanbut you need to run m1n1 under the hv first to be able to boot linux; you should be able to use the second USB port to talk to the inner m1n1 and launch linux that way
04:40marcanalternatively, concatenate m1n1 and linux using payload mode and load it directly under the hv
04:41marcanyeah with the cat
04:41marcanthat's payload mode
04:43amwIs there a better way? I am getting a bit confused of how that would all hold together...
04:44marcanthat works fine
04:45marcanbasically the instructions are fine :)
04:55x56 is now known as Guest3123
04:55x56 has joined #asahi
04:56Guest3123 has quit [Ping timeout: 480 seconds]
05:58svenpeter[m]That serror is because a clock is not enabled
05:59svenpeter[m]Do you the nvme branch? You’ll have to manually enable the clocks for the ANS node then before booting
06:01amwsvenpeter[m]: I have both the nvme branch and the dart combined (but it is the nvme that introduces the problem...)
06:03amwDo I call pmgr_clock_enable() in a m1n1 script before loading?
06:03svenpeter[m]Try that pmgr adt enable calls with /arm-io/ans or so
06:06amwproxyclient/experiments/i2c.py has "...run pmgr_adt_clocks_enable for /arm-io/i2c0 before this script."
06:06svenand that makes no sense
06:06sventhis isn't about i2c, this is about ans
06:07amwI assume something similar but for "ans" - don't understand the syntax so will require some reading...
06:07svenyeah, pretty much
06:21jbowen has quit [Remote host closed the connection]
06:22jbowen has joined #asahi
06:32marcanalyssa: btw, here are some of the surface pixel formats:
06:41bps has joined #asahi
06:45pipcet[m]amw: pmgr_adt_clocks_enable("/arm-io/ans") ?
06:51amwpipcet[m]: Thanks - my MBP is down doing an update/charging (run it out of battery under m1n1 I think)
06:52amw*Sorry that was MBA - I think it might have been running m1n1 when I closed the lid till the battery went flat - it wouldn't start up till I plugged in a power cable to a good USB charger
07:06marcanyeah, it might not charge properly under m1n1
07:10pipcet[m]do we know it's charging properly under linux? :-)
07:11pipcet[m](the SMC stuff to query battery status and all that stuff isn't hard, but I'm waiting for the ASC mailbox stuff to work properly)
07:17VinDuv_ is now known as VinDuv
07:27bps has quit [Ping timeout: 480 seconds]
07:33svenat this point i think the mailbox driver should probably really only implement the "dumb" mailbox interface. that's at least what all other drivers in there also do
07:33svenstill not sure where the other rtkit stuff (syslog, etc.) should go
07:33pipcet[m]how "dumb", though? single-channel mailbox or one channel for each endpoint?
07:34svenone channel for each endpoint
07:34svencan be used for all rtkit stuff and also for the SEP then
07:49amwI'm getting a ImportError on "python3.9 ./proxyclient/m1n1/adt.py --retrieve dt.bin" - attempted relative import with no known parent package
07:50amwRemoving the '.' from .utils just pushes the problem further down to "from .setup import *"
07:51amwand further removing that leads to other ones in ./proxyclient/m1n1/setup.py ...?
07:51pipcet[m]proxyclient$ M1N1DEVICE=/dev/ttyACM0 python3.9 -m m1n1.adt --retrieve dt.bin
07:51pipcet[m]is what I use.
07:52amwModuleNotFoundError: No module named 'm1n1'?
07:52pipcet[m]in the proxyclient dir?
07:52amwYep - need to be in proxyclient dir - now works - thanks
07:53marcanalyssa: pushed some more wtf to that branch
07:53marcanhopefully that makes more sense now :)
07:53rkjnsn[m]For the installer, would it be at all reasonable to build a self-contained binary using, e.g., Rust, rather than the install script needing to download a full Python interpreter?
07:53marcanI'll clean up the commits and push to main later
07:53sven"push some more wtf" "hope that makes more sense now" :D
07:53marcanrkjnsn[m]: what's the difference?
07:55marcana stripped down python isn't that large, you can throw away most of the modules
07:55marcaninstallation is going to involve a 1GB recovery image, so 50MB or whatever for python is rounding error
07:56rkjnsn[m]Smaller download, conceptually simpler (to my brain, at least) would be the advantages that would push me that way. Not relevant, since I probably won't be hacking on it, but I also find compiled languages to be more productive for me personally since the kinds of mistakes I tend to make most are the ones compilers are good at catching before even running the code.
07:59bps has joined #asahi
07:59rkjnsn[m]Not having to maintain the stripped-down Python package, I guess. Since the project already has a lot of Python code, though, I will readily admit that's a good point for using it rather than introducing a new language.
08:04j_eyamw: it's "el1h_64_error", EL1H is in the armarm
08:07svenit's definitely the missing clock gate :-)
08:07svenwe still need to figure out those clock bindings :/
08:09amwI think my changes to proxyclient/m1n1/shell.py have broken proxyclient/tools/shell.py :-( sorry
08:10svenyou can also add the call to main.c
08:26amwsven: Yep - this fixes my boot up with the nvme tree: pmgr_adt_clocks_enable("/arm-io/ans")
08:26amwUnder shell.py - I had to fix the broken help code though - just did a try to catch the exception when no Signature found
08:47chadmedrkjnsn: there are ways to package/bundle the python interpreter and whatever modules you need with your script and have it run in a self-contained way. as marcan said, the size added by doing this is insignificant
08:48chadmednow if it were _just_ the script required as a self-contained program without such a huge external dependency then i think most would agree that writing a proper program would be beneficial. but as it stands, its more work for questionable benefit
08:48amwmarcan: Just made PR for the fix to shell.py
10:34amwsven: nvme + dart + ans clocks can see nvme drive - now how would I re-partition it for Linux? - https://raw.githubusercontent.com/amworsley/asahi-wiki/main/images/nvme-boot.jpg
10:36sveni strongly recommend against doing that for now fwiw. the mailbox driver is still quite a hack and the co-processor is not shut down cleanly. now if you're still brave enough to continue: if you follow that general setup guide you should have two FAT partitions there
10:36svenjust format one of them with ext4 or whatever system you prefer
10:37svenprobably p5 in your case
10:37j_eywhy is it FAT?
10:38svenbecause i think that's the closest thing you can select in disk util :d
10:38svendoesn't matter either way
11:00_alice has quit [Quit: Bridge terminating on SIGTERM]
11:00go4godvin has quit [Quit: Bridge terminating on SIGTERM]
11:00perigoso[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00maxim[m] has quit []
11:00davay[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00angustrau[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00jammie[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00bfredl[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00brentr123[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00noc0lour[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00PthariensFlame[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00sephamorr[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00stttcccccccccccc[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00sandornagy[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00spot[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00svenpeter[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00Dementor[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00The_DarkFire_[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00YichaoYu[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00ted[m]1 has quit [Quit: Bridge terminating on SIGTERM]
11:00Izumoo[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00ganpa[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00mulderje has quit [Quit: Bridge terminating on SIGTERM]
11:00ovf[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00vivithecanine[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00fluffypup[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00AndrewLee[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00andi-[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00Bastian[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00AkihikoOdaki[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00booffo[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00AlessandroFerrari[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00TypoKign[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00AONeiLL[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00alexanderwillner[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00cepheus has quit [Quit: Bridge terminating on SIGTERM]
11:00jevinskie[m] has quit []
11:00ll3macorn[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00MingcongBai[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00marcan[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00PeterHilgenfeld[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00nemanjan00[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00MagMell[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00facez[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00Spectrejan[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00SocioProphet[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00rob-3[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00quentincestino[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00uur[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00dpatterbee[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00julianp[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00alicela1n has quit [Quit: Bridge terminating on SIGTERM]
11:00i509vcb[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00fedx[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00ella-0[m] has quit []
11:00Aaron[m]1 has quit [Quit: Bridge terminating on SIGTERM]
11:00Serentty[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00alessandrorzz[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00davidrysk[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00bastilian[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00DanielHuisman[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00NikolaCicmil[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00blazra[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00izzyisles[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00Ferluci[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00PixelyIon[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00anfernee[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00rkjnsn[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00s-urabe[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00pitust[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00xerpi[m] has quit []
11:00Emantor[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00samfromspace[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00M32thSystem[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00bngs[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00RowanGoemans[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00c1truz[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00pipcet[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00rowang077[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00user1tt[m] has quit []
11:00TellowKrinkle[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00PieroDel[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00CristianMgheruan-Stanciu[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00mmlb[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00ruach[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00ryanhrob[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00haterade[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00mofux[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00Scott[m]1 has quit [Quit: Bridge terminating on SIGTERM]
11:00foxlet has quit [Quit: Bridge terminating on SIGTERM]
11:00ilovetrains[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00hablerentand[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00cavoirom[m] has quit [Quit: Bridge terminating on SIGTERM]
11:00LeviLynch[m] has quit [Quit: Bridge terminating on SIGTERM]
11:13M32thSystem[m] has joined #asahi
11:49amwsven: Thanks - I might just focus on the keyboard/spi for the moment - but fun to get this far...
11:58deed02392 has joined #asahi
12:06marcanamw: thanks, didn't catch that during the review
12:07marcanthe installer will bundle a bunch of stuff anyway, we need stuff like img4tool and possibly some userspace filesystem stuff depending on how fancy we want to get with the linux install side
12:07marcanso it'll be python driving the UI and download and file operations, plus some helper tools for specific things that already exist
12:19svenkettenis: thanks for updating the device tree dart nodes in u-boot btw. that made booting with pci support much less painful :-)
12:27j_eysven: force_bypass and supports_bypass, this would be true and false for PCIe?
12:28svenon 4k kernels, yes :(
12:28svenbut i'll fix the dma-iommu api in a follow up
12:28j_eyfor example 'def_domain_type' checks force_bypass but not supports_bypass
12:29svenso what will happen is that the iommu dev attach for a pcie device will fail
12:29j_eywhere will it fail?
12:29svenapple_dart_attach_dev
12:30j_eyOh, I see it now
12:32j_eysven: so for 16k kernels, this dart code works fine for pcie?
12:34deed02392what does DCP stand for?
12:35j_eydisplay controller processor, or something like that
12:36j_eydeed02392: iBoot sets up a framebuffer, but without the DCP resolution can't be changed, brightness, colour grading(I think), stuff like that
12:39deed02392ahh, nice thanks for the info j_ey
12:40deed02392i was watching how it seemed to be responsible for drawing the tiles and cursor etc. on the screen as well, from the framebuffer. this was being re'd in the latest DCP youtube video i watched
13:22phiremarcan: you know how you said the actual dcp hardware only supports 3 surfaces? what happens when you set all four?
13:23phireIs there some kind of multiplexing in the DCP firmware?
13:25amwFinally got the nvme/USB running under the HV - needed to compile in the kernel parameters into the kernel image - updated https://github.com/AsahiLinux/docs/wiki/SW:Linux#nvme--usb
13:26j_eythere's no way to pass kernel commandline with the hv?
13:27pipcet[m] has joined #asahi
13:27amwj_ey: The boot_args are for the HV. I tried it didn't go through to Linux
13:27pipcet[m]there is, but the kernel takes its command line from one of three locations (built-in, device tree, passed by boot loader) and it's a bit hard to make sure it's using the right one
13:29j_eyyeah, you could try it with bootargs in the chosen node in the dtb
13:29amwj_ey: I tried that and it didn't work for me
13:30pipcet[m]amw: is it possible your .config has CONFIG_CMDLINE_FORCE set?
13:32alyssamarcan: I like more wtf
13:34amwpipcet[m]: That's not set but CONFIG_CMDLINE_FROM_BOOTLOADER=y is set
13:37yuyichao has quit [Ping timeout: 480 seconds]
13:40alyssamarcan: Do we understand what happens when src_rect != dst_rect for swap info?
13:40alyssadoes it do the expected blit? (including rescaling up or down as needed?)
13:41pipcet[m]amw: I was confused, sorry.
13:46alyssaj_ey: for a second i thought this would be a meme, then i realized it'd be a marcan work stream, now i'm still worried it'll be a rickroll
13:46j_eyrisk it1
13:51Caedus[m] has joined #asahi
13:51Aaron[m]1 has joined #asahi
13:51ah-[m] has joined #asahi
13:51alessandrorzz[m] has joined #asahi
13:51alexanderwillner[m] has joined #asahi
13:51_alice has joined #asahi
13:51Amey has joined #asahi
13:51alicela1n has joined #asahi
13:51andi-[m] has joined #asahi
13:51AONeiLL[m] has joined #asahi
13:51anfernee[m] has joined #asahi
13:51angustrau[m] has joined #asahi
13:51AkihikoOdaki[m] has joined #asahi
13:51avx3[m] has joined #asahi
13:51davay[m] has joined #asahi
13:51Bastian[m] has joined #asahi
13:51bastilian[m] has joined #asahi
13:51bfredl[m] has joined #asahi
13:51blazra[m] has joined #asahi
13:51bngs[m] has joined #asahi
13:51booffo[m] has joined #asahi
13:51brentr123[m] has joined #asahi
13:51c1truz[m] has joined #asahi
13:51AndrewLee[m] has joined #asahi
13:51cavoirom[m] has joined #asahi
13:51cepheus has joined #asahi
13:51NikolaCicmil[m] has joined #asahi
13:51CristianMgheruan-Stanciu[m] has joined #asahi
13:52DanielHuisman[m] has joined #asahi
13:52davidrysk[m] has joined #asahi
13:52TypoKign[m] has joined #asahi
13:52dpatterbee[m] has joined #asahi
13:52ella-0[m] has joined #asahi
13:52Emantor[m] has joined #asahi
13:52emilazy has joined #asahi
13:52facez[m] has joined #asahi
13:52fedx[m] has joined #asahi
13:52LeviLynch[m] has joined #asahi
13:52Ferluci[m] has joined #asahi
13:52AlessandroFerrari[m] has joined #asahi
13:52fluffypup[m] has joined #asahi
13:52foxlet has joined #asahi
13:52fridtjof[m] has joined #asahi
13:52ganpa[m] has joined #asahi
13:52go4godvin has joined #asahi
13:52h_ro[m] has joined #asahi
13:52hablerentand[m] has joined #asahi
13:52happy-dude[m] has joined #asahi
13:52haterade[m] has joined #asahi
13:52i509vcb[m] has joined #asahi
13:52ilovetrains[m] has joined #asahi
13:52Izumoo[m] has joined #asahi
13:52izzyisles[m] has joined #asahi
13:52jammie[m] has joined #asahi
13:52jevinskie[m] has joined #asahi
13:52jryans has joined #asahi
13:52julianp[m] has joined #asahi
13:52mofux[m] has joined #asahi
13:52ll3macorn[m] has joined #asahi
13:52marcan[m] has joined #asahi
13:52maxim[m] has joined #asahi
13:52MingcongBai[m] has joined #asahi
13:52mmlb[m] has joined #asahi
13:52mulderje has joined #asahi
13:52nemanjan00[m] has joined #asahi
13:52noc0lour[m] has joined #asahi
13:52ovf[m] has joined #asahi
13:52perigoso[m] has joined #asahi
13:52PeterHilgenfeld[m] has joined #asahi
13:52pitust[m] has joined #asahi
13:52PixelyIon[m] has joined #asahi
13:52psydroid[m] has joined #asahi
13:52PthariensFlame[m] has joined #asahi
13:52quentincestino[m] has joined #asahi
13:52rkjnsn[m] has joined #asahi
13:52rob-3[m] has joined #asahi
13:52RowanGoemans[m] has joined #asahi
13:52rowang077[m] has joined #asahi
13:52ruach[m] has joined #asahi
13:52ryanhrob[m] has joined #asahi
13:52s-urabe[m] has joined #asahi
13:52MagMell[m] has joined #asahi
13:52samfromspace[m] has joined #asahi
13:52sandornagy[m] has joined #asahi
13:52Scott[m] has joined #asahi
13:52sephamorr[m] has joined #asahi
13:52Serentty[m] has joined #asahi
13:52SocioProphet[m] has joined #asahi
13:53Spectrejan[m] has joined #asahi
13:53spot[m] has joined #asahi
13:53stttcccccccccccc[m] has joined #asahi
13:53svenpeter has joined #asahi
13:53ted[m]1 has joined #asahi
13:53TellowKrinkle[m] has joined #asahi
13:53Dementor[m] has joined #asahi
13:53The_DarkFire_[m] has joined #asahi
13:53user1tt[m] has joined #asahi
13:53uur[m] has joined #asahi
13:53vivithecanine[m] has joined #asahi
13:53xerpi[m] has joined #asahi
13:53YichaoYu[m] has joined #asahi
13:53PieroDel[m] has joined #asahi
13:53svenpeter is now known as Guest3181
13:57alyssaj_ey: aweome, thanks
14:29marcanphire: old firmware only supported 3, I assume this is for newer hardware and it'll probably fail, but I haven't tried
14:29marcanalyssa: scaling
14:30marcanthat was all tested in the stream where I first got it to work
14:30marcanif the out rect overflows the screen area it breaks badly :D
14:36alyssamarcan: that's annoying, means you can't crop if a window goes partially offscreen or something?
14:43marcanalyssa: you just set the source rect smaller
14:43marcanalso fb compression works
14:44marcanI think the iova offset thing I saw was a red herring caused by the compression reading data starting halfway into the buffer
14:44marcanit all works as intended
14:54marcaner, pushed now
14:56deed02392 has quit [Remote host closed the connection]
14:57marcansome of the compression info params are obviously the same stuff from the plane info
14:57alyssaon linux, libliftoff is the closest we have to that sort of display plane / GPU management
14:58marcanIIRC android can do this
14:58marcan"receives shared-memory buffers via wl_shm and DMA-BUFs via wp_linux_dmabuf"
14:58j_eymarcan: what's &b38?
14:58marcantfw those are the same thing on these systems
14:58marcanj_ey: good question.
14:58j_eyformat = '&b38'
14:59marcanit's not in the list of formats from stringsing the firmware
14:59marcanso I suspect some shenanigans
14:59alyssaanyway uhhhh
14:59alyssaback to mali compiler development
15:10marcanj_ey: okay yeah there is a complicated mapping between those values and the table I found
15:23marcanj_ey: apparently that one maps to 'b3a8'
15:24j_eyand that's a lookup in some table or?
15:25alyssabut... why
15:26marcanand this is from the surface def to the internal stuff... so where does the surface def come from?
15:28marcanI guess ultimately AGX probably
15:30alyssamarcan: "AGX compression" is definitely a thing
15:30alyssaand iirc referenced by DCP fw
15:31marcanyes, this is obviously that
15:31marcanbut what I don't know is where that constant comes from
15:31marcandoesn't help that ARM64 does not align 16-bit constant fields, so I can't just grep binaries for this
15:31marcanwould be nice to have a list of valid pixel formats somewher
15:31marcan*somewhere
15:31marcanright now I have an internal list from the DCP side that doesn't mean anything
15:31marcanand some formats that are known from headers
15:32marcananyway, there's a lot of supported formats; the table has 77 entries
15:33j_eyI wonder how many are actually used?
15:36marcanwonder if I can just brute force this
15:48Andalu30 has joined #asahi
15:48alyssatbh it doesn't -really- matter as long as the useful formats are known
15:48alyssaRGBA, BGRA, NV12, call it a day.
15:52marcanI love how I can just run through all possible 32-bit format codes in a couple minutes :p
15:52alyssamarcan: or, er, that :p
15:59marcanj_ey: okay so 'b3a8' also works
15:59marcanI don't know why this weird aliasing exists
16:01j_eyNo idea either!
16:01marcanall supported pixel formats with their names/aliases
16:01marcanthe numbers are the data in the table, probably DCP register configs or similar
16:02marcanmight be useful to figure out what some of these are
16:02marcanlast one is obviously the component swap
16:02j_ey'===1' weird
16:06tomtastic_ has joined #asahi
16:07tomtastic has quit [Ping timeout: 480 seconds]
16:09marcanwell that answers a lot of them
16:10j_eylooks like greg got a super early m1 :P
16:12dougallhacky script i use for finding immediate magic numbers in kernelcaches: https://gist.github.com/dougallj/bfbffffe8af7a08e322633d7d7f19af7
16:12marcanoh neat :)
16:15alyssaj_ey: m-1
16:53mps has joined #asahi
17:02mpsif I decide to install linux on M1 macbook pro what will not work of the hardware? according to https://github.com/AsahiLinux/docs/wiki/Tasks not much drivers works
17:04mpsthis page is dated 'May 29, 2021' so maybe in meantime more drivers works
17:09j_eymps: nothing more in upstream
17:10mpsj_ey: thanks for info
17:11mpsso not yet read as 'daily driver' computer, except maybe using linux in qemu
17:11j_eymps: there's branches that have some nvme support, and pipcet[m] has more stuff working based on corelliums code
17:11mpss/read/ready/
17:13mpsj_ey: thanks, will wait some time before decide it is good idea to buy one
17:14mpsthough I tested it with corellium kernel and alpine linux few months ago
17:15mpsbut it works only from usb disk
17:20marcanmps: I wouldn't recommend anything as a daily driver until we get the GPU working, but maybe that's just me
17:21mpsmarcan: first thank you for your awesome work
17:21marcanwe aren't really prioritizing getting stuff working so much as getting stuff working *right*, so e.g. there is no keyboard support yet, not because it's hard but because we've been busy with more interesting drivers :)
17:21alyssamps: If you're a linux hat, the M1 isn't a computer, it's an expensive toy for reverse-engineering addicts like marcan and me
17:21mpsmarcan: maybe gpu is not much important to my use case, I use chromebooks without gpu driver and that is quite fine for me
17:22marcandepends on what you do I guess, e.g. playing video without GPU is, at best, questionable (tearing...)
17:22mpsalyssa: well, I understand this I think
17:23marcanbut either way I'm going to work on the installation tools a bit this week, which will at least make it less annoying to set up for development
17:23alyssamarcan: that video players need GPU is more of a "linux video players suck" issue and not anything more fundamental
17:23marcanalyssa: good luck playing video without tearing on the iBoot framebuffer
17:23alyssamarcan: that's DCP, though
17:23mpsmarcan: I use old mt8173 (acer R13) chromebook (linux installed first day) for about 5 years without gpu driver and I'm quite satisfied
17:24j_eymarcan: on stream or nah?
17:24marcanj_ey: probably on stream tomorrow
17:24alyssafor video playback, GPU is really only used for colour space conversion and scaling
17:24alyssaboth of which suck on the CPU
17:24marcanalso something DCP can do
17:24alyssabut ... both of which can be done by the display controller
17:24marcananyway when I said GPU I really wanted to say "not the iBoot framebuffer"
17:24alyssabut in practice none of the linux video players get this right
17:24marcan(which is the current state of affairs)
17:25alyssamarcan: fwiw, since i'm still learning kernel and KMS on top of DCP, i'm planning to start with a dummy driver using the corellium regs and the iboot framebuffer
17:25mpsalyssa: sorry for curiosity but are you panfrost driver author
17:25marcanalyssa: lol
17:26alyssamarcan: At minimum, getting no tearing would be an improvement on the current state of affairs. And that's just disp0-dart and twiddle one register back and forth :p
17:26alyssamps: yes
17:26marcanalyssa: yes but rather useless in the grand scheme of things since we need to use DCP :p
17:26alyssamps: and that's a good reminder i should get off IRC and get back to panfrost :p
17:26alyssamarcan: meh, that still implies all the KMS driver skeleton and figuring out how to DART
17:27alyssaonce that works i can start wiring in DCP stuff
17:27mpsalyssa: ah, very good work, it works fine on my rk3399 samsung chromebook
17:27marcanDART is just the iommu API, right?
17:27alyssai think so
17:27marcanthough the current DART driver won't work for disp0
17:27marcandue to the lock
17:27marcanoh sorry
17:27marcannot sure about disp0
17:27marcandefinitely not dcp
17:27alyssa(and there next milestone would be running the python dcp client on boot, then booting linux and issueing set_matrix() from linux side)
17:28j_eyyeah sven mentioned the dcp locked dart a few days ago
17:28brentr123[m]I can create a portable python .zip if necessary
17:28Andalu30 has quit [Quit: Konversation terminated!]
17:28marcanalyssa: ah yeah, disp is not locked
17:29marcanhowever, I expect the driver will probably tear down the iBoot mappings on init... so that should probably be fixed
17:30marcanalyssa: that would be one heck of a hack and not very useful IMO. the problem is you need to carry over state and the linux ASC driver isn't designed to get instantiated on an already initialized device.
17:31Andalu30 has joined #asahi
17:31alyssagrumble. ok.
17:31alyssafair enough
17:31alyssathis sounds like an excellent reason for me to close irc and work on mali.
17:32marcanand for me to put my bedsheets back on and go to sleep
17:33mpsmarcan: alyssa: j_ey: thank you all for fast answer to my question
17:33marcanalyssa: you can probably just call printRegs or other dummy stuff without doing the actual high level init sequence on DCP though
17:33j_eyhm there's a "IOMMU_DOMAIN_UNMANAGED"
17:33marcanand the stuff below that is trivial, just setting up the shmem buffer, which you need to do anyway
17:34j_eythat sounds like it might be useful with a 'locked' dart?
17:34marcanand once that works you can move on to working through the init sequence, which you can do incrementally (the very first thing it's going to require you to do is support callbacks)
17:55svenalyssa: disp0 dart isn't locked, only dcp dart
17:55svenso disp0 dart should just work if you can do anything useful with that
17:55svenbut i think it only maps the framebuffer
17:56svenj_ey: no
17:56svenj_ey: unmanaged domain just means "translation enabled, but not managed by the iommu-dma layer"
17:58svenfor the locked we'll need to somehow hack the io-pgtable code to not allocate the first level pagetable but just take some pointer instead
17:58svenbut first the current driver needs to be accepted anyway :)
17:58j_eywhat does 'locked' mean exactly? the ttbr regs are RO?
17:59svenmost registers are ro, yes
17:59svenyou can still flush the tlb but not much more
17:59marcanso you need to continue to use the L1 pagetable from iBoot
17:59svenand ack errors
17:59marcanbut that pagetable is writable
17:59svenpretty much. and force a DMA domain. but that's all easily possible
17:59marcanso it just means the kernel needs to adopt that PT as is
17:59marcanthe main thing though is that we also need to support seamlessly adopting all mappings
17:59marcaneven for non-locked DARTs like disp0
18:00svenyeah, that's gonna be more tricky
18:00marcanI was thinking we could walk the page table, re-adding those mappings to the kernel's view
18:00svenor, well, doing that in a sane way is going to be tricky
18:00marcanand then, if !locked, just swap the TTBRs
18:00marcanif locked, copy instead
18:01marcanas long as the copy is word-wise, I think it should be atomic and not bork
18:01svenpretty sure it'll work
18:01marcanand then once that's done you swap out the kernel's idea of what the real L1 is and you're done
18:02svenand then the dcp or whatever drivers need to be made away of the right memory locations as well i guess
18:09pipcet[m]mps: I do have stuff working with Corellium's drivers but really the work marcan and sven and alyssa are doing is just amazing, and you should help them in any way you can :-)
18:12mpspipcet[m]: thanks for info. I don't have M1 and only tested corellium few times on my son machine and had a hope that we will not wait too long for 'working' solution
18:13mpspipcet[m]: these days I contemplated about buying yet another one, but above answers 'explained' to me that is not worth waste of money
18:14mpsthough display is very good and that was main reason I wanted to buy it (I'm about 13-16 hours behind screen daily)
18:14svenalyssa> mps: If you're a linux hat, the M1 isn't a computer, it's an expensive toy for reverse-engineering addicts like marcan and me <-- that's... very very accurate.
18:15mpssven: yes, now I understand
18:15marcanmps: it'll be really good when it's done, but it's not done yet ;)
18:15pipcet[m]yeah, I'm beginning to wish I had gotten two of them so I could use one and hack on the other (also it would have been really handy that time I ended up putting my machine into I-need-DFU mode)
18:16marcanpipcet[m]: you can DFU from linux
18:16sveni really enjoy my macbook air + mini setup :-)
18:16marcansame (+pro but tbh I don't really use it much)
18:16sventhe only thing that's annoying is that compiling the kernel on mac os is not much fun
18:16j_ey+imac?
18:16mpsyes, my son uses it daily but with alpine linux in qemu, really fast even in qemu
18:16marcanactually the imac is still in the box because I've been procrastinating figuring out where to mount it
18:17j_eyeven less used than the pro! :P
18:19pipcet[m]marcan: oh, apple never told me that behind the URL they gave me ;-)
18:19mpsmarcan: I have no doubt that it will be done :)
18:20marcanpipcet[m]:
18:20marcanhaven't tried it yet, but M1 support got merged
18:28pipcet[m]oooh, thanks!
18:30Andalu30 has quit [Quit: Konversation terminated!]
18:41EmantorI have started to put together all necessary parts to boot m1 linux into a Yocto BSP (m1n1, u-boot, merged kernel branches). Next up I'll add an initramfs and than it should be good to go.
18:53Guest3181Hopefully all those merged branches will soon just be torvalds/linux.git ;)
19:35hexchain_ has joined #asahi
19:37BlitzWorks has quit [Ping timeout: 480 seconds]
19:40hexchain has quit [Ping timeout: 480 seconds]
20:31linearcannon has quit [Remote host closed the connection]
20:53j_eyIs this still right? "You need at least 70GB for the stub partition, because the macOS install/update process is very inefficient. " I feel like someone said it might be even bigger now
20:54brentr123[m]does macos automatically reserve storage space for updates/
20:54brentr123[m] * does macos automatically reserve storage space for updates?
21:04mps has left #asahi [#asahi]
21:09j_eyamw: do you get earlycon serial over USB?
21:30Guest3181 is now known as svenpeter[m]
21:30MTecknologyThis was a lot more interesting than I was expecting (homemade apple 1) https://www.youtube.com/watch?v=36NgkpctW6k
21:48deed02392 has joined #asahi
21:48deed02392 has quit []
22:53amwj_ey: I think so - See https://paste.debian.net/1206483/ - that output was from linux.py over the serial I believe
22:53amwI'm not in a position to try again for another 12 hours or so
22:53j_eyhm wonder what's with all the spaces
22:54j_eyno worries, just thinking about finally re-partitioning my m1 :P
22:54amwThere is a bug in the system some where with the extra spaces (in the python/m1n1) I believe
22:55amwj_ey: Talk to sven, it's too unstable for me to risk it for me
22:56amwPlenty of fun to be had with other things
23:00j_eyamw: dont you need to repartition it to install m1n1 at all?
23:23amwj_ey: As per quick start you just re-partition it under the MacOS filesystem APFS
23:23j_eyamw: yeah, that's what I meant. I haven't done any of that with my m1 yet!
23:25amwYou might be right about the partitioning - I'll have to check exactly what I did as it was a while ago and didn't touch it since then
23:46cth451_desktop has quit [Remote host closed the connection]
23:55quarkyalice has quit [Remote host closed the connection]
…