summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorRobert Lippert <rlippert@google.com>2017-10-04 16:53:37 -0700
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-10-30 23:42:26 -0400
commit69b2391ad8854f1103653b8473cd2aad5ddab099 (patch)
treeb81cb1e1ab05f9cbf9190072a373f5433a48b9ac /src/include
parent20b179f938d42961ad31b4660c86717a02f06739 (diff)
downloadtalos-hostboot-69b2391ad8854f1103653b8473cd2aad5ddab099.tar.gz
talos-hostboot-69b2391ad8854f1103653b8473cd2aad5ddab099.zip
ipmi: add support for reading SEL time from BMC
The SEL time is used as the equivalent of the RTC on OpenPOWER platforms and can be used to timestamp events. Resolves #116 Signed-off-by: Robert Lippert <rlippert@google.com> Change-Id: I2cc7f3054e0d58fa3e2d083005d0f4e05adf8d2f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48375 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/ipmi/ipmiif.H4
-rw-r--r--src/include/usr/ipmi/ipmisel.H9
2 files changed, 12 insertions, 1 deletions
diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
index d94e5d4a2..55546d13e 100644
--- a/src/include/usr/ipmi/ipmiif.H
+++ b/src/include/usr/ipmi/ipmiif.H
@@ -6,6 +6,7 @@
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -245,6 +246,9 @@ namespace IPMI
// Storage messages
+ inline const command_t get_sel_time(void)
+ { return std::make_pair(NETFUN_STORAGE, 0x48); }
+
inline const command_t set_sel_time(void)
{ return std::make_pair(NETFUN_STORAGE, 0x49); }
diff --git a/src/include/usr/ipmi/ipmisel.H b/src/include/usr/ipmi/ipmisel.H
index 4509130f4..caf62f6e4 100644
--- a/src/include/usr/ipmi/ipmisel.H
+++ b/src/include/usr/ipmi/ipmisel.H
@@ -5,7 +5,8 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -312,6 +313,12 @@ namespace IPMISEL
void send_esel(IPMISEL::eselInitData * i_data,
errlHndl_t &o_err, IPMI::completion_code &o_cc);
+ /**
+ * @brief read the SEL time
+ * @return time from unix epoch or 0 on error
+ */
+ uint32_t get_sel_time();
+
} // namespace IPMISEL
#ifndef __HOSTBOOT_RUNTIME
OpenPOWER on IntegriCloud