Evgeny Zinoviev uploaded patch set #2 to this change.

View Change

util/smctool: A tool for reading Apple SMC keys

SMC is an embedded controller on Apple computers. With this tool you
can read SMC keys. It supports various data types and can output
result in various formats.

Example how to get battery capacity level:

smctool -k B0FC -t ui16 # returns Full Capacity of Battery 0
smctool -k B0RM -t ui16 # returns Remaining Capacity of Batery 0

So B0RM / B0FC * 100 = battery capacity in percents.

Another example, reading current fan speed, which is returned as
unsigned fixed point number:

sudo ./smctool -k F0Ac -t fpe2

Change-Id: I6161203e52b7f7eaa1205de06e8241d7d40a7481
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
---
A util/smctool/Makefile
A util/smctool/description.md
A util/smctool/smc.c
A util/smctool/smc.h
A util/smctool/smctool.c
5 files changed, 538 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/33052/2

To view, visit change 33052. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6161203e52b7f7eaa1205de06e8241d7d40a7481
Gerrit-Change-Number: 33052
Gerrit-PatchSet: 2
Gerrit-Owner: Evgeny Zinoviev <me@ch1p.com>
Gerrit-MessageType: newpatchset