Initial commit
This commit is contained in:
Executable
+866
@@ -0,0 +1,866 @@
|
||||
From c5fdb031d5b352a32dce058b8326637b82b79fe7 Mon Sep 17 00:00:00 2001
|
||||
From: roly <Rolyli.Li@luxshare-ict.com>
|
||||
Date: Thu, 12 Dec 2024 11:17:57 +0800
|
||||
Subject: [PATCH] change ipmitool to shared objects
|
||||
|
||||
---
|
||||
include/ipmitool/Makefile.am | 6 +-
|
||||
include/ipmitool/ipmi_sel_desc.h | 797 +++++++++++++++++++++++++++++++
|
||||
lib/Makefile.am | 2 +-
|
||||
src/plugins/Makefile.am | 2 +-
|
||||
4 files changed, 803 insertions(+), 4 deletions(-)
|
||||
create mode 100755 include/ipmitool/ipmi_sel_desc.h
|
||||
|
||||
diff --git a/include/ipmitool/Makefile.am b/include/ipmitool/Makefile.am
|
||||
index 8bc584a..fb4d72f 100644
|
||||
--- a/include/ipmitool/Makefile.am
|
||||
+++ b/include/ipmitool/Makefile.am
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
-noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||
+pkgincludedir = $(includedir)/ipmitool
|
||||
+pkginclude_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||
ipmi_chassis.h ipmi_entity.h ipmi_fru.h ipmi_hpmfwupg.h ipmi_lanp.h \
|
||||
ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_mc.h ipmi_raw.h \
|
||||
ipmi_channel.h ipmi_sensor.h ipmi_event.h ipmi_session.h \
|
||||
@@ -39,4 +40,5 @@ noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
|
||||
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
|
||||
ipmi_delloem.h ipmi_dcmi.h ipmi_vita.h ipmi_sel_supermicro.h \
|
||||
- ipmi_cfgp.h ipmi_lanp6.h ipmi_quantaoem.h
|
||||
+ ipmi_cfgp.h ipmi_lanp6.h ipmi_quantaoem.h ipmi_time.h ipmi_sel_desc.h
|
||||
+
|
||||
diff --git a/include/ipmitool/ipmi_sel_desc.h b/include/ipmitool/ipmi_sel_desc.h
|
||||
new file mode 100755
|
||||
index 0000000..942857c
|
||||
--- /dev/null
|
||||
+++ b/include/ipmitool/ipmi_sel_desc.h
|
||||
@@ -0,0 +1,797 @@
|
||||
+#ifndef IPMI_SEL_DESC_H
|
||||
+#define IPMI_SEL_DESC_H
|
||||
+
|
||||
+#include <inttypes.h>
|
||||
+#include <stddef.h>
|
||||
+
|
||||
+#define SEL_OEM_TS_DATA_LEN 6
|
||||
+#define SEL_OEM_NOTS_DATA_LEN 13
|
||||
+#define HDD_NVME_STATUS_EVT2 0x3
|
||||
+#define EXPANDER_ERR_EVT2 0x4
|
||||
+#define EXPANDER_ERR_EVT3 0x5
|
||||
+#define POWER_FAULT_EVT2 0x6
|
||||
+#define BMC_BOOT_EVT2 0x7
|
||||
+#define BMC_BOOT_EVT3 0x8
|
||||
+#define LEAKAGE_EVT2 0x0A
|
||||
+#define FW_UPDATE_EVT2 0x0B
|
||||
+#define FW_UPDATE_EVT3 0x0C
|
||||
+#define RETIMER_ERR_EVT2 0x0D
|
||||
+
|
||||
+#define SENSOR_TYPE_MAX 0x2C
|
||||
+
|
||||
+// Definition for PowerFault sensor
|
||||
+#define SIZE_OF_POWER_FAULT 10 /* Max Size of the length of the power_fault array */
|
||||
+#define MAX_EVENT_STR 128 /* Max Size of each event string */
|
||||
+
|
||||
+static const char sensor_power_fault[SIZE_OF_POWER_FAULT][MAX_EVENT_STR] = {
|
||||
+ "PSU",
|
||||
+ "MAINBOARD",
|
||||
+ "FAN",
|
||||
+ "NVME",
|
||||
+ "OCP",
|
||||
+ "RISER",
|
||||
+ "CPU",
|
||||
+ "DIMM",
|
||||
+ "OTHER",
|
||||
+ "ACCELERATOR"};
|
||||
+
|
||||
+/* sensor type codes (IPMI v1.5 table 36.3)
|
||||
+ / Updated to v2.0 Table 42-3, Sensor Type Codes */
|
||||
+static const char *sensor_type_desc[] = {
|
||||
+ "reserved",
|
||||
+ "Temperature",
|
||||
+ "Voltage",
|
||||
+ "Current",
|
||||
+ "Fan",
|
||||
+ "Physical Security",
|
||||
+ "Platform Security",
|
||||
+ "Processor",
|
||||
+ "Power Supply",
|
||||
+ "Power Unit",
|
||||
+ "Cooling Device",
|
||||
+ "Other",
|
||||
+ "Memory",
|
||||
+ "Drive Slot / Bay",
|
||||
+ "POST Memory Resize",
|
||||
+ "System Firmwares",
|
||||
+ "Event Logging Disabled",
|
||||
+ "Watchdog1",
|
||||
+ "System Event",
|
||||
+ "Critical Interrupt",
|
||||
+ "Button",
|
||||
+ "Module / Board",
|
||||
+ "Microcontroller",
|
||||
+ "Add-in Card",
|
||||
+ "Chassis",
|
||||
+ "Chip Set",
|
||||
+ "Other FRU",
|
||||
+ "Cable / Interconnect",
|
||||
+ "Terminator",
|
||||
+ "System Boot Initiated",
|
||||
+ "Boot Error",
|
||||
+ "OS Boot",
|
||||
+ "OS Critical Stop",
|
||||
+ "Slot / Connector",
|
||||
+ "System ACPI Power State",
|
||||
+ "Watchdog2",
|
||||
+ "Platform Alert",
|
||||
+ "Entity Presence",
|
||||
+ "Monitor ASIC",
|
||||
+ "LAN",
|
||||
+ "Management Subsys Health",
|
||||
+ "Battery",
|
||||
+ "Session Audit",
|
||||
+ "Version Change",
|
||||
+ "FRU State"};
|
||||
+
|
||||
+/* IPMI 2.0 Table 43-15, Sensor Unit Type Codes */
|
||||
+#define UNIT_TYPE_MAX 92 /* This is the ID of "grams" */
|
||||
+#define UNIT_TYPE_LONGEST_NAME 19 /* This is the length of "color temp deg K" */
|
||||
+static const char *unit_desc[] = {
|
||||
+ "unspecified",
|
||||
+ "degrees C",
|
||||
+ "degrees F",
|
||||
+ "degrees K",
|
||||
+ "Volts",
|
||||
+ "Amps",
|
||||
+ "Watts",
|
||||
+ "Joules",
|
||||
+ "Coulombs",
|
||||
+ "VA",
|
||||
+ "Nits",
|
||||
+ "lumen",
|
||||
+ "lux",
|
||||
+ "Candela",
|
||||
+ "kPa",
|
||||
+ "PSI",
|
||||
+ "Newton",
|
||||
+ "CFM",
|
||||
+ "RPM",
|
||||
+ "Hz",
|
||||
+ "microsecond",
|
||||
+ "millisecond",
|
||||
+ "second",
|
||||
+ "minute",
|
||||
+ "hour",
|
||||
+ "day",
|
||||
+ "week",
|
||||
+ "mil",
|
||||
+ "inches",
|
||||
+ "feet",
|
||||
+ "cu in",
|
||||
+ "cu feet",
|
||||
+ "mm",
|
||||
+ "cm",
|
||||
+ "m",
|
||||
+ "cu cm",
|
||||
+ "cu m",
|
||||
+ "liters",
|
||||
+ "fluid ounce",
|
||||
+ "radians",
|
||||
+ "steradians",
|
||||
+ "revolutions",
|
||||
+ "cycles",
|
||||
+ "gravities",
|
||||
+ "ounce",
|
||||
+ "pound",
|
||||
+ "ft-lb",
|
||||
+ "oz-in",
|
||||
+ "gauss",
|
||||
+ "gilberts",
|
||||
+ "henry",
|
||||
+ "millihenry",
|
||||
+ "farad",
|
||||
+ "microfarad",
|
||||
+ "ohms",
|
||||
+ "siemens",
|
||||
+ "mole",
|
||||
+ "becquerel",
|
||||
+ "PPM",
|
||||
+ "reserved",
|
||||
+ "Decibels",
|
||||
+ "DbA",
|
||||
+ "DbC",
|
||||
+ "gray",
|
||||
+ "sievert",
|
||||
+ "color temp deg K",
|
||||
+ "bit",
|
||||
+ "kilobit",
|
||||
+ "megabit",
|
||||
+ "gigabit",
|
||||
+ "byte",
|
||||
+ "kilobyte",
|
||||
+ "megabyte",
|
||||
+ "gigabyte",
|
||||
+ "word",
|
||||
+ "dword",
|
||||
+ "qword",
|
||||
+ "line",
|
||||
+ "hit",
|
||||
+ "miss",
|
||||
+ "retry",
|
||||
+ "reset",
|
||||
+ "overflow",
|
||||
+ "underrun",
|
||||
+ "collision",
|
||||
+ "packets",
|
||||
+ "messages",
|
||||
+ "characters",
|
||||
+ "error",
|
||||
+ "correctable error",
|
||||
+ "uncorrectable error",
|
||||
+ "fatal error",
|
||||
+ "grams"
|
||||
+};
|
||||
+
|
||||
+struct ipmi_event_data_types
|
||||
+{
|
||||
+ uint8_t flag;
|
||||
+ uint8_t data;
|
||||
+ char desc[256];
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types HDD_NVME_Status_evt2[] = {
|
||||
+ {HDD_NVME_STATUS_EVT2, 0x00, ""},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types Expander_Err_evt2[] = {
|
||||
+ {EXPANDER_ERR_EVT2, 0x00, ""},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types Expander_Err_evt3[] = {
|
||||
+ {EXPANDER_ERR_EVT3, 0x00, ""},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types Retimer_Err_evt2[] = {
|
||||
+ {RETIMER_ERR_EVT2, 0x00, ""},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types power_fault_evt2[] = {
|
||||
+ {POWER_FAULT_EVT2, 0x00, "Fault event of PSU"},
|
||||
+ {POWER_FAULT_EVT2, 0x01, "main board 12V inlet eFuse overcurrent protection event"},
|
||||
+ {POWER_FAULT_EVT2, 0x02, "Fault or PG events related to fan board power supply"},
|
||||
+ {POWER_FAULT_EVT2, 0x03, "NVMe backplane power supply Fault or PG event"},
|
||||
+ {POWER_FAULT_EVT2, 0x04, "Fault or PG event related to OCP card power supply"},
|
||||
+ {POWER_FAULT_EVT2, 0x05, "Fault or PG event related to Riser board power supply"},
|
||||
+ {POWER_FAULT_EVT2, 0x06, "CPU power supply related Fault or PG events"},
|
||||
+ {POWER_FAULT_EVT2, 0x07, "DIMM related power supply Fault/PG events"},
|
||||
+ {POWER_FAULT_EVT2, 0x08, "Other system module power supply Fault/PG event"},
|
||||
+ {POWER_FAULT_EVT2, 0xff, "Other kinds of power on timeout events"},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types BMC_BOOT_evt2[] = {
|
||||
+ {BMC_BOOT_EVT2, 0xaa, ""},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types BMC_BOOT_evt3[] = {
|
||||
+ {BMC_BOOT_EVT3, 0x00, ", AC power on"},
|
||||
+ {BMC_BOOT_EVT3, 0x01, ", ExtReset Pin reset"},
|
||||
+ {BMC_BOOT_EVT3, 0x02, ", Bmc startup FMT_WDT2 timeout"},
|
||||
+ {BMC_BOOT_EVT3, 0x03, ", Bmc runtime watchdog timeout"},
|
||||
+ {BMC_BOOT_EVT3, 0x04, ", Bmc cold reset "},
|
||||
+ {BMC_BOOT_EVT3, 0x05, ", Bmc warm reset"},
|
||||
+ {BMC_BOOT_EVT3, 0x06, ", Execute reboot command in shell"},
|
||||
+ {BMC_BOOT_EVT3, 0x08, ", Upgrade and restart"},
|
||||
+ {BMC_BOOT_EVT3, 0x0f, ", The main process restarts only"}};
|
||||
+
|
||||
+static struct ipmi_event_data_types Leakage_evt2[] = {
|
||||
+ {LEAKAGE_EVT2, 0x00, ", Leakage Point default"},
|
||||
+ {LEAKAGE_EVT2, 0x01, ", Leakage Point A"},
|
||||
+ {LEAKAGE_EVT2, 0x02, ", Leakage Point B"},
|
||||
+ {LEAKAGE_EVT2, 0x03, ", Leakage Point C"},
|
||||
+ {LEAKAGE_EVT2, 0x04, ", Leakage Point D"},
|
||||
+ {LEAKAGE_EVT2, 0x05, ", Leakage Point E"},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_data_types FW_Update_evt2[] = {
|
||||
+ {FW_UPDATE_EVT2, 0x01, ""},
|
||||
+ {FW_UPDATE_EVT2, 0x02, ""},
|
||||
+ {FW_UPDATE_EVT2, 0x03, ""},
|
||||
+};
|
||||
+static struct ipmi_event_data_types FW_Update_evt3[] = {
|
||||
+ {FW_UPDATE_EVT3, 0x01, ", image-1(BMC)"},
|
||||
+ {FW_UPDATE_EVT3, 0x02, ", image-2(BMC)"},
|
||||
+ {FW_UPDATE_EVT3, 0xFF, ", BIOS"},
|
||||
+};
|
||||
+
|
||||
+struct ipmi_event_sensor_types
|
||||
+{
|
||||
+ uint8_t code;
|
||||
+ uint8_t offset;
|
||||
+#define ALL_OFFSETS_SPECIFIED 0xff
|
||||
+ uint8_t data;
|
||||
+ const char *desc;
|
||||
+ struct ipmi_event_data_types *evt2;
|
||||
+ struct ipmi_event_data_types *evt3;
|
||||
+};
|
||||
+
|
||||
+struct ipmi_oem_event_sensor_types
|
||||
+{
|
||||
+ uint8_t code0;
|
||||
+ uint8_t code1;
|
||||
+ uint8_t code2;
|
||||
+ uint8_t code3;
|
||||
+ const char *desc;
|
||||
+};
|
||||
+
|
||||
+struct ipmi_oem_specific_sensor_types
|
||||
+{
|
||||
+ uint8_t flag;
|
||||
+ uint8_t code;
|
||||
+ const char *desc;
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_sensor_types generic_event_types[] = {
|
||||
+ /* Threshold Based States */
|
||||
+ {0x01, 0x00, 0xff, "Lower Non-critical going low"},
|
||||
+ {0x01, 0x01, 0xff, "Lower Non-critical going high"},
|
||||
+ {0x01, 0x02, 0xff, "Lower Critical going low"},
|
||||
+ {0x01, 0x03, 0xff, "Lower Critical going high"},
|
||||
+ {0x01, 0x04, 0xff, "Lower Non-recoverable going low"},
|
||||
+ {0x01, 0x05, 0xff, "Lower Non-recoverable going high"},
|
||||
+ {0x01, 0x06, 0xff, "Upper Non-critical going low"},
|
||||
+ {0x01, 0x07, 0xff, "Upper Non-critical going high"},
|
||||
+ {0x01, 0x08, 0xff, "Upper Critical going low"},
|
||||
+ {0x01, 0x09, 0xff, "Upper Critical going high"},
|
||||
+ {0x01, 0x0a, 0xff, "Upper Non-recoverable going low"},
|
||||
+ {0x01, 0x0b, 0xff, "Upper Non-recoverable going high"},
|
||||
+ /* DMI-based "usage state" States */
|
||||
+ {0x02, 0x00, 0xff, "Transition to Idle"},
|
||||
+ {0x02, 0x01, 0xff, "Transition to Active"},
|
||||
+ {0x02, 0x02, 0xff, "Transition to Busy"},
|
||||
+ /* Digital-Discrete Event States */
|
||||
+ {0x03, 0x00, 0xff, "State Deasserted", power_fault_evt2},
|
||||
+ {0x03, 0x01, 0xff, "State Asserted", power_fault_evt2},
|
||||
+ {0x04, 0x00, 0xff, "Predictive Failure Deasserted"},
|
||||
+ {0x04, 0x01, 0xff, "Predictive Failure Asserted"},
|
||||
+ {0x05, 0x00, 0xff, "Limit Not Exceeded"},
|
||||
+ {0x05, 0x01, 0xff, "Limit Exceeded"},
|
||||
+ {0x06, 0x00, 0xff, "Performance Met"},
|
||||
+ {0x06, 0x01, 0xff, "Performance Lags"},
|
||||
+ /* Severity Event States */
|
||||
+ {0x07, 0x00, 0xff, "Transition to OK", Leakage_evt2},
|
||||
+ {0x07, 0x01, 0xff, "Transition to Non-critical from OK", Leakage_evt2},
|
||||
+ {0x07, 0x02, 0xff, "Transition to Critical from less severe"},
|
||||
+ {0x07, 0x03, 0xff, "Transition to Non-recoverable from less severe"},
|
||||
+ {0x07, 0x04, 0xff, "Transition to Non-critical from more severe"},
|
||||
+ {0x07, 0x05, 0xff, "Transition to Critical from Non-recoverable"},
|
||||
+ {0x07, 0x06, 0xff, "Transition to Non-recoverable"},
|
||||
+ {0x07, 0x07, 0xff, "Monitor"},
|
||||
+ {0x07, 0x08, 0xff, "Informational"},
|
||||
+ /* Availability Status States */
|
||||
+ {0x08, 0x00, 0xff, "Device Absent"},
|
||||
+ {0x08, 0x01, 0xff, "Device Present"},
|
||||
+ {0x09, 0x00, 0xff, "Device Disabled"},
|
||||
+ {0x09, 0x01, 0xff, "Device Enabled"},
|
||||
+ {0x0a, 0x00, 0xff, "Transition to Running"},
|
||||
+ {0x0a, 0x01, 0xff, "Transition to In Test"},
|
||||
+ {0x0a, 0x02, 0xff, "Transition to Power Off"},
|
||||
+ {0x0a, 0x03, 0xff, "Transition to On Line"},
|
||||
+ {0x0a, 0x04, 0xff, "Transition to Off Line"},
|
||||
+ {0x0a, 0x05, 0xff, "Transition to Off Duty"},
|
||||
+ {0x0a, 0x06, 0xff, "Transition to Degraded"},
|
||||
+ {0x0a, 0x07, 0xff, "Transition to Power Save"},
|
||||
+ {0x0a, 0x08, 0xff, "Install Error"},
|
||||
+ /* Redundancy States */
|
||||
+ {0x0b, 0x00, 0xff, "Fully Redundant"},
|
||||
+ {0x0b, 0x01, 0xff, "Redundancy Lost"},
|
||||
+ {0x0b, 0x02, 0xff, "Redundancy Degraded"},
|
||||
+ {0x0b, 0x03, 0xff, "Non-Redundant: Sufficient from Redundant"},
|
||||
+ {0x0b, 0x04, 0xff, "Non-Redundant: Sufficient from Insufficient"},
|
||||
+ {0x0b, 0x05, 0xff, "Non-Redundant: Insufficient Resources"},
|
||||
+ {0x0b, 0x06, 0xff, "Redundancy Degraded from Fully Redundant"},
|
||||
+ {0x0b, 0x07, 0xff, "Redundancy Degraded from Non-Redundant"},
|
||||
+ /* ACPI Device Power States */
|
||||
+ {0x0c, 0x00, 0xff, "D0 Power State"},
|
||||
+ {0x0c, 0x01, 0xff, "D1 Power State"},
|
||||
+ {0x0c, 0x02, 0xff, "D2 Power State"},
|
||||
+ {0x0c, 0x03, 0xff, "D3 Power State"},
|
||||
+ /* END */
|
||||
+ {0x00, 0x00, 0xff, NULL},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_sensor_types sensor_retimer_event_types[] = {
|
||||
+ /* Digital-Discrete Event States */
|
||||
+ {0x03, 0x00, 0xff, "State Deasserted"},
|
||||
+ {0x03, 0x01, 0xff, "State Asserted", Retimer_Err_evt2},
|
||||
+ /* END */
|
||||
+ {0x00, 0x00, 0xff, NULL},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_event_sensor_types sensor_specific_event_types[] = {
|
||||
+ /* Physical Security */
|
||||
+ {0x05, 0x00, 0xff, "General Chassis intrusion"},
|
||||
+ {0x05, 0x01, 0xff, "Drive Bay intrusion"},
|
||||
+ {0x05, 0x02, 0xff, "I/O Card area intrusion"},
|
||||
+ {0x05, 0x03, 0xff, "Processor area intrusion"},
|
||||
+ {0x05, 0x04, 0xff, "System unplugged from LAN"},
|
||||
+ {0x05, 0x05, 0xff, "Unauthorized dock"},
|
||||
+ {0x05, 0x06, 0xff, "FAN area intrusion"},
|
||||
+ /* Platform Security */
|
||||
+ {0x06, 0x00, 0xff, "Front Panel Lockout violation attempted"},
|
||||
+ {0x06, 0x01, 0xff, "Pre-boot password violation - user password"},
|
||||
+ {0x06, 0x02, 0xff, "Pre-boot password violation - setup password"},
|
||||
+ {0x06, 0x03, 0xff, "Pre-boot password violation - network boot password"},
|
||||
+ {0x06, 0x04, 0xff, "Other pre-boot password violation"},
|
||||
+ {0x06, 0x05, 0xff, "Out-of-band access password violation"},
|
||||
+ /* Processor */
|
||||
+ {0x07, 0x00, 0xff, "IERR"},
|
||||
+ {0x07, 0x01, 0xff, "Thermal Trip"},
|
||||
+ {0x07, 0x02, 0xff, "FRB1/BIST failure"},
|
||||
+ {0x07, 0x03, 0xff, "FRB2/Hang in POST failure"},
|
||||
+ {0x07, 0x04, 0xff, "FRB3/Processor startup/init failure"},
|
||||
+ {0x07, 0x05, 0xff, "Configuration Error"},
|
||||
+ {0x07, 0x06, 0xff, "SM BIOS Uncorrectable CPU-complex Error"},
|
||||
+ {0x07, 0x07, 0xff, "Presence detected"},
|
||||
+ {0x07, 0x08, 0xff, "Disabled"},
|
||||
+ {0x07, 0x09, 0xff, "Terminator presence detected"},
|
||||
+ {0x07, 0x0a, 0xff, "Throttled"},
|
||||
+ {0x07, 0x0b, 0xff, "Uncorrectable machine check exception"},
|
||||
+ {0x07, 0x0c, 0xff, "Correctable machine check error"},
|
||||
+ /* Power Supply */
|
||||
+ {0x08, 0x00, 0xff, "Presence detected"},
|
||||
+ {0x08, 0x01, 0xff, "Failure detected"},
|
||||
+ {0x08, 0x02, 0xff, "Predictive failure"},
|
||||
+ {0x08, 0x03, 0xff, "Power Supply AC lost"},
|
||||
+ {0x08, 0x04, 0xff, "AC lost or out-of-range"},
|
||||
+ {0x08, 0x05, 0xff, "AC out-of-range, but present"},
|
||||
+ {0x08, 0x06, 0x00, "Config Error: Vendor Mismatch"},
|
||||
+ {0x08, 0x06, 0x01, "Config Error: Revision Mismatch"},
|
||||
+ {0x08, 0x06, 0x02, "Config Error: Processor Missing"},
|
||||
+ {0x08, 0x06, 0x03, "Config Error: Power Supply Rating Mismatch"},
|
||||
+ {0x08, 0x06, 0x04, "Config Error: Voltage Rating Mismatch"},
|
||||
+ {0x08, 0x06, 0xff, "Config Error"},
|
||||
+ {0x08, 0x07, 0xff, "Power Supply Inactive"},
|
||||
+ /* Power Unit */
|
||||
+ {0x09, 0x00, 0xff, "Power off/down"},
|
||||
+ {0x09, 0x01, 0xff, "Power cycle"},
|
||||
+ {0x09, 0x02, 0xff, "240VA power down"},
|
||||
+ {0x09, 0x03, 0xff, "Interlock power down"},
|
||||
+ {0x09, 0x04, 0xff, "AC lost"},
|
||||
+ {0x09, 0x05, 0xff, "Soft-power control failure"},
|
||||
+ {0x09, 0x06, 0xff, "Failure detected"},
|
||||
+ {0x09, 0x07, 0xff, "Predictive failure"},
|
||||
+ /* Memory */
|
||||
+ {0x0c, 0x00, 0xff, "Correctable ECC"},
|
||||
+ {0x0c, 0x01, 0xff, "Uncorrectable ECC"},
|
||||
+ {0x0c, 0x02, 0xff, "Parity"},
|
||||
+ {0x0c, 0x03, 0xff, "Memory Scrub Failed"},
|
||||
+ {0x0c, 0x04, 0xff, "Memory Device Disabled"},
|
||||
+ {0x0c, 0x05, 0xff, "Correctable ECC logging limit reached"},
|
||||
+ {0x0c, 0x06, 0xff, "Presence Detected"},
|
||||
+ {0x0c, 0x07, 0xff, "Configuration Error"},
|
||||
+ {0x0c, 0x08, 0xff, "Spare"},
|
||||
+ {0x0c, 0x09, 0xff, "Throttled"},
|
||||
+ {0x0c, 0x0a, 0xff, "Critical Overtemperature"},
|
||||
+ /* Drive Slot */
|
||||
+ {0x0d, 0x00, 0xff, "Drive Present", HDD_NVME_Status_evt2},
|
||||
+ {0x0d, 0x01, 0xff, "Drive Fault", HDD_NVME_Status_evt2},
|
||||
+ {0x0d, 0x02, 0xff, "Predictive Failure"},
|
||||
+ {0x0d, 0x03, 0xff, "Hot Spare"},
|
||||
+ {0x0d, 0x04, 0xff, "Parity Check In Progress"},
|
||||
+ {0x0d, 0x05, 0xff, "In Critical Array"},
|
||||
+ {0x0d, 0x06, 0xff, "In Failed Array"},
|
||||
+ {0x0d, 0x07, 0xff, "Rebuild In Progress"},
|
||||
+ {0x0d, 0x08, 0xff, "Rebuild Aborted"},
|
||||
+ /* System Firmware Error */
|
||||
+ {0x0f, 0x00, 0x00, "Unspecified"},
|
||||
+ {0x0f, 0x00, 0x01, "No system memory installed"},
|
||||
+ {0x0f, 0x00, 0x02, "No usable system memory"},
|
||||
+ {0x0f, 0x00, 0x03, "Unrecoverable IDE device failure"},
|
||||
+ {0x0f, 0x00, 0x04, "Unrecoverable system-board failure"},
|
||||
+ {0x0f, 0x00, 0x05, "Unrecoverable diskette failure"},
|
||||
+ {0x0f, 0x00, 0x06, "Unrecoverable hard-disk controller failure"},
|
||||
+ {0x0f, 0x00, 0x07, "Unrecoverable PS/2 or USB keyboard failure"},
|
||||
+ {0x0f, 0x00, 0x08, "Removable boot media not found"},
|
||||
+ {0x0f, 0x00, 0x09, "Unrecoverable video controller failure"},
|
||||
+ {0x0f, 0x00, 0x0a, "No video device selected"},
|
||||
+ {0x0f, 0x00, 0x0b, "BIOS corruption detected"},
|
||||
+ {0x0f, 0x00, 0x0c, "CPU voltage mismatch"},
|
||||
+ {0x0f, 0x00, 0x0d, "CPU speed mismatch failure"},
|
||||
+ {0x0f, 0x00, 0xff, "Unknown Error"},
|
||||
+ /* System Firmware Hang */
|
||||
+ {0x0f, 0x01, 0x00, "Unspecified"},
|
||||
+ {0x0f, 0x01, 0x01, "Memory initialization"},
|
||||
+ {0x0f, 0x01, 0x02, "Hard-disk initialization"},
|
||||
+ {0x0f, 0x01, 0x03, "Secondary CPU Initialization"},
|
||||
+ {0x0f, 0x01, 0x04, "User authentication"},
|
||||
+ {0x0f, 0x01, 0x05, "User-initiated system setup"},
|
||||
+ {0x0f, 0x01, 0x06, "USB resource configuration"},
|
||||
+ {0x0f, 0x01, 0x07, "PCI resource configuration"},
|
||||
+ {0x0f, 0x01, 0x08, "Option ROM initialization"},
|
||||
+ {0x0f, 0x01, 0x09, "Video initialization"},
|
||||
+ {0x0f, 0x01, 0x0a, "Cache initialization"},
|
||||
+ {0x0f, 0x01, 0x0b, "SMBus initialization"},
|
||||
+ {0x0f, 0x01, 0x0c, "Keyboard controller initialization"},
|
||||
+ {0x0f, 0x01, 0x0d, "Management controller initialization"},
|
||||
+ {0x0f, 0x01, 0x0e, "Docking station attachment"},
|
||||
+ {0x0f, 0x01, 0x0f, "Enabling docking station"},
|
||||
+ {0x0f, 0x01, 0x10, "Docking station ejection"},
|
||||
+ {0x0f, 0x01, 0x11, "Disabling docking station"},
|
||||
+ {0x0f, 0x01, 0x12, "Calling operating system wake-up vector"},
|
||||
+ {0x0f, 0x01, 0x13, "System boot initiated"},
|
||||
+ {0x0f, 0x01, 0x14, "Motherboard initialization"},
|
||||
+ {0x0f, 0x01, 0x15, "reserved"},
|
||||
+ {0x0f, 0x01, 0x16, "Floppy initialization"},
|
||||
+ {0x0f, 0x01, 0x17, "Keyboard test"},
|
||||
+ {0x0f, 0x01, 0x18, "Pointing device test"},
|
||||
+ {0x0f, 0x01, 0x19, "Primary CPU initialization"},
|
||||
+ {0x0f, 0x01, 0xff, "Unknown Hang"},
|
||||
+ /* System Firmware Progress */
|
||||
+ {0x0f, 0x02, 0x00, "Unspecified"},
|
||||
+ {0x0f, 0x02, 0x01, "Memory initialization"},
|
||||
+ {0x0f, 0x02, 0x02, "Hard-disk initialization"},
|
||||
+ {0x0f, 0x02, 0x03, "Secondary CPU Initialization"},
|
||||
+ {0x0f, 0x02, 0x04, "User authentication"},
|
||||
+ {0x0f, 0x02, 0x05, "User-initiated system setup"},
|
||||
+ {0x0f, 0x02, 0x06, "USB resource configuration"},
|
||||
+ {0x0f, 0x02, 0x07, "PCI resource configuration"},
|
||||
+ {0x0f, 0x02, 0x08, "Option ROM initialization"},
|
||||
+ {0x0f, 0x02, 0x09, "Video initialization"},
|
||||
+ {0x0f, 0x02, 0x0a, "Cache initialization"},
|
||||
+ {0x0f, 0x02, 0x0b, "SMBus initialization"},
|
||||
+ {0x0f, 0x02, 0x0c, "Keyboard controller initialization"},
|
||||
+ {0x0f, 0x02, 0x0d, "Management controller initialization"},
|
||||
+ {0x0f, 0x02, 0x0e, "Docking station attachment"},
|
||||
+ {0x0f, 0x02, 0x0f, "Enabling docking station"},
|
||||
+ {0x0f, 0x02, 0x10, "Docking station ejection"},
|
||||
+ {0x0f, 0x02, 0x11, "Disabling docking station"},
|
||||
+ {0x0f, 0x02, 0x12, "Calling operating system wake-up vector"},
|
||||
+ {0x0f, 0x02, 0x13, "System boot initiated"},
|
||||
+ {0x0f, 0x02, 0x14, "Motherboard initialization"},
|
||||
+ {0x0f, 0x02, 0x15, "reserved"},
|
||||
+ {0x0f, 0x02, 0x16, "Floppy initialization"},
|
||||
+ {0x0f, 0x02, 0x17, "Keyboard test"},
|
||||
+ {0x0f, 0x02, 0x18, "Pointing device test"},
|
||||
+ {0x0f, 0x02, 0x19, "Primary CPU initialization"},
|
||||
+ {0x0f, 0x02, 0xff, "Unknown Progress"},
|
||||
+ /* Event Logging Disabled */
|
||||
+ {0x10, 0x00, 0xff, "Correctable memory error logging disabled"},
|
||||
+ {0x10, 0x01, 0xff, "Event logging disabled"},
|
||||
+ {0x10, 0x02, 0xff, "Log area reset/cleared"},
|
||||
+ {0x10, 0x03, 0xff, "All event logging disabled"},
|
||||
+ {0x10, 0x04, 0xff, "Log full"},
|
||||
+ {0x10, 0x05, 0xff, "Log almost full"},
|
||||
+ /* Watchdog 1 */
|
||||
+ {0x11, 0x00, 0xff, "BIOS Reset"},
|
||||
+ {0x11, 0x01, 0xff, "OS Reset"},
|
||||
+ {0x11, 0x02, 0xff, "OS Shut Down"},
|
||||
+ {0x11, 0x03, 0xff, "OS Power Down"},
|
||||
+ {0x11, 0x04, 0xff, "OS Power Cycle"},
|
||||
+ {0x11, 0x05, 0xff, "OS NMI/Diag Interrupt"},
|
||||
+ {0x11, 0x06, 0xff, "OS Expired"},
|
||||
+ {0x11, 0x07, 0xff, "OS pre-timeout Interrupt"},
|
||||
+ /* System Event */
|
||||
+ {0x12, 0x00, 0xff, "System Reconfigured"},
|
||||
+ {0x12, 0x01, 0xff, "OEM System boot event"},
|
||||
+ {0x12, 0x02, 0xff, "Undetermined system hardware failure"},
|
||||
+ {0x12, 0x03, 0xff, "Entry added to auxiliary log"},
|
||||
+ {0x12, 0x04, 0xff, "PEF Action"},
|
||||
+ {0x12, 0x05, 0xff, "Timestamp Clock Sync"},
|
||||
+ /* Critical Interrupt */
|
||||
+ {0x13, 0x00, 0xff, "NMI/Diag Interrupt"},
|
||||
+ {0x13, 0x01, 0xff, "Bus Timeout"},
|
||||
+ {0x13, 0x02, 0xff, "I/O Channel check NMI"},
|
||||
+ {0x13, 0x03, 0xff, "Software NMI"},
|
||||
+ {0x13, 0x04, 0xff, "PCI PERR", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ {0x13, 0x05, 0xff, "PCI SERR", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ {0x13, 0x06, 0xff, "EISA failsafe timeout"},
|
||||
+ {0x13, 0x07, 0xff, "Bus Correctable error", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ {0x13, 0x08, 0xff, "Bus Uncorrectable error", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ {0x13, 0x09, 0xff, "Fatal NMI"},
|
||||
+ {0x13, 0x0a, 0xff, "Bus Fatal Error", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ {0x13, 0x0b, 0xff, "Bus Degraded", Expander_Err_evt2, Expander_Err_evt3},
|
||||
+ /* Button */
|
||||
+ {0x14, 0x00, 0xff, "Power Button pressed"},
|
||||
+ {0x14, 0x01, 0xff, "Sleep Button pressed"},
|
||||
+ {0x14, 0x02, 0xff, "Reset Button pressed"},
|
||||
+ {0x14, 0x03, 0xff, "FRU Latch"},
|
||||
+ {0x14, 0x04, 0xff, "FRU Service"},
|
||||
+ /* Chip Set */
|
||||
+ {0x19, 0x00, 0xff, "Soft Power Control Failure"},
|
||||
+ {0x19, 0x01, 0xff, "Thermal Trip"},
|
||||
+ /* Cable/Interconnect */
|
||||
+ {0x1b, 0x00, 0xff, "Connected"},
|
||||
+ {0x1b, 0x01, 0xff, "Config Error"},
|
||||
+ /* System Boot Initiated */
|
||||
+ {0x1d, 0x00, 0xff, "Initiated by power up", BMC_BOOT_evt2, BMC_BOOT_evt3},
|
||||
+ {0x1d, 0x01, 0xff, "Initiated by hard reset"},
|
||||
+ {0x1d, 0x02, 0xff, "Initiated by warm reset"},
|
||||
+ {0x1d, 0x03, 0xff, "User requested PXE boot"},
|
||||
+ {0x1d, 0x04, 0xff, "Automatic boot to diagnostic"},
|
||||
+ {0x1d, 0x05, 0xff, "OS initiated hard reset"},
|
||||
+ {0x1d, 0x06, 0xff, "OS initiated warm reset"},
|
||||
+ {0x1d, 0x07, 0xff, "System Restart"},
|
||||
+ /* Boot Error */
|
||||
+ {0x1e, 0x00, 0xff, "No bootable media"},
|
||||
+ {0x1e, 0x01, 0xff, "Non-bootable disk in drive"},
|
||||
+ {0x1e, 0x02, 0xff, "PXE server not found"},
|
||||
+ {0x1e, 0x03, 0xff, "Invalid boot sector"},
|
||||
+ {0x1e, 0x04, 0xff, "Timeout waiting for selection"},
|
||||
+ /* OS Boot */
|
||||
+ {0x1f, 0x00, 0xff, "A: boot completed"},
|
||||
+ {0x1f, 0x01, 0xff, "C: boot completed"},
|
||||
+ {0x1f, 0x02, 0xff, "PXE boot completed"},
|
||||
+ {0x1f, 0x03, 0xff, "Diagnostic boot completed"},
|
||||
+ {0x1f, 0x04, 0xff, "CD-ROM boot completed"},
|
||||
+ {0x1f, 0x05, 0xff, "ROM boot completed"},
|
||||
+ {0x1f, 0x06, 0xff, "boot completed - device not specified"},
|
||||
+ {0x1f, 0x07, 0xff, "Installation started"},
|
||||
+ {0x1f, 0x08, 0xff, "Installation completed"},
|
||||
+ {0x1f, 0x09, 0xff, "Installation aborted"},
|
||||
+ {0x1f, 0x0a, 0xff, "Installation failed"},
|
||||
+ /* OS Stop/Shutdown */
|
||||
+ {0x20, 0x00, 0xff, "Error during system startup"},
|
||||
+ {0x20, 0x01, 0xff, "Run-time critical stop"},
|
||||
+ {0x20, 0x02, 0xff, "OS graceful stop"},
|
||||
+ {0x20, 0x03, 0xff, "OS graceful shutdown"},
|
||||
+ {0x20, 0x04, 0xff, "PEF initiated soft shutdown"},
|
||||
+ {0x20, 0x05, 0xff, "Agent not responding"},
|
||||
+ /* Slot/Connector */
|
||||
+ {0x21, 0x00, 0xff, "Fault Status"},
|
||||
+ {0x21, 0x01, 0xff, "Identify Status"},
|
||||
+ {0x21, 0x02, 0xff, "Device Installed"},
|
||||
+ {0x21, 0x03, 0xff, "Ready for Device Installation"},
|
||||
+ {0x21, 0x04, 0xff, "Ready for Device Removal"},
|
||||
+ {0x21, 0x05, 0xff, "Slot Power is Off"},
|
||||
+ {0x21, 0x06, 0xff, "Device Removal Request"},
|
||||
+ {0x21, 0x07, 0xff, "Interlock"},
|
||||
+ {0x21, 0x08, 0xff, "Slot is Disabled"},
|
||||
+ {0x21, 0x09, 0xff, "Spare Device"},
|
||||
+ /* System ACPI Power State */
|
||||
+ {0x22, 0x00, 0xff, "S0/G0: working"},
|
||||
+ {0x22, 0x01, 0xff, "S1: sleeping with system hw & processor context maintained"},
|
||||
+ {0x22, 0x02, 0xff, "S2: sleeping, processor context lost"},
|
||||
+ {0x22, 0x03, 0xff, "S3: sleeping, processor & hw context lost, memory retained"},
|
||||
+ {0x22, 0x04, 0xff, "S4: non-volatile sleep/suspend-to-disk"},
|
||||
+ {0x22, 0x05, 0xff, "S5/G2: soft-off"},
|
||||
+ {0x22, 0x06, 0xff, "S4/S5: soft-off"},
|
||||
+ {0x22, 0x07, 0xff, "G3: mechanical off"},
|
||||
+ {0x22, 0x08, 0xff, "Sleeping in S1/S2/S3 state"},
|
||||
+ {0x22, 0x09, 0xff, "G1: sleeping"},
|
||||
+ {0x22, 0x0a, 0xff, "S5: entered by override"},
|
||||
+ {0x22, 0x0b, 0xff, "Legacy ON state"},
|
||||
+ {0x22, 0x0c, 0xff, "Legacy OFF state"},
|
||||
+ {0x22, 0x0e, 0xff, "Unknown"},
|
||||
+ /* Watchdog 2 */
|
||||
+ {0x23, 0x00, 0xff, "Timer expired"},
|
||||
+ {0x23, 0x01, 0xff, "Hard reset"},
|
||||
+ {0x23, 0x02, 0xff, "Power down"},
|
||||
+ {0x23, 0x03, 0xff, "Power cycle"},
|
||||
+ {0x23, 0x04, 0xff, "reserved"},
|
||||
+ {0x23, 0x05, 0xff, "reserved"},
|
||||
+ {0x23, 0x06, 0xff, "reserved"},
|
||||
+ {0x23, 0x07, 0xff, "reserved"},
|
||||
+ {0x23, 0x08, 0xff, "Timer interrupt"},
|
||||
+ /* Platform Alert */
|
||||
+ {0x24, 0x00, 0xff, "Platform generated page"},
|
||||
+ {0x24, 0x01, 0xff, "Platform generated LAN alert"},
|
||||
+ {0x24, 0x02, 0xff, "Platform Event Trap generated"},
|
||||
+ {0x24, 0x03, 0xff, "Platform generated SNMP trap, OEM format"},
|
||||
+ /* Entity Presence */
|
||||
+ {0x25, 0x00, 0xff, "Present"},
|
||||
+ {0x25, 0x01, 0xff, "Absent"},
|
||||
+ {0x25, 0x02, 0xff, "Disabled"},
|
||||
+ /* LAN */
|
||||
+ {0x27, 0x00, 0xff, "Heartbeat Lost"},
|
||||
+ {0x27, 0x01, 0xff, "Heartbeat"},
|
||||
+ /* Management Subsystem Health */
|
||||
+ {0x28, 0x00, 0xff, "Sensor access degraded or unavailable"},
|
||||
+ {0x28, 0x01, 0xff, "Controller access degraded or unavailable"},
|
||||
+ {0x28, 0x02, 0xff, "Management controller off-line"},
|
||||
+ {0x28, 0x03, 0xff, "Management controller unavailable"},
|
||||
+ {0x28, 0x04, 0xff, "Sensor failure"},
|
||||
+ {0x28, 0x05, 0xff, "FRU failure"},
|
||||
+ /* Battery */
|
||||
+ {0x29, 0x00, 0xff, "Low"},
|
||||
+ {0x29, 0x01, 0xff, "Failed"},
|
||||
+ {0x29, 0x02, 0xff, "Presence Detected"},
|
||||
+ /* Version Change */
|
||||
+ {0x2b, 0x00, 0xff, "Hardware change detected"},
|
||||
+ {0x2b, 0x01, 0x00, "Firmware or software change detected"},
|
||||
+ {0x2b, 0x01, 0x01, "Firmware or software change detected, Mngmt Ctrl Dev Id"},
|
||||
+ {0x2b, 0x01, 0x02, "Firmware or software change detected, Mngmt Ctrl Firm Rev"},
|
||||
+ {0x2b, 0x01, 0x03, "Firmware or software change detected, Mngmt Ctrl Dev Rev"},
|
||||
+ {0x2b, 0x01, 0x04, "Firmware or software change detected, Mngmt Ctrl Manuf Id"},
|
||||
+ {0x2b, 0x01, 0x05, "Firmware or software change detected, Mngmt Ctrl IPMI Vers"},
|
||||
+ {0x2b, 0x01, 0x06, "Firmware or software change detected, Mngmt Ctrl Aux Firm Id"},
|
||||
+ {0x2b, 0x01, 0x07, "Firmware or software change detected, Mngmt Ctrl Firm Boot Block"},
|
||||
+ {0x2b, 0x01, 0x08, "Firmware or software change detected, Mngmt Ctrl Other"},
|
||||
+ {0x2b, 0x01, 0x09, "Firmware or software change detected, BIOS/EFI change"},
|
||||
+ {0x2b, 0x01, 0x0A, "Firmware or software change detected, SMBIOS change"},
|
||||
+ {0x2b, 0x01, 0x0B, "Firmware or software change detected, O/S change"},
|
||||
+ {0x2b, 0x01, 0x0C, "Firmware or software change detected, O/S loader change"},
|
||||
+ {0x2b, 0x01, 0x0D, "Firmware or software change detected, Service Diag change"},
|
||||
+ {0x2b, 0x01, 0x0E, "Firmware or software change detected, Mngmt SW agent change"},
|
||||
+ {0x2b, 0x01, 0x0F, "Firmware or software change detected, Mngmt SW App change"},
|
||||
+ {0x2b, 0x01, 0x10, "Firmware or software change detected, Mngmt SW Middle"},
|
||||
+ {0x2b, 0x01, 0x11, "Firmware or software change detected, Prog HW Change (FPGA)"},
|
||||
+ {0x2b, 0x01, 0x12, "Firmware or software change detected, board/FRU module change"},
|
||||
+ {0x2b, 0x01, 0x13, "Firmware or software change detected, board/FRU component change"},
|
||||
+ {0x2b, 0x01, 0x14, "Firmware or software change detected, board/FRU replace equ ver"},
|
||||
+ {0x2b, 0x01, 0x15, "Firmware or software change detected, board/FRU replace new ver"},
|
||||
+ {0x2b, 0x01, 0x16, "Firmware or software change detected, board/FRU replace old ver"},
|
||||
+ {0x2b, 0x01, 0x17, "Firmware or software change detected, board/FRU HW conf change"},
|
||||
+ {0x2b, 0x02, 0xff, "Hardware incompatibility detected"},
|
||||
+ {0x2b, 0x03, 0xff, "Firmware or software incompatibility detected"},
|
||||
+ {0x2b, 0x04, 0xff, "Invalid or unsupported hardware version"},
|
||||
+ {0x2b, 0x05, 0xff, "Invalid or unsupported firmware or software version"},
|
||||
+ {0x2b, 0x06, 0xff, "Hardware change success"},
|
||||
+ {0x2b, 0x07, 0x00, "Firmware or software change success"},
|
||||
+ {0x2b, 0x07, 0x01, "Firmware or software change success, Mngmt Ctrl Dev Id"},
|
||||
+ {0x2b, 0x07, 0x02, "Firmware or software change success, Mngmt Ctrl Firm Rev", FW_Update_evt2, FW_Update_evt3},
|
||||
+ {0x2b, 0x07, 0x03, "Firmware or software change success, Mngmt Ctrl Dev Rev"},
|
||||
+ {0x2b, 0x07, 0x04, "Firmware or software change success, Mngmt Ctrl Manuf Id"},
|
||||
+ {0x2b, 0x07, 0x05, "Firmware or software change success, Mngmt Ctrl IPMI Vers"},
|
||||
+ {0x2b, 0x07, 0x06, "Firmware or software change success, Mngmt Ctrl Aux Firm Id"},
|
||||
+ {0x2b, 0x07, 0x07, "Firmware or software change success, Mngmt Ctrl Firm Boot Block"},
|
||||
+ {0x2b, 0x07, 0x08, "Firmware or software change success, Mngmt Ctrl Other"},
|
||||
+ {0x2b, 0x07, 0x09, "Firmware or software change success, BIOS/EFI change"},
|
||||
+ {0x2b, 0x07, 0x0A, "Firmware or software change success, SMBIOS change"},
|
||||
+ {0x2b, 0x07, 0x0B, "Firmware or software change success, O/S change"},
|
||||
+ {0x2b, 0x07, 0x0C, "Firmware or software change success, O/S loader change"},
|
||||
+ {0x2b, 0x07, 0x0D, "Firmware or software change success, Service Diag change"},
|
||||
+ {0x2b, 0x07, 0x0E, "Firmware or software change success, Mngmt SW agent change"},
|
||||
+ {0x2b, 0x07, 0x0F, "Firmware or software change success, Mngmt SW App change"},
|
||||
+ {0x2b, 0x07, 0x10, "Firmware or software change success, Mngmt SW Middle"},
|
||||
+ {0x2b, 0x07, 0x11, "Firmware or software change success, Prog HW Change (FPGA)"},
|
||||
+ {0x2b, 0x07, 0x12, "Firmware or software change success, board/FRU module change"},
|
||||
+ {0x2b, 0x07, 0x13, "Firmware or software change success, board/FRU component change"},
|
||||
+ {0x2b, 0x07, 0x14, "Firmware or software change success, board/FRU replace equ ver"},
|
||||
+ {0x2b, 0x07, 0x15, "Firmware or software change success, board/FRU replace new ver"},
|
||||
+ {0x2b, 0x07, 0x16, "Firmware or software change success, board/FRU replace old ver"},
|
||||
+ {0x2b, 0x07, 0x17, "Firmware or software change success, board/FRU HW conf change"},
|
||||
+ /* FRU State */
|
||||
+ {0x2c, 0x00, 0xff, "Not Installed"},
|
||||
+ {0x2c, 0x01, 0xff, "Inactive"},
|
||||
+ {0x2c, 0x02, 0xff, "Activation Requested"},
|
||||
+ {0x2c, 0x03, 0xff, "Activation in Progress"},
|
||||
+ {0x2c, 0x04, 0xff, "Active"},
|
||||
+ {0x2c, 0x05, 0xff, "Deactivation Requested"},
|
||||
+ {0x2c, 0x06, 0xff, "Deactivation in Progress"},
|
||||
+ {0x2c, 0x07, 0xff, "Communication lost"},
|
||||
+ /* PICMG FRU Hot Swap */
|
||||
+ {0xF0, 0x00, 0xFF, "Transition to M0"},
|
||||
+ {0xF0, 0x01, 0xFF, "Transition to M1"},
|
||||
+ {0xF0, 0x02, 0xFF, "Transition to M2"},
|
||||
+ {0xF0, 0x03, 0xFF, "Transition to M3"},
|
||||
+ {0xF0, 0x04, 0xFF, "Transition to M4"},
|
||||
+ {0xF0, 0x05, 0xFF, "Transition to M5"},
|
||||
+ {0xF0, 0x06, 0xFF, "Transition to M6"},
|
||||
+ {0xF0, 0x07, 0xFF, "Transition to M7"},
|
||||
+ /* PICMG IPMB Physical Link */
|
||||
+ {0xF1, 0x00, 0xff, "IPMB-A disabled, IPMB-B disabled"},
|
||||
+ {0xF1, 0x01, 0xff, "IPMB-A enabled, IPMB-B disabled"},
|
||||
+ {0xF1, 0x02, 0xff, "IPMB-A disabled, IPMB-B enabled"},
|
||||
+ {0xF1, 0x03, 0xff, "IPMB-A enabled, IPMB-B enabled"},
|
||||
+ /* PICMG Module Hot Swap */
|
||||
+ {0xF2, 0x00, 0xff, "Module Handle Closed"},
|
||||
+ {0xF2, 0x01, 0xff, "Module Handle Opened"},
|
||||
+ {0xF2, 0x02, 0xff, "Quiesced"},
|
||||
+ {0x00, 0x00, 0xff, NULL},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_oem_event_sensor_types sensor_oem_event_types[] = {
|
||||
+ {0xba, 0xcb, 0x01, 0xff, "Kernel Panic"},
|
||||
+ {0xba, 0xcb, 0x02, 0x00, "Power Button pressed accidentally under S0"},
|
||||
+ {0xba, 0xcc, 0x01, 0x00, "Switch to golden flash"},
|
||||
+ {0xba, 0xcc, 0x01, 0x01,
|
||||
+ "Switch to golden flash forced by security module due to primary flash verification failure"},
|
||||
+ {0xba, 0xcc, 0x02, 0x01, "PCIe topology does not match any suite"},
|
||||
+ {0xba, 0xcc, 0x02, 0x02, "EEPROM CRC result is incorrect"},
|
||||
+ {0xba, 0xcc, 0x02, 0x03, "Current PCIe devices do not match PCIe topology"},
|
||||
+ {0xba, 0xcc, 0x03, 0x00, "Abnormal leakage line detected"},
|
||||
+ {0xba, 0xcc, 0x03, 0x01, "Abnormal leakage line detected at point A"},
|
||||
+ {0xba, 0xcc, 0x03, 0x02, "Abnormal leakage line detected at point B"},
|
||||
+ {0xba, 0xcc, 0x03, 0x03, "Abnormal leakage line detected at point C"},
|
||||
+ {0xba, 0xcc, 0x03, 0x04, "Abnormal leakage line detected at point D"},
|
||||
+ {0xba, 0xcc, 0x03, 0x05, "Abnormal leakage line detected at point E"},
|
||||
+ {0xba, 0xcc, 0x04, 0x00, "Leakage line is absent"},
|
||||
+ {0xba, 0xcc, 0x05, 0x01, "Security module verify BMC primary flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x02, "Security module verify BMC golden flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x03, "Security module verify BMC primary and golden flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x04, "Security module verify BIOS flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x05, "Security module verify BMC primary flash and BIOS flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x06, "Security module verify BMC golden flash and BIOS flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x07, "Security module verify BMC primary and golden flash and BIOS flash failed"},
|
||||
+ {0xba, 0xcc, 0x05, 0x08, "Security module firmware update failed"},
|
||||
+ {0xba, 0xcc, 0x06, 0x01, "BMC Recovery occurred"},
|
||||
+ {0xba, 0xcc, 0x06, 0x02, "BIOS Recovery occurred"},
|
||||
+ {0xba, 0xcc, 0x06, 0x03, "PFR Recovery occurred"},
|
||||
+ {0xba, 0xcc, 0x07, 0x01, "Insufficient Bus Number resources"},
|
||||
+ {0xba, 0xcc, 0x07, 0x02, "Insufficient IO Size resources"},
|
||||
+ {0xba, 0xcc, 0x07, 0x03, "Insufficient MEM32 Size resources"},
|
||||
+ {0xba, 0xcc, 0x07, 0x04, "Insufficient MEM32 PREF Size resources"},
|
||||
+ {0xba, 0xcc, 0x07, 0x05, "Insufficient MEM64 PREF Size resources"},
|
||||
+ {0xba, 0xcc, 0x08, 0x00,
|
||||
+ "Failed to synchronize user information between HOST and BOX BMC"},
|
||||
+ {0xba, 0xcc, 0x09, 0x01, "Failed to power on HOST through BMC"},
|
||||
+ {0xba, 0xcc, 0x09, 0x02, "Failed to power off HOST through BMC"},
|
||||
+ {0x00, 0x00, 0x00, 0x00, NULL},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_oem_specific_sensor_types sensor_oem_ppr_types[] = {
|
||||
+ {1, 0x01, "hPPR repair "},
|
||||
+ {1, 0x02, "sPPR repair "},
|
||||
+ {1, 0x03, "runtime hPPR repair "},
|
||||
+ {1, 0x04, "runtime sPPR repair "},
|
||||
+ {5, 0x01, "success"},
|
||||
+ {5, 0x02, "fail"},
|
||||
+ {0, 0x00, NULL},
|
||||
+};
|
||||
+
|
||||
+static struct ipmi_oem_specific_sensor_types sensor_oem_bacd_types[] = {
|
||||
+ {3, 0, "Fatal(CATERR/MSMI)"},
|
||||
+ {3, 1, "UCE-R(CATERR/MSMI_16BCLK)"},
|
||||
+ {3, 2, "CE(reserve for ERR 0)"},
|
||||
+ {3, 3, "FW(Data from FW/BIOS)"},
|
||||
+ {3, 4, "Reserved"},
|
||||
+ {3, 5, "Reserved"},
|
||||
+ {3, 6, "Reserved"},
|
||||
+ {3, 7, "Reserved"},
|
||||
+ {2, 0x00, "Dump succeeded"},
|
||||
+ {2, 0x01, "Dump failed"},
|
||||
+ {0, 0x00, NULL},
|
||||
+};
|
||||
+
|
||||
+#endif /* IPMI_SEL_DESC_H */
|
||||
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
||||
index 258aa1c..edfd80f 100644
|
||||
--- a/lib/Makefile.am
|
||||
+++ b/lib/Makefile.am
|
||||
@@ -32,7 +32,7 @@ AUTOMAKE_OPTIONS = subdir-objects
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
-noinst_LTLIBRARIES = libipmitool.la
|
||||
+lib_LTLIBRARIES = libipmitool.la
|
||||
libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \
|
||||
ipmi_lanp.c ipmi_fru.c ipmi_chassis.c ipmi_mc.c log.c \
|
||||
dimm_spd.c ipmi_sensor.c ipmi_channel.c ipmi_event.c \
|
||||
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
|
||||
index 14acbcf..0829e84 100644
|
||||
--- a/src/plugins/Makefile.am
|
||||
+++ b/src/plugins/Makefile.am
|
||||
@@ -35,7 +35,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
SUBDIRS = @INTF_LAN@ @INTF_LANPLUS@ @INTF_OPEN@ @INTF_LIPMI@ @INTF_IMB@ @INTF_BMC@ @INTF_FREE@ @INTF_SERIAL@ @INTF_DUMMY@ @INTF_USB@ @INTF_DBUS@
|
||||
DIST_SUBDIRS = lan lanplus open lipmi imb bmc free serial dummy usb dbus
|
||||
|
||||
-noinst_LTLIBRARIES = libintf.la
|
||||
+lib_LTLIBRARIES = libintf.la
|
||||
libintf_la_SOURCES = ipmi_intf.c
|
||||
libintf_la_CFLAGS = -DDEFAULT_INTF='"@DEFAULT_INTF@"'
|
||||
libintf_la_LDFLAGS = -export-dynamic
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
|
||||
SRC_URI:append = " \
|
||||
file://0001-change-ipmitool-to-shared-objects.patch \
|
||||
"
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
From dcfe25ff7fe8874933107ff5dcfaa447722de5d1 Mon Sep 17 00:00:00 2001
|
||||
From: wangjue <jue.wang2@luxshare-ict.com>
|
||||
Date: Thu, 26 Dec 2024 10:38:18 +0800
|
||||
Subject: [PATCH] Add multiplierM offsetB bExp rExp items in
|
||||
sensor_data_record.json
|
||||
|
||||
Signed-off-by: wangjue <jue.wang2@luxshare-ict.com>
|
||||
---
|
||||
scripts/sensor_data_record_gen.py | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/scripts/sensor_data_record_gen.py b/scripts/sensor_data_record_gen.py
|
||||
index 2ef58b7..fdcf691 100755
|
||||
--- a/scripts/sensor_data_record_gen.py
|
||||
+++ b/scripts/sensor_data_record_gen.py
|
||||
@@ -12,10 +12,18 @@ def getSensorParams(sensor, sensor_params):
|
||||
sensorName = sensor.get("sensorName", path[path.rfind("/") + 1 :])
|
||||
sensorReadingType = sensor.get("sensorReadingType", 0)
|
||||
sensorType = sensor.get("sensorType", 0)
|
||||
+ multiplierM = sensor.get("multiplierM", 0)
|
||||
+ offsetB = sensor.get("offsetB", 0)
|
||||
+ bExp = sensor.get("bExp", 0)
|
||||
+ rExp = sensor.get("rExp", 0)
|
||||
sensor_params[path] = {
|
||||
"sensorName": sensorName,
|
||||
"sensorReadingType": sensorReadingType,
|
||||
"sensorType": sensorType,
|
||||
+ "multiplierM": multiplierM,
|
||||
+ "offsetB": offsetB,
|
||||
+ "bExp": bExp,
|
||||
+ "rExp": rExp,
|
||||
}
|
||||
|
||||
overridePaths = sensor.get("overridePaths", [])
|
||||
@@ -25,6 +33,10 @@ def getSensorParams(sensor, sensor_params):
|
||||
"sensorName": sensorName,
|
||||
"sensorReadingType": sensorReadingType,
|
||||
"sensorType": sensorType,
|
||||
+ "multiplierM": multiplierM,
|
||||
+ "offsetB": offsetB,
|
||||
+ "bExp": bExp,
|
||||
+ "rExp": rExp,
|
||||
}
|
||||
return sensor_params
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
From 57dc7fbdd1dceb8c82512dae754bf4a8370a4010 Mon Sep 17 00:00:00 2001
|
||||
From: roly <Rolyli.Li@luxshare-ict.com>
|
||||
Date: Fri, 7 Feb 2025 14:42:30 +0800
|
||||
Subject: [PATCH] Add power cycle trigger async firmware update
|
||||
|
||||
---
|
||||
chassishandler.cpp | 216 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 216 insertions(+)
|
||||
|
||||
diff --git a/chassishandler.cpp b/chassishandler.cpp
|
||||
index 89d3e00..8e68ac5 100644
|
||||
--- a/chassishandler.cpp
|
||||
+++ b/chassishandler.cpp
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <mapper.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
+#include <boost/asio.hpp>
|
||||
#include <ipmid/api.hpp>
|
||||
#include <ipmid/types.hpp>
|
||||
#include <ipmid/utils.hpp>
|
||||
@@ -813,6 +814,196 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
|
||||
return ipmi::responseSuccess();
|
||||
}
|
||||
|
||||
+//------------------------------------------------
|
||||
+// Is power on (check power state before async update)
|
||||
+//------------------------------------------------
|
||||
+bool isPowerOn()
|
||||
+{
|
||||
+ std::variant<std::string> msg;
|
||||
+ sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
|
||||
+ try
|
||||
+ {
|
||||
+ auto method = bus.new_method_call("xyz.openbmc_project.State.Chassis",
|
||||
+ "/xyz/openbmc_project/state/chassis0",
|
||||
+ "org.freedesktop.DBus.Properties",
|
||||
+ "Get");
|
||||
+ method.append("xyz.openbmc_project.State.Chassis");
|
||||
+ method.append("CurrentPowerState");
|
||||
+ auto reply = bus.call(method);
|
||||
+ reply.read(msg);
|
||||
+ return std::get<std::string>(msg).find("Off") != std::string::npos
|
||||
+ ? false
|
||||
+ : true;
|
||||
+ }
|
||||
+ catch (const std::exception& /*ex*/)
|
||||
+ {
|
||||
+ log<level::ERR>("Can not get power status");
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+//------------------------------------------------
|
||||
+// Async update start (return status or no value))
|
||||
+//------------------------------------------------
|
||||
+std::string asyncUpdateStart()
|
||||
+{
|
||||
+ sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
|
||||
+ std::string asyncStatus{};
|
||||
+ auto method = bus.new_method_call(
|
||||
+ "xyz.openbmc_project.Software.AsyncUpdate",
|
||||
+ "/xyz/openbmc_project/Software/AsyncUpdate",
|
||||
+ "xyz.openbmc_project.Software.AsyncUpdate", "Start");
|
||||
+ try
|
||||
+ {
|
||||
+ auto reply = bus.call(method);
|
||||
+ reply.read(asyncStatus);
|
||||
+ return asyncStatus;
|
||||
+ }
|
||||
+ catch (const sdbusplus::exception::SdBusError& /*ex*/)
|
||||
+ {
|
||||
+ log<level::ERR>("Error in starting async update");
|
||||
+ return "";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+//------------------------------------------------
|
||||
+// Get async update status (return status or no value)
|
||||
+//------------------------------------------------
|
||||
+std::string asyncUpdateStatus()
|
||||
+{
|
||||
+ sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
|
||||
+ try
|
||||
+ {
|
||||
+ auto status = ipmi::getDbusProperty(
|
||||
+ bus, "xyz.openbmc_project.Software.AsyncUpdate",
|
||||
+ "/xyz/openbmc_project/Software/AsyncUpdate",
|
||||
+ "xyz.openbmc_project.Software.AsyncUpdate", "AsyncUpdateStatus");
|
||||
+ return std::get<std::string>(status);
|
||||
+ }
|
||||
+ catch (const sdbusplus::exception::SdBusError& /*ex*/)
|
||||
+ {
|
||||
+ log<level::ERR>("Can not get async update status");
|
||||
+ return "";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int initiateHostStateTransition(ipmi::Context::ptr& ctx,
|
||||
+ State::Host::Transition transition);
|
||||
+int initiateChassisStateTransition(ipmi::Context::ptr& ctx,
|
||||
+ State::Chassis::Transition transition);
|
||||
+//---------------------------------------------------------------------------
|
||||
+// if power cycle wait for power on
|
||||
+//---------------------------------------------------------------------------
|
||||
+void waitForUpdateDone()
|
||||
+{
|
||||
+ static boost::asio::steady_timer timer(*getIoContext());
|
||||
+ timer.expires_after(boost::asio::chrono::seconds(15));
|
||||
+ timer.async_wait([&](const boost::system::error_code& ec) {
|
||||
+ if (ec)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (asyncUpdateStatus() != "Idle")
|
||||
+ {
|
||||
+ waitForUpdateDone();
|
||||
+ return;
|
||||
+ }
|
||||
+ sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
|
||||
+ try
|
||||
+ {
|
||||
+ auto method =
|
||||
+ bus.new_method_call("xyz.openbmc_project.State.Host",
|
||||
+ "/xyz/openbmc_project/state/host0",
|
||||
+ "org.freedesktop.DBus.Properties", "Set");
|
||||
+
|
||||
+ method.append("xyz.openbmc_project.State.Host");
|
||||
+ method.append("RequestedHostTransition");
|
||||
+ method.append(std::variant<std::string>{
|
||||
+ "xyz.openbmc_project.State.Host.Transition.On"});
|
||||
+ bus.call_noreply(method);
|
||||
+ }
|
||||
+ catch (const sdbusplus::exception::SdBusError& /*ex*/)
|
||||
+ {
|
||||
+ log<level::ERR>("Can not power On after async update");
|
||||
+ }
|
||||
+ });
|
||||
+}
|
||||
+//---------------------------------------------------------------------------
|
||||
+// wait for power off to start update
|
||||
+//---------------------------------------------------------------------------
|
||||
+void waitForStartUpdate(bool doPowerOn)
|
||||
+{
|
||||
+ static boost::asio::steady_timer timer(*getIoContext());
|
||||
+ timer.expires_after(boost::asio::chrono::seconds(15));
|
||||
+ timer.async_wait(
|
||||
+ [doPowerOn](const boost::system::error_code& ec) {
|
||||
+ if (ec)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (isPowerOn()) // power status is not "off"
|
||||
+ {
|
||||
+ waitForStartUpdate(doPowerOn);
|
||||
+ return;
|
||||
+ }
|
||||
+ try
|
||||
+ {
|
||||
+ asyncUpdateStart();
|
||||
+ if (doPowerOn)
|
||||
+ {
|
||||
+ waitForUpdateDone();
|
||||
+ }
|
||||
+ }
|
||||
+ catch (const sdbusplus::exception::SdBusError& /*ex*/)
|
||||
+ {
|
||||
+ log<level::ERR>("Can not start update");
|
||||
+ }
|
||||
+ });
|
||||
+}
|
||||
+
|
||||
+enum class PowerControlAsyncStatus
|
||||
+{
|
||||
+ active,
|
||||
+ running,
|
||||
+ idle
|
||||
+};
|
||||
+
|
||||
+//---------------------------------------------------------------------------
|
||||
+// hook host power control to trigger async update
|
||||
+// return true if async-update is not in progress
|
||||
+//---------------------------------------------------------------------------
|
||||
+PowerControlAsyncStatus
|
||||
+ processPowerControlHost(ipmi::Context::ptr& ctx,
|
||||
+ State::Host::Transition transition)
|
||||
+{
|
||||
+ std::string asyncStatus = asyncUpdateStatus();
|
||||
+ auto doPowerOn = isPowerOn();
|
||||
+ switch (transition)
|
||||
+ {
|
||||
+ case State::Host::Transition::Reboot:
|
||||
+ if (asyncStatus == "Waiting")
|
||||
+ {
|
||||
+ initiateChassisStateTransition(ctx,
|
||||
+ State::Chassis::Transition::Off);
|
||||
+ waitForStartUpdate(doPowerOn);
|
||||
+ return PowerControlAsyncStatus::active;
|
||||
+ }
|
||||
+ else if (asyncStatus == "Running")
|
||||
+ {
|
||||
+ return PowerControlAsyncStatus::running;
|
||||
+ }
|
||||
+ break;
|
||||
+ case State::Host::Transition::On:
|
||||
+ if (asyncStatus == "Running")
|
||||
+ {
|
||||
+ return PowerControlAsyncStatus::running;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return PowerControlAsyncStatus::idle;
|
||||
+}
|
||||
//------------------------------------------
|
||||
// Calls into Host State Manager Dbus object
|
||||
//------------------------------------------
|
||||
@@ -1363,9 +1554,18 @@ ipmi::RspType<> ipmiChassisControl(ipmi::Context::ptr& ctx,
|
||||
uint8_t chassisControl)
|
||||
{
|
||||
int rc = 0;
|
||||
+ PowerControlAsyncStatus asyncUpdateStatus = PowerControlAsyncStatus::idle;
|
||||
switch (chassisControl)
|
||||
{
|
||||
case CMD_POWER_ON:
|
||||
+ asyncUpdateStatus =
|
||||
+ processPowerControlHost(ctx, State::Host::Transition::On);
|
||||
+ if (asyncUpdateStatus != PowerControlAsyncStatus::idle)
|
||||
+ {
|
||||
+ log<level::ERR>(
|
||||
+ "Power-on opertion is not allowed during the upgrade process");
|
||||
+ return ipmi::responseCommandNotAvailable();
|
||||
+ }
|
||||
rc = initiateHostStateTransition(ctx, State::Host::Transition::On);
|
||||
break;
|
||||
case CMD_POWER_OFF:
|
||||
@@ -1377,6 +1577,22 @@ ipmi::RspType<> ipmiChassisControl(ipmi::Context::ptr& ctx,
|
||||
ctx, State::Host::Transition::ForceWarmReboot);
|
||||
break;
|
||||
case CMD_POWER_CYCLE:
|
||||
+ asyncUpdateStatus =
|
||||
+ processPowerControlHost(ctx, State::Host::Transition::Reboot);
|
||||
+ if (asyncUpdateStatus == PowerControlAsyncStatus::active)
|
||||
+ {
|
||||
+ log<level::INFO>(
|
||||
+ "Power-cycle operation will activate the async-update, let the async-update flow to do the power-cycle");
|
||||
+ rc = ipmi::ccSuccess;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (asyncUpdateStatus == PowerControlAsyncStatus::running)
|
||||
+ {
|
||||
+ log<level::INFO>(
|
||||
+ "Power-cycle operation is not allowed during the upgrade");
|
||||
+ rc = ipmi::ccCommandNotAvailable;
|
||||
+ break;
|
||||
+ }
|
||||
rc = initiateHostStateTransition(ctx,
|
||||
State::Host::Transition::Reboot);
|
||||
break;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
From a16e5220657aeca72ad01c2408fefed38fa3c256 Mon Sep 17 00:00:00 2001
|
||||
From: wangjue <jue.wang2@luxshare-ict.com>
|
||||
Date: Fri, 13 Dec 2024 11:07:55 +0800
|
||||
Subject: [PATCH] Fix incorrect thresholdLevelsStates response for Get Sensor
|
||||
Reading command
|
||||
|
||||
Signed-off-by: wangjue <jue.wang2@luxshare-ict.com>
|
||||
---
|
||||
sensordatahandler.hpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
|
||||
index 6c3a8e5..2867cd5 100644
|
||||
--- a/sensordatahandler.hpp
|
||||
+++ b/sensordatahandler.hpp
|
||||
@@ -327,9 +327,9 @@ GetSensorResponse readingData(const Info& sensorInfo)
|
||||
warningAlarmLow = false;
|
||||
}
|
||||
response.thresholdLevelsStates =
|
||||
- (static_cast<uint8_t>(critAlarmHigh) << 3) |
|
||||
- (static_cast<uint8_t>(critAlarmLow) << 2) |
|
||||
- (static_cast<uint8_t>(warningAlarmHigh) << 1) |
|
||||
+ (static_cast<uint8_t>(critAlarmHigh) << 4) |
|
||||
+ (static_cast<uint8_t>(warningAlarmHigh) << 3) |
|
||||
+ (static_cast<uint8_t>(critAlarmLow) << 1) |
|
||||
(static_cast<uint8_t>(warningAlarmLow));
|
||||
|
||||
return response;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
From 3079d7621187cb966f19726f2f31fb03f0080eed Mon Sep 17 00:00:00 2001
|
||||
From: roly <Rolyli.Li@luxshare-ict.com>
|
||||
Date: Wed, 11 Dec 2024 17:08:44 +0800
|
||||
Subject: [PATCH] add sensor config file
|
||||
|
||||
---
|
||||
scripts/meson.build | 19 +++++-
|
||||
scripts/sensor_data_record_gen.py | 104 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 120 insertions(+), 3 deletions(-)
|
||||
create mode 100755 scripts/sensor_data_record_gen.py
|
||||
|
||||
diff --git a/scripts/meson.build b/scripts/meson.build
|
||||
index b739e6f..ae5358c 100644
|
||||
--- a/scripts/meson.build
|
||||
+++ b/scripts/meson.build
|
||||
@@ -3,11 +3,11 @@ python_exe = find_program('python3', 'python')
|
||||
|
||||
sensor_gen = custom_target('sensor-gen',
|
||||
output: 'sensor-gen.cpp',
|
||||
- input: [ 'sensor_gen.py', get_option('sensor-yaml-gen')],
|
||||
+ input: files(get_option('sensor-yaml-gen')),
|
||||
command: [
|
||||
python_exe,
|
||||
- '@INPUT0@',
|
||||
- '-i', '@INPUT1@',
|
||||
+ files('sensor_gen.py'),
|
||||
+ '-i', '@INPUT@',
|
||||
'-o', meson.current_build_dir(),
|
||||
'generate-cpp',
|
||||
],
|
||||
@@ -39,3 +39,16 @@ fru_gen = custom_target('fru-gen',
|
||||
],
|
||||
)
|
||||
generated_src += fru_gen
|
||||
+
|
||||
+sensor_data_gen = custom_target('sensor-json-gen',
|
||||
+ output: 'sensor-data-record.json',
|
||||
+ input: files(get_option('sensor-yaml-gen')),
|
||||
+ command: [
|
||||
+ files('sensor_data_record_gen.py'),
|
||||
+ '-i', '@INPUT@',
|
||||
+ '-o', meson.current_build_dir(),
|
||||
+ ],
|
||||
+ install: true,
|
||||
+ install_dir: get_option('datadir') / 'ipmi-providers',
|
||||
+)
|
||||
+generated_src += sensor_data_gen
|
||||
diff --git a/scripts/sensor_data_record_gen.py b/scripts/sensor_data_record_gen.py
|
||||
new file mode 100755
|
||||
index 0000000..2ef58b7
|
||||
--- /dev/null
|
||||
+++ b/scripts/sensor_data_record_gen.py
|
||||
@@ -0,0 +1,104 @@
|
||||
+#!/usr/bin/env python3
|
||||
+
|
||||
+import argparse
|
||||
+import json
|
||||
+import os
|
||||
+
|
||||
+import yaml
|
||||
+
|
||||
+
|
||||
+def getSensorParams(sensor, sensor_params):
|
||||
+ path = sensor["path"]
|
||||
+ sensorName = sensor.get("sensorName", path[path.rfind("/") + 1 :])
|
||||
+ sensorReadingType = sensor.get("sensorReadingType", 0)
|
||||
+ sensorType = sensor.get("sensorType", 0)
|
||||
+ sensor_params[path] = {
|
||||
+ "sensorName": sensorName,
|
||||
+ "sensorReadingType": sensorReadingType,
|
||||
+ "sensorType": sensorType,
|
||||
+ }
|
||||
+
|
||||
+ overridePaths = sensor.get("overridePaths", [])
|
||||
+ for item in overridePaths:
|
||||
+ sensorName = item[item.rfind("/") + 1 :]
|
||||
+ sensor_params[item] = {
|
||||
+ "sensorName": sensorName,
|
||||
+ "sensorReadingType": sensorReadingType,
|
||||
+ "sensorType": sensorType,
|
||||
+ }
|
||||
+ return sensor_params
|
||||
+
|
||||
+
|
||||
+def main():
|
||||
+ app_description = "Convert sensor yaml to json."
|
||||
+
|
||||
+ parser = argparse.ArgumentParser(
|
||||
+ description=app_description,
|
||||
+ formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
+ )
|
||||
+ parser.add_argument(
|
||||
+ "-i",
|
||||
+ "--sensor_yaml",
|
||||
+ dest="sensor_yaml",
|
||||
+ nargs="*",
|
||||
+ type=str,
|
||||
+ default=[],
|
||||
+ help="input sensor yaml file list to parse",
|
||||
+ )
|
||||
+ parser.add_argument(
|
||||
+ "-o",
|
||||
+ "--output-dir",
|
||||
+ dest="outputdir",
|
||||
+ help="The directory of json file",
|
||||
+ )
|
||||
+ parser.add_argument(
|
||||
+ "-f",
|
||||
+ "--override-flag",
|
||||
+ dest="override",
|
||||
+ default="",
|
||||
+ help="override flag",
|
||||
+ )
|
||||
+ args = parser.parse_args()
|
||||
+
|
||||
+ if not args.override and len(args.sensor_yaml) > 1:
|
||||
+ raise RuntimeError(
|
||||
+ "Not support multi machine, but there are multi sensor yamls"
|
||||
+ )
|
||||
+ total_sensor_params = {}
|
||||
+
|
||||
+ for yaml_file in args.sensor_yaml:
|
||||
+ with open(yaml_file, "r") as y:
|
||||
+ sensors = yaml.safe_load(y)
|
||||
+ sensors = [i for i in sensors.values()]
|
||||
+ sensor_params = {}
|
||||
+ for s in sensors:
|
||||
+ sensor_params = getSensorParams(s, sensor_params)
|
||||
+ for sensor_param in sensor_params:
|
||||
+ # if the sensor is already in the total_sensor_params, check the value is must same
|
||||
+ if sensor_param in total_sensor_params:
|
||||
+ if (
|
||||
+ total_sensor_params[sensor_param]
|
||||
+ != sensor_params[sensor_param]
|
||||
+ ):
|
||||
+ raise RuntimeError(
|
||||
+ "The sensor is already in the total_sensor_params, but the value is different"
|
||||
+ )
|
||||
+ else:
|
||||
+ total_sensor_params[sensor_param] = sensor_params[
|
||||
+ sensor_param
|
||||
+ ]
|
||||
+ output_json = os.path.join(args.outputdir, "sensor-data-record.json")
|
||||
+ with open(output_json, "w") as j:
|
||||
+ j.write(
|
||||
+ json.dumps(
|
||||
+ total_sensor_params,
|
||||
+ indent=4,
|
||||
+ sort_keys=True,
|
||||
+ separators=(",", ": "),
|
||||
+ )
|
||||
+ )
|
||||
+ j.write("\n")
|
||||
+
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ main()
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
From fdcfa9e7ff6eb31fe77cd4032d202bb8f1a50f37 Mon Sep 17 00:00:00 2001
|
||||
From: roly <Rolyli.Li@luxshare-ict.com>
|
||||
Date: Thu, 21 Nov 2024 18:23:00 +0800
|
||||
Subject: [PATCH] ipmi cmd support set sel time utc offset
|
||||
|
||||
---
|
||||
storagehandler.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 63 insertions(+)
|
||||
|
||||
diff --git a/storagehandler.cpp b/storagehandler.cpp
|
||||
index 4fef019..67d76ea 100644
|
||||
--- a/storagehandler.cpp
|
||||
+++ b/storagehandler.cpp
|
||||
@@ -696,6 +696,63 @@ ipmi::RspType<int16_t> ipmiStorageGetSelTimeUtcOffset()
|
||||
return ipmi::responseSuccess(timeEquation);
|
||||
}
|
||||
|
||||
+/** @brief implements the Set SEL timezone command
|
||||
+ * @returns IPMI completion code plus response data
|
||||
+ * -current timezone
|
||||
+ */
|
||||
+ipmi::RspType<> ipmiStorageSetSelTimeUtcOffset(int16_t UTCOffset)
|
||||
+{
|
||||
+ int hrs = 0;
|
||||
+ char ZoneInfoFile[128] = {0}, file[32] = {0};
|
||||
+ static constexpr int16_t SEL_UTC_MAX_RANGE = 1440;
|
||||
+ static constexpr int16_t SEL_UTC_MIN_RANGE = -1440;
|
||||
+ static constexpr int16_t UNSPECIFIED_UTC_OFFSET = 0x7ff;
|
||||
+ constexpr auto LOCALTIME = "/etc/localtime";
|
||||
+
|
||||
+ if (((UTCOffset > SEL_UTC_MAX_RANGE ) || (UTCOffset < SEL_UTC_MIN_RANGE) || (UTCOffset % 60 != 0)) && UTCOffset != UNSPECIFIED_UTC_OFFSET)
|
||||
+ {
|
||||
+ return ipmi::responseParmOutOfRange();
|
||||
+ }
|
||||
+
|
||||
+ hrs = UTCOffset / 60;
|
||||
+ if(UTCOffset == UNSPECIFIED_UTC_OFFSET)
|
||||
+ {
|
||||
+ hrs = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (0 > UTCOffset)
|
||||
+ {
|
||||
+ if (snprintf(file,sizeof(file), "GMT+%d", -hrs) >= (long int)sizeof(file))
|
||||
+ {
|
||||
+ return ipmi::responseUnspecifiedError();
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (snprintf(file,sizeof(file), "GMT-%d", hrs) >= (long int)sizeof(file))
|
||||
+ {
|
||||
+ return ipmi::responseUnspecifiedError();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (snprintf (ZoneInfoFile, sizeof(ZoneInfoFile), "%s/%s", "/usr/share/zoneinfo/Etc", file) >= (long int)sizeof(ZoneInfoFile))
|
||||
+ {
|
||||
+ return ipmi::responseUnspecifiedError();
|
||||
+ }
|
||||
+
|
||||
+ if((0 > unlink(LOCALTIME)) && errno != ENOENT)
|
||||
+ {
|
||||
+ return ipmi::responseUnspecifiedError();
|
||||
+ }
|
||||
+
|
||||
+ if(symlink(ZoneInfoFile, LOCALTIME) < 0)
|
||||
+ {
|
||||
+ return ipmi::responseUnspecifiedError();
|
||||
+ }
|
||||
+
|
||||
+ return ipmi::responseSuccess();
|
||||
+}
|
||||
+
|
||||
/** @brief implements the reserve SEL command
|
||||
* @returns IPMI completion code plus response data
|
||||
* - SEL reservation ID.
|
||||
@@ -952,6 +1009,12 @@ void register_netfn_storage_functions()
|
||||
ipmi::Privilege::User,
|
||||
ipmiStorageGetSelTimeUtcOffset);
|
||||
|
||||
+ // <Set SEL Timezone>
|
||||
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnStorage,
|
||||
+ ipmi::storage::cmdSetSelTimeUtcOffset,
|
||||
+ ipmi::Privilege::Operator,
|
||||
+ ipmiStorageSetSelTimeUtcOffset);
|
||||
+
|
||||
// <Get SEL Entry>
|
||||
ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_GET_SEL_ENTRY, NULL,
|
||||
getSELEntry, PRIVILEGE_USER);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
From cfb5e13388531e1317eeb3ccf0f8eef0c6eeca60 Mon Sep 17 00:00:00 2001
|
||||
From: Ren Yu <yux.ren@intel.com>
|
||||
Date: Tue, 28 May 2019 17:11:17 +0800
|
||||
Subject: [PATCH] Save the pre-timeout interrupt in dbus property
|
||||
|
||||
Get the watchdog pre-timeout interrupt value from ipmi watchdog set command,
|
||||
and store it into dbus property.
|
||||
|
||||
Tested:
|
||||
Config IPMI watchdog: BIOS FRB2 Power Cycle after 1 seconds:
|
||||
ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00
|
||||
Start watchdog:
|
||||
Ipmitool mc watchdog reset
|
||||
Check the watchdog pre-timeout interrupt in below:
|
||||
https://BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries
|
||||
|
||||
Signed-off-by: Ren Yu <yux.ren@intel.com>
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
app/watchdog.cpp | 47 ++++++++++++++++++++++++++++++++++++++++
|
||||
app/watchdog_service.cpp | 6 +++++
|
||||
app/watchdog_service.hpp | 9 ++++++++
|
||||
3 files changed, 62 insertions(+)
|
||||
|
||||
diff --git a/app/watchdog.cpp b/app/watchdog.cpp
|
||||
index 03c373e..cb0b1fd 100644
|
||||
--- a/app/watchdog.cpp
|
||||
+++ b/app/watchdog.cpp
|
||||
@@ -80,6 +80,7 @@ ipmi::RspType<> ipmiAppResetWatchdogTimer()
|
||||
|
||||
static constexpr uint8_t wd_dont_stop = 0x1 << 6;
|
||||
static constexpr uint8_t wd_timeout_action_mask = 0x3;
|
||||
+static constexpr uint8_t wdPreTimeoutInterruptMask = 0x3;
|
||||
|
||||
static constexpr uint8_t wdTimerUseResTimer1 = 0x0;
|
||||
static constexpr uint8_t wdTimerUseResTimer2 = 0x6;
|
||||
@@ -127,6 +128,45 @@ WatchdogService::Action ipmiActionToWdAction(IpmiAction ipmi_action)
|
||||
}
|
||||
}
|
||||
|
||||
+enum class IpmiPreTimeoutInterrupt : uint8_t
|
||||
+{
|
||||
+ None = 0x0,
|
||||
+ SMI = 0x1,
|
||||
+ NMI = 0x2,
|
||||
+ MI = 0x3,
|
||||
+};
|
||||
+/** @brief Converts an IPMI Watchdog PreTimeoutInterrupt to DBUS defined action
|
||||
+ * @param[in] ipmi_action The IPMI Watchdog PreTimeoutInterrupt
|
||||
+ * @return The Watchdog PreTimeoutInterrupt that the ipmi_action maps to
|
||||
+ */
|
||||
+WatchdogService::PreTimeoutInterruptAction ipmiPreTimeoutInterruptToWdAction(
|
||||
+ IpmiPreTimeoutInterrupt ipmiPreTimeOutInterrupt)
|
||||
+{
|
||||
+ switch (ipmiPreTimeOutInterrupt)
|
||||
+ {
|
||||
+ case IpmiPreTimeoutInterrupt::None:
|
||||
+ {
|
||||
+ return WatchdogService::PreTimeoutInterruptAction::None;
|
||||
+ }
|
||||
+ case IpmiPreTimeoutInterrupt::SMI:
|
||||
+ {
|
||||
+ return WatchdogService::PreTimeoutInterruptAction::SMI;
|
||||
+ }
|
||||
+ case IpmiPreTimeoutInterrupt::NMI:
|
||||
+ {
|
||||
+ return WatchdogService::PreTimeoutInterruptAction::NMI;
|
||||
+ }
|
||||
+ case IpmiPreTimeoutInterrupt::MI:
|
||||
+ {
|
||||
+ return WatchdogService::PreTimeoutInterruptAction::MI;
|
||||
+ }
|
||||
+ default:
|
||||
+ {
|
||||
+ throw std::domain_error("IPMI PreTimeoutInterrupt is invalid");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
enum class IpmiTimerUse : uint8_t
|
||||
{
|
||||
Reserved = 0x0,
|
||||
@@ -250,6 +290,13 @@ ipmi::RspType<>
|
||||
// Mark as initialized so that future resets behave correctly
|
||||
wd_service.setInitialized(true);
|
||||
|
||||
+ // pretimeOutAction
|
||||
+ const auto ipmiPreTimeoutInterrupt =
|
||||
+ static_cast<IpmiPreTimeoutInterrupt>(wdPreTimeoutInterruptMask &
|
||||
+ (static_cast<uint8_t>(preTimeoutInterrupt)));
|
||||
+ wd_service.setPreTimeoutInterrupt(
|
||||
+ ipmiPreTimeoutInterruptToWdAction(ipmiPreTimeoutInterrupt));
|
||||
+
|
||||
lastCallSuccessful = true;
|
||||
return ipmi::responseSuccess();
|
||||
}
|
||||
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
|
||||
index 3534e89..4df1ab6 100644
|
||||
--- a/app/watchdog_service.cpp
|
||||
+++ b/app/watchdog_service.cpp
|
||||
@@ -198,3 +198,9 @@ void WatchdogService::setInterval(uint64_t interval)
|
||||
{
|
||||
setProperty("Interval", interval);
|
||||
}
|
||||
+
|
||||
+void WatchdogService::setPreTimeoutInterrupt(
|
||||
+ PreTimeoutInterruptAction preTimeoutInterrupt)
|
||||
+{
|
||||
+ setProperty("PreTimeoutInterrupt", convertForMessage(preTimeoutInterrupt));
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
|
||||
index 141bdb7..32b7461 100644
|
||||
--- a/app/watchdog_service.hpp
|
||||
+++ b/app/watchdog_service.hpp
|
||||
@@ -15,6 +15,8 @@ class WatchdogService
|
||||
|
||||
using Action =
|
||||
sdbusplus::xyz::openbmc_project::State::server::Watchdog::Action;
|
||||
+ using PreTimeoutInterruptAction = sdbusplus::xyz::openbmc_project::State::
|
||||
+ server::Watchdog::PreTimeoutInterruptAction;
|
||||
using TimerUse =
|
||||
sdbusplus::xyz::openbmc_project::State::server::Watchdog::TimerUse;
|
||||
|
||||
@@ -92,6 +94,13 @@ class WatchdogService
|
||||
*/
|
||||
void setInterval(uint64_t interval);
|
||||
|
||||
+ /** @brief Sets the value of the PreTimeoutInterrupt property on the host
|
||||
+ * watchdog
|
||||
+ *
|
||||
+ * @param[in] PreTimeoutInterrupt - The new PreTimeoutInterrupt value
|
||||
+ */
|
||||
+ void setPreTimeoutInterrupt(PreTimeoutInterruptAction preTimeoutInterrupt);
|
||||
+
|
||||
private:
|
||||
/** @brief sdbusplus handle */
|
||||
sdbusplus::bus_t bus;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Phosphor Inband IPMI
|
||||
Wants=clear-once.service
|
||||
Wants=xyz.openbmc_project.Settings.service
|
||||
After=xyz.openbmc_project.Settings.service
|
||||
After=clear-once.service
|
||||
After=org.openbmc.HostIpmi.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/env ipmid
|
||||
SyslogIdentifier=ipmid
|
||||
RuntimeDirectory = ipmi
|
||||
RuntimeDirectoryPreserve = yes
|
||||
StateDirectory = ipmi
|
||||
Type=dbus
|
||||
BusName=xyz.openbmc_project.Control.Host
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
Alias=xyz.openbmc_project.Control.Host.service
|
||||
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
Wants=mapper-wait@-xyz-openbmc_project-inventory-system-board-Lux_Baseboard-BMC_Boot.service
|
||||
After=mapper-wait@-xyz-openbmc_project-inventory-system-board-Lux_Baseboard-BMC_Boot.service
|
||||
@@ -0,0 +1,40 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
|
||||
|
||||
# The URI is required for the autobump script but keep it commented
|
||||
# to not override the upstream value
|
||||
# SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid;branch=master;protocol=https"
|
||||
|
||||
SRC_URI += "file://phosphor-ipmi-host.service \
|
||||
file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
|
||||
file://sensor-wait-sel.conf \
|
||||
file://0001-ipmi-cmd-support-set-sel-time-utc-offset.patch \
|
||||
file://0001-add-sensor-config-file.patch \
|
||||
file://0001-Fix-incorrect-thresholdLevelsStates-response-for-Get.patch \
|
||||
file://0001-Add-multiplierM-offsetB-bExp-rExp-items-in-sensor_da.patch \
|
||||
file://0001-Add-power-cycle-trigger-async-firmware-update.patch \
|
||||
"
|
||||
FILES:${PN} += "${datadir}/ipmi-providers"
|
||||
|
||||
PACKAGECONFIG:remove = "allowlist"
|
||||
PACKAGECONFIG:remove = "i2c-allowlist"
|
||||
PACKAGECONFIG:remove = "boot-flag-safe-mode"
|
||||
RDEPENDS:${PN}:remove = "clear-once"
|
||||
|
||||
# remove the softpoweroff service since we do not need it
|
||||
SYSTEMD_SERVICE:${PN}:remove = " \
|
||||
xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
|
||||
|
||||
SYSTEMD_LINK:${PN}:remove = " \
|
||||
../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service:obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
|
||||
"
|
||||
|
||||
# remove dependencies from main recipe since we control it with local service file
|
||||
unset IPMI_HOST_NEEDED_SERVICES
|
||||
|
||||
do_install:append(){
|
||||
rm -f ${D}/${bindir}/phosphor-softpoweroff
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system/phosphor-ipmi-host.service.d/
|
||||
install -m 0644 ${WORKDIR}/sensor-wait-sel.conf ${D}${systemd_unitdir}/system/phosphor-ipmi-host.service.d/
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3"
|
||||
KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"
|
||||
@@ -0,0 +1,23 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
#SYSTEMD_SUBSTITUTIONS_remove = "KCS_DEVICE:${KCS_DEVICE}:${DBUS_SERVICE_${PN}}"
|
||||
|
||||
# Default kcs device is ipmi-kcs3; this is SMS.
|
||||
# Add SMM kcs device instance
|
||||
|
||||
# Replace the '-' to '_', since Dbus object/interface names do not allow '-'.
|
||||
KCS_DEVICE = "ipmi_kcs3"
|
||||
SMM_DEVICE = "ipmi_kcs4"
|
||||
SYSTEMD_SERVICE:${PN}:append = " ${PN}@${SMM_DEVICE}.service "
|
||||
|
||||
# The URI is required for the autobump script but keep it commented
|
||||
# to not override the upstream value
|
||||
# SRC_URI = "git://github.com/openbmc/kcsbridge.git;branch=master;protocol=https"
|
||||
SRCREV = "43c83c56507cd35982537e5a646ee716f8335b6c"
|
||||
|
||||
SRC_URI += "file://99-ipmi-kcs.rules"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${base_libdir}/udev/rules.d
|
||||
install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules ${D}${base_libdir}/udev/rules.d/
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From 5e41098712ad65cb508560b01e38a9c9bf481a0c Mon Sep 17 00:00:00 2001
|
||||
From: "Chen.Zhao" <zhao.chen@luxshare-ict.com>
|
||||
Date: Wed, 14 Aug 2024 19:48:15 +0800
|
||||
Subject: [PATCH] Support HMAC-SHA1 Authentication/Integrity for RMCP+ lan
|
||||
session
|
||||
|
||||
---
|
||||
auth_algo.hpp | 3 ++-
|
||||
integrity_algo.hpp | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/auth_algo.hpp b/auth_algo.hpp
|
||||
index f940370..c218acf 100644
|
||||
--- a/auth_algo.hpp
|
||||
+++ b/auth_algo.hpp
|
||||
@@ -106,7 +106,8 @@ class Interface
|
||||
*/
|
||||
static bool isAlgorithmSupported(Algorithms algo)
|
||||
{
|
||||
- if (algo == Algorithms::RAKP_HMAC_SHA256)
|
||||
+ if (algo == Algorithms::RAKP_HMAC_SHA1 ||
|
||||
+ algo == Algorithms::RAKP_HMAC_SHA256)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
diff --git a/integrity_algo.hpp b/integrity_algo.hpp
|
||||
index 6ba6340..6347357 100644
|
||||
--- a/integrity_algo.hpp
|
||||
+++ b/integrity_algo.hpp
|
||||
@@ -94,7 +94,8 @@ class Interface
|
||||
*/
|
||||
static bool isAlgorithmSupported(Algorithms algo)
|
||||
{
|
||||
- if (algo == Algorithms::HMAC_SHA256_128)
|
||||
+ if (algo == Algorithms::HMAC_SHA1_96 ||
|
||||
+ algo == Algorithms::HMAC_SHA256_128)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
SRC_URI += " \
|
||||
file://0001-Support-HMAC-SHA1-Authentication-Integrity-for-RMCP.patch \
|
||||
"
|
||||
Reference in New Issue
Block a user