2026-10-25
00:03byte has joined #asahi-dev
00:03byte is now known as Guest3823
00:04Guest3823can the smc maintainers please review this, as we need to test this on older macs aswell so i want to get these patches pre-reviewed
00:05Guest3823 has quit []
00:19iwuvmika has joined #asahi-dev
00:20hardy94 has quit [Quit: hardy94]
00:26bgb has quit [Remote host closed the connection]
00:31bgb has joined #asahi-dev
01:05veloek_ has joined #asahi-dev
01:07veloek has quit [Ping timeout: 480 seconds]
01:08MichaelReeves[m]ill take a look at macsmc-power (I upstreamed/co-wrote it), but the power supply maintainer (for all of it) is seb reichel, so they'd be the one to review if you sent it upstream
01:13MichaelReeves[m]ehh im sorry I really don't like it and I think upstream would NAK it
01:14MichaelReeves[m]you've almost duplicated the entire driver internally behind checks for smc->is_acpi. I think, at that point, it's probably cleaner to write a seperate new driver
01:15MichaelReeves[m]and there's like stuff for how to read and parse SMC data types in there, but that doesn't belong in a power supply driver, IMO, like we do, it should go in the SMC MFD driver so it is reusable
01:20MichaelReeves[m]on another note, I noticed you included the asahi M1 SPI hid patches. are you planning to upstream SPI hid? if so that would be very useful and appreciated, because I'm upstreaming dockchannel HID (M2+) so if they both get upstream, then HID is fully covered (and previously I thought I'd have to figure out SPI after DC is done)
01:22JamesCalligeros[m]spi hid is a bit of a mess
01:22JamesCalligeros[m]We probably want to figure out the unreasonable irq storm
01:23JamesCalligeros[m]Also for context the “original” smc implementation was a decoupled backend and frontend and upstream had a whinge about it
01:23JamesCalligeros[m]And this is the result
02:18bgb has quit [Remote host closed the connection]
02:18bgb has joined #asahi-dev
02:59___nick___ has quit []
03:00yurix has quit [Remote host closed the connection]
03:00yurix has joined #asahi-dev
03:01agball has quit [Ping timeout: 480 seconds]
03:01___nick___ has joined #asahi-dev
04:49agball has joined #asahi-dev
04:52nora_ has joined #asahi-dev
04:54nora has quit [Ping timeout: 480 seconds]
05:29bgb has quit [Remote host closed the connection]
05:30oolong4 has joined #asahi-dev
05:35bgb has joined #asahi-dev
05:50chadmed has quit [Quit: Konversation terminated!]
05:50chadmed has joined #asahi-dev
05:59agball has quit [Ping timeout: 480 seconds]
06:08oolong4 has quit [Quit: The Lounge - https://thelounge.chat]
06:09oolong4 has joined #asahi-dev
06:11agball has joined #asahi-dev
06:12KimTalmo has quit [Remote host closed the connection]
06:21oolong4 has quit [Quit: The Lounge - https://thelounge.chat]
06:26byte has joined #asahi-dev
06:27byte is now known as Guest3839
06:28Guest3839MichaelReeves[m]: so what are we supposed to do, as m-series and intel macs share a lot of keys (B0AP, B0AC, and a lot more, including the charge limit key used in new intel macs firmware), separate driver will mean duplicate code
06:29chadmedgo back to old versions of the downstream driver, which had a common frontend and then platform-specific backends to talk to the actual hardware
06:29Guest3839JamesCalligeros[m]: ive seen the original smc implementation in ur linux github repo, this is inspired from that
06:29Guest3839chadmed: the code does that: https://github.com/t2linux/linux-t2-patches/blob/7.3/3001-treewide-add-backend-for-macsmc.patch
06:31chadmedi dont think the "core" (which is really the frontend) should care at all about implementation details of the backends (is_acpi)
06:32Guest3839(power keys in intel macs uses BE instead of LE, so we need to use that, and also hwmon, we dont use dt)
06:33Guest3839https://github.com/t2linux/linux-t2-patches/blob/7.3/3010-power-supply-add-support-for-x86-macs-in-macsmc-powe.patch#L309
06:34Guest3839as you can see here, we need to do that in macsmc-power, for that we need to know if the backend is acpi or rtkit
06:39chadmedno, this is backwards. you should not introduce platform-specific API. what you need to do is rework the core so that it has something like struct macsmc_funcs which would just be a bunch of function pointers to the backend's implementations of e.g. read_u16
06:45Guest3839wont that be a worse design than just adding quirks?, only the battery sensor is that messed up, every other driver is fine
06:47chadmedi dont think it is a "worse design" to avoid leaking implementation details into places where they do not fundamentally belong
06:47Guest3839chadmed: "you just said theyre all like that", yeah sorry i meant all battery keys are mixed
06:48chadmedsince these drivers are upstream its best to get maintainer input. maybe they dont care anymore
06:48chadmedbut imo you should do everything in your power to avoid implementation details in the generic drivers
06:50Guest3839the code in the platform device would get too big, and adding quirks everytime we want to add something or change something is not that great
06:50Guest3839and its not like the battery sensor dont use quirks, it does use quirks for firmware afair
06:52chadmedid argue that case is slightly different as its not really something fundamental to the rtkit implementation and does not matter outside the battery driver. if youve got mixed endianness/key-specific stuff happening in rtc (and possibly others) too then thats a bigger problem
06:54Guest3839rtc, we use different keys, that exist on apple silicon too, but apple silicon dosent use them, so we need is_acpi, hwmon is very generic code (i think it can replace ur DT implementation, but i havent done that currently: https://github.com/t2linux/linux-t2-patches/blob/main/3013-hwmon-add-support-for-x86-macs-in-macsmc-hwmon.patch#L196)
06:58Guest3839 has quit [Quit: Page closed]
07:25agball has quit [Ping timeout: 480 seconds]
07:27agball has joined #asahi-dev
07:40agball has quit [Ping timeout: 480 seconds]
07:55mattia013 has quit [Quit: mattia013]
07:56mattia013 has joined #asahi-dev
08:14yukaI randomly stared at M4+ device trees enough to notice that the amcc info is scattered all over the place depending on the soc/device
08:17agball has joined #asahi-dev
08:22yukaj700 has amcc-enable-mask = 1, amcc-plane-enable-mask = 15, dcs-channel-enable-mask = 15 (all in the mcc node only)
08:30rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
08:30Guest2868 has quit [Quit: Bridge terminating on SIGTERM]
08:30agball has quit [Ping timeout: 480 seconds]
08:32rhysmdnz has joined #asahi-dev
08:32Guest3854 has joined #asahi-dev
08:56aditya has joined #asahi-dev
09:11bgb has quit [Remote host closed the connection]
09:15yukasven: would you mind sending me the full adt of your base M5 machine so I can take it into account when refactoring this?
09:16bgb has joined #asahi-dev
09:28hardy94 has joined #asahi-dev
09:36chadmed has quit [Quit: Konversation terminated!]
09:38chadmed has joined #asahi-dev
09:38Guest3854 has quit [Quit: Bridge terminating on SIGTERM]
09:38rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
09:48cy8aer has quit [Remote host closed the connection]
09:50rhysmdnz has joined #asahi-dev
09:51Guest3859 has joined #asahi-dev
09:54hardy94 has quit [Remote host closed the connection]
09:55cy8aer has joined #asahi-dev
09:56yukaI'll take another look at the M3 Max dcp issue today, since it would be nice to get brightness control and HDMI out on my daily driver :)
09:59___nick___ has quit []
10:01___nick___ has joined #asahi-dev
10:02al3xtjames2 has joined #asahi-dev
10:04chadmed has quit [Remote host closed the connection]
10:07leah2 has quit [Ping timeout: 480 seconds]
10:16leah2 has joined #asahi-dev
10:33hardy94 has joined #asahi-dev
10:41mx08_ has quit [Quit: WeeChat 3.8]
10:43leah2 has quit [Ping timeout: 480 seconds]
10:43mx08 has joined #asahi-dev
10:44al3xtjames23 has joined #asahi-dev
10:45al3xtjames2 has quit [Read error: Connection reset by peer]
10:45al3xtjames23 is now known as al3xtjames2
10:48hardy94 has quit [Remote host closed the connection]
10:48hardy94 has joined #asahi-dev
10:52leah2 has joined #asahi-dev
10:55yurix_ has joined #asahi-dev
10:55yurix has quit [Read error: Connection reset by peer]
10:56yurix_ is now known as yurix
10:58___nick___ has quit [Ping timeout: 480 seconds]
11:01chadmed has joined #asahi-dev
11:04jannauchadmed: do we still need mca changes compared to v7.3 upstream? does downstream macaudio need chnages to work with v7.3 mca?
11:05leah2 has quit [Ping timeout: 480 seconds]
11:05chadmedi think there are a couple of patches we are still carrying but we might be able to just drop them
11:05Bhyve has joined #asahi-dev
11:06aditya has quit [Quit: Connection closed for inactivity]
11:07MichaelReeves[m]oh are we doing 7.3 rebase already? would it be better to skip p3s 7.2 (I'm only a bit done) and go straight to 7.3, so there's not wasted effort (as MM changes a lot between releases) or is 7.3 probably still a while away
11:08jannauI started with the rebase, should be faster this time (at least on GPU side), wifi makes a little trouble
11:10jannauMichaelReeves[m]: does your series apply to v7.3? do our downstream 6GHz changes apply without large copnflicts to it
11:10MichaelReeves[m]that's issues with the M1 wifi chip right? I was planning on re-sending brcm4388 after 7.4-rc1 but if something's changed making it not work that would be annoying
11:10MichaelReeves[m]I based it on 7.3-rc[idk] but there might have been changes in final
11:10MichaelReeves[m]ill check
11:12MichaelReeves[m]ok my series applies cleanly to 7.3 final, that's good
11:12MichaelReeves[m]I'll check downstream 6hz and all that stuff now
11:13jannau our downstream driver conflicts with commit 08a3f02fea63 (wifi: brcmfmac: fix P2P device removal race in brcmf_detach()) in v7.3 and it looks annoying to resolve
11:14leah2 has joined #asahi-dev
11:14MichaelReeves[m]might as well, the only thing I haven't tested is if it accidentally broke anything with older chips (as I don't have the hardware)
11:15MichaelReeves[m]no, cause it was school holidays
11:16MichaelReeves[m]it is exam period now and earliest I can test it would be november
11:16MichaelReeves[m]november 10
11:17MichaelReeves[m]if anyone else would like to test that would be appreciated
11:18MichaelReeves[m]0c10263 ("[brcmfmac] Add support for 6G bands and HE") fails to apply on top of 7.3 final + my series
11:18MichaelReeves[m]rest of the stuff seems to
11:18ddxtanx_ has joined #asahi-dev
11:18ddxtanx has quit [Read error: Connection reset by peer]
11:18MichaelReeves[m]it seems like only a small fix, let me see
11:19MichaelReeves[m]yep conflict seems easy to fix
11:19MichaelReeves[m]my home wifi is only 2.4GHz/5GHz, but if I push a branch, can someone test if 6GHz works for them?
11:21bgb has quit [Remote host closed the connection]
11:21MichaelReeves[m]ok all 6Ghz stuff applies cleanly on top of my series now (but, it might not actually work, can't try sorry)
11:24chadmed(well i didnt miss it, i just thought it might have been nothing but now im not so sure)
11:24jannauthe series from the mailing list did not apply cleanly because v7.3 misses fbt and okc features
11:27bgb has joined #asahi-dev
11:28MichaelReeves[m]on the branch do you want just 6GHz or the rest of the stuff downstream too
11:38MichaelReeves[m]going to bed, will push branch tmrw
12:13jannauregressed how? do you patch com.apple.kernel:_recount_transition? are the EL2 mrs/msr still patched out?
12:14meow676767676 has quit [Quit: The Lounge - https://thelounge.chat]
12:24Bhyve has quit []
12:26yukaso maybe not that much regressed after all, it just seemed like it because the e-cores now fail earlier, or maybe more likely that failure is just nondeterministic so it is difficult to observe
12:31meow676767676 has joined #asahi-dev
12:39snooze6214[m]sven: hv on a18 pro faults with an SError while still executing m1n1 code i think
12:39snooze6214[m]Seems to fault reading the end of the "reserved sprr pool" according to L2C_ERR_ADR in the exception info
12:41dud has joined #asahi-dev
12:54snooze6214[m]$ aarch64-unknown-linux-gnu-addr2line -e build/m1n1-raw.elf 0x4ac58
12:54snooze6214[m]/home/.../.../.../m1n1/src/hv/hv_sprr.c:635
12:55snooze6214[m]i assume the address is PC is the right one to check? but it seems to be the end of sprr_mirror_entry
12:56snooze6214[m]i can upload my m1n1-raw.elf too, but my internet kind of sucks rn, might take a while :')
12:57* snooze6214[m]posted a file: (7298KiB) < https://matrix.org/oftc/media/v1/media/download/AX6Dj1liqvnjXk0Q54xifGfiMsKR5ddgtG9xKDRxAvRv3W5BwooUl78MHjcpXQAtL3mP_i4uzXg5FvDjPy6xbehCehuzvYVgAG1hdHJpeC5vcmcveWxPZ1FpWG5TTUlldVZrRWlQaXJYdGhI >
12:57snooze6214[m]nvm that was faster than i thought
12:57myriaFor those interested, everything I tracking patch wise is in torvalds master except the ATCPHY 3 via 4, and GPIO_SHARED_PIN
13:04snooze6214[m]yep from the main branch
13:06svenit looks like it's trying to access past the end of the sprr reservation: PT[10166e28000:101e6e2c000] -> RESERVED SPRR POOL
13:07svenmyria: i think you're confused, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be72934da8f5f1e432b98eff76c4d4df0d7b531e contains it, doesn't it?
13:09myriaI can't see it in https://github.com/torvalds/linux/blob/master/arch/arm64/Kconfig.platforms though
13:10svensnooze6214[m]: dunno how that can happen, i'd add some debug prints around the sprr allocation stuff
13:12svene.g. https://github.com/AsahiLinux/m1n1/blob/51b747dced07a58eacf5dabc31ed6f00bcfa20fd/src/hv/hv_sprr.c#L226 to confirm the bounds and then in https://github.com/AsahiLinux/m1n1/blob/51b747dced07a58eacf5dabc31ed6f00bcfa20fd/src/hv/hv_sprr.c#L234 for each allocation
13:14snooze6214[m]gotcha, let me spend some time with it :)
13:14svenand probably also in mirror_entry and maybe mirror_table since that's where it probably faults
13:15kennw has joined #asahi-dev
13:16svenif the i passed in to mirror_entry is too large that would cause it to write past its bounds i think.
13:20agball has joined #asahi-dev
13:22bgb has quit [Remote host closed the connection]
13:27bgb has joined #asahi-dev
13:28agball has quit [Ping timeout: 480 seconds]
13:34snooze6214[m]my bad, wait
13:36snooze6214[m]the build i sent you shouldn't have that
13:36snooze6214[m]no no, it faults without that
13:37snooze6214[m]wait, let me rebuild to be sure
13:37snooze6214[m]im fairly sure i made that change just to check what changes the base and top addresses in the mappings
13:38snooze6214[m]can confirm, still faults without it
13:40snooze6214[m]yep yep
13:52bgb has quit [Remote host closed the connection]
13:58bgb has joined #asahi-dev
14:01___nick___ has joined #asahi-dev
14:10ev4[m]maybe dumb question: what is the right way to run m1n1 rust tests? i can build fine, but running cargo test with all of the cargo build flags/args in the Makefile throws a bunch of errors about missing core imports
14:16chaos_princessm1n1 has tests?
14:17chaos_princessoh, the softfloat library has it
14:17chaos_princessthe short answer is - you don't
14:21chaos_princesswhat are you changing
14:31aissen_ has quit []
14:31aissen has joined #asahi-dev
14:34snooze6214[m]and somehow the SError didnt pop up??? the hv hung after a bit tho: https://termbin.com/bdsj
14:35Yushi has quit [Remote host closed the connection]
14:35Yushi has joined #asahi-dev
14:52svennvram is the only stuff in the adt that contains private stuff like wlan ssids, etc. isn't it?
15:00svensnooze6214[m]: you want to dump the state of all cores, it's also helpful if you have a development kernel with symbols
15:08croissant` has joined #asahi-dev
15:10bgb has quit [Remote host closed the connection]
15:15croissant has quit [Ping timeout: 480 seconds]
15:16bgb has joined #asahi-dev
15:22xdbob has quit [Remote host closed the connection]
15:23xdbob has joined #asahi-dev
15:33Bhyve has joined #asahi-dev
15:38jannauI assume it's different builds of the same kernel. maybe turning some debug builds on and possibly less optimizing compiler
15:40yukasven: in the M5 adt you sent me, it also has amcc-enable-mask = 1, amcc-plane-enable-mask = 15
15:50snooze6214[m]sven: how do i dump state of all cores with m1n1? i seem to be stuck spinning, also there's some strings pointed by the registers so i might be stuck in some error handler? https://termbin.com/mmyt
15:50svenhttps://fuzzinglabs.com/wp-content/uploads/2026/05/Navigating_iOS_MTE_Landscape.pdf which points to that... MTE crap :-(
15:51svensnooze6214[m]: ah.. the other cores might not even be up i think. otherwise cpu(n) and then context()
15:52svensnooze6214[m]: and yeah, that looks like a panic loop. could even be SPTM's panic loop that early
16:08snooze6214[m]:( im stuck with the serror again
16:19meow676767676 has quit [Ping timeout: 480 seconds]
16:24hex86[m]and to answer your question, I would really like to get it upstreamed; There's basically nobody using the haptic functionality in the kernel right now (See: Libinput) and so having more of the haptic functionality actually in the kernel would definitely help push adoption
16:24hex86[m]But I think a lot of the pre-requisite patches that lead up to it haven't been upstreamed yet
16:26hex86[m]I'd really like to take on the work of getting the pre-requisite patches upstreamed, I've submitted to the kernel before but I've never tried upstreaming patches from kernel forks, and I'd like to get experience on that, but I might need some advice because I've never tried
16:27hex86[m]and the magicmouse / apple hid drivers get a patch every so often anyways, as they're used for non-macbook devices too, and so finally getting these upstreamed would probably help reduce asahi maintainence burden too :D
16:31Bhyve has quit []
16:34meow676767676 has joined #asahi-dev
16:38sofusAmazing! Im not super familiar with how to handle dependencies. The dockchannel-hid driver which i imagine is the biggest pre-requisite, is activly being upstreamed
16:39sofusTechnically the driver depends on magic-mouse having mtp thing, but maybe that can just be ignored. If the dockchannel-hid driver works with the actuator, maybe its enough to simply write 'depends on: xxx'
16:42fatcullen has joined #asahi-dev
16:45msimonelli224 has joined #asahi-dev
16:46lynndotpy72 has quit [Quit: bye bye]
16:47lynndotpy72 has joined #asahi-dev
16:47bgb has quit [Remote host closed the connection]
16:47lynndotpy72 has quit [Read error: Connection reset by peer]
16:48lynndotpy72 has joined #asahi-dev
16:50msimonelli22 has quit [Ping timeout: 480 seconds]
16:50msimonelli224 is now known as msimonelli22
16:52bgb has joined #asahi-dev
17:05lynndotpy724 has joined #asahi-dev
17:12lynndotpy72 has quit [Ping timeout: 480 seconds]
17:12lynndotpy724 is now known as lynndotpy72
17:13hex86[m]sofus: Yeah I think so, and even the magicmouse.c file itself is really different from upstream, I have no idea how to even start with handling all of that..
17:13hex86[m]By the way, could you clarify what is meant by https://github.com/AsahiLinux/linux/pull/573#discussion_r4371104043 ?
17:24fatcullen has quit [Quit: This computer has gone to sleep]
17:24fatcullen has joined #asahi-dev
17:29sofusthe probe of the actuator. I will give you a small example by what i mean, but im really not sure its correct/better
17:35yuyichao has joined #asahi-dev
17:39yuyichao_ has quit [Ping timeout: 480 seconds]
17:39fatcullen has quit [Quit: This computer has gone to sleep]
17:41bgb has quit [Remote host closed the connection]
17:44fatcullen has joined #asahi-dev
17:46bgb has joined #asahi-dev
17:49sillyevelyn has joined #asahi-dev
18:04agball has joined #asahi-dev
18:14agball has quit [Ping timeout: 480 seconds]
18:14agball has joined #asahi-dev
18:17sveni have the fun problem that the MTE tags are stored at the end of RAM and I can't change that because the register is locked where I also want to store my SPRR shadow tables now
18:18svenso it's either back to patching SPTM's check that panics if I steal too much memory at the beginning of RAM or I have to find another way to steal memory from SPTM
18:28svensnooze6214[m]: ah, now i finally saw that string: "000001001de14000-0x000001001df77fff] CTRR-C regions don't match"
18:28snooze6214[m]yeahh, also i think i figured out why i am getting serrors
18:30svenhttps://github.com/AsahiLinux/m1n1/blob/51b747dced07a58eacf5dabc31ed6f00bcfa20fd/proxyclient/m1n1/hv/__init__.py#L2074 that's how region C is computed on m4 pro
18:32snooze6214[m]in m1n1's logs, i saw... (full message at <https://matrix.org/oftc/media/v1/media/download/AZ_MmSZfhl70fgJREB_BrBM_6c_GLv00I6avACI4pJGejAFZI47SYat2VWfxQaMQKIRH5_QJ5NrgIgw6LxH1lFlCehvG9EfwAG1hdHJpeC5vcmcvand0ekhqaHFMTUlCeUVpTXROVmVIa21p>)
18:33snooze6214[m]and that stopped the serrors
18:35snooze6214[m]but yeah now the hv is stuck at this CTRR-C regions don't match thingy
18:35snooze6214[m]ill raise a PR for this fix tho :)
18:36svenit's complaining that the region in AMCC doesn't match the region in the CTRR sysreg I think
18:36svenmaybe https://github.com/AsahiLinux/m1n1/blob/51b747dced07a58eacf5dabc31ed6f00bcfa20fd/proxyclient/m1n1/hv/amcc.py works different on A18 pro
18:37sventhe sysreg CTRR regions are written by SPTM but the regions inside AMCC are set up by iboot
18:38svenso i fake the values inside AMCC (https://github.com/AsahiLinux/m1n1/blob/51b747dced07a58eacf5dabc31ed6f00bcfa20fd/proxyclient/m1n1/hv/__init__.py#L2074) but if a18 pro's SPTM writes something different to the CTRR sysregs it'll panic
18:38svenAMCC [0x00000100060a0000-0x00000100060abfff] and ACC [0x000001001de14000-0x000001001df77fff] <-- first is what it reads from MMIO and second is what it wrote itself iirc
18:40snooze6214[m]26.6.2
18:40fatcullen has quit [Quit: This computer has gone to sleep]
18:42snooze6214[m]25G83
18:42snooze6214[m]okay i feel dumb... i dont have the latest copy of m1n1 🤦♂️
18:44snooze6214[m]i realized when i couldnt find the amcc.py file... im sorry lol
18:45svenlong before it even reaches its exclave bootstrap code I think. but that's probably gonna be fine, the real test will be what happens once XNU is up and tries to talk to something it expects to run inside those exclaves
18:46snooze6214[m]now it stoped at: TTY> HV: AMCC interrupt hook failed; can't start the hypervisor
18:46snooze6214[m]and then just quits the hv
18:48snooze6214[m]alright 👍️
18:51sillyevelyn has quit [Remote host closed the connection]
18:52snooze6214[m]yoo i see a loading bar :)
18:53snooze6214[m]no debug logs tho... i think it panicked because the loading bar is stuck :/
18:54chaos_princessjust to clarify, you have both m1n1 and xnu logs open, right?
18:55millefy14 has joined #asahi-dev
18:55aurora_ has joined #asahi-dev
18:56svenwhen you see the progress bar SPTM has handed control to XNU and it prints something like "Darwin Kernel 26.x.x..." very very early
18:57snooze6214[m]yep it is stuck in a loop: wfe b loop
19:00aurora has quit [Ping timeout: 480 seconds]
19:00aurora_ is now known as aurora
19:04snooze6214[m]>>> u.mrs(ELR_EL12)... (full message at <https://matrix.org/oftc/media/v1/media/download/AaQJVzXtoLaQ1Dly2T2QlR3v97VQ0Od5gGyPaXchgKWCxOjB6uEn1RClwOwkss9pgug4PtjGYhef3FLsJKH7wV1CehvIvTKAAG1hdHJpeC5vcmcvbXdNelBSTnhLYlVlaFpYRUJCalBmbFhh>)
19:04snooze6214[m]* u.mrs(ELR_EL12)
19:04snooze6214[m]0xfffffe003cf4ba84
19:04snooze6214[m]u.mrs(FAR_EL12)
19:04snooze6214[m]0xfffffebcb4130000
19:04snooze6214[m]is there some way to see the disassembly at some address in m1n1?
19:05snooze6214[m]u.mrs(ESR_EL12)
19:05snooze6214[m]0x2000000
19:05snooze6214[m]this just means serror i think?
19:06snooze6214[m]chaos_princess: ah nvm... this is probably it 🤦♂️im sorry again 😭
19:07snooze6214[m]will xnu logs appear as another tty in /dev?
19:07chaos_princesssnooze6214[m]: everyone started out knowing ~nothing, don't worry
19:07chaos_princessyes, usually the same device but with 3 instead of 1
19:08snooze6214[m]hmm neo has a usb hub in between, so i dont think they'll pop up... i know yuka was talking about this a while back
19:08chaos_princessirrelevant
19:08chaos_princessttys are virtual
19:09svenif i were to bet this is an UNDEF instruction because there's some new sysreg in the a18 pro kernel the m4 pro one doesn't have ;)
19:10ZacharyEdminster[m] has joined #asahi-dev
19:13agball has quit [Remote host closed the connection]
19:24snooze6214[m]i dont see a new ACM device come up in /dev :( https://termbin.com/v45e idk if this matters but im using debugusb + kisd
19:26snooze6214[m]yeah, i didnt get device more working because of the usb hub thing that yuka mentioned
19:27snooze6214[m]alright, ill look into it tomorrow then. thanks for all the help :)
19:27snooze6214[m]s/more/mode/
19:31hello0092 has joined #asahi-dev
19:52yukapeople have gotten it to work by doing usb3 device mode, since the usb3 lanes are not going through the hub. there is only sloppy code for this though.
20:19fatcullen has joined #asahi-dev
20:22fatcullen has quit []
20:31fatcullen has joined #asahi-dev
20:33fatcullen has quit []
20:34fatcullen has joined #asahi-dev
20:36midou_ has quit [Ping timeout: 480 seconds]
20:37fatcullen has quit []
20:39fatcullen has joined #asahi-dev
20:41fatcullen has quit []
20:51fatcullen has joined #asahi-dev
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:21svenok, pretty sure that sptm doesn't set up any stage 2 translations for cl4 so this shouldn't be too bad I think
21:28hex86[m]Haha hopefully we can get this merged at some point, I've left it sitting around for maybe a little too long!
21:29chaos_princesshow does mte interact with virtualization?
21:29iwuvmika has quit [Remote host closed the connection]
21:30svenso far the issue is that there's some apple IMPDEF reg that points to end_of_useable_ram - $whatever and that's where I store the sprr shadow pageables
21:30chaos_princessyea, trying to read the relevant sections of arm arm, and intel sdm is a lot more comprehensible in general
21:30svenand sptm really wants to be able to access (or at least create pagetable entries) for that region
21:32chaos_princesswhat about having shadow page tables right before it in physical memory, but hide them from sptm
21:32chaos_princessand virtualize said reg
21:33svenI don't know if SPTM tries to write to that region.. though I guess I could remap those writes via stage 2
21:33chaos_princessdoes macos expose mte to vms?
21:34chaos_princesslike, qemu, or utm, or w/e
21:34svenyeah, I think that might work. [fake mte tag region][sprr shadow pagetables][real mte tag region] and then just map fake to real via stage 2 and pretend RAM ends after the fake region
21:35chaos_princesswhere does el1 mte store tags?
21:35chaos_princesssince that can probably be remapped
21:36iwuvmika has joined #asahi-dev
21:43fatcullen has quit [Quit: This computer has gone to sleep]
21:51svenah.. I think there's no need for a separate EL1 storage because the allocation tags are for _physical_ addresses
21:51rany has quit [Quit: Leaving]
21:52rany has joined #asahi-dev
22:02slowlydev has joined #asahi-dev
22:04slowlydev has quit []
22:09midou has joined #asahi-dev
22:10jsk_ has joined #asahi-dev
22:13jsk has quit [Ping timeout: 480 seconds]
22:14jsk_ is now known as jsk
22:18svenbut I think I may have found a way to steal some memory (just a little 2 GiB hole) from SPTM without it complaining :D
22:18svenif it doesn't I'll just go back to patching out that panic and steal memory from the beginning of RAM again
22:20yukaI sadly only managed to set up the reproducer for dcp and get the traces for comparison. I see a few differences in the endpoints started, in invalidations etc. But probably need to get the m1n1 experiment into either state in order to isolate the cause.
22:20rosalyntg has quit [Remote host closed the connection]
22:22fatcullen has joined #asahi-dev
22:22rosalyntg has joined #asahi-dev
22:24mmediouni[m]chaos_princess: no MTE exposed through virtualization right now
22:24mmediouni[m]for macs
22:25croissant` has quit []
22:25mmediouni[m]tags are stored in a tag memory region that's accessible only to SPTM but with a twist. If the pages that reference that tag page are not using MTE, then the underlying MTE tag page is usable as regular memory
22:25croissant has joined #asahi-dev
22:26JamesCalligeros[m]yuka: is this still 14.8.3 on m3*?
22:26svenyuuup, creating a SPTMDebug memory region and just making it 16 KiB (which it actually is supposed to be I think) + 2 GiB seems to work :D
22:27chaos_princesscan confirm the above
22:27JamesCalligeros[m]thats annoying
22:27JamesCalligeros[m]the tracer in main should be good enough to see whats going on now
22:27mmediouni[m]sven: virtual MTE (on virtual memory instead of physical, so that you can have different tags on the same underlying physical page depending on the view) is an ARMv10 feature - FEAT_VMTE
22:27chaos_princessalso starting endpoints in macos order did not help (i think)
22:28JamesCalligeros[m]oh yeah i remember you mentioning this a little while ago now
22:28mmediouni[m]lower priority item, I expect it to come at some point
22:29JamesCalligeros[m]i hope we dont have to feed it a bunch of property chunks before starting things now, that would suck big time
22:29chaos_princessand yes, things go wrong quite early, even before they start chatting over afk/epic
22:29mmediouni[m]MS asked for FEAT_VMTE and x86's memory tagging extension is also virtual memory-based
22:29JamesCalligeros[m]oh even better....
22:30mmediouni[m]Apple and Android-land most likely going to stick with pMTE
22:31svenalright, it's crashing some some sysreg inside XNU now that I don't patch out yet. enough progress for today
22:32chaos_princesssomeone got one of those two working (don't remember which)
22:32chaos_princessbut max is problematic
22:32JamesCalligeros[m]sofus and a-ramses both have DT MRs that supposedly work
22:32JamesCalligeros[m]ok i feel a lot better if its just the max, but that is weird
22:33JamesCalligeros[m]is there some power domain we're not switching on?
22:35fatcullen has quit [Quit: This computer has gone to sleep]
22:40hardy94 has quit [Quit: hardy94]
22:46fatcullen has joined #asahi-dev
23:04fatcullen has quit [Quit: This computer has gone to sleep]
23:06fatcullen has joined #asahi-dev
23:36chadmed has quit [Quit: Konversation terminated!]
23:36chadmed has joined #asahi-dev
23:40ninelore_ is now known as ninelore
23:42rany has quit [Quit: Leaving]
23:42rany has joined #asahi-dev
23:44bgb has quit [Remote host closed the connection]
23:50bgb has joined #asahi-dev
23:56iwuvmika has quit [Ping timeout: 480 seconds]