Page MenuHomeFreeBSD

asmc: replace hardcoded model table with universal probing
Needs ReviewPublic

Authored by guest-seuros on Wed, Apr 15, 11:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 8:50 AM
Unknown Object (File)
Sat, Apr 18, 8:50 AM
Unknown Object (File)
Sat, Apr 18, 8:50 AM
Unknown Object (File)
Sat, Apr 18, 7:00 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 Passed
Unit
No Test Coverage
Build Status
Buildable 72274
Build 69157: arc lint + arc unit