#
…

2026-06-15

00:15hdbngr has joined #asahi-dev
00:24hdbngr has quit [Ping timeout: 480 seconds]
00:55ipatch_ has joined #asahi-dev
00:55ipatch has quit [Read error: Connection reset by peer]
01:38kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
01:40jnn has joined #asahi-dev
01:43jn has quit [Ping timeout: 480 seconds]
01:44freetolga has joined #asahi-dev
01:45steinsgate has quit [Quit: Connection closed for inactivity]
01:58marvin24 has quit [Ping timeout: 480 seconds]
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:35tobhe has joined #asahi-dev
02:41xal_ has joined #asahi-dev
02:42tobhe_ has quit [Ping timeout: 480 seconds]
02:43xal has quit [Read error: Connection reset by peer]
02:56kaleryeblueberryoboe has joined #asahi-dev
03:20webeshadjkaksd[m] has joined #asahi-dev
03:36nora_ has joined #asahi-dev
03:38nora has quit [Ping timeout: 480 seconds]
03:43marvin24 has joined #asahi-dev
04:23kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
04:25kaleryeblueberryoboe has joined #asahi-dev
04:34ddxtanx_ has joined #asahi-dev
04:34ddxtanx has quit [Read error: Connection reset by peer]
04:57hdbngr has joined #asahi-dev
05:11hdbngr has quit [Ping timeout: 480 seconds]
05:24hdbngr has joined #asahi-dev
05:36hdbngr has quit [Ping timeout: 480 seconds]
05:39chadmed has quit [Quit: Konversation terminated!]
05:39chadmed has joined #asahi-dev
05:40hdbngr has joined #asahi-dev
05:48hdbngr has quit [Ping timeout: 480 seconds]
06:19mattia013 has joined #asahi-dev
06:23ipatch_ has quit [Ping timeout: 480 seconds]
06:27hdbngr has joined #asahi-dev
06:38hdbngr has quit [Ping timeout: 480 seconds]
06:43kaleryeblueberryoboe has quit [Remote host closed the connection]
06:51chadmedcan we merge the VRR stuff please? i want to move on to finishing up HDR
06:52chadmedand get the surface handling thing i did ages ago ready for merging
07:01nickchanupdated soc codenames now M5 is, in fact, t8142
07:01chadmedtheyre so creative
07:03nickchani did not fill Sotra D but what it is could not be more obvious
07:04chadmedm1 anniversary edition
07:04jnn is now known as jn
07:05chadmedcool the pipeline still works
07:08jannaunickchan: based on ipsw template Sotra C ADT with 36 CPUs it looks a safe bet
07:09jannauwe might end up with a m3 ultra / m4 max repeat and get m5 ultra and m6 max
07:10chadmedi wonder how many ultra-equipped studios they actually sell
07:10nickchanallegedly Nevis is some Apple Watch chip, and Borneo should be A20 Pro
07:11nickchanchadmed: enough to run out of stock at least
07:11nickchanwith the current DRAM pricing
07:12chadmedlet me be more specific, i wonder how many ultra-equipped studios they actually sell to people who arent ai hypebeasts
07:12nickchani really think most people that bought the high ram ultras are doing ai inference of sorts
07:12chadmedi know they cant keep up with the demand for minis from the openclaw types
07:13jannauchadmed: I'm unhappy that only forced VRR works. I'd prefer if the driver at least worked with a compositor which can deal with the needs_modeset to enable VRR
07:13nickchanthe kind of demand good for those ultra would need to require loads of VRAM, but not fast VRAM
07:14nickchanxcode cloud runs on M2 Ultra
07:14chadmedreally impressive work from the industry to make apple's dram prices look reasonable
07:15chadmedjannau: fair enough. ill ask xaver again but iirc the consensus was "lets wait and see what the drm maintainers decide to do about the hdmi spec"
07:15nickchanxcode cloud 27 anyways 26 is on intel xeon gold
07:15nickchanand the xcode cloud 27 gives you 12 cpus per CI runner
07:16chadmedi'll finish off HDR and surface handling separately, because i do want to pick up oliver's work on compression too (if he doesnt come back ~soonish)
07:16nickchanthe m2 ultra has 24 cpu so it looks like not even apple is escaping their own 2 VM limit
07:16jannauchadmed: this is unrelated to what compositors actually do
07:17chadmedi know, but are there any compositors that currently allow vrr toggling with a full modeset?
07:17chadmedif kwin folks want to wait for drm to make a decision then we are kind of at the mercy of that anyway
07:21nickchanseems like some recent T2 firmware have the SMC gain enough keys to "support" the macsmc-battery driver which is not something I want to support because half of the keys ar
07:21nickchane bogus and minimum design voltage is 0 mV
07:21chadmedchaos_princess: are you reasonably confident that the M3 device audio configs dont need any changes? i'll tag asahi-audio and the ucm conf stuff if so and add some comments to macaudio for the of match table
07:22chadmed(im mostly concerned about the speakersafetyd parameters, as long as we dont melt anyones tweeters im happy for now)
07:22jannauI fear VRR is in anycase a lost cause on apple. xaver is also waiting on controls for min/max refresh for VRR. As far as I see we can't control that either without modeset
07:24chadmedi didnt think that was going to be a hard requirement
07:24nickchani feel like for cpu if some sysreg workaround ugly enough is posted on the list then the people at Arm Limited may bother apple to unlock them and that could be much faster
07:25hdbngr has joined #asahi-dev
07:25JamesCalligeros[m]There is a possible nightmare ending scenario to that too
07:26sveni think file feedback report -> forward FBxxx number to some apple engineer kinda works so no need to try and escalate that to something else
07:27JamesCalligeros[m]Yeah we dont need to pick unnecessary fights
07:28jannauit kinda works. we need to learn to file those earlier instead of wasting time/effort trying to find the issue on our side
07:29svenand if this is regarding wfi: at this point it looks like the "force wfi to use clock gating only" debug settings are just gone in hardware so even filing a feedback report wouldn't really help us
07:30DD65 has joined #asahi-dev
07:31nickchanthe register still exists at least
07:32svenyes, but xnu doesn't touch it anymore. there's even a "/* CPU_OVRD register accesses are banned */" comment
07:32nickchanthere's other explainations for that NO_CPU_OVRD, like the job is done by sptm or preconfigured by iBoot
07:34hdbngr has quit [Ping timeout: 480 seconds]
07:34nickchanbugs aside the only one that could really know is Apple
07:35chaos_princesschadmed: for !j504 - yes
07:35svenfrom yesterday: 11:36:17 <sven> fwiw, we essentially got confirmation that wfi losing state on m4+ is expected because that cyc_ovrd thing we set just doesn’t exist anymore
07:36JamesCalligeros[m]Cool, i will sort it all out in a bit then
07:36ddxtanx_ has quit [Remote host closed the connection]
07:36nickchanconfirmation from... somewhere?
07:37Sobek[m]nickchan: What is Sotra D ?
07:37svenit's obvious enough at this point, not gonna comment anymore
07:37chaos_princessand idk what's up with internal mics. They re-done how the decimator works, so we may or may not need to re-tune them, idk.
07:37JamesCalligeros[m]Well the good news is that theyre not tuned at all currently apart from the gain
07:37nickchanSobek[m]: M5 Ultra probably
07:38chaos_princessi _think_ i am doing the aop part correctly, but admac is not cooperating, and macos is doing something cursed to it that i may or may not need to do too
07:40Sobek[m]<JamesCalligeros[m]> "There is a possible nightmare..." <- Yep, ARM could pressure Apple into locking down the thing more.
07:41hdbngr has joined #asahi-dev
07:42DD65 has quit [Remote host closed the connection]
07:47DD65 has joined #asahi-dev
07:55chadmedi guess i need to find a j504 argh
07:55chadmedmy family thinks im insane :D
07:56hdbngr has quit [Ping timeout: 480 seconds]
07:57chadmedhow are they still $2000....
07:58chaos_princessis this aud? cause 2k usd for that thing is crazy even new
07:58chadmedaud for a refurbed one
07:58chadmedso like 1200 eur or thereabouts
08:04hdbngr has joined #asahi-dev
08:12ipatch has joined #asahi-dev
08:13hdbngr has quit [Ping timeout: 480 seconds]
08:34chaos_princess has quit [Quit: chaos_princess]
08:34chaos_princess has joined #asahi-dev
08:36hdbngr has joined #asahi-dev
08:41pb17 has quit [Ping timeout: 480 seconds]
08:44pb17 has joined #asahi-dev
08:46hdbngr has quit [Ping timeout: 480 seconds]
08:46nickchanfwiw yuka's patch works well on pre-M1 with cyc_ovrd workaround disabled or force down so I will give R-b when it hits the list
08:48yukaI sent it to the auto detected lists (arm-kernel) yesterday but forgot to add the asahi list
08:49yukaBut you should have received a copy too?
08:49nickchanwell yes I just thought it's not on the list because it's not on asahi
08:50yukaCan I fix this somehow without getting two threads?
08:51svennah, also doesn't matter much at this point
08:51chaos_princessjust fix it in v2
08:51chaos_princessyou can do it, but it is kinda complicated, and if you get it wrong, you annoy everyone
08:53hdbngr has joined #asahi-dev
08:54gargantua has joined #asahi-dev
09:04gargantu1 has joined #asahi-dev
09:05chadmedchaos_princess: do you have the AIDs for the M3 machines handy?
09:06gargantua has quit [Ping timeout: 480 seconds]
09:07chadmedthanks :)
09:09yukaFor v2, I should add a check for EL2? Anything else?
09:09svenso i guess wfi keeps state in el1 then?
09:09yukaI mean it probably depends on what EL2 does?
09:10yukaBut under mac os hvf I would assume so, or else VMs would be very broken
09:10chaos_princesscan you run the experiment on m4 in el1 then?
09:10yukain el1 under ...?
09:10chaos_princessthere is el1_call or sth in m1n1
09:10yukaSure, can do
09:10chaos_princesswith hcr configured not to trap
09:11kaleryeblueberryoboe has joined #asahi-dev
09:13gargantu1 has quit []
09:14oliverchadmed: please feel free. I am still here and reading. I am using my patches without any issues since month now, but I don't have the time to follow up on that.
09:15chadmedno stress
09:19kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
09:26freetolgaso still waiting for apple to fix some register thing?
09:27kaleryeblueberryoboe has joined #asahi-dev
09:33yukaI can't set my mac os 27 installation to permissive (or even reduced) security on the macbook neo :(
09:33freetolgayo good to know
09:33freetolgai was almost gonna flash it
09:33freetolgais this the beginning of a new trap?
09:33freetolgaofftopic sorry
09:34chadmedyuka: any special message?
09:34kaleryeblueberryoboe has quit [Remote host closed the connection]
09:34freetolgaoh wait even reduced not being available means no downgrade
09:34chadmedsounds like a bug
09:34nickchanin practice this only means no old beta downgrades
09:35chadmedbputil -nkcas not working is sus
09:35nickchancause apple signs every released version still
09:35kaleryeblueberryoboe has joined #asahi-dev
09:35freetolgabtw is the normal way to idevicerestore the ipsw
09:35freetolgadoes it normally appear in settings?
09:36chadmedwhat are you trying to achieve? does what appear in settings/
09:36chadmedidevicerestore is a cli tool for linux
09:36freetolgai want to try macos 27 beta
09:36freetolgasee if m1n1 works
09:36chaos_princessdo you have an asahi install, and is your device a laptop
09:36freetolgam4 macbook air
09:37chadmedyou need to have an apple developer account (not hard to get)
09:37chadmedoh they changed that?
09:37yukabputil -nkcas error: https://x0.at/VByt.txt
09:38yukait didn't happen on my M4, which I freshly dfu'd
09:38chaos_princessi couldn't do csrutil disable on 27 in a vm either with the same error
09:38freetolgaah no need for me to waste time then
09:38freetolgaalso i should lowk get a second mac if i want to actually do devleopment
09:39chaos_princessgeneric linux works
09:39chaos_princessi started with a 2011 intel mbp as the host device running linux
09:40hardy94 has joined #asahi-dev
09:41chadmedthe only reason to have a second apple silicon mac is if you need debug uart via tuxvdmtool
09:41chadmedotherwise just use whatever linux box
09:41chadmedi started with a 2017 13" mbp with a cactus battery :P
09:41freetolgaanything different on first macos 27 beta on m4 yuka
09:41hdbngr has quit [Ping timeout: 480 seconds]
09:50kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
09:50nickchanthe cpu_pstate_latencies seems to not like higher pstate slower than low pstate
09:51hdbngr has joined #asahi-dev
09:55nickchanactually no, what it doesn't like is frequency starting to decrease when a switch is initiated, only to increase again halfway through the switch
09:55kaleryeblueberryoboe has joined #asahi-dev
09:55yukanickchan: probably the core you're testing is in the same cluster as the boot core which m1n1 is running on
09:56yukaso the cluster can't go into the higher pstate
09:56nickchanno, it's cursed core switching on A10
09:56yukaoh well
09:56nickchanif switching from one core type to another then the frequency always decrease to around 450 MHz, change MPIDR, and start to increase again
09:57nickchanthat is if both init and end freq is higher than around 450 MHz
09:57nickchani think i will just keep the workarounds to myself and add experiments for other socs
10:00nickchanyuka: how did you run cpufreq experiments on neo anyways
10:00nickchanin my case once the cpu switch to the lower state, it can't keep up with 1.5M baud anymore
10:00yukaDebugusb
10:01yukaAlso 1.5M baud generally does not work on my neo, I always comment out the baudrate switch if I need to use the serial
10:02nickchanfor me 1.5M baud don't seem to work at <600 MHz, but on 1152 MHz it seems to be find
10:02yukaIt depends which device is on the other side
10:02yukaAnd what OS it is running
10:03nickchan(albeit with an error rate that cause adt fetch to explode 1/3 of the time)
10:03yukaM4 Mac Mini booted in mac os can talk 1.5M to Neo running m1n1 somewhat reliably
10:03yukaLeading to me carrying around a mac mini as uart adapter
10:04yuka(Until I got kisd working)
10:04yukaM1 Pro booted in Linux can never talk 1.5M to a Neo
10:05yukaCentral scrutinizer worked sometimes I think but something else is borked there (it is very unreliable with the Neo)
10:05nickchanin any case it seems i should keep all pre-m1 cpu pstate experiments to myself for longer since none of them work without usb dwc2
10:05jannauchadmed: what do you need j504 for? I'd expect it to be very close to j[3-5]14 audio-wise. I haven't had time yet to look into it
10:06yukaPre m1 has dockchannel uart?
10:06yukaAh no usbc probably
10:06nickchanyuka: Only on T2 and Apple TV 4K
10:06chadmedjannau: TS parameters are different, so it must use different woofers and tweeters
10:06nickchanboth of which suffers from cursed core switching
10:07chadmedim not sure why theyd do that given its the same chassis as the others but whatever, its different
10:07chadmedyou can test the 314 config if you want, but thats going to suck regardless because it needs redoing
10:13jannauI'd expect Apple has to do testing anyway to detect unexpected issues due to changes (missing usb-c port, single fan and different main pcb) and then there isn't any reason not to do a proper per device calibration
10:16kaleryeblueberryoboe has quit [Remote host closed the connection]
10:24Sobek[m]chaos_princess: (Btw, it is interesting that the two releases that dropped a whole architecture (Snow Leopard and Golden Gate), are both kind of low on features)
10:26chadmedthe SL betas were slightly less busted
10:26chaos_princessgate does not fully drop an architecture
10:26chaos_princessin order for rosetta2 to work, they still need to compile the entire macos userland for x86
10:26chaos_princessonly kernel bits are gone
10:27Sobek[m]chaos_princess: Snow Leopard had Rosetta 1 too. It's more that they drop support for hardware with that archtiecture. (Host Architecture ?)
10:33nickchansome leaf executables like launchd is gone
10:47jannauspeakers have the same part number but the audio board differs between j504/j514. the latter seems to be just the headphone amp though
10:47chadmedprobably fine to use the same userspace config then
10:48chadmedstill need AID for j575 then i will do the releases
10:48chadmedi think it's either 32 or 33
10:51chaos_princesscan we even support it? it comes with 15
10:53nickchanm3 does not have sptm in 15
10:53chadmedit was more for putting in all the places we document the AIDs and configs (speakers.txt and macaudio.c) but i can just leave it out
10:53chaos_princessanyway, give me a few mins, will get the aid
10:58chaos_princessacoustic-id = 33
10:59chadmedawesome, so diffing the austrips does work :P
11:00hdbngr has quit [Ping timeout: 480 seconds]
11:01hdbngr has joined #asahi-dev
11:17yukain el1_call I am not allowed to write CNTP_TVAL_EL0 / CNTP_CFG_EL0. is that configurable?
11:19yukaor should this always cause an exception which EL2 then handles by doing the thing?
11:20chaos_princessCNTHCTL_EL2.EL1PCEN
11:28yukahuh, CNTHCTL_EL2 = 0
11:28yukaEL1PCEN is set would mean things are trapped
11:28yukabut it isn't set, so EL1 should be able to access things directly?
11:28yukabut it isn't
11:29chaos_princess0b1 This control does not cause any instructions to be trapped.
11:30yukaok, so u.msr(CNTHCTL_EL2, u.mrs(CNTHCTL_EL2) | 2)
11:30yukastill causes an exception
11:31hardy94 has quit [Remote host closed the connection]
11:31chaos_princessalso set EL1PTEN
11:31yukano difference
11:34chadmedokie doke userspace audio components have been tagged/released, couple of trivial kernel patches at https://github.com/AsahiLinux/linux/pull/519
11:35chaos_princessmaybe try using the virtual counter then?
11:37yukaYes that works
11:38yukaand the wfi retention is the same as in EL2
11:38chaos_princessso kvm will have to trap it
11:38yukaAh I didn't check if wfi trapping was enabled, but I would have noticed right?
11:39yukaSo what does this mean for the erratum?
11:40chaos_princessstill only apply in el2, kvm unbreak can be in a different patch
12:24yukaI forgot to remove the r-b when sending v2 🤦
12:24yukawell, but now it's on the asahi list too
12:27yukaalso used actual b4 send this time
12:28nickchancurrentEL check don't work for nested case :melting_face:
12:28nickchanwell, currentEL would be 2 in a VM with nested enabled
12:28yukaAh well
12:28yukacan it read cyc ovrd?
12:28yukadoes it get the correct value for cyc ovrd
12:29chaos_princessit shouldn't do that anyway
12:29yukaOk, can it check that it is a guest with nested virt?
12:29yuka(how?)
12:29nickchanonly real reliable indicator of running bare metal is checking "apple,arm-platform" in the root node fdt compatible
12:30nickchanthis also allows the workaround to be enabled under m1n1 hypervisor
12:31chaos_princesscan we put a 'wfi-broken' into the cpu dt node or something?
12:31chaos_princessseems better than indirect guesses
12:32fl0id_oftc has joined #asahi-dev
12:44svenah crap, nested virt ofc exists
12:49nickchanchaos_princess: apple,arm-platform is what cpuidle-apple does
12:50nickchanso it works well enough for bare metal cpu behavior
12:50yukait no longer does that because it breaks on M4+, so I introduced an explicit list of hosts to enable it on
12:51chaos_princesscpuidle-apple is not upstream
12:51nickchanthe check is still there and your list comes after that check
12:51yukaahh true
12:52nickchan...actually, where is "must use psci" even mentioned?
12:52jannauplease move the main discussion on list. that's more constructive than to confuse people with new revisions every 12 hours
12:54yukayes, also preserves the context of the changes
12:56nickchani will write a reply on list
13:06kaleryeblueberryoboe has joined #asahi-dev
13:06nickchani hope upstream can reply soon
13:06svenhm, i don't even remember where "must use pci" came from. maybe during early upstreaming on list? or maybe even on irc
13:06pb17 has quit [Ping timeout: 480 seconds]
13:11chaos_princessthe only thing i can find is "Further, it is essential that the ARMv8 SoC provide a fully functional implementation of PSCI; this will be the only mechanism supported by ACPI to control CPU power state. "
13:11chaos_princesswhich, well, covers acpi, not dt
13:17sveni remember the argument being that they don't want to open the floodgates for N custom cpuidle drivers if they would accept one for apple silicon
13:18chaos_princesscounterargument - we don't have an el3 to hide our sins in
13:20pb17 has joined #asahi-dev
13:20svenno need to convince me ;)
13:21svendo we need callbacks or whatever to other drivers for deep sleep? because that would be very annoying with just psci as well
13:21chaos_princesswell, it is an argument for the list
13:22chaos_princessyou mean the acc_ovrd deep sleep? - unclear, but signs point to yes
13:22chaos_princesslike 'probably have several gpio drivers become proxies to psci' levels of yes
13:23nickchaneven the non retention wfi is already annoying enough
13:23svensounds like another good argument against psci-via-efi-or-whatever
13:24nickchanthe rvbar is still inside m1n1 while in linux
13:24chadmedyeah its just that its a lot of work that no one really wants to do rn
13:24chaos_princessoverwrite it with a jmp
13:25nickchannow you need to restore the state of a bunch of system registers
13:26chadmedyeah but if m1n1's entrypoint is a trampoline that can either start m1n1 or go do that other stuff if coming out of sleep on an already booted system then that becomes """"""easy""""""
13:27chadmedits been on the pile of things to do for years, and at one point there was even a very dirty poc floating around
13:27chadmedits just not really been terribly important
13:28nickchani mean, wasn't there an issue where the uncore is not powering down on pro/max/ultra on deep wfi
13:28nickchanbut macos does the same thing and power consumption is perfectly fine there
13:29hdbngr has quit [Ping timeout: 480 seconds]
13:29chadmedi have a feeling a lot of our terrible idle power draw is no longer related to the application cores at this point
13:30chadmedbig one i havent a clue how we'd actually investigate is whether or not PSR is actually being used on the laptops for example
13:30chadmedthe tcons support it, but are we actually doing it? cant really tell just from iomfb
13:32nickchanspeaking of trampoline m1n1 entry point kind of has a trampoline now to drop to EL1 from EL3
13:33chaos_princesswe also keep dcp and gpu up.
13:33chaos_princessmacos aggressively turns gpu off when it is not being used
13:34chadmedi played with making pstate 0 the "base" for agx aaages ago and it helped slightly but caused massive performance issues
13:34chaos_princessdoes that turn it off via pmgr?
13:34chaos_princesscause that is what macos does
13:35nickchando we keep dcp on? we have dcp_poweroff() and dcp_poweron() in firmware logs when going to s2idle
13:35chaos_princessit is on via pmgr
13:36chadmednot sure if it goes that far but iirc its supposed to be clock gated at the very least in that state
13:36nickchanwasn't pstate 0 usually like, 24 MHz
13:38hdbngr has joined #asahi-dev
13:46hdbngr has quit [Ping timeout: 480 seconds]
13:49jannaudcp is at most clock-gated via "apple,min-state = 4". my understanding for agx was that it has its own aggressive power management
13:50chaos_princessmacos does even further, if you load the pmp tracer, there is constant agx on/off spam
13:51jannauwe tried runtime PM in DCP but gave up since marcan and me didn't get it reliable
13:56hdbngr has joined #asahi-dev
14:08hardy94 has joined #asahi-dev
14:12kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
14:14hdbngr has quit [Ping timeout: 480 seconds]
14:16kaleryeblueberryoboe has joined #asahi-dev
14:22hdbngr has joined #asahi-dev
14:27kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
14:31hdbngr has quit [Ping timeout: 480 seconds]
14:32hdbngr has joined #asahi-dev
14:38kaleryeblueberryoboe has joined #asahi-dev
14:41hdbngr has quit [Ping timeout: 480 seconds]
14:45hdbngr has joined #asahi-dev
14:59nickchani think when the rvbar entry on primary cpu code path is exercised, the malloc entries will get corrupted
14:59chaos_princessthat is fixable
14:59nickchanafter exercise that code path two times, would result in `dlmalloc: internal error` at least on a7
15:00nickchanright, it definitely shouldn't init the heapblock again
15:00kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
15:02nickchanand m1n1 needs to remember where its pagetables are
15:05svensure, that's all fixable once we actually get a PoC with that path working
15:17nickchanthere's also the issue of fb initialized while mmu is off which is very slow
15:18sventhe first step is to get a PoC running that actually ends up at the entry after a deep sleep wfi. we can then just fix any issues that arive
15:18sven*arise
15:19nickchani will use my devices then
15:19nickchanhm actually let me try to make it happen on t6000
15:20yukaI'm trying to run m1n1 in m1n1 hv on M4
15:21yukawe need an equivalent of cpu_features->apple_sysregs_unlocked in the proxyclient code, or is there a way to pull cpu features from the running m1n1 to not duplicate them?
15:21yukalots of stuff the hv is trying to do (SPRR, GXF, AMX) is not available ofc
15:22svencould probably just add a proxyclient call that returns the cpu features
15:24yukajust return the raw struct and then unpack it in the proxyclient?
15:24yukaor is that too error prone in case the struct changes
15:24svensure, unless you want to build something more fancy :D
15:25svenwe don't guarantee that different versions of proxyclient vs m1n1 work anyway so the only error that could happen is a change to the structure on the m1n1 side without a change to the .py file
15:29yukathe current status is: I know that it runs up to the eret in hv_enter_guest
15:29yukaI don't quite understand where it jumps from there
15:29yukaand then I get an exception which I can't quite tell where it is coming from
15:30yukait should start executing guest code? is the pc part of SPSR which is restored in hv_enter_guest?
15:32yukadoesn't look like it
15:34yukait sounds like it should continue executing at elr_el1
15:35yukaI don't see that being set anywhere related to hv
15:36yukaAh I'm dumb it gets passed and gets written to elr_el2
15:36yukathe parameter is literally called entry
15:39kaleryeblueberryoboe has joined #asahi-dev
15:41hdbngr has quit [Ping timeout: 480 seconds]
15:48mattia013 has quit [Remote host closed the connection]
15:49mazjannau: thanks for the feature register dump. I'm glad to see that NV2 is indeed present... could be a replacement for the M2 air one day.
15:50mattia013 has joined #asahi-dev
15:56picnoir has quit [Ping timeout: 480 seconds]
15:57nickchansimply clear cyc_ovrd's wfi_ret and setting wfi force start does not allow boot cpu to restart via wfi at least on t6000
15:58nickchanreplacement only if one does not need the arm performance counters inside the vm
15:59mazPMU emulation is pretty much useless for anything real, TBH.
16:00nickchanmicrosoft Windows needs it but clearly you are not the target audience for that kind of stuff
16:02mazquite.
16:04picnoir has joined #asahi-dev
16:23Maya[m]1 has joined #asahi-dev
16:28chaos_princessis pmu related to locked reg or sth else?
16:35hdbngr has joined #asahi-dev
16:42nickchanchaos_princess: pmu emulation uses hacr_el2 [56]
16:44nickchanthe contents of this register is implementation defined
16:44nickchanwith bit [56] set access to ARM PMUv3 registers in EL1 will be trapped to EL2 with EC==0x3f
16:45nickchan has quit [Quit: ZNC 1.9.1+deb2+b3 - https://znc.in]
16:45nickchan has joined #asahi-dev
16:45nickchanerm im stupid ive been setting cyc_ovrd's wfi_ret backwards
16:59kaleryeblueberryoboe has quit [Remote host closed the connection]
17:02nickchansmp_start_secondaries is required for some reason.
17:02hdbngr has quit [Ping timeout: 480 seconds]
17:04yukasmp_start_secondaries means the cluster doesn't turn off, no?
17:04yukaif some other core is not in deep sleep
17:05yukathe question is if you can do this with all cores in a cluster and still have them wake up again somehow
17:06nickchani think it's possible with an IRQ instead of a FIQ but i think i will leave it at this today
17:07nickchansince FIQ is part of the core complxes despite being handled in the "AIC" driver in linux
17:07svennickchan: nice!
17:08svenhrm.. though we'd ideally want all cores to be in deep sleep for this to make sense
17:09svenwe know that the deep sleep code in utils.c or whatever works for the seconaries
17:09sveniirc chaos_princess managed to put all cores to sleep but never got them to wake up again :(
17:10chaos_princessi also set a pile of extra stuff in ACC_OVRD, and actually do this on all cores
17:10nickchani did not do deep sleep in that code
17:10nickchanall i did is set non retention wfi
17:11svenand then it ended up at the entry point again?!
17:11yukaI think this is a terminology problem
17:11yukaat least with deep sleep I meant exactly what you did
17:11nickchansven: correct if the secondaries are active
17:11nickchanthere's a difference if you look at m1n1 code when stopping the cpu there's a deep_sleep switch
17:12chaos_princessdeep sleep = exactly the same as you do in cyc_ovrd, but extra stuff in acc_ovrd
17:12chaos_princessm1n1 also has those
17:12gargantua has joined #asahi-dev
17:14nickchanif i want to do this seriously then I need a good IRQ source
17:14nickchan...maybe the SMC mailbox irq can work for that
17:14nickchanpress power button => IRQ
17:16chaos_princessdoesn't work, or i am configuring it wrong
17:16chaos_princessone of the aop gpios is hooked up to lid switch
17:20hardy94 has quit [Quit: hardy94]
17:28hdbngr has joined #asahi-dev
17:33xal_ has quit []
17:34xal has joined #asahi-dev
17:51hdbngr has quit [Ping timeout: 480 seconds]
17:53wabam9391 has joined #asahi-dev
18:00hdbngr has joined #asahi-dev
18:28hardy94 has joined #asahi-dev
18:29mattia013 has quit [Read error: Connection reset by peer]
18:29hardy94 has quit [Remote host closed the connection]
18:35wabam9391 has quit [Ping timeout: 480 seconds]
18:42hdbngr has quit [Ping timeout: 480 seconds]
18:51hdbngr has joined #asahi-dev
19:39gargantua has quit [Ping timeout: 480 seconds]
19:40nora_ has quit [Quit: WeeChat 4.6.3]
19:42pb17 has quit [Ping timeout: 480 seconds]
19:46pb17 has joined #asahi-dev
19:53kaleryeblueberryoboe has joined #asahi-dev
19:54rensenwxre19 has joined #asahi-dev
19:54rensenwxre1 has quit [Read error: Connection reset by peer]
20:35kaleryeblueberryoboe has quit [Read error: Connection timed out]
21:02kaleryeblueberryoboe has joined #asahi-dev
21:10kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
21:10kaleryeblueberryoboe has joined #asahi-dev
21:20kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
21:38Calandracas__ has joined #asahi-dev
21:41hdbngr has quit [Ping timeout: 480 seconds]
21:45Calandracas_ has quit [Ping timeout: 480 seconds]
21:50hdbngr has joined #asahi-dev
21:54Tramtrist has quit [Quit: leaving]
21:54kaleryeblueberryoboe has joined #asahi-dev
21:54Tramtrist has joined #asahi-dev
22:10kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
22:12hdbngr has quit [Ping timeout: 480 seconds]
22:20hdbngr has joined #asahi-dev
22:29hdbngr has quit [Ping timeout: 480 seconds]
22:35kaleryeblueberryoboe has joined #asahi-dev
22:37hdbngr has joined #asahi-dev
22:45chaos_princessCan someone with a t6030 run `python3 proxyclient/tools/run_guest.py --cpus=4 -d -s kernel.development.t6031.14.8.3 dev.kc.macho.development.t6031.14.8.3 -- "debug=0x14e serial=3 -enable-kprintf-spam wdt=-1 pmgr-debug=0xffffffff pmgr-debug-devices=0xffffffff pmgr-debug-always-on=0xffffffff pmgr-debug-energy-model=0xffffffff pmgr-debug-restore-counter=1 pmgr-trace=1 -disable_mtx_chk
22:45chaos_princessclpc=0"` and send me the xnu logs? (substitute your own kernel ofc)
22:47hdbngr has quit [Ping timeout: 480 seconds]
22:56hdbngr has joined #asahi-dev
23:03catred has quit [Remote host closed the connection]
23:03catred has joined #asahi-dev
23:05hdbngr has quit [Ping timeout: 480 seconds]
23:13hdbngr has joined #asahi-dev
23:19kaleryeblueberryoboe has quit [Read error: Connection timed out]
23:22hdbngr has quit [Ping timeout: 480 seconds]
23:25kaleryeblueberryoboe has joined #asahi-dev
23:29hdbngr has joined #asahi-dev
23:33kaleryeblueberryoboe has quit [Ping timeout: 480 seconds]
23:37pb17 has quit [Ping timeout: 480 seconds]
23:41hdbngr has quit [Ping timeout: 480 seconds]
23:42kaleryeblueberryoboe has joined #asahi-dev
23:44pb17 has joined #asahi-dev
23:49hdbngr has joined #asahi-dev
23:54kaleryeblueberryoboe has quit [Remote host closed the connection]
23:54kaleryeblueberryoboe has joined #asahi-dev
23:57hdbngr has quit [Ping timeout: 480 seconds]
…