From: Tobias Heider Subject: Re: scmi(4): add mbox transport and perf protocol To: tech@openbsd.org, Landry Breuil Cc: kettenis@openbsd.org, patrick@openbsd.org Date: Mon, 18 Nov 2024 11:02:42 +0100 On November 18, 2024 7:29:05 AM GMT+01:00, Landry Breuil wrote: >Le Mon, Nov 18, 2024 at 01:01:11AM +0100, Tobias Heider a écrit : >> Here is the promised diff to get scmi for cpu frequency management >> working on the Snapdragon X Elite. Roughly speaking this adds two >> big new features: mailbox transport and the scmi perf protocol. >> >> Mailbox transport is very similar to smc which we already support. >> Messages are written to a shared memory region, instead of an SMC call we >> use a mailbox doorbell to notify the platform that our request is ready. >> On X Elites this is done using the CPUCP mailbox which we support via >> qccpucp(4). The attach function for the mbox transport is deferred to make >> sure our mailbox driver is available when we need it. >> There are a lot of possible optimization here, instead of polling we could >> use mailbox interrupts and for PERFORMANCE_LEVEL_GET we probably want to >> switch to using a fast channel at some point. >> >> The perf protocol allows us to read and set the performance level of our >> performance domains. On the X Elite we have 3 domains, each spanning 4 cpu >> cores. This patch adds sensors to expose the current frequency and power >> consumption for each domain. It is a bit pointless since the level doesn't >> really change currently. Eventually we probably want to hook this up to >> cpu(4) to expose it to apm(8). >> >> The output on my T14s looks like this: >> $ sysctl | grep scmi >> hw.sensors.scmi0.power0=0.22 W >> hw.sensors.scmi0.power1=0.29 W >> hw.sensors.scmi0.power2=0.31 W >> hw.sensors.scmi0.frequency0=2976000000.00 Hz >> hw.sensors.scmi0.frequency1=3417600000.00 Hz >> hw.sensors.scmi0.frequency2=3417600000.00 Hz >> >> Test feedback and reviews welcome. I don't have a machine using scmi-smc or >> the clock protocol so I'd appreciate if someone could test those too. > >on the omnibook x14 i get this difference in dmesg: > >-"scmi" at mainbus0 not configured >+scmi0 at mainbus0 >... >+scmi0: no tx mbox > >and no hw.sensors.scmi0. > >where should i look to figure out what to change ? sounds like qccpucp is missing >