File: smm-test

package info (click to toggle)
i8kutils 1.45
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: ansic: 413; tcl: 271; sh: 97; xml: 32; makefile: 23
file content (87 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
#
# Test the SMM BIOS.
#
# Note on 04 Mar 2017: Test file kept in the source code as a reference to an old smm
# tool that no longer works in recent kernels. smm tool must be reimplemented inside
# the dell-smm-hwmon kernel module.
#
# WARNING!!! READ CAREFULLY BEFORE USING THIS PROGRAM!!!
#
# THIS PROGRAM IS VERY DANGEROUS. IT CAN CRASH YOUR COMPUTER, DESTROY DATA
# ON THE HARDISK, CORRUPT THE BIOS, PHYSICALLY DAMAGE YOUR HARDWARE AND
# MAKE YOUR COMPUTER TOTALLY UNUSABLE.
#
# DON'T USE THIS PROGRAM UNLESS YOU REALLY KNOW WHAT YOU ARE DOING. I WILL
# NOT BE RESPONSIBLE FOR ANY DIRECT OR INDIRECT DAMAGE CAUSED BY USING THIS
# PROGRAM.

PROG_VERSION="v1.6 12/11/2001"

echo "smm-test $PROG_VERSION"; echo

if [ ! -x ./smm ]; then
    echo "smm program not found" >&2
    exit 1
fi

if [ $EUID != 0 ]; then
    echo "you must be root to run this script" >&2
    exit 1
fi

echo "DELL signature, should return eax=44494147 and edx=44454c4c"
./smm ffa3

echo "BIOS version, should return eax=00413137 or something like that"
./smm 00a6

echo "Power status, should return al=05 on ac power, 01 on battery"
./smm 0069

echo "Cpu temperature, should return al=temperature"
./smm 10a3

echo "Set right fan to low speed"
./smm 01a3 0100
sleep 3

echo "Set right fan to high speed"
./smm 01a3 0200
sleep 3

echo "Get right fan status, should return al=status"
./smm 00a3 0000

echo "Get right fan speed, should return al=rpm/30"
./smm 02a3 0000

echo "Set right fan off"
./smm 01a3 0000
sleep 1

echo "Set left fan to low speed"
./smm 01a3 0101
sleep 3

echo "Set left fan to high speed"
./smm 01a3 0201
sleep 3

echo "Get left fan status, should return al=status"
./smm 00a3 0001

echo "Get left fan speed, should return al=rpm/30"
./smm 02a3 0001

echo "Set left fan off"
./smm 01a3 0001
sleep 1

echo "Volume buttons, ah should change if a button is pressed"
for i in `seq 1 10`; do
    sleep 1
    ./smm 0025
done

# end of file