#
…

2026-07-23

00:08amarioguy has joined #asahi-dev
00:09alessaba has joined #asahi-dev
00:20nepeat has quit [Ping timeout: 480 seconds]
00:27nepeat has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:00j-baz00 has joined #asahi-dev
02:17j-baz00 has quit [Ping timeout: 480 seconds]
03:11foltz5 has joined #asahi-dev
03:20nora has joined #asahi-dev
03:21debtquity has quit [Remote host closed the connection]
03:22nora_ has quit [Ping timeout: 480 seconds]
03:22debtquity has joined #asahi-dev
04:42mattia013 has joined #asahi-dev
05:26voidah has quit [Ping timeout: 480 seconds]
05:33pb17 has quit [Ping timeout: 480 seconds]
05:33voidah has joined #asahi-dev
05:38pb17 has joined #asahi-dev
05:42voidah has quit [Ping timeout: 480 seconds]
05:47yukasven: FB23924837 Slow boot with macOS 27 beta on MacBook Neo
05:49yukaThe only way I found to make it boot quickly again was dfu to 26.x. The extra 20-30 seconds of boot time occur before the iBootStage1 info is printed
05:50yukaI attached the logs with timestamps to the FB
05:50voidah has joined #asahi-dev
05:59voidah has quit [Ping timeout: 480 seconds]
06:07voidah has joined #asahi-dev
06:16voidah has quit [Ping timeout: 480 seconds]
06:23voidah has joined #asahi-dev
06:27yukaI revise what I said about samsung uart being unusable on A18 Pro and M5
06:27yukaIt's still making problems on A18 Pro, but M5 Pro works fine after I fixed some issues with my device tree
06:29yukathere's still the compatibility issues between different Macs' samsung uarts too
06:30yukaso it has its issues, but M5 can probably use the same s5l uart compatible as M1..M3
06:31rhlvista[m]Does that mean the address In the soc.c is incorrect?
06:31vup has quit []
06:32voidah has quit [Ping timeout: 480 seconds]
06:32yukaother issue
06:35yuka(the device tree I originally used to test samsung uart with on t6050 was missing always-on on ps_aic, that's why it crashed in s5l init)
06:38hardy94 has joined #asahi-dev
06:39voidah has joined #asahi-dev
06:45yukathis fixes samsung serial on A18 Pro
06:45yukathe 1<<10 bit in UCON is set and must not be cleared during resetport
06:46yukanot 1000% sure but this maybe this is RXTO_ENA
06:48voidah has quit [Ping timeout: 480 seconds]
06:55voidah has joined #asahi-dev
07:03voidah has quit [Ping timeout: 480 seconds]
07:12voidah has joined #asahi-dev
07:12yukaIf I understand correctly what RXTO does, this is likely something different
07:12yukaotherwise it would break RX not TX
07:13mattia013 has quit [Quit: mattia013]
07:15hardy94 has quit [Quit: hardy94]
07:27voidah has quit [Ping timeout: 480 seconds]
07:35voidah has joined #asahi-dev
07:37vup has joined #asahi-dev
07:41nickchanlinux says that bit is responsible for clock selection
07:42nickchanhaving that bit set should use the 24 mhz clock
07:43voidah has quit [Ping timeout: 480 seconds]
07:45nickchani don't think it's ever figured out but clearing that bit could be interesting for another clock
07:51voidah has joined #asahi-dev
07:54hardy94 has joined #asahi-dev
08:00voidah has quit [Ping timeout: 480 seconds]
08:09voidah has joined #asahi-dev
08:18voidah has quit [Ping timeout: 480 seconds]
08:26voidah has joined #asahi-dev
08:34voidah has quit [Ping timeout: 480 seconds]
08:42voidah has joined #asahi-dev
08:50voidah has quit [Ping timeout: 480 seconds]
08:56hardy94 has quit [Quit: hardy94]
09:00voidah has joined #asahi-dev
09:09voidah has quit [Ping timeout: 480 seconds]
09:17voidah has joined #asahi-dev
09:25voidah has quit [Ping timeout: 480 seconds]
09:33voidah has joined #asahi-dev
09:35yuyichao_ has joined #asahi-dev
09:39yuyichao has quit [Ping timeout: 480 seconds]
09:42voidah has quit [Ping timeout: 480 seconds]
09:51voidah has joined #asahi-dev
09:58yukaAre you sure? Why would linux clear it then
09:59voidah has quit [Ping timeout: 480 seconds]
10:02NickChan[m]yuka: i believe linux clears it because the uart clock in device tree is clk_uart_baud0 and as the only baud clock
10:02NickChan[m]looking at S3C2410_UCON_CLKMASK
10:05voidah has joined #asahi-dev
10:14voidah has quit [Ping timeout: 480 seconds]
10:14DD65 has quit [Remote host closed the connection]
10:15DD65 has joined #asahi-dev
10:22voidah has joined #asahi-dev
10:31voidah has quit [Ping timeout: 480 seconds]
10:38voidah has joined #asahi-dev
10:47voidah has quit [Ping timeout: 480 seconds]
10:48rivendell has joined #asahi-dev
10:52voidah has joined #asahi-dev
11:00voidah has quit [Ping timeout: 480 seconds]
11:09voidah has joined #asahi-dev
11:17voidah has quit [Ping timeout: 480 seconds]
11:17sofuswhat is cs42l84? I think there comes a sound from the magsafe side when the module is loaded, on t6030
11:18sofusits like a slight biip - static - biip sound
11:21rivendell has quit [Ping timeout: 480 seconds]
11:21rivendell has joined #asahi-dev
11:25voidah has joined #asahi-dev
11:26chadmedsofus: its the headphone jack codec
11:33chaos_princesscan someone check if tunable_LN1_RX_TOP_USB_EQA is something that exists on m3 or m3pro? it is in /arm-io/atc-phy0
11:34voidah has quit [Ping timeout: 480 seconds]
11:41voidah has joined #asahi-dev
11:49voidah has quit [Ping timeout: 480 seconds]
11:58voidah has joined #asahi-dev
12:06voidah has quit [Ping timeout: 480 seconds]
12:07hami has joined #asahi-dev
12:10yukanickchan: this confuses me even more. S3C2410_UCON_CLKMASK is not used anywhere
12:12hami has quit [Quit: hami]
12:15hami has joined #asahi-dev
12:15voidah has joined #asahi-dev
12:16jannauchaos_princess: the property exists for both but is None for M3. M3Pro has values
12:22minecrell has quit [Read error: Connection reset by peer]
12:24minecrell has joined #asahi-dev
12:24voidah has quit [Ping timeout: 480 seconds]
12:24hami has quit [Quit: hami]
12:24hami has joined #asahi-dev
12:26pb17 has quit [Ping timeout: 480 seconds]
12:27nickchanyuka: can ignore then I must have made an assumption from the comments saying s5l is "close enough to s3c2410 for earlycon"
12:27pb17 has joined #asahi-dev
12:31voidah has joined #asahi-dev
12:31hami has quit [Read error: Connection reset by peer]
12:40voidah has quit [Ping timeout: 480 seconds]
12:49voidah has joined #asahi-dev
13:01voidah has quit [Ping timeout: 480 seconds]
13:09voidah has joined #asahi-dev
13:18voidah has quit [Ping timeout: 480 seconds]
13:26voidah has joined #asahi-dev
14:27voidah has quit [Ping timeout: 480 seconds]
14:34nicklvh has joined #asahi-dev
14:56nicklvh has quit [Ping timeout: 480 seconds]
14:58nicklvh has joined #asahi-dev
15:06nicklvh has quit [Ping timeout: 480 seconds]
15:08nicklvh has joined #asahi-dev
15:15chadmed has quit [Read error: Connection reset by peer]
15:15chadmed has joined #asahi-dev
15:17voidah has joined #asahi-dev
15:18nicklvh has quit [Remote host closed the connection]
15:21nicklvh has joined #asahi-dev
15:26voidah has quit [Ping timeout: 480 seconds]
15:40nicklvh has quit [Ping timeout: 480 seconds]
15:49mattia013 has joined #asahi-dev
15:53yuka has quit [Remote host closed the connection]
15:58yuka has joined #asahi-dev
16:00barusuGuys, I got a good deal on a logic board (A2442). It has touch ID and usb ports. But there is no battery. I tried to power it up but it's not powering on and only draws 5 watts from my USB C adapter
16:00barusuDo you have an idea how I can power it up without the battery?
16:01barusuI wanted to set it up for rev engineering since I didn't want to mess up my main machine
16:01mattia013 has quit [Quit: mattia013]
16:02nickchanbarusu: did you use a 96 watt usb c adapter?
16:03barusuI only have 65 watts
16:03nickchanYou need at least 96 if the board does not have a battery
16:04barusuI guess I'll have to order it. But has it been documented to power up without a battery with 96 watts onwards?
16:04barusuThis is the 14 inch MBP M1 Pro
16:06nickchan that information is from dosdude1
16:07barusuDang it. I guess I'll order it. In the worst case, I can just sell it. I was so excited to set up a custom rig for this. Hope it works
16:29mattia013 has joined #asahi-dev
16:32barusunickchan: do you have the link to the video by any chance?
16:42nickchannot from a video
16:53barusuOh, I just wanted to confirm with them before I made the purchase
17:01chaos_princess has quit [Quit: chaos_princess]
17:01chaos_princess has joined #asahi-dev
17:14nicklvh has joined #asahi-dev
17:37runxiyu_ has quit [Remote host closed the connection]
17:38runxiyu has joined #asahi-dev
17:43nickchanformat check for 4level paging is still running for some reason
17:44nickchanit's been running for 2hrs
17:58nicklvh has quit [Remote host closed the connection]
18:01vimproved has quit [Remote host closed the connection]
18:02vimproved has joined #asahi-dev
18:12svenlol, even cancel workflow seems to do nothing
18:12svenah, no, now it worked
18:38nnym_ has quit [Quit: quitting out | tjmnkrajyej@gmail.com]
18:49vimproved has quit [Remote host closed the connection]
18:50vimproved has joined #asahi-dev
19:17enverbalalic has joined #asahi-dev
19:21yukaI'm thinking about how to refactor usb / tps6598x to make it more maintainable
19:21enverbalalic has quit [Read error: Connection reset by peer]
19:21enverbalalic has joined #asahi-dev
19:21yuka(in m1n1)
19:22yukaI think we definitely want some helper function or macro for "do a thing for each hpm in the system"
19:22yukaand one for "find the hpm with index X (usually 0) and do a thing with it"
19:22enverbalalic has quit []
19:23yukaOr maybe they can be the same, as finding a specfic hpm can be done by iterating all and returning early out of the macro
19:25yukahowever the part I don't have a good solution for is whether to call tps6598x_init for each iterated hpm even if the caller ultimately doesn't want to do anything with it
19:25enverbalalic has joined #asahi-dev
19:25enverbalalic has quit []
19:26yukaI can add a condition expression to the macro, but this makes it kinda complex?
19:30enverbalalic has joined #asahi-dev
19:31enverbalalic has quit []
19:34enverbalalic has joined #asahi-dev
19:35enverbalalic has quit []
19:37mattia013 has quit [Remote host closed the connection]
19:40enverbalalic has joined #asahi-dev
19:41enverbalalic has quit []
19:41svenmeanwhile, i've been thinking about emulating sprr with shadow pagetables. the trickiest part is probably how to track changes, and i can really only come up with two solutions which i both dislike: a) map all pagetables read-only for the guests and track all changes whenever we get a trap to EL2 and b) since we know that only SPTM can change
19:41svenpagetables just figure out which functions touch them and sniff arguments there
19:41sveni thought about trapping TLB maintenance instructions but that's not gonna be enough I think. if you're just adding new entries you don't have to invalidate anything if I read the ARM ARM correctly
19:44svenbreak before make is e.g. invalidate old entry -> dsb -> tlbi -> add new entry -> dsb -> entry is live, so there's no maintenance insn we could trap after that entry has been added
19:44enverbalalic has joined #asahi-dev
19:49chaos_princesslazy trapping? only fill our page table entry when it faults on the relevant address, and kill our entries if get a tlb instruction
19:49svenhm.. true, that could work. requires patching the EL1 exception handler but this needs a bunch of patches to xnu anyway
19:50sventhe faul will go to EL1, won't it?
19:50chaos_princesscan't we set it as no access in l2 page table?
19:51chaos_princessand yes, we will probably need to patch el1 exception handler for instruction emulation anyway
19:51svenso sptm adds a new page at 0x1234 to the stage 1 table and we don't know about it so the shadow table just has no mapping.. ohh
19:51svenwe could make the shadow table redirect unknown addresses to a page that's no access in stage 2
19:51chaos_princessright, so when kernel goes there, we get a el2 fault
19:51sventhen we'd get the trap
19:52svenmy current plan is to just replace all the unknown instructions we know about (genter,gexit,msr,mrs for locked sysregs) with hvc
19:52svenshould work since we know that xnu's code can't change anyway
19:53svenbut i guess we will need patching for when EL0 tries to e.g. access that sprr map for JIT
19:53chaos_princesswhat about sptm itself? it loads things under it, those can change the code
19:53svenmy understanding is that at least XNU and that secure kernel thingy are pre-loaded by iboot
19:54chaos_princessis all exclave code r/o? if so, then just patching should work
19:54sveni don't know about the EL0 code
19:54sven(or GL0, whatever)
19:55sveni'm pretty sure EL1/GL1 is all r/o
19:55chaos_princessarguably el0/gl0 shouldn't touch msrs anyway
19:56svenonly exception i know about is that SPRR thing
19:56chaos_princesscan that be flipped from el0 directly?
19:56svenand maybe we can disable that by messing with the commpage
19:56svenit's the fast JIT thingy
19:56svenflips between RX and RW
19:56chaos_princessi know, i just expected that the flip is a syscall
19:57svenlet me double check but iirc it's a direct sysreg write
19:57svenyup, direct sysreg write from EL0
19:57chaos_princessok, but like, it is in libsystem.B.dylib or whatever, can't we just patch the on-disk copy
19:58chaos_princesswe are breaking SIP anyway
19:58svenyeah, maybe
19:58svenmaybe commpage is enough because that's where it gets the values from
20:00nickchan has quit [Quit: ZNC 1.9.1+deb2+b3 - https://znc.in]
20:00nickchan has joined #asahi-dev
20:03sventhis is all gonna be so very cursed. i think i love it :D
20:12svenmacos vms have the same userspace as bare-metal macos, don't they?
20:12sventhen adjusting the commpage (or some other place) should be enough to at least prevent EL0 from accessing anything fancy
20:12svenGL0 is probably another story though i guess
20:14sventhough... what would GL0 do? i don't think it even wants anything like JIT
20:14yurix_ has joined #asahi-dev
20:18yurix has quit [Ping timeout: 480 seconds]
20:19yurix_ is now known as yurix
20:23jmax[m] has joined #asahi-dev
20:23jmax[m]This may be a dumb question (I'm only understanding like 10% of what is being discussed here about sprr shadow pages). Is this to allow for running XNU under m1n1 in raw object mode? And this effort is to make it so we can teach m1n1 which page tables XNU needs so that m1n1 can map them for XNU (instead of SPTM doing it)? And we do that through brute force by mapping the tables only when XNU traps when trying to access them? If this handles
20:23jmax[m]CPU level page table mappings (since we can intercept CPU EL2 faults) how do we use this approach for device mappings (like GPU) when we can't trap device faults gracefully? I assume XNU uses SPTM to map both CPU pages and Device pages. Hopefully my question is not complete nonsense lol
20:24chaos_princessdevice pages are mapped via darts
20:24chaos_princessnot via cpu page tables
20:25jmax[m]Ah! And darts are managed directly by XNU (via mmio based driving and configuration of the darts) and not by SPTM?
20:25chaos_princessand sptm will be doing the mapping, just indirectly, as m1n1 will trap it's attempts to modify page tables and do whatever m1n1 needs to do
20:25svenSPTM will still do all the mapping, we'll just translate them to something the CPU understands in raw boot mode
20:25chaos_princessdarts are also managed by sptm, but also, who cares it is all memory accesses from el1 anyway
20:26svenstill need to mull this over a bit more but this is starting to sound like feasible plan
20:26chaos_princesswe will not be doing any fancy memory remapping, beyond trapping whatever the currently active tracer needs, and stealing a bit of memory for m1n1 to run it
20:30jmax[m]Makes sense. Didn't know we could run SPTM in raw object mode. Thanks for the explanations!
20:30chaos_princessthe whole thing is that we can't but we are going to do it anyway
20:31chaos_princessand the above cursed discussion is on how to do it
20:34svensecure kernel is gonna be extra fun. i think i could even prototype all this on an M3 by just pretending it doesn't have GXF/SPRR before trying bring up on M4 or M5
20:47nela has quit [Quit: Ping timeout (120 seconds)]
20:47nela has joined #asahi-dev
20:53lafield has joined #asahi-dev
21:04lafield has quit [Read error: Connection reset by peer]
21:38nathanW[m] has joined #asahi-dev
21:49chaos_princessthinking of it, NV has literally the same problem as sptm emulation, just steal code from them
21:50yukais the question if the non-vm xnu kernels can run inside NV (or a macOS VM at all)?
21:51yukasince the VM environment (that I know of) looks more like raw boot mode
21:52yukalike, do they expose SPRR inside VMs at all
21:53chaos_princessnot in a way that matters
21:53chaos_princesss/matters/is useful/
21:54enverbalalicyuka... dc uart, earlycon and console works on 6041... i figured out what i have been doing wrong... it's too embarrassing to even write here... when i first cloned asahi kernel and compiled it, for some reason i copied over linux/arch/arm64/boot/Image.gz to linux/Image.gz
21:54enverbalalicmy proxyclient linux.py has been referencing that Image.gz file for the last 25 days...
21:55yukagood that it's working now :)
21:55chaos_princesswelcome to the club :P (also done similar mistakes before)
21:56enverbalalicthe moment i realized that made me want to run head first into a wall
21:56j`eyenverbalalic: right of passage
21:57JamesCalligeros[m]I think i spent 3 days last week trying to figure out why run_linux_guest wasnt working
21:57JamesCalligeros[m]It was because the Image.gz was from the last kernel build i did before moving to efi image builds :p
21:57JamesCalligeros[m]Which…. Did not have the new dcp driver in it
21:59yukayay for net -50 loc
22:00chaos_princessok, i am going to complain about style straight away: 1. please never function pointer w/o a typedef. 2. Can we make it similar to linux kernel style _foreach macros?
22:01yukare typedefs of course
22:01yukaThe problem with a macro is stuff still needs to happen after the user-specified code (shutdown the tps, shutdown the bus)
22:02yukamaybe it's possible with macros, I wouldn't know how
22:02chaos_princesspossible but cursed and probably not worth it
22:04enverbalalickeyboard also works...
22:07yukaadded typedefs for the function pointer signatures
22:08yukaI will soon re-do my dcuart / device-tree branches without the assumption that the samsung serial is broken
22:08yukaso samsung serial will be default earlycon on the newer devices too
22:10yukaIt would be nice if m1n1 had some extra features for debugusb:
22:10yuka1. define EARLY_DCUART_BASE for each board
22:10yuka2. use it in debug_putc ifdef USE_DEBUG_USB
22:11yuka3. if both a samsung uart and dcuart are in the fdt, rewrite stdout-path / earlycon to use the dcuart ifdef USE_DEBUG_USB
22:11yukabasically bring dockchannel uart support on par with the samsung uart
22:12yukadebug_putc will be slightly less useful if one does not have a second mac or central scrutinizer, because the self-enter debugusb happens rather late, but it's still useful for debugging secondaries startup and chainloading things :)
22:13enverbalalicsecond mac still has issues with generations not being compatible right ? my m2 -> m4 scenario ?
22:13yukaYes, but maybe also solvable
22:21enverbalalic has quit [Quit: enverbalalic]
22:25pb17 has quit [Ping timeout: 480 seconds]
22:27enverbalalic has joined #asahi-dev
22:28enverbalalicquestion, what's the easiest way to update the second mac install where i replaced the boot object on ? run the installer again and do all that stuff again ?
22:31pb17 has joined #asahi-dev
22:34lafield has joined #asahi-dev
22:35yukayou can also do "bputil -n" in 1TR which will revert the boot object back to xnu
22:35yukaand then do a normal update an install m1n1 again
22:35yukaBut I usually reinstall or even dfu dev devices for each beta
22:37enverbalalicwell dfu isn't an option i have an actual mac install here
22:37enverbalalicbut -n is what i wanted so great
22:38enverbalalicand i keep my actual install on the same version as my second install always so should be fine without it
22:58lafield has quit [Ping timeout: 480 seconds]
…