ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
chadmed has quit [Remote host closed the connection]
nate8 has quit [Ping timeout: 480 seconds]
chadmed has joined #asahi-dev
<chadmed> does m1n1 have a size limit for gzipped initrds?
<chadmed> i get TINF_DATA_ERROR with a 330mb initrd, but making a smaller one with the same method works fine so i assume its a size thing
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chadmed> which is odd because it decompresses fine when passing to linux.py, just not run_guest.py
seeeath has joined #asahi-dev
<ah-> amarioguy: a while ago someone here was asking about the camera driver
<ah-> i think the nick was just "t"
<chadmed> seems to be something up with the file at the block level... thats very strange
zef_ has joined #asahi-dev
zef has quit [Ping timeout: 480 seconds]
hightower3 has joined #asahi-dev
hightower2 has quit [Ping timeout: 480 seconds]
chadmed has quit [Remote host closed the connection]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lawrence has quit [Ping timeout: 480 seconds]
lawrence has joined #asahi-dev
cylm has joined #asahi-dev
chadmed has joined #asahi-dev
seeeath has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jfreedman0 has joined #asahi-dev
seeeath has joined #asahi-dev
jfreedman0 has quit [Quit: Igloo IRC: https://iglooirc.com]
thevar1able has quit [Remote host closed the connection]
thevar1able has joined #asahi-dev
thevar1able has quit [Remote host closed the connection]
thevar1able has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
korniltsev has joined #asahi-dev
<povik> isn't it simply a case of the hypervisor cropping the payload or otherwise damaging it past a certain size limit?
<povik> i am surprised this doesn't error out on that large a payload since run_guest.py allocated 128mb for the heap
<povik> and compressed_writemem uses the heap internally
korniltsev has quit [Quit: Konversation terminated!]
stickytoffee has quit [Quit: Ping timeout (120 seconds)]
stickytoffee has joined #asahi-dev
<chadmed> not sure the hv is cropping off the tail of the file since it passes all of tinf's length sanity checks
<chadmed> it errors out somewhere in the block-level decompress (didnt dig any deeper than that)
<chadmed> i bumped up the heap to a few gigs just in case and it didnt help
jeffmiw has joined #asahi-dev
zzywysm has quit [Ping timeout: 480 seconds]
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
<povik> sanity check probably wouldn't see that the data past a point are missing
<povik> unless there's some trailer it's checking for
akspecs has quit [Remote host closed the connection]
akspecs has joined #asahi-dev
<jannau> TINF_DATA_ERROR sounds like the error one would expect for partial or overwritten data
<povik> yeah
<chadmed> it returns that for virtually everything that goes pear shaped lmfao
akspecs has quit [Remote host closed the connection]
akspecs has joined #asahi-dev
<jannau> how large is the initrd uncompressed?
<chadmed> 986mb
<jannau> you could try https://github.com/AsahiLinux/m1n1/pull/268 which defers uncompressing to linux
<jannau> that's close: "unsigned int source_len = size, dest_len = 1 << 30; // 1 GiB should be enough hopefully
<jannau> "
<jannau> in payload.c:decompress_gz()
<chadmed> i bumped that to 2 << 30 with no success
<jannau> have you tried compressing the same initrd with xz?
<sven> did you put your entire rootfs into the initrd? :D
psykose has quit [Remote host closed the connection]
psykose has joined #asahi-dev
<chadmed> not quite, its most of the gentoo installer with firmware and some other useless stuff ripped out
weitcis has quit [Ping timeout: 480 seconds]
gladiac has joined #asahi-dev
weitcis has joined #asahi-dev
<chadmed> argh found it, run_guest.py overrides the default heap size in m1n1/hv/__init__.py
<povik> still it's a bug it silently overrides/crops the data instead of erroring out
<povik> if you find the root cause it would be good to fix
<jannau> yes, compressed_writemem should fail (from quick code inspection) if it can't allocate enough heap
<povik> chadmed: what do you mean by the default heap size in hv/__init__?
<povik> i don't see it
<chadmed> sorry, in proxyutils.py
<chadmed> not hv/__init__.py
<jannau> ProxyUtils default heap size is 1GB
<chadmed> yeah thats why i was stumped as to why it wasnt working
<chadmed> then i did a grep for 128 on a whim :P
<povik> that's the 128mb i was referring to earlier ;)
<chadmed> yeah, all the comments in proxyutils references 128mb as the default too though which is where i got confused
<chadmed> i thought there was something off about 1024 * 1024 * 1024 not adding up to 128
gladiac has quit [Quit: k thx bye]
r0ni has joined #asahi-dev
<jannau> the PMU regression fix was merged yesterday for 6.2
Dementor has quit [Remote host closed the connection]
Dementor has joined #asahi-dev
hightower3 has quit [Ping timeout: 480 seconds]
hightower2 has joined #asahi-dev
chadmed has quit [Remote host closed the connection]
<sven> povik: w.r.t. those SIO bindings, do I understand it correctly that the memory-region things have to be mapped inside the SIO DART, that m1n1 will prepare e.g. sio_auxdata2 and then put the hardcoded IOVA pointing to sio_auxdata2 into apple,sio-firmware-params?
<sven> and "apple,sio-firmware-params" is just something that's passed to the SIO firmware using some rtkit messages?
chadmed has joined #asahi-dev
<jannau> that's the way I understand it
<jannau> thanks for the reviews
<sven> sure :)
<sven> my cold is finally gone so that I can catch up on emails and try to get my inbox empty again ;)
<povik> sven: yeah, that's exactly right
kesslerd has joined #asahi-dev
<povik> if you haven't seen there's this standard way to arrange the mappings ^-- (not sure if that was the final version of the series)
<jannau> it's not, but v13 got picked up for v6.3
<jannau> still depends on patches in the asahi tree to support mappings with translation. I plan to send them out after v6.3-rc1
<povik> what you mean by translation here?
<povik> setting up translation from iova space seems to be the whole point of the series :D
<jannau> translation from iova to physical memory
<jannau> the series ended up the way it is because asahi needs translation
sam_- is now known as sam_
<povik> aha, the upstream series merely reserves the iovas, doesn't set up translation for those but assumes some other mechanism resolves those addresses
<povik> with the example being a 1:1 mapping of a region
<povik> right, now it makes sense
<jannau> it either reserves the iova or suppurt direct (1:1) mappings
<povik> ah, i wasn't looking at the latest version
<povik> anyway now it's clear
<sven> lol, so acio/nhi reset works now but I’m back to the first plug just not working :D
<sven> the device tree is also a bit of a mess because I need to bring down the DART on unplug as well (https://f.svpe.de/aa6c13322a846da8a88166c38603ba89cfee68a74d3cdbd5e4605d13f675f11e_acio_dt.txt)
<sven> for anyone who knows how to actually run and debug this (i.e. no end users!): https://github.com/AsahiLinux/linux/tree/atcphy-20230219
<sven> note that this only allows thunderbolt 1,2 and 3 (i.e. no USB3, no USB4, no DP) mainly because I've been too lazy to deal with tipd/typec yet.
<sven> I don't care about bug reports, I only care about bug reports together with patches that fix them for now :P
seeeath has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
bluetail986 has quit [Ping timeout: 480 seconds]
amarioguy has quit [Remote host closed the connection]
amarioguy has joined #asahi-dev
bluetail986 has joined #asahi-dev
<jannau> chadmed: I get an out of memory error from run_guest.py with a larger kernel (with debug symbols)
zzywysm has joined #asahi-dev
<jannau> sven: any config dependencies except enabling the added CONFIG_* and PCI_HOTPLUG? I see the thunderbolt pcie controller but no devices
<sven> have you tried replugging the device?
<sven> the first plug is broken (again)
<sven> and is the device actually tbt1,2 or 3 and are you using a passive cable?
kesslerd has joined #asahi-dev
<sven> until the tipd stuff is done you might have to change the value of that vse cable info thing manually
<jannau> yes, tried replugging multiple devices. thunderbolt3 nvme adapter, thunderbolt3 monitor (afaik dp and usb) and usb4 hub. I expect the latter two to be broken
<jannau> I would assume a passive cable
<sven> anything in dmesg?
<sven> usb4 might work if you set that vse thingy to 0x11 iirc
<jannau> nothing on device plug
<sven> uhh.. that sound very broken
<sven> have fun debugging I guess? ;)
<sven> make sure that debug prints for everything thunderbolt is enabled
<sven> that should be very verbose
<sven> oh, and if the nhi probed after plug you should see the host in boltctl list -a
bluetail986 has quit [Ping timeout: 480 seconds]
amarioguy has quit [Ping timeout: 480 seconds]
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
bluetail986 has joined #asahi-dev
cylm has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
<jannau> no tps6598x interrupts explains why nothing happens on device plug
<sven> huh, I don’t think I changed anything there
<sven> maybe some probe ordering issue?
<jannau> yes, nothing suspicious changed there. is it normal that the second tps698x is not removed/disabled when using the first usb-c port for the HV?
<sven> uh, my setup usually is atcphy0 for the hv and atcphy1 for thunderbolt
<sven> and in that case the tipd at 0x3f must remain active
<jannau> argh, did I mix up the ports?
<sven> no idea, I was just confused by first and second because I always think of the ports as atcphy0/1
<sven> atcphy0 is the one closer to the power plug on the mini iirc
<jannau> no, I didn't but there is something missing since usb-pd@3f is deferred. I assumed that was the one connected to the hv port
<sven> hmm.. it’s connected to that nhi now
<sven> weird that it works for me though
<sven> maybe nhi fails to probe somehow?
<jannau> no, dwc3 fails to probe with "DWC3 controller soft reset failed."
<sven> uh..
<sven> I knew that I broke usb but I didn’t expect it to break that badly
<sven> soft reset fail happens when atcphy isn’t fully initialized
<sven> I don’t remember which part but if some but in the usb2 phy part isn’t set it cleared the soft reset bit inside dwc3 is stuck
<sven> still strange that that happens because I don’t think I changed anything there
<sven> you can probably just drop the connection to dwc3 from tipd for now though
<jannau> already trying that
<jannau> you changed the default mode from usb to usb4 in tipd
<sven> yeah, that’s the hack that makes tbt work and breaks everything else :D
<sven> but dwc3 shouldn’t care
<sven> it still works in usb2 mode here fwiw
<jannau> irqs work now and the thunderbolt connection is detected. it fails with "-ETIMEDOUT: M3 firmware failed to boot"
<sven> hm, weird
<sven> is rtkit debug enabled?
<sven> er, wait, it fails even before that
<sven> dunno what’s going on, never saw that here
spikerguy has joined #asahi-dev
<sven> ah yes, and now the build bots have started screaming at me :D
<ChaosPrincess> that is only t8103 rn, no m1 pro/max?
<sven> yes
<sven> and held together by duct tape
<ChaosPrincess> ok
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
spikerguy has quit [Quit: Page closed]
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #asahi-dev
<jannau> sven: works now somewhat. it was an active cable
<sven> yeah, those needs special treatment in that vse apple field
<sven> still weird that it failed with that m3 error though
<jannau> I see that occasionally
<sven> usually the error mode here is just “nhi comes up but can’t establish a connection so that it never sees a hotplug event”
<sven> hrm, maybe the timeout is too low
<sven> or maybe it has to be done after the rtkit stuff
hightower2 has quit [Ping timeout: 480 seconds]
hightower2 has joined #asahi-dev
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
darkapex has quit [Remote host closed the connection]
yrlf has joined #asahi-dev
darkapex has joined #asahi-dev
stsmwg has joined #asahi-dev
beeblebrox has quit [Remote host closed the connection]
stsmwg has quit [Quit: Lost terminal]