<marcan>
last I checked it's a perfect match except that apple invented some funny escaping mechanism to store binary values
<marcan>
amarioguy: why are you enabling syscall hooking? that will indeed log every single page fault in the guest (and also probably break things after a while)
<marcan>
I only used that way, way early on to debug really early XNU startup issues
<marcan>
don't use -e unless you're trying to do that
<marcan>
you asked it to log every guest exception so it's doing just that ;)
<marcan>
but that aside, also turn off clpc because it spams due to time warping (boot with clpc=0)
<marcan>
going back to nvram: FWIW, nvram userspace tooling should be written in C (or Rust if you want to be adventurous); we don't want to rely on Python for this because that's the kind of thing we/someone might want to use from an initramfs for something, so it has to be a small self-contained tool
<sven>
the tricky part is in dma-iommu and I don’t think that change much
<ChaosPrincess>
marcan: what i did figur out is the funny escaping business, the fact that there are two sections that `nvram` tool does not expose, the apple checksum (its adler32) and some other things :P
MajorBiscuit has quit [Quit: WeeChat 3.5]
WanliLi[m] has joined #asahi-dev
<ChaosPrincess>
and if the problem with initramfs is the size - rust isnt great, the binaries end up being huge
bisko has joined #asahi-dev
<sven>
should still be much easier to get a rust binary into a initramfs than an entire Python distribution
BrendanLaw[m] has joined #asahi-dev
Felix[m] has joined #asahi-dev
bastilian[m] has joined #asahi-dev
exuberance[m] has joined #asahi-dev
null-nop[m] has joined #asahi-dev
yepezaurio[m] has joined #asahi-dev
JanKral[m] has joined #asahi-dev
AurlienBidon[m] has joined #asahi-dev
AkihikoOdaki[m] has joined #asahi-dev
xnry5yg2kv[m] has joined #asahi-dev
willow[m]1 has joined #asahi-dev
<marcan>
ChaosPrincess: "huge" is largely FUD from people building in debug mode. with statically linked runtime in release mode, hello.rs is 256kB
<marcan>
people regularly throw `lvm` into initramfses and that's like 2.6MB statically linked.
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<marcan>
hello.c compiles to ~nothing, but if you statically link it, it's 768kB (and if you statically link the Rust one, it grows by about that much)
atomic_null[m] has joined #asahi-dev
<marcan>
so the Rust runtime needed to support hello, world is ~33% the size of the underlying glibc runtime needed to support it. I don't think a 33% overhead over C qualifies as "huge binaries".
EdwinMoradian[m] has joined #asahi-dev
Gaspare has quit [Ping timeout: 480 seconds]
akamizu[m] has joined #asahi-dev
ajbio[m] has joined #asahi-dev
Willmish[m] has joined #asahi-dev
quas4r[m] has joined #asahi-dev
amypotato[m] has joined #asahi-dev
TMK[m] has joined #asahi-dev
<mps>
marcan: this hello.c size is when linked with glibc?
<marcan>
yes
h_ro[m] has joined #asahi-dev
<jn>
somewhat irrelevant side note: *if* you want to statically link a C program and have a tiny resulting binary, try musl instead of glibc
<mps>
jn: I know
Igunublue[m] has joined #asahi-dev
<ChaosPrincess>
marcan: its not fud, an average rust binary that i made is approx ~35 mb, and thats release build and strip
<ChaosPrincess>
tho, it usually includes serde and tokio, which aren't exctly small
<mps>
jn: hello.c static is about 60-70KB
<marcan>
ChaosPrincess: Pulling in cargo dependency hell doesn't mean "rust binaries are huge", it means you have cargo dependency hell ;)
<marcan>
that's a different ecosystem problem that has little to do with the language itself
<marcan>
and wouldn't really apply to something simple like an nvram util if you're careful about it
<marcan>
I have a Rust binary for a thing I wrote in 2016 here (first time I tried it! didn't touch it again until m1n1 :p) which does use a bunch of crates (mio, net2, log, some more), and it's 1.6MB
<marcan>
if you're ending up with 35MB binaries, that's not rust, that's that there's 35MB of stuff in there
the_real_briel[m] has joined #asahi-dev
<ChaosPrincess>
btw, how did you get the spi0 pins for m1 pro/max
<marcan>
oh that wasn't even stripped, 1.0MB stripped
<marcan>
the gpio mappings?
<ChaosPrincess>
on m1 i could just assume that cs is highest, and then take 4 down, but that doesnt work on m1pro
<marcan>
I think that was guesswork and testing with the logic analyzer?
<marcan>
yeah it's broken up
<ChaosPrincess>
so, no easy method like looking in the adt
<marcan>
IIRC I just regmon'd the gpio stuff and saw which bits flipped when I used the SPI interface
<marcan>
then confirmed with gpiola
<ChaosPrincess>
:shrug: i call black magic
Lizard[m] has joined #asahi-dev
Matt[m]12 has joined #asahi-dev
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi-dev
zbotpath[m] has joined #asahi-dev
zelig_[m] has joined #asahi-dev
hdurr[m] has joined #asahi-dev
JasonAntwi-Appah[m] has joined #asahi-dev
rethematrix[m] has joined #asahi-dev
manacho[m] has joined #asahi-dev
caligulam[m] has joined #asahi-dev
wuhoipok[m] has joined #asahi-dev
jackbijou[m] has joined #asahi-dev
richardburleigh[m] has joined #asahi-dev
chipxxx has quit [Read error: Connection reset by peer]
brentr123[m] has joined #asahi-dev
acno[m] has joined #asahi-dev
nametable[m] has joined #asahi-dev
pg12_ has joined #asahi-dev
dnjmis[m] has joined #asahi-dev
EvanJulius[m] has joined #asahi-dev
pg12 has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
denden[m] has joined #asahi-dev
HaoYanQi[m] has joined #asahi-dev
Candygoblen123[m] has joined #asahi-dev
codegosu[m] has joined #asahi-dev
butterfly[m] has joined #asahi-dev
BenPetterborg[m] has joined #asahi-dev
bpalmer4[m] has joined #asahi-dev
bard[m] has joined #asahi-dev
aycippo[m] has joined #asahi-dev
aw213mf3f8[m] has joined #asahi-dev
KayaGkalp[m] has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
<dottedmag>
marcan: that binary probably can be upx'ed to 200kb :)
jeksskenis[m] has joined #asahi-dev
vup has quit [Ping timeout: 480 seconds]
skrll[m] has joined #asahi-dev
cgv[m] has joined #asahi-dev
justeinkemp[m] has joined #asahi-dev
digitalfx[m] has joined #asahi-dev
Xichao[m] has joined #asahi-dev
NightRaven[m] has joined #asahi-dev
xf00[m] has joined #asahi-dev
MarcinPajkowski[m] has joined #asahi-dev
teach3e[m] has joined #asahi-dev
sjbtrn[m] has joined #asahi-dev
nfranco[m] has joined #asahi-dev
skaldek has joined #asahi-dev
Capta1nT0ad[m] has joined #asahi-dev
wmann95[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<_jannau_>
marcan: I was thinking if a simpler version would be preferable. It would allow to use the same function for dcpext. Instead of bools in the mapping we would have the aliases. Would result in looking up DT nodes and initializing darts multiple times
<marcan>
_jannau_: I'm fine with what we have now, the bools seem preferable to repeat lookups and inits
<marcan>
we can always refactor later
<marcan>
we could probably just always use the bools and pass the node names to the function at the caller? dcpext would always have X, false, false and NULLs for the latter 2 nodes.
<_jannau_>
I've monitored the piodma/dcp mapping left by iboot. It seems to be unused on the mac mini. It's all 0 and is not written to during a whole macos boot/shutdown cycle. macos keeps however the mapping
eaxk[m] has joined #asahi-dev
<_jannau_>
yes, that sounds like good compromise, I'll update the PR tonight
KrushnaDeore[m] has joined #asahi-dev
<_jannau_>
I'll keep the mappings as iboot left them
<sven>
fwiw, it’d also possible to manually create a new device and attach it to some apple,piodma-iommu
<sven>
there‘s something in drm (tegra maybe?) that does something similar iirc
vup has joined #asahi-dev
<sven>
it’s a bit of a hack since you have to manually create the fwnodes but so is that fake piodma device I guess
<sven>
not sure which approach is better
<_jannau_>
sven: do you mean drivers/gpu/host1x/context.c:host1x_memory_context_list_init()
<sven>
hmmm… don’t think so. maybe I saw it in some downstream tree
feeleep[m] has joined #asahi-dev
<sven>
tegra_smmu_configure I think
<sven>
Er, no
<sven>
nvm, I just confused myself
<sven>
hmm… i guess it actually was in a downstream tree :/
<marcan>
if piodma represents hardware that exists, even if the driver doesn't talk to it, I think it's fine having it as a separate node/subnode in the DT
vup has quit [Ping timeout: 480 seconds]
Jamie[m] has joined #asahi-dev
Lena has joined #asahi-dev
legarts[m] has joined #asahi-dev
<sven>
I dunno what piodma is, I just saw the slightly awkward way the DCP driver currently deals with it ;)
<sven>
but yeah, if it’s real hardware I agree
<_jannau_>
could piodma be a sio like coprocessor which emulates DMA between disp0 and dcp for dcp? Hard to make sense out of piodma otherwise
<sven>
i got some initial afk code working btw., seems to be able to talk to the system endpoint and enable extra logging. I’ll try to get dptx up next
<sven>
I also have a better idea how DCP and atcphy will interact. Just need to figure out the typec/tps6598x part now
ElvishJerricco[m] has joined #asahi-dev
<_jannau_>
I've forward pushed my dcp branch with fixes for multiple crtcs case, probably still broken
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sven>
probably hard to fix that blindly ;)
<sven>
I’ll push what I have later this week
IbrahimMAkrab[m] has joined #asahi-dev
goldsoultheory has joined #asahi-dev
chengsun_ has quit [Ping timeout: 480 seconds]
goldsoultheory has quit []
jisan[m] has joined #asahi-dev
<_jannau_>
yes, only I'm only fixing mismatches between the implementation and drm expectations as I discover them
kdwk-l[m] has joined #asahi-dev
goldsoultheory has joined #asahi-dev
nyanpasu64 has joined #asahi-dev
RootspringSkyClan[m] has joined #asahi-dev
cycatz[m][m] has joined #asahi-dev
PermissionDenied[m] has joined #asahi-dev
vup has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
lowz[m] has joined #asahi-dev
chengsun has joined #asahi-dev
NotHere[m] has joined #asahi-dev
kdrag0n[m] has joined #asahi-dev
djk121[m] has joined #asahi-dev
bluetail has quit [Ping timeout: 480 seconds]
Naruto[m] has joined #asahi-dev
bluetail has joined #asahi-dev
chengsun has quit [Ping timeout: 480 seconds]
thedevnull[m] has joined #asahi-dev
thebrinkoftomorrow[m] has joined #asahi-dev
Major_Biscuit has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
chipxxx has joined #asahi-dev
ljmcc[m] has joined #asahi-dev
ghantaz[m] has joined #asahi-dev
jofes[m] has joined #asahi-dev
<rmk>
_jannau_: I worked out a resolution and it builds, so I'm going to be testing it, probably tomorrow now.
mnc7[m] has joined #asahi-dev
Major_Biscuit has quit [Ping timeout: 480 seconds]
yummypotato[m] has joined #asahi-dev
ntan[m] has joined #asahi-dev
joerosenberg[m] has joined #asahi-dev
nikorai[m] has joined #asahi-dev
NoahSchill[m] has joined #asahi-dev
donnyjoe[m] has joined #asahi-dev
arti1208[m] has joined #asahi-dev
___nick___ has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
___nick___ has quit []
bligma[m] has joined #asahi-dev
meher1[m] has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goldsoultheory has joined #asahi-dev
SanskarBajpai[m] has joined #asahi-dev
goldsoultheory has quit []
ey3ball[m] has joined #asahi-dev
ryan_nupp[m] has joined #asahi-dev
michael5050[m] has joined #asahi-dev
mattebullet[m] has joined #asahi-dev
MarcoG[m] has joined #asahi-dev
palashgo[m] has joined #asahi-dev
MikaB[m] has joined #asahi-dev
randomguy69420[m] has joined #asahi-dev
goldsoultheory has joined #asahi-dev
etsukata[m] has joined #asahi-dev
nicky-d[m] has joined #asahi-dev
faiz_abbas[m] has joined #asahi-dev
facez[m] has joined #asahi-dev
renadan[m] has joined #asahi-dev
Thib[m] has joined #asahi-dev
KirkByers[m] has joined #asahi-dev
gpanders[m] has joined #asahi-dev
CristianMgheruan-Stanciu[m] has joined #asahi-dev
peerp[m] has joined #asahi-dev
luxio_39[m] has joined #asahi-dev
DanStrong[m] has joined #asahi-dev
HendrawanKuncoro[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
FellFromTheSky[m] has joined #asahi-dev
vovanoxin[m] has joined #asahi-dev
clayscode[m] has joined #asahi-dev
citruscitrus[m] has joined #asahi-dev
hothandyman[m] has joined #asahi-dev
KrishbinPaudel[m] has joined #asahi-dev
irving[m] has joined #asahi-dev
RowanGoemans[m] has joined #asahi-dev
bmrgz[m] has joined #asahi-dev
nihilistpc[m] has joined #asahi-dev
RoelAlejandroPerezCandanoza[m] has joined #asahi-dev
nik875[m] has joined #asahi-dev
gjekdkdjjr[m] has joined #asahi-dev
EthanBudd[m] has joined #asahi-dev
vistro[m] has joined #asahi-dev
pikabo[m] has joined #asahi-dev
sepkov[m] has joined #asahi-dev
chipxxx has quit [Read error: Connection reset by peer]
long[m] has joined #asahi-dev
logenkain[m] has joined #asahi-dev
NikolayNikolaev[m] has joined #asahi-dev
igrom[m] has joined #asahi-dev
perigoso[m] has joined #asahi-dev
kjm99[m] has joined #asahi-dev
Tawhid[m] has joined #asahi-dev
chengsun has joined #asahi-dev
limegorilla[m] has joined #asahi-dev
AntonioSchettini[m] has joined #asahi-dev
kryptokazz[m] has joined #asahi-dev
espo has joined #asahi-dev
Thib[m]1 has joined #asahi-dev
Taro[m] has joined #asahi-dev
surgeon has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
amarioguy has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hmon[m] has joined #asahi-dev
goldsoultheory has joined #asahi-dev
virmos[m] has joined #asahi-dev
mizuhiki[m] has joined #asahi-dev
spot[m] has joined #asahi-dev
nirusu[m] has joined #asahi-dev
nilsi[m] has joined #asahi-dev
spokv[m] has joined #asahi-dev
matde[m] has joined #asahi-dev
YichaoYu[m] has joined #asahi-dev
photogrant[m] has joined #asahi-dev
minkuu[m] has joined #asahi-dev
pfdub[m] has joined #asahi-dev
mipi[m] has joined #asahi-dev
PasteldeCocoa[m] has joined #asahi-dev
mmlb[m] has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r0ni has joined #asahi-dev
goldsoultheory has joined #asahi-dev
f423[m] has joined #asahi-dev
rucadi[m] has joined #asahi-dev
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
leonardeyer[m] has joined #asahi-dev
as400[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
GaborSOOS[m] has joined #asahi-dev
s-urabe[m] has joined #asahi-dev
pulpy_orange2[m] has joined #asahi-dev
RenatoMarinho[m] has joined #asahi-dev
Redecorating[m] has joined #asahi-dev
josipknezovic[m] has joined #asahi-dev
notyou[m] has joined #asahi-dev
latko[m] has joined #asahi-dev
w12101111[m] has joined #asahi-dev
RasmusEneman[m] has joined #asahi-dev
IvanMaksimovic[m] has joined #asahi-dev
ponkey364[m] has joined #asahi-dev
TiangangYang[m] has joined #asahi-dev
Pallatinus[m] has joined #asahi-dev
alicela1n has joined #asahi-dev
ntrung03[m] has joined #asahi-dev
luxtrnscd[m] has joined #asahi-dev
vup has quit [Ping timeout: 480 seconds]
the_kauffman[m] has joined #asahi-dev
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stoneaxe[m] has joined #asahi-dev
mactheknife[m] has joined #asahi-dev
Gaspare has joined #asahi-dev
sikkiladho[m] has joined #asahi-dev
DaanDeMeyer[m] has joined #asahi-dev
goldsoultheory has joined #asahi-dev
ManuelQuinones[m] has joined #asahi-dev
selene751[m] has joined #asahi-dev
Ferluci[m] has joined #asahi-dev
SethDowden[m] has joined #asahi-dev
nope-slide[m] has joined #asahi-dev
s4p3r_x[m] has joined #asahi-dev
konradybcio has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
StephenGallagher[m] has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
SSJ_GZ has quit [Ping timeout: 480 seconds]
jialixu[m] has joined #asahi-dev
zamadatix[m] has joined #asahi-dev
CaptainYukinoshitaHachiman[m] has joined #asahi-dev
henje[m] has joined #asahi-dev
fetsorn[m] has joined #asahi-dev
Riki[m] has joined #asahi-dev
ryanhrob1[m] has joined #asahi-dev
happy-dude[m] has joined #asahi-dev
redflag[m] is now known as Nia[m]
OfirRubenov[m] has joined #asahi-dev
AntoniosPapadakis[m] has joined #asahi-dev
PrasanthOmanakuttan[m] has joined #asahi-dev
rails[m] has joined #asahi-dev
retonlage[m] has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ethantwardy[m] has joined #asahi-dev
JuniorJPDJ has joined #asahi-dev
Emantor[m] has joined #asahi-dev
thinkalex[m] has joined #asahi-dev
thebigbossch[m] has joined #asahi-dev
<jannau>
sigh, dcp*'s __TEXT is not mapped in their dart. "segment-ranges" in iop-dcp*-nub finally make sense