Move commands from ipmi-providers

Many commands were in ipmi-providers and need to be moved into the
active development library (intel-ipmi-oem). This copies wholesale
those commands, even though many need to be rewritten to use the new
ipmi providers API.

Tested-by: build and see that the commands are still present even when
           the ipmi-providers library is removed

Change-Id: If326f5d7844adeed7da2d3b7a2f1d3eeeea43b29
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/include/smbioshandler.hpp b/include/smbioshandler.hpp
new file mode 100644
index 0000000..4e403ca
--- /dev/null
+++ b/include/smbioshandler.hpp
@@ -0,0 +1,100 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+
+#pragma once
+#include <cstddef>
+#include <cstdint>
+#include <oemcommands.hpp>
+
+#include "ipmid/api.h"
+
+constexpr uint16_t msgPayloadSize = 1024 * 60;
+
+typedef enum
+{
+    regionLockUnlocked = 0,
+    regionLockStrict,
+    regionLockPreemptable
+} MDRLockType;
+
+typedef struct
+{
+    uint8_t DirVer;
+    uint8_t MDRType;
+    uint16_t timestamp;
+    uint16_t DataSize;
+} __attribute__((packed)) MDRSmbios_Header;
+
+typedef struct
+{
+    uint8_t MdrVersion;
+    uint8_t regionId;
+    bool valid;
+    uint8_t updateCount;
+    uint8_t lockPolicy;
+    uint16_t regionLength;
+    uint16_t regionUsed;
+    uint8_t CRC8;
+} __attribute__((packed)) MDRState;
+
+struct RegionStatusRequest
+{
+    uint8_t regionId;
+} __attribute__((packed));
+
+struct RegionStatusResponse
+{
+    MDRState State;
+} __attribute__((packed));
+
+struct RegionCompleteRequest
+{
+    uint8_t sessionId;
+    uint8_t regionId;
+} __attribute__((packed));
+
+struct RegionReadRequest
+{
+    uint8_t regionId;
+    uint8_t length;
+    uint16_t offset;
+} __attribute__((packed));
+
+struct RegionReadResponse
+{
+    uint8_t length;
+    uint8_t updateCount;
+    uint8_t data[msgPayloadSize];
+} __attribute__((packed));
+
+struct RegionWriteRequest
+{
+    uint8_t sessionId;
+    uint8_t regionId;
+    uint8_t length;
+    uint16_t offset;
+    uint8_t data[msgPayloadSize];
+} __attribute__((packed));
+
+struct RegionLockRequest
+{
+    uint8_t sessionId;
+    uint8_t regionId;
+    uint8_t lockPolicy;
+    uint16_t msTimeout;
+} __attribute__((packed));
+
+constexpr size_t maxMDRId = 5;