aboutsummaryrefslogtreecommitdiff
path: root/core/ipmi.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2015-02-27 16:12:01 +1030
committerJeremy Kerr <jk@ozlabs.org>2015-03-04 16:02:20 +0800
commita736f60aaed6bb33047646949df7ab08697a896c (patch)
tree8be60781340c7a0d64e4d7f91491f356325ff731 /core/ipmi.c
parent573d0a9af9e46afbefc34cf95510f3d91bc778f6 (diff)
downloadskiboot-a736f60aaed6bb33047646949df7ab08697a896c.zip
skiboot-a736f60aaed6bb33047646949df7ab08697a896c.tar.gz
skiboot-a736f60aaed6bb33047646949df7ab08697a896c.tar.bz2
hw/ipmi: Set boot count sensor
The boot count sensor is a discrete sensor that is set once the system is up and running. On successful boot, the BMC expects the sensor to be set to 2. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'core/ipmi.c')
-rw-r--r--core/ipmi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/ipmi.c b/core/ipmi.c
index 6c1179f..78a54de 100644
--- a/core/ipmi.c
+++ b/core/ipmi.c
@@ -156,9 +156,14 @@ static void ipmi_get_message_flags_complete(struct ipmi_msg *msg)
/* Once we see an interrupt we assume the payload has
* booted. We disable the wdt and let the OS setup its own
- * wdt. */
- if (flags & IPMI_MESSAGE_FLAGS_WATCHDOG_PRE_TIMEOUT)
+ * wdt.
+ *
+ * This is also where we consider the OS to be booted, so we set
+ * the boot count sensor */
+ if (flags & IPMI_MESSAGE_FLAGS_WATCHDOG_PRE_TIMEOUT) {
ipmi_wdt_stop();
+ ipmi_set_boot_count();
+ }
/* Message available in the event buffer? Queue a Read Event command
* to retrieve it. The flag is cleared by performing a read */