Lines Matching full:sel

20 #include <xyz/openbmc_project/Logging/SEL/error.hpp>
60 using namespace xyz::openbmc_project::logging::sel;
62 sdbusplus::error::xyz::openbmc_project::logging::sel::Created;
65 using SELEntry = ipmi::sel::SELEventRecordFormat;
86 return std::string(ipmi::sel::logBasePath) + "/" + std::to_string(id);
95 ipmi::sel::GetSELEntryResponse record{};
96 record = ipmi::sel::convertLogEntrytoSEL(p);
101 fprintf(stderr, "Failed to convert %s to SEL: %s\n", p.c_str(),
166 bus, interfacesAdded(ipmi::sel::logWatchPath),
172 bus, interfacesRemoved(ipmi::sel::logWatchPath),
181 argN(0, ipmi::sel::logEntryIntf),
189 ipmi::sel::ObjectPaths paths;
192 ipmi::sel::readLoggingObjectPaths(paths);
219 /** @brief implements the get SEL Info command
221 * - selVersion - SEL revision
222 * - entries - Number of log entries in SEL.
226 * - operationSupport - Reserve & Delete SEL operations supported
229 ipmi::RspType<uint8_t, // SEL revision.
230 uint16_t, // number of log entries in SEL.
235 bool, // SEL allocation info supported
236 bool, // reserve SEL supported
237 bool, // partial Add SEL Entry supported
238 bool, // delete SEL supported
246 uint32_t addTimeStamp = ipmi::sel::invalidTimeStamp;
261 (ipmi::sel::getEntryTimeStamp(objPath).count()));
271 constexpr uint8_t selVersion = ipmi::sel::selVersion;
273 constexpr uint32_t eraseTimeStamp = ipmi::sel::invalidTimeStamp;
278 ipmi::sel::operationSupport::getSelAllocationInfo,
279 ipmi::sel::operationSupport::reserveSel,
280 ipmi::sel::operationSupport::partialAddSelEntry,
281 ipmi::sel::operationSupport::deleteSel, reserved,
282 ipmi::sel::operationSupport::overflow);
286 std::vector<uint8_t> // SEL data
312 // Check for the requested SEL Entry.
313 if (selRecordID == ipmi::sel::firstEntry)
317 else if (selRecordID == ipmi::sel::lastEntry)
339 ipmi::sel::GetSELEntryResponse record{0, iter->second};
340 // Identify the next SEL record ID
344 record.nextRecordID = ipmi::sel::lastEntry;
353 if (readLength == ipmi::sel::entireRecord)
360 if (offset >= ipmi::sel::selRecordSize ||
361 readLength > ipmi::sel::selRecordSize)
366 auto diff = ipmi::sel::selRecordSize - offset;
370 const ipmi::sel::SELEventRecordFormat* evt = &record.event;
379 /** @brief implements the delete SEL entry command
382 * - selRecordID; // SEL record ID.
398 // Per the IPMI spec, need to cancel the reservation when a SEL entry is
416 if (selRecordID == ipmi::sel::firstEntry)
420 else if (selRecordID == ipmi::sel::lastEntry)
441 service = ipmi::getService(bus, ipmi::sel::logDeleteIntf, objPath);
450 ipmi::sel::logDeleteIntf, "Delete");
463 /** @brief implements the Clear SEL command
493 if (eraseOperation == ipmi::sel::getEraseStatus)
496 static_cast<uint8_t>(ipmi::sel::eraseComplete));
500 if (eraseOperation != ipmi::sel::initiateErase)
505 // Per the IPMI spec, need to cancel any reservation when the SEL is cleared
509 auto service = ipmi::getService(bus, ipmi::sel::logIntf, ipmi::sel::logObj);
511 bus.new_method_call(service.c_str(), ipmi::sel::logObj,
512 ipmi::sel::logIntf, ipmi::sel::logDeleteAllMethod);
524 static_cast<uint8_t>(ipmi::sel::eraseComplete));
527 /** @brief implements the get SEL time command
567 /** @brief implements the set SEL time command
612 /** @brief implements the get SEL timezone command
632 /** @brief implements the reserve SEL command
634 * - SEL reservation ID.
641 /** @brief implements the Add SEL entry command
644 * - recordID ID used for SEL Record access
657 * - RecordID of the Added SEL entry
659 ipmi::RspType<uint16_t // recordID of the Added SEL entry
671 // Hostboot sends SEL with OEM record type 0xDE to indicate that there is
686 auto selDataStr = ipmi::sel::toHexStr(eventData);
699 // In the OEM record type 0xDE, byte 11 in the SEL record indicate the
871 // <Get SEL Info>
876 // <Get SEL Timezone>
882 // <Get SEL Entry>
887 // <Delete SEL Entry>
892 // <Add SEL Entry>
897 // <Clear SEL>
933 // <Reserve SEL>
938 // <Get SEL Time>
943 // <Set SEL Time>