#
…

2023-02-19

00:45chadmed has quit [Remote host closed the connection]
00:54nate8 has quit [Ping timeout: 480 seconds]
01:04chadmed has joined #asahi-dev
01:05chadmeddoes m1n1 have a size limit for gzipped initrds?
01:12chadmedi 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
01:37seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:41chadmedwhich is odd because it decompresses fine when passing to linux.py, just not run_guest.py
02:09seeeath has joined #asahi-dev
02:18ah-amarioguy: a while ago someone here was asking about the camera driver
02:19ah-i think the nick was just "t"
02:23chadmedseems to be something up with the file at the block level... thats very strange
02:41zef_ has joined #asahi-dev
02:48zef has quit [Ping timeout: 480 seconds]
02:59hightower3 has joined #asahi-dev
03:06hightower2 has quit [Ping timeout: 480 seconds]
03:17chadmed has quit [Remote host closed the connection]
03:21seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:26lawrence has quit [Ping timeout: 480 seconds]
03:36lawrence has joined #asahi-dev
03:40cylm has joined #asahi-dev
03:49chadmed has joined #asahi-dev
04:28seeeath has joined #asahi-dev
05:46cylm has quit [Ping timeout: 480 seconds]
05:50seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:20jfreedman0 has joined #asahi-dev
06:21seeeath has joined #asahi-dev
06:24jfreedman0 has quit [Quit: Igloo IRC: https://iglooirc.com]
06:35thevar1able has quit [Remote host closed the connection]
06:36thevar1able has joined #asahi-dev
06:39thevar1able has quit [Remote host closed the connection]
06:43thevar1able has joined #asahi-dev
06:53seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:43korniltsev has joined #asahi-dev
07:51povikisn't it simply a case of the hypervisor cropping the payload or otherwise damaging it past a certain size limit?
07:54poviki am surprised this doesn't error out on that large a payload since run_guest.py allocated 128mb for the heap
07:54povikand compressed_writemem uses the heap internally
08:00korniltsev has quit [Quit: Konversation terminated!]
08:04stickytoffee has quit [Quit: Ping timeout (120 seconds)]
08:04stickytoffee has joined #asahi-dev
08:53chadmednot sure the hv is cropping off the tail of the file since it passes all of tinf's length sanity checks
08:53chadmedit errors out somewhere in the block-level decompress (didnt dig any deeper than that)
08:54chadmedi bumped up the heap to a few gigs just in case and it didnt help
09:04jeffmiw has joined #asahi-dev
09:25zzywysm has quit [Ping timeout: 480 seconds]
09:41chadmed has quit [Quit: Konversation terminated!]
09:41chadmed has joined #asahi-dev
09:42poviksanity check probably wouldn't see that the data past a point are missing
09:42povikunless there's some trailer it's checking for
09:43akspecs has quit [Remote host closed the connection]
09:43akspecs has joined #asahi-dev
09:43jannauTINF_DATA_ERROR sounds like the error one would expect for partial or overwritten data
09:44chadmedit returns that for virtually everything that goes pear shaped lmfao
09:45akspecs has quit [Remote host closed the connection]
09:45akspecs has joined #asahi-dev
09:50jannauhow large is the initrd uncompressed?
09:50jannauyou could try https://github.com/AsahiLinux/m1n1/pull/268 which defers uncompressing to linux
09:51jannauthat's close: "unsigned int source_len = size, dest_len = 1 << 30; // 1 GiB should be enough hopefully
09:51jannauin payload.c:decompress_gz()
09:52chadmedi bumped that to 2 << 30 with no success
09:53jannauhave you tried compressing the same initrd with xz?
09:54svendid you put your entire rootfs into the initrd? :D
09:55psykose has quit [Remote host closed the connection]
09:56psykose has joined #asahi-dev
10:01chadmednot quite, its most of the gentoo installer with firmware and some other useless stuff ripped out
10:03weitcis has quit [Ping timeout: 480 seconds]
10:11gladiac has joined #asahi-dev
10:18weitcis has joined #asahi-dev
10:42chadmedargh found it, run_guest.py overrides the default heap size in m1n1/hv/__init__.py
11:02povikstill it's a bug it silently overrides/crops the data instead of erroring out
11:02povikif you find the root cause it would be good to fix
11:03jannauyes, compressed_writemem should fail (from quick code inspection) if it can't allocate enough heap
11:04povikchadmed: what do you mean by the default heap size in hv/__init__?
11:05poviki don't see it
11:06chadmedsorry, in proxyutils.py
11:06chadmednot hv/__init__.py
11:06jannauProxyUtils default heap size is 1GB
11:06chadmedyeah thats why i was stumped as to why it wasnt working
11:07chadmedthen i did a grep for 128 on a whim :P
11:07povikthat's the 128mb i was referring to earlier ;)
11:08chadmedyeah, all the comments in proxyutils references 128mb as the default too though which is where i got confused
11:09chadmedi thought there was something off about 1024 * 1024 * 1024 not adding up to 128
11:16gladiac has quit [Quit: k thx bye]
11:52r0ni has joined #asahi-dev
11:52jannauthe PMU regression fix was merged yesterday for 6.2
11:55Dementor has quit [Remote host closed the connection]
11:56Dementor has joined #asahi-dev
12:01hightower3 has quit [Ping timeout: 480 seconds]
12:32hightower2 has joined #asahi-dev
12:45chadmed has quit [Remote host closed the connection]
12:54svenpovik: 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?
12:54svenand "apple,sio-firmware-params" is just something that's passed to the SIO firmware using some rtkit messages?
13:05chadmed has joined #asahi-dev
13:06jannauthat's the way I understand it
13:25jannauthanks for the reviews
13:25svensure :)
13:25svenmy cold is finally gone so that I can catch up on emails and try to get my inbox empty again ;)
13:44poviksven: yeah, that's exactly right
14:00kesslerd has joined #asahi-dev
14:07povikif you haven't seen there's this standard way to arrange the mappings ^-- (not sure if that was the final version of the series)
14:14jannauit's not, but v13 got picked up for v6.3
14:15jannaustill depends on patches in the asahi tree to support mappings with translation. I plan to send them out after v6.3-rc1
14:19povikwhat you mean by translation here?
14:19poviksetting up translation from iova space seems to be the whole point of the series :D
14:21jannautranslation from iova to physical memory
14:21jannauthe series ended up the way it is because asahi needs translation
14:23sam_- is now known as sam_
14:32povikaha, the upstream series merely reserves the iovas, doesn't set up translation for those but assumes some other mechanism resolves those addresses
14:33povikwith the example being a 1:1 mapping of a region
14:33povikright, now it makes sense
14:34jannauit either reserves the iova or suppurt direct (1:1) mappings
14:37povikah, i wasn't looking at the latest version
14:37povikanyway now it's clear
14:49svenlol, so acio/nhi reset works now but I’m back to the first plug just not working :D
14:51sventhe 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)
15:42svenfor anyone who knows how to actually run and debug this (i.e. no end users!): https://github.com/AsahiLinux/linux/tree/atcphy-20230219
15:42svennote 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.
15:43svenI don't care about bug reports, I only care about bug reports together with patches that fix them for now :P
15:50seeeath has joined #asahi-dev
16:03kesslerd has quit [Remote host closed the connection]
16:04kesslerd has joined #asahi-dev
16:05kesslerd has quit [Remote host closed the connection]
16:35seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:35seeeath has joined #asahi-dev
16:44bluetail986 has quit [Ping timeout: 480 seconds]
16:47amarioguy has quit [Remote host closed the connection]
16:48amarioguy has joined #asahi-dev
16:51bluetail986 has joined #asahi-dev
16:54jannauchadmed: I get an out of memory error from run_guest.py with a larger kernel (with debug symbols)
17:05zzywysm has joined #asahi-dev
17:10jannausven: any config dependencies except enabling the added CONFIG_* and PCI_HOTPLUG? I see the thunderbolt pcie controller but no devices
17:12svenhave you tried replugging the device?
17:13sventhe first plug is broken (again)
17:13svenand is the device actually tbt1,2 or 3 and are you using a passive cable?
17:13kesslerd has joined #asahi-dev
17:14svenuntil the tipd stuff is done you might have to change the value of that vse cable info thing manually
17:15jannauyes, tried replugging multiple devices. thunderbolt3 nvme adapter, thunderbolt3 monitor (afaik dp and usb) and usb4 hub. I expect the latter two to be broken
17:15jannauI would assume a passive cable
17:15svenanything in dmesg?
17:16svenusb4 might work if you set that vse thingy to 0x11 iirc
17:16jannaunothing on device plug
17:17svenuhh.. that sound very broken
17:17svenhave fun debugging I guess? ;)
17:17svenmake sure that debug prints for everything thunderbolt is enabled
17:17sventhat should be very verbose
17:18svenoh, and if the nhi probed after plug you should see the host in boltctl list -a
17:19bluetail986 has quit [Ping timeout: 480 seconds]
17:24amarioguy has quit [Ping timeout: 480 seconds]
17:24kesslerd has quit [Remote host closed the connection]
17:26kesslerd has joined #asahi-dev
17:31kesslerd has quit [Remote host closed the connection]
17:32kesslerd has joined #asahi-dev
17:32bluetail986 has joined #asahi-dev
17:39cylm has joined #asahi-dev
17:41kesslerd has quit [Remote host closed the connection]
17:42kesslerd has joined #asahi-dev
17:51jannauno tps6598x interrupts explains why nothing happens on device plug
17:53svenhuh, I don’t think I changed anything there
17:53svenmaybe some probe ordering issue?
17:56jannauyes, 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?
17:57svenuh, my setup usually is atcphy0 for the hv and atcphy1 for thunderbolt
17:58svenand in that case the tipd at 0x3f must remain active
18:00jannauargh, did I mix up the ports?
18:01svenno idea, I was just confused by first and second because I always think of the ports as atcphy0/1
18:01svenatcphy0 is the one closer to the power plug on the mini iirc
18:04jannauno, 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
18:07svenhmm.. it’s connected to that nhi now
18:07svenweird that it works for me though
18:08svenmaybe nhi fails to probe somehow?
18:16jannauno, dwc3 fails to probe with "DWC3 controller soft reset failed."
18:18svenI knew that I broke usb but I didn’t expect it to break that badly
18:18svensoft reset fail happens when atcphy isn’t fully initialized
18:19svenI 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
18:19svenstill strange that that happens because I don’t think I changed anything there
18:20svenyou can probably just drop the connection to dwc3 from tipd for now though
18:21jannaualready trying that
18:22jannauyou changed the default mode from usb to usb4 in tipd
18:26svenyeah, that’s the hack that makes tbt work and breaks everything else :D
18:26svenbut dwc3 shouldn’t care
18:26svenit still works in usb2 mode here fwiw
18:30jannauirqs work now and the thunderbolt connection is detected. it fails with "-ETIMEDOUT: M3 firmware failed to boot"
18:33svenhm, weird
18:34svenis rtkit debug enabled?
18:35svener, wait, it fails even before that
18:35svendunno what’s going on, never saw that here
18:53spikerguy has joined #asahi-dev
18:59svenah yes, and now the build bots have started screaming at me :D
19:01ChaosPrincessthat is only t8103 rn, no m1 pro/max?
19:02svenand held together by duct tape
19:57kesslerd has quit [Remote host closed the connection]
19:57kesslerd has joined #asahi-dev
20:42spikerguy has quit [Quit: Page closed]
20:48hightower2 has quit [Remote host closed the connection]
20:48hightower2 has joined #asahi-dev
21:22jannausven: works now somewhat. it was an active cable
21:24svenyeah, those needs special treatment in that vse apple field
21:24svenstill weird that it failed with that m3 error though
21:25jannauI see that occasionally
21:25svenusually the error mode here is just “nhi comes up but can’t establish a connection so that it never sees a hotplug event”
21:25svenhrm, maybe the timeout is too low
21:26svenor maybe it has to be done after the rtkit stuff
22:16hightower2 has quit [Ping timeout: 480 seconds]
22:38hightower2 has joined #asahi-dev
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:00darkapex has quit [Remote host closed the connection]
23:01yrlf has joined #asahi-dev
23:01darkapex has joined #asahi-dev
23:03stsmwg has joined #asahi-dev
23:05beeblebrox has quit [Remote host closed the connection]
23:22stsmwg has quit [Quit: Lost terminal]
…