From 28219c8896177558892f48bef03ef7381382c420 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 21 Apr 2015 16:17:57 +1000 Subject: discover/platform-powerpc: Set IPMI OS boot sensor 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 Signed-off-by: Jeremy Kerr --- discover/dt.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 discover/dt.h (limited to 'discover/dt.h') diff --git a/discover/dt.h b/discover/dt.h new file mode 100644 index 0000000..4692d04 --- /dev/null +++ b/discover/dt.h @@ -0,0 +1,8 @@ +#ifndef _DT_H +#define _DT_H + +#include "ipmi.h" + +int get_ipmi_sensor(void *t, enum ipmi_sensor_ids sensor_id); + +#endif /* _IPMI_H */ -- cgit v1.2.1