]> git.ozlabs.org Git - petitboot/commitdiff
discover/platform-powerpc: Set IPMI OS boot sensor
authorJoel Stanley <joel@jms.id.au>
Tue, 21 Apr 2015 06:17:57 +0000 (16:17 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 23 Apr 2015 22:48:53 +0000 (17:48 -0500)
This is to indicate to a BMC that we have initiated OS boot.

This patch manually parses the device tree for the sensor information.
In the future this could be replaced by libfdt or similar.

Discover the id of your OS Boot sensor:

$ sudo ipmitool sensor get "OS Boot"
Locating sensor record...
Sensor ID              : OS Boot (0x5a)
 Entity ID             : 35.0 (Operating System)
 Sensor Type (Discrete): OS Boot (0x1f)
 Sensor Reading        : 0h
 Event Message Control : Per-threshold
 Assertion Events      : OS Boot
                         [boot completed - device not specified]
 Assertions Enabled    : OS Boot
                         [A: boot completed]
                         [C: boot completed]
                         [PXE boot completed]
                         [Diagnostic boot completed]
                         [CD-ROM boot completed]
                         [ROM boot completed]
                         [boot completed - device not specified]
                         [Installation started]
                         [Installation completed]
                         [Installation aborted]
                         [Installation failed]
 OEM                   : 0

In this case it is 0x1f. Note that the sesnor is currently asserted iwth boot
completed - device not specified.

Test by clearing all assertions in the OS Boot sensor:

$ sudo ipmitool raw 0x04 0x30 0x5a 0x30 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
$ sudo ipmitool sensor get "OS Boot"
Locating sensor record...
Sensor ID              : OS Boot (0x5a)
 Entity ID             : 35.0 (Operating System)
 Sensor Type (Discrete): OS Boot (0x1f)
 Sensor Reading        : 0h
 Event Message Control : Per-threshold
 Assertions Enabled    : OS Boot
                         [A: boot completed]
                         [C: boot completed]
                         [PXE boot completed]
                         [Diagnostic boot completed]
                         [CD-ROM boot completed]
                         [ROM boot completed]
                         [boot completed - device not specified]
                         [Installation started]
                         [Installation completed]
                         [Installation aborted]
                         [Installation failed]
 OEM                   : 0

Then reboot your system. The assertion event should once more say "boot
completed - device not specified".

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found