com.ampere: Add Ampere's events
The Ampere is logging PLDM error/warning/event as [1]. Create new events
for these so that can be exposed via Redfish.
[1] https://github.com/openbmc/pldm/blob/master/oem/ampere/event/oem_event_manager.cpp#L38
Change-Id: I435c3bbb1d7b0b21067006fb2dcc8ceb81ac5b78
Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
diff --git a/gen/com/ampere/Event/ReportedSEL/meson.build b/gen/com/ampere/Event/ReportedSEL/meson.build
new file mode 100644
index 0000000..d55c07e
--- /dev/null
+++ b/gen/com/ampere/Event/ReportedSEL/meson.build
@@ -0,0 +1,26 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'com/ampere/Event/ReportedSEL'
+
+generated_sources += custom_target(
+ 'com/ampere/Event/ReportedSEL__cpp'.underscorify(),
+ input: ['../../../../../yaml/com/ampere/Event/ReportedSEL.events.yaml'],
+ output: ['event.cpp', 'event.hpp'],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'cpp',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../../../yaml',
+ 'com/ampere/Event/ReportedSEL',
+ ],
+ install: should_generate_cpp,
+ install_dir: [false, get_option('includedir') / sdbusplus_current_path],
+ build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/com/ampere/Event/meson.build b/gen/com/ampere/Event/meson.build
new file mode 100644
index 0000000..a86d977
--- /dev/null
+++ b/gen/com/ampere/Event/meson.build
@@ -0,0 +1,49 @@
+# Generated file; do not modify.
+subdir('ReportedSEL')
+
+sdbusplus_current_path = 'com/ampere/Event'
+
+generated_markdown += custom_target(
+ 'com/ampere/Event/ReportedSEL__markdown'.underscorify(),
+ input: ['../../../../yaml/com/ampere/Event/ReportedSEL.events.yaml'],
+ output: ['ReportedSEL.md'],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'markdown',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../../yaml',
+ 'com/ampere/Event/ReportedSEL',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
+generated_registry += custom_target(
+ 'com/ampere/Event/ReportedSEL__registry'.underscorify(),
+ input: ['../../../../yaml/com/ampere/Event/ReportedSEL.events.yaml'],
+ output: ['ReportedSEL.json'],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'registry',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../../yaml',
+ 'com/ampere/Event/ReportedSEL',
+ ],
+ install: should_generate_registry,
+ install_dir: [inst_registry_dir / sdbusplus_current_path],
+ build_by_default: should_generate_registry,
+)
+
diff --git a/gen/com/ampere/meson.build b/gen/com/ampere/meson.build
new file mode 100644
index 0000000..be32e88
--- /dev/null
+++ b/gen/com/ampere/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('Event')
diff --git a/gen/com/meson.build b/gen/com/meson.build
index 3727d07..825860f 100644
--- a/gen/com/meson.build
+++ b/gen/com/meson.build
@@ -1,4 +1,5 @@
# Generated file; do not modify.
+subdir('ampere')
subdir('google')
subdir('ibm')
subdir('intel')
diff --git a/meson.build b/meson.build
index d66839c..4bb7584 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,9 @@
# Parse options to determine appropriate subdirectories to support.
yaml_selected_subdirs = []
+if get_option('data_com_ampere')
+ yaml_selected_subdirs += 'com/ampere'
+endif
if get_option('data_com_google')
yaml_selected_subdirs += 'com/google'
endif
diff --git a/meson.options b/meson.options
index c193bbd..34fc4e4 100644
--- a/meson.options
+++ b/meson.options
@@ -1,5 +1,6 @@
option('generate_md', type: 'boolean', value: true)
option('libphosphor_dbus', type: 'boolean', value: true)
+option('data_com_ampere', type: 'boolean', value: true)
option('data_com_google', type: 'boolean', value: true)
option('data_com_ibm', type: 'boolean', value: true)
option('data_com_intel', type: 'boolean', value: true)
diff --git a/yaml/com/ampere/Event/ReportedSEL.events.yaml b/yaml/com/ampere/Event/ReportedSEL.events.yaml
new file mode 100644
index 0000000..6d0c307
--- /dev/null
+++ b/yaml/com/ampere/Event/ReportedSEL.events.yaml
@@ -0,0 +1,58 @@
+version: 1.0.0
+
+errors:
+ - name: ReportedSELCritical
+ severity: critical
+ metadata:
+ - name: Source
+ type: string
+ primary: true
+ description: The source which reports error.
+ - name: Message
+ type: string
+ primary: true
+ description: The reported error message.
+ - name: RawData
+ type: string
+ description: The Raw data received.
+ en:
+ description: Critical System Event Log received by the BMC.
+ message: "Error SEL reported by {Source}: {Message}"
+ errno: EIO
+
+ - name: ReportedSELWarning
+ severity: warning
+ metadata:
+ - name: Source
+ type: string
+ primary: true
+ description: The source which reports warning.
+ - name: Message
+ type: string
+ primary: true
+ description: The reported warning message.
+ - name: RawData
+ type: string
+ description: The Raw data received.
+ en:
+ description: Warning System Event Log received by the BMC.
+ message: "Warning SEL reported by {Source}: {Message}"
+ errno: EIO
+
+events:
+ - name: ReportedSELInfo
+ metadata:
+ - name: Source
+ type: string
+ primary: true
+ description: The source which reports event.
+ - name: Message
+ type: string
+ primary: true
+ description: The reported event message.
+ - name: RawData
+ type: string
+ description: The Raw data received.
+ en:
+ description: Information System Event Log received by the BMC.
+ message: "Information SEL reported by {Source}: {Message}"