FaultLog: Add new FaultLog dump entry interface

Fault Log is a new type of dump in openbmc/phosphor-debug-collector.
For details please see
https://github.com/openbmc/docs/blob/master/designs/hw-fault-monitor.md

This new interface (xyz.openbmc_project.Dump.Entry.FaultLog) contains
properties that are specific to Fault Log entries. Fault log entries
can contain references to fault data captured and stored by other code
modules (e.g. see the PrimaryLogId property). A fault log entry
represents a bundle of data from various sources that correspond to the
same fault event (additional properties such as references to secondary
logs may be added later).

Change-Id: I491b8fc58c752513d9066c908bf91999380e17c5
Signed-off-by: Claire Weinan <cweinan@google.com>
diff --git a/gen/xyz/openbmc_project/Dump/Entry/FaultLog/meson.build b/gen/xyz/openbmc_project/Dump/Entry/FaultLog/meson.build
new file mode 100644
index 0000000..5fdb0fb
--- /dev/null
+++ b/gen/xyz/openbmc_project/Dump/Entry/FaultLog/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Dump/Entry/FaultLog__cpp'.underscorify(),
+    input: [ '../../../../../../yaml/xyz/openbmc_project/Dump/Entry/FaultLog.interface.yaml',  ],
+    output: [ 'server.cpp', 'server.hpp', 'client.hpp',  ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../../yaml',
+        'xyz/openbmc_project/Dump/Entry/FaultLog',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Dump/Entry/meson.build b/gen/xyz/openbmc_project/Dump/Entry/meson.build
index 38c780d..692a321 100644
--- a/gen/xyz/openbmc_project/Dump/Entry/meson.build
+++ b/gen/xyz/openbmc_project/Dump/Entry/meson.build
@@ -26,6 +26,20 @@
     ],
 )
 
+subdir('FaultLog')
+generated_others += custom_target(
+    'xyz/openbmc_project/Dump/Entry/FaultLog__markdown'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/Dump/Entry/FaultLog.interface.yaml',  ],
+    output: [ 'FaultLog.md' ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/Dump/Entry/FaultLog',
+    ],
+)
+
 subdir('System')
 generated_others += custom_target(
     'xyz/openbmc_project/Dump/Entry/System__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Dump/Entry/FaultLog.interface.yaml b/yaml/xyz/openbmc_project/Dump/Entry/FaultLog.interface.yaml
new file mode 100644
index 0000000..6d74228
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Dump/Entry/FaultLog.interface.yaml
@@ -0,0 +1,40 @@
+description: >
+    Implement this to add FaultLog dump management.
+
+properties:
+    - name: Type
+      type: enum[self.FaultDataType]
+      description: >
+          Type of fault data in the log indicated by PrimaryLogId.
+      flags:
+          - const
+    - name: AdditionalTypeName
+      type: string
+      description: >
+          Additional string to further identify the Type (e.g. it
+          can indicate the OEM format of a Crashdump)
+      flags:
+          - const
+    - name: PrimaryLogId
+      type: string
+      description: >
+          This is intended to be a unique identifier, depending on
+          Type, to reference the primary fault data log but is not
+          intended otherwise to be programatically interpreted
+          (e.g. string parsing)
+      flags:
+          - const
+
+enumerations:
+    - name: FaultDataType
+      description: >
+          Type of fault data logged.
+      values:
+          - name: CPER
+            description: >
+                UEFI Common Platform Error Record
+          - name: Crashdump
+            description: >
+                Collection of processor and chipset register values
+                typically gathered for debugging purposes at the time
+                of a crash (or sometimes on-demand)