Page MenuHomeFreeBSD

asmc: replace hardcoded model table with universal probing
ClosedPublic

Authored by guest-seuros on Apr 15 2026, 11:56 AM.
Tags
None
Referenced Files
F157177077: D56405.diff
Tue, May 19, 1:35 AM
F157176363: D56405.diff
Tue, May 19, 1:27 AM
Unknown Object (File)
Sun, May 17, 10:07 AM
Unknown Object (File)
Sun, May 17, 10:03 AM
Unknown Object (File)
Sun, May 17, 8:45 AM
Unknown Object (File)
Sat, May 16, 11:44 PM
Unknown Object (File)
Sat, May 16, 5:21 AM
Unknown Object (File)
Fri, May 15, 2:07 AM
Subscribers

Details

Summary

Probe SMC keys at attach time to detect hardware capabilities,
supporting all Intel Apple machines without per-model entries.

Sensors are discovered by scanning sorted SMC key ranges for
known prefixes and types. Capabilities such as SMS, fan safe
speed, and ambient light are detected by key presence.

A global key description table provides human-readable names
for well-known temperature sensors.

Tested on:

  • MacBook Pro (Early 2007, Mid 2014, Mid 2015)
  • MacBook Air (Early 2015, Mid 2017)
  • iMac (Mid 2011, Late 2013)
  • Mac mini (Mid 2011)
Test Plan

Covers Intel Apple systems that expose the SMC via the APP0001 ACPI device (2006–2017 models).

Not yet tested on 2018+ models with the Apple T2 chip.

On these systems, the T2 mediates access to the SMC,
which may restrict or virtualize key enumeration.

For reference i used the source below for the mapping:

The driver has the complete list.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

guest-seuros held this revision as a draft.
guest-seuros edited the test plan for this revision. (Show Details)
guest-seuros added reviewers: imp, ngie, adrian.

I will rebase after D55807 land.

guest-seuros edited the test plan for this revision. (Show Details)

rebase

This revision is now accepted and ready to land.Thu, Apr 30, 12:36 AM