#
…

2022-04-19

00:52chadmed has joined #asahi-dev
01:07yuyichao has quit [Ping timeout: 480 seconds]
01:18user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:31millenialhacker has joined #asahi-dev
01:39millenialhacker has quit [Ping timeout: 480 seconds]
02:03millenialhacker has joined #asahi-dev
02:12millenialhacker has quit [Ping timeout: 480 seconds]
02:13user982492 has joined #asahi-dev
02:43yuyichao has joined #asahi-dev
02:43phiologe has joined #asahi-dev
02:46PhilippvK has quit [Ping timeout: 480 seconds]
02:49yuyichao has quit [Quit: Konversation terminated!]
02:50yuyichao has joined #asahi-dev
03:00skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:05chadmed has quit [Quit: Konversation terminated!]
03:06chadmed has joined #asahi-dev
04:03kov has quit [Quit: Coyote finally caught me]
04:03kov has joined #asahi-dev
04:07timokrgr has quit [Remote host closed the connection]
04:19user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:50user982492 has joined #asahi-dev
05:12nicolas17 has quit [Quit: Konversation terminated!]
05:55millenialhacker has joined #asahi-dev
05:56the_lanetly_052___ has quit [Ping timeout: 480 seconds]
06:03millenialhacker has quit [Ping timeout: 480 seconds]
06:08Skirmisher has quit [Remote host closed the connection]
06:09Skirmisher has joined #asahi-dev
06:33millenialhacker has joined #asahi-dev
07:05jannaumarcan: how much effort is it to recreate KNOWN_MSGS in trace_dcp.py? I think '"A103": "IOMFB::UPPipe2::test_control(IOMFB_TC_Cmd, unsigned int)"' doesn't exists anymore
07:07jannausignature still matches but looks more like it should be 'A103 = Call(void, "get_config_frame_size", width=InOutPtr(uint), height=InOutPtr(uint))'
07:08jannauCALL > 0x0000002000400002 CMD 0x40 A103 0xc 0x8 00000000000000000000aaaa
07:10jannauthe next two calls set_config_frame_size and program_config_frame_size are consistent with one removed call
07:14jannaunot a particularly important task but it's impossible to tell from traces what happened to unobserved calls/callbacks
07:17jannauthe next observed Call A131 doesn't look obviously wrong judging by context
07:37jannauat least dpms and switching between 2 different seems now to work reliable
07:38j`eybetween 2 different whats?
07:41jannaudisplays
07:41j`eywith different resolutions?
07:42jannauyes, a cursed dell 4k display and a well behaved FullHD display
07:44svensounds like we have the same dell display :D
07:45jannaukde system settings seems to get confused about the refresh rates though. 4k is limited to 30 Hz due to HDMI 1.4 but it offers 60, 50 and 24 Hz instead of 30, 25 and 24
08:25millenialhacker has quit [Remote host closed the connection]
08:45user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:34j`eysven: r-b by hch.. nvme seems pretty close now!
09:37svenyeah, just dt-bindings and SART/rtkit now :)
10:00svenin other news, acio ofc has another tunable format compared to atcphy *sigh*
10:08j`eytalking of tunables, I get this warning when building m1n1 now, not sure which type should be changed:
10:08j`eysrc/kboot.c:710:51: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
10:08j`ey 710 | if (tunable->offset + (tunable->size / 8) > tunable_info->reg_size) {
10:13Dcow[m]1sven: acio?
10:20DragoonAethis has quit [Quit: hej-hej!]
10:20DragoonAethis has joined #asahi-dev
10:22marcansven: can we convert the tunables to some common format in m1n1?
10:22svenmarcan: yes, that already happens for the atcphy ones
10:22jnn is now known as jn
10:23svenim just annoyed I have to write another converter and can’t just reuse the one that already exists
10:23svenDcow: thunderbolt
10:23svenj`ey: huh, let me fix that
11:00svenj`ey: uhh.. i'm a bit confused. tunable->{offset,size} should be u32 and tunable_info->reg_size is size_t and unsigned as well.
11:02j`eysven: yeah but '8' is an int!
11:03j`ey8u fixes the warning, heh
11:03svenhuh. which compiler is that?
11:03j`eyaarch64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
11:03marcan11.2.1 throws no warnings for me
11:04svenapple's clang 12.0.5 also doesn't
11:08jannauthe 8 should be promoted to unsigned as 'int' and 'u32' should have the same rank
11:10j`eylet's just assume it's funky in the build of gcc I have then
11:11marcanI can't repro on godbolt on 9.4 either
11:11j`eynor me, I was just trying that
11:13millenialhacker has joined #asahi-dev
11:16marcanthough that seems c++-specific
11:17bps has joined #asahi-dev
11:24Mrmaxmeier has joined #asahi-dev
11:42MajorBiscuit has joined #asahi-dev
12:44marcanjannau: pushed your t6k2 stuff to main, with some adjustments
12:44marcanlet me take a look at that DCP thing
13:02marcanlet me know if you need more; it's not 100% automated
13:02jannaumarcan: thanks, t6k2 looks good. note that macos guest panics due to the initialized display
13:03marcanyeah, need to look into that
13:04jannauAMCC0 PLANE0 UNEXP_RT_HIT_DIR error: INTSTS1 0x00000100 AFERRLOG0/1/2/3/4 0xfff47500/0xea10f/0x23a120e/0x80/0x80041 ADDR 0x10ffff47500 CMD/SIZE 0x14(ncrdincr_ro)/0x7 AID/TID 0x120e/0x23a @AppleT6000PlatformErrorHandler.cpp:2712
13:05marcandid we set the uncached mode thing in the DART FB mapping?
13:06jannau0x10ffff47500 is within the first dart-disp0 page table
13:06marcan dart->l1[ttbr][idx] = offset | DART_PTE_VALID;
13:06marcanI suspect that's wrong since DART_PTE_VALID sets both bits
13:06marcanwe might be mapping the *page tables* themselves as RT
13:07marcanor maybe they are supposed to be RT, and having them in CPU cache also is a no-no?
13:09jannauthe page table itself is initialized by iboot
13:09marcanbut we write it, right?
13:09marcanso we probably need to map it uncached
13:10millenialhackerHi! here working on ISP, I notice a memory address which gets written always with a incrementing value but step between value and value is not constant. Have you ever seen a similar pattern?
13:11svencould be a ringer buffer that gets advanced, or maybe some timeout. hard to tell without context
13:11jannauI tried that and it didn't made a difference
13:12sventhat address is *read* and increases. looks like a counter at first glance
13:12jannaualso bit 1 (uncached for t6000/t8110) is not set: table (0): 00000000 ... 02000000 -> 0000010ffff44000 [01]
13:12millenialhackersven: ring stuff makes sense, it always come back to lower addresses after some time
13:18jluthra has quit [Remote host closed the connection]
13:18jannaumarcan: dcp method annotations are good, I haven't spotted any other inconsistencies. thanks
13:18jluthra has joined #asahi-dev
13:28nihilistpc[m] has joined #asahi-dev
13:54yuyichao has quit [Ping timeout: 480 seconds]
14:15millenialhackersven: definely some kind of counter, timer, each 3 mins it does a full cycle and next subsequent word (+4 bytes) get incremented in one.
14:19svensounds like some timer based on that 24 MHz clock then
14:20millenialhackersven: how did you get is related to 24Mhz clock?
14:20millenialhackerSorry for the question, just curious, trying to learn here
14:20jannaushould loop every 178.957 seconds
14:20svenbecause 2**32 ticks with a 24 MHz frequency take about 3 minutes ;)
14:21j`eyand there is a 24Mhz clock that's used by several things already!
14:21svenand I just happened to know that by heart because I wrote the watchdog driver where I did that calculation
14:21millenialhackerholy cow guys, I didn't spot that one
14:21millenialhackerI was planning to count number of reads per second
14:22millenialhackerbut I'm almost sure all of you are right, so no need to do the math
14:24svenyou already know that a full cycle takes 3 minutes. a full cycle is 2**32 events, i.e. 2**32 / 3 minutes which is ~24 MHz
14:24sven(note that it's actually not a full cycle but a 64bit counter but same difference)
14:25millenialhackersven: yeah, it seems next 4 bytes are just the upper bits of the 64 bit counter
14:25millenialhackershould I document that stuff, right?
14:34kaprests has quit [Ping timeout: 480 seconds]
14:43marcanjannau: fixed the macos thing. It's what I said; we need to map the pagetables as UC, since DART page table walks count as part of the realtime path, same as the framebuffer itself, and cannot hit the CPU cache.
14:44marcanthere's a flag in pmap-ranges that I'm guessing tells us that; alternatively we could use the real-time DART property and the l2 ranges thing
14:44marcanthis won't work (right now) if we have to allocate our own page tables, of course
14:50jannaumarcan: thanks. format check failed
15:00bps has quit [Ping timeout: 480 seconds]
15:01nicolas17 has joined #asahi-dev
15:20j`eyooh tick polling
15:21marcanor rather, not
15:21marcanjannau: hopefully HV should scale to t6002 core counts better now
15:21marcanit no longer tries to take a single lock 20000 times per second :p
15:21marcan(only 1000 and from the same CPU in the easy case)
15:22MajorBiscuit has quit [Ping timeout: 480 seconds]
15:22svensomeone should pick up that t6k dart series and correctly add support for that new PTE format now that we know these bits
15:22marcanthough the uncached bit seems unrelated here?
15:22sveniirc there’s a flag that can be passed to map something as uncashed
15:23marcanthe issue I fixed was just the MMU mappings
15:23svenoh, just in general
15:23marcannot sure exactly how that uncached bit interacts
15:23marcanbut yeah
15:23svenread/write protection also changed iirc
15:30c10l684 has quit []
15:31c10l684 has joined #asahi-dev
15:31jannaumarcan: yes, macos HV is much faster. linux seems to be faster as well although it was less noticeable
15:32jannauonly annoying case was window resizing/moving which could have been caused by dcp tracing
15:32marcaneverything should be faster in general, I think macos is just heavier so becomes even worse when everything is fighting
15:36marcanjannau: whoops, forgot a thing, pushed a fix
15:36marcanhopefully I didn't slow it down again :)
15:37marcan(it wasn't properly running the tick on secondaries)
15:37c10l684 has quit []
15:37c10l684 has joined #asahi-dev
15:37c10l684 is now known as c10l
15:38marcanheh, missed a thing, force-pushed the fix to properly fix it now
15:38lgaryslmtdobt^ has joined #asahi-dev
15:42jannaushutdown/restart is slower but still reasonable fast
15:46millenialhackerregarding isp, I noticed a pattern of access some memory regions that get's repeated over and over. :D
15:46millenialhackerI actually copy pasted the logs, and then selected like 50 lines of memory accesses and then find them using VSCode and they get repeated over and over.
15:47millenialhackerso I'm wondering if this could be some kind of polling between host and ISP
15:50andytest[m] has left #asahi-dev [#asahi-dev]
16:02millenialhackerholycow, I think the pattern repeats over each camera frame
16:19c10l has quit [Quit: Bye o/]
16:23c10l has joined #asahi-dev
16:27timokrgr has joined #asahi-dev
16:44lgaryslmtdobt^ has quit [Remote host closed the connection]
16:47HaDongGiang[m] has joined #asahi-dev
16:50HaDongGiang[m] is now known as virmos[m]
17:21user982492 has joined #asahi-dev
17:22MajorBiscuit has joined #asahi-dev
17:28svenurgh... usb4/thunderbolt is going to be nvme all over again. the current driver only supports PCI.
17:37user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:39user982492 has joined #asahi-dev
17:39user982492 has quit []
18:04kettenissven: took me a few seconds to realize what you were trying to say there
18:05svenah. yeah, that sentence is more than a bit confusing.
18:32mazsven: hopefully there will be less opposition this time around. I remember looking at the Corellium hack, and it didn't seem to have a massively different programming interface.
18:33jannauis there even usb4/thunderbolt HW beside Intel (and apple)? zen4 will be pcie based too
18:34jannaumaz: Corellium had/has usb4/thunderbolt support?
18:35jannauindeed, the last thing they added
18:36svendidn’t look at the corellium thing yet. I first want to figure out which crimes I’d commit against drivers/thunderbolt before I look at that ;)
18:36svenbut apple’s NHI doesn’t look too different from what I can tell
18:40bps has joined #asahi-dev
18:44user982492 has joined #asahi-dev
18:59MajorBiscuit has quit [Ping timeout: 480 seconds]
19:05MajorBiscuit has joined #asahi-dev
19:11user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:59user982492 has joined #asahi-dev
20:11MajorBiscuit has quit [Ping timeout: 480 seconds]
20:13MajorBiscuit has joined #asahi-dev
20:27axboe has quit [Remote host closed the connection]
20:28axboe has joined #asahi-dev
21:30lgaryslmtdobt^ has joined #asahi-dev
21:33millenialhacker has quit [Remote host closed the connection]
21:33millenialhacker has joined #asahi-dev
21:38MajorBiscuit has quit [Quit: WeeChat 3.4]
21:41millenialhacker has quit [Ping timeout: 480 seconds]
22:00yuyichao has joined #asahi-dev
22:09yuyichao has quit [Remote host closed the connection]
22:09yuyichao has joined #asahi-dev
22:13yuyichao has quit [Remote host closed the connection]
22:14yuyichao has joined #asahi-dev
22:19yuyichao has quit [Remote host closed the connection]
22:19yuyichao has joined #asahi-dev
22:23yuyichao has quit [Remote host closed the connection]
22:24yuyichao has joined #asahi-dev
22:29yuyichao has quit [Remote host closed the connection]
22:29yuyichao has joined #asahi-dev
22:33yuyichao has quit [Remote host closed the connection]
22:33yuyichao has joined #asahi-dev
22:36user982492 has quit [Read error: Connection reset by peer]
22:40user982492 has joined #asahi-dev
22:40yuyichao has quit [Remote host closed the connection]
22:41yuyichao has joined #asahi-dev
22:49yuyichao has quit [Remote host closed the connection]
22:49yuyichao has joined #asahi-dev
22:54yuyichao has quit [Remote host closed the connection]
22:55yuyichao has joined #asahi-dev
23:00yuyichao has quit [Remote host closed the connection]
23:00yuyichao has joined #asahi-dev
23:04yuyichao has quit [Remote host closed the connection]
23:04yuyichao has joined #asahi-dev
23:09yuyichao has quit [Remote host closed the connection]
23:10yuyichao has joined #asahi-dev
23:15yuyichao has quit [Remote host closed the connection]
23:15yuyichao has joined #asahi-dev
23:20yuyichao has quit [Remote host closed the connection]
23:21yuyichao has joined #asahi-dev
23:24user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:26yuyichao has quit [Remote host closed the connection]
23:26yuyichao has joined #asahi-dev
23:31yuyichao has quit [Remote host closed the connection]
23:31yuyichao has joined #asahi-dev
23:36yuyichao has quit [Remote host closed the connection]
23:36yuyichao has joined #asahi-dev
23:41yuyichao has quit [Remote host closed the connection]
23:41yuyichao has joined #asahi-dev
23:46yuyichao has quit [Remote host closed the connection]
23:47yuyichao has joined #asahi-dev
23:51yuyichao has quit [Remote host closed the connection]
23:51yuyichao has joined #asahi-dev
23:56yuyichao has quit [Remote host closed the connection]
23:57yuyichao has joined #asahi-dev
…