|
From: Zdenek S. <st...@us...> - 2015-12-09 06:55:58
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ipmitool".
The branch, master has been updated
via 336b2cb1ab0dbed4dcdfd94d4c2f117594b6d931 (commit)
from 2c3a876a7354e3c5dc1d500bc10f90f2f40f2035 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 336b2cb1ab0dbed4dcdfd94d4c2f117594b6d931
Author: Martin Wilck <mar...@ts...>
Date: Tue Dec 8 11:47:04 2015 +0100
ID:405 - Use meaningful Generator ID for "ipmitool sel add"
"ipmitool sel add" always sets the Generator ID field of the generated SEL entry
to 0x0000.
Looking at the IPMI spec v2, §13.2, this is questionable. The value 0 would be
read as a HW-generated event from IPMB with slave address 0, which is the
broadcast or ["general call"]http://www.i2c-bus.org/addressing/ address.
The spec says that the Generator ID should be "Software ID if event was
generated from system software", and goes on to say that bit 0 should be set to
1 and bit 1-7 should be set to the Software ID for software-generated events.
SEL entries generated by ipmitool will usually be software-generated.
Out of the SWIDs defined in §5.5 of the IPMI spec, "System management Software"
or "OEM" would match ipmitool's use best, thus it would make sense to set the
generator ID field to 0x0041 or 0x0061. I am using 0x0041 here.
Signed-off-by: Martin Wilck <mar...@ts...>
diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c
index 5df66a7..fbdccd9 100644
--- a/lib/ipmi_sel.c
+++ b/lib/ipmi_sel.c
@@ -419,7 +419,12 @@ ipmi_sel_add_entries_fromfile(struct ipmi_intf * intf, const char * filename)
memset(&sel_event, 0, sizeof(struct sel_event_record));
sel_event.record_id = 0x0000;
sel_event.record_type = 0x02;
- sel_event.sel_type.standard_type.gen_id = 0x00;
+ /*
+ * IPMI spec §32.1 generator ID
+ * Bit 0 = 1 "Software defined"
+ * Bit 1-7: SWID (IPMI spec §5.5), using 2 = "System management software"
+ */
+ sel_event.sel_type.standard_type.gen_id = 0x41;
sel_event.sel_type.standard_type.evm_rev = rqdata[0];
sel_event.sel_type.standard_type.sensor_type = rqdata[1];
sel_event.sel_type.standard_type.sensor_num = rqdata[2];
-----------------------------------------------------------------------
Summary of changes:
lib/ipmi_sel.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
hooks/post-receive
--
ipmitool
|