summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/entry_points.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-05-23 14:29:16 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-07-16 21:30:24 +0000
commit99c2b4059e708a7cba6740a0e832ef5f480a9f12 (patch)
treee7279c67ccf6281dde4adea17162e822eb031b38 /extensions/openpower-pels/entry_points.cpp
parent3b81846a764c4f87977b726188df224c0107c760 (diff)
downloadphosphor-logging-99c2b4059e708a7cba6740a0e832ef5f480a9f12.tar.gz
phosphor-logging-99c2b4059e708a7cba6740a0e832ef5f480a9f12.zip
OpenPower PEL Extension support framework
The goal of extensions is to extend phosphor-logging's `xyz.openbmc_project.Logging.Entry` log support to allow other log formats to be created without incurring extra D-Bus call overhead. The README.md change in this commit provides additional documentation on how extensions work. The summary is that they allow code that resides in this repository to provide functions that can be called at certain points (startup, log creation/deletion) such that the code can then create their own logs based on the contents of an OpenBMC log. A specific extension's code is compiled in using a --enable configure option, so platforms that did not use those log formats would incur no performance/size penalties. This commit provides the support for extensions, plus a basic OpenPower PEL (Platform Event Log) extension as the first extension. PELs are event logs used only on some OpenPower systems. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ifbb31325261c157678c29bbebc7f6d32d282582f
Diffstat (limited to 'extensions/openpower-pels/entry_points.cpp')
-rw-r--r--extensions/openpower-pels/entry_points.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/extensions/openpower-pels/entry_points.cpp b/extensions/openpower-pels/entry_points.cpp
new file mode 100644
index 0000000..1b29ec5
--- /dev/null
+++ b/extensions/openpower-pels/entry_points.cpp
@@ -0,0 +1,42 @@
+#include "elog_entry.hpp"
+#include "extensions.hpp"
+#include "sdbusplus/bus.hpp"
+
+namespace openpower
+{
+namespace pels
+{
+
+using namespace phosphor::logging;
+
+DISABLE_LOG_ENTRY_CAPS();
+
+void pelStartup(internal::Manager& logManager)
+{
+}
+
+REGISTER_EXTENSION_FUNCTION(pelStartup);
+
+void pelCreate(const std::string& message, uint32_t id, uint64_t timestamp,
+ Entry::Level severity, const AdditionalDataArg& additionalData,
+ const AssociationEndpointsArg& assocs)
+{
+}
+
+REGISTER_EXTENSION_FUNCTION(pelCreate);
+
+void pelDelete(uint32_t id)
+{
+}
+
+REGISTER_EXTENSION_FUNCTION(pelDelete);
+
+void pelDeleteProhibited(uint32_t id, bool& prohibited)
+{
+ prohibited = false;
+}
+
+REGISTER_EXTENSION_FUNCTION(pelDeleteProhibited);
+
+} // namespace pels
+} // namespace openpower
OpenPOWER on IntegriCloud