#
✕ nick:nickchan
#asahi-dev · 2026-07-08 15:54
nickchanand if deep_sleep is false there then the code does not touch acc_ovrd
#asahi-dev · 2026-07-08 15:53
nickchan"going into deep sleep" in smp_stop_cpu() of m1n1 does sound like powering down the cluster
#asahi-dev · 2026-07-08 15:51
nickchancpu_sleep(0) in m1n1
#asahi-dev · 2026-07-08 15:50
nickchanI suppose it could be a problem when shutting down the last core in a cluster
#asahi-dev · 2026-07-08 15:49
nickchanright but wouldn't those be for shutting down the cluster
#asahi-dev · 2026-07-08 15:47
nickchanCPU_OVRD/CYC_OVRD should be per core
#asahi-dev · 2026-07-08 14:40
nickchanand reduce that main el3 stack to 16k since its main use is for the exception code which is the same code used by the secondaries that had 16K stack already in experiments like find_regs
#asahi-dev · 2026-07-08 14:36
nickchancould probably get rid of dummy_stack entirely as well, it should never be used and in practice it also doesn't work because it's not 16 byte aligned
#asahi-dev · 2026-07-08 14:30
nickchanon the main branch
#asahi-dev · 2026-07-08 14:29
nickchanthese two stacks accounts for 75% of the difference between the .macho and the .bin which is caused by whether .bss is included
#asahi-dev · 2026-07-08 14:28
nickchan though moving the main EL3 stack would require an appropriate reservation in FDT on the devices that need it
#asahi-dev · 2026-07-08 14:22
nickchanthe boot-args makes it easy to do in asm
#asahi-dev · 2026-07-08 14:21
nickchanone optimization im thinking is moving the main stack to just after top_of_kdata and using a seperate variable to tell the allocator about this fact
#asahi-dev · 2026-07-08 14:20
nickchannp it wouldn't cause immediate problems so i can make it less messed up later
#asahi-dev · 2026-07-08 14:06
nickchanonly for the secondary though since this would leak memory if another m1n1 is chainloaded after secondary has been started
#asahi-dev · 2026-07-08 14:02
nickchanand then the secondary stack size can still be 16K i think
#asahi-dev · 2026-07-08 14:01
nickchansince the memory needs to be reserved anyway
#asahi-dev · 2026-07-08 13:47
nickchanroom
#asahi-dev · 2026-07-08 13:47
nickchanwhat i am saying is there's tons of rom for optimization and splitting bin is not going to be required
#asahi-dev · 2026-07-08 13:47
nickchanbut then it's still okay, though with psci-via-efi branch the size does become *slightly* concerning but probably won't cause immediate issues
#asahi-dev · 2026-07-08 13:46
nickchanSobek[m]: doubt it it would go to the point of needing different bins since the m1n1 size is not optimized at all now
#asahi-dev · 2026-07-08 13:45
nickchanand im dealing with devices that may have only less than 512 MiB of usable dram
#asahi-dev · 2026-07-08 13:44
nickchanas the size of the .bin
#asahi-dev · 2026-07-08 13:44
nickchanyes but the static allocation is everywhere
#asahi-dev · 2026-07-08 13:43
nickchanwith m5 ultra 36 cpus it would make the m1n1.bin over 2 MiB of just stacks
#asahi-dev · 2026-07-08 13:42
nickchannot really a fan of making the secondary stack a static allocation
#asahi-dev · 2026-07-08 09:04
nickchaniboot traces makes it so much simpler
#asahi-dev · 2026-07-08 09:03
nickchani can already read from the nand from m1n1 python on a8x so a7/a8/a8x storage support would be coming eventually
#asahi-dev · 2026-07-08 09:02
nickchanif you include every a11 user there's maybe 10
#asahi-dev · 2026-07-08 09:02
nickchani say there's about 5
#asahi-dev · 2026-07-08 09:01
nickchanI can't tell for sure i don't have the stats
#asahi-dev · 2026-07-08 09:00
nickchanthere is about 5 times more Linux on iPhone 8 users than mac pro asahi linux users then
#asahi-dev · 2026-07-08 08:59
nickchanfraud ! ! !
#asahi-dev · 2026-07-08 08:57
nickchanabout the revenue now I still use macOS a lot but I think my way of using it doesn't generate much revenue for apple
#asahi-dev · 2026-07-08 08:57
nickchani wonder who is the other one
#asahi-dev · 2026-07-08 08:54
nickchanrribly broken more visible like on social media to attract scrutiny about these "computers" but then at the same time I feel like that could pick some fights that one does not want to deal with
#asahi-dev · 2026-07-08 08:54
nickchansometimes i thought about making the fact that this mode is ho
#asahi-dev · 2026-07-08 08:49
nickchan(computers that could run custom operation systems are taxed differently in some)
#asahi-dev · 2026-07-08 08:48
nickchanapple has not much incentive to test the mode unless they face legal pressure of "this is not really a computer" and had to be taxed differently
#asahi-dev · 2026-07-07 17:59
nickchanwe will see; too early to worry about them now
#asahi-dev · 2026-07-07 17:58
nickchanwould probably use it in u-boot though
#asahi-dev · 2026-07-07 17:57
nickchan...which doesn't exist on the devices that had 1 GiB of RAM as well as on T2
#asahi-dev · 2026-07-07 17:57
nickchan64K is technically supported in pre-M1 but I do avoid it in Linux since it would try to make a 512 MiB contiguous reservation for cma or whatever
#asahi-dev · 2026-07-07 05:53
nickchanthe pcie-apple.c is directly derived from corellium codes but setup_port() is in probe in the original corellium pcie driver; it must be changed to init at some point in upstreaming
#asahi-dev · 2026-07-06 11:06
nickchan4level paging is still good for 4k paging though
#asahi-dev · 2026-07-06 11:05
nickchan... no i do not really need mmu for EL3
#asahi-dev · 2026-07-06 09:43
nickchanin practice on 16K the second L1 table would never be used in m1n1 so this does save memory even on m1
#asahi-dev · 2026-07-06 09:21
nickchanjust 30 lines extra
#asahi-dev · 2026-07-06 09:20
nickchanthe diff isn't even that big 1 file changed, 88 insertions(+), 56 deletions(-)
#asahi-dev · 2026-07-06 09:15
nickchangotta rewrite the memory management comments too

plus ›