Add interface for sending raw PECI commands

This adds a D-Bus interface to send raw PECI commands to the
CPU.

Change-Id: I37c8c0b9fc713705b3afc81adca22ca313e91701
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/gen/com/intel/Protocol/PECI/Raw/meson.build b/gen/com/intel/Protocol/PECI/Raw/meson.build
new file mode 100644
index 0000000..2c2aa49
--- /dev/null
+++ b/gen/com/intel/Protocol/PECI/Raw/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'com/intel/Protocol/PECI/Raw__cpp'.underscorify(),
+    input: [ '../../../../../../yaml/com/intel/Protocol/PECI/Raw.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',
+        'com/intel/Protocol/PECI/Raw',
+    ],
+)
+
diff --git a/gen/com/intel/Protocol/PECI/meson.build b/gen/com/intel/Protocol/PECI/meson.build
new file mode 100644
index 0000000..313e523
--- /dev/null
+++ b/gen/com/intel/Protocol/PECI/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+subdir('Raw')
+generated_others += custom_target(
+    'com/intel/Protocol/PECI/Raw__markdown'.underscorify(),
+    input: [ '../../../../../yaml/com/intel/Protocol/PECI/Raw.interface.yaml',  ],
+    output: [ 'Raw.md' ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'com/intel/Protocol/PECI/Raw',
+    ],
+)
+
diff --git a/gen/com/intel/Protocol/meson.build b/gen/com/intel/Protocol/meson.build
new file mode 100644
index 0000000..b9af983
--- /dev/null
+++ b/gen/com/intel/Protocol/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('PECI')
diff --git a/gen/com/intel/meson.build b/gen/com/intel/meson.build
new file mode 100644
index 0000000..f0bbed6
--- /dev/null
+++ b/gen/com/intel/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('Protocol')
diff --git a/gen/com/meson.build b/gen/com/meson.build
index 9f8f198..b06016e 100644
--- a/gen/com/meson.build
+++ b/gen/com/meson.build
@@ -1,2 +1,3 @@
 # Generated file; do not modify.
 subdir('ibm')
+subdir('intel')
diff --git a/meson.build b/meson.build
index be863f2..856123b 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,9 @@
 if get_option('data_com_ibm')
     selected_subdirs += 'com/ibm'
 endif
+if get_option('data_com_intel')
+    selected_subdirs += 'com/intel'
+endif
 if get_option('data_org_freedesktop')
     selected_subdirs += 'org/freedesktop'
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 30a49de..56a1679 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,7 @@
 option('generate_md', type: 'boolean', value: true)
 option('libphosphor_dbus', type: 'boolean', value: true)
 option('data_com_ibm', type: 'boolean', value: false)
+option('data_com_intel', type: 'boolean', value: false)
 option('data_org_freedesktop', type: 'boolean', value: true)
 option('data_org_open_power', type: 'boolean', value: false)
 option('data_xyz_openbmc_project', type: 'boolean', value: true)
diff --git a/yaml/com/intel/Protocol/PECI/Raw.interface.yaml b/yaml/com/intel/Protocol/PECI/Raw.interface.yaml
new file mode 100644
index 0000000..9b8d071
--- /dev/null
+++ b/yaml/com/intel/Protocol/PECI/Raw.interface.yaml
@@ -0,0 +1,25 @@
+description: >
+    Implement to provide D-Bus raw PECI access to the CPU.
+
+methods:
+    - name: Send
+      description: >
+          Send raw PECI command(s) to the CPU
+      parameters:
+        - name: device
+          type: string
+          description: >
+            The path for the PECI device to use for the command
+        - name: commands
+          type: array[array[byte]]
+          description: >
+            An array of byte arrays where each byte array holds the raw
+            bytes for a single PECI command.  The larger array allows
+            sending multiple PECI commands in a single transaction.
+      returns:
+        - name: results
+          type: array[array[byte]]
+          description: >
+            An array of byte arrays where each byte array holds the raw
+            bytes for a single PECI response corresponding to the command
+            in the command array.