summaryrefslogtreecommitdiffstats
path: root/src/include/usr/expupd
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/expupd')
-rw-r--r--src/include/usr/expupd/expupd.H45
-rw-r--r--src/include/usr/expupd/expupd_reasoncodes.H54
-rw-r--r--src/include/usr/expupd/ocmbFwImage_const.H111
3 files changed, 210 insertions, 0 deletions
diff --git a/src/include/usr/expupd/expupd.H b/src/include/usr/expupd/expupd.H
new file mode 100644
index 000000000..a686d7f91
--- /dev/null
+++ b/src/include/usr/expupd/expupd.H
@@ -0,0 +1,45 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/expupd/expupd.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2019 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __EXPUPD_H
+#define __EXPUPD_H
+
+#include <isteps/hwpisteperror.H>
+
+namespace expupd
+{
+
+/**
+ * @brief Check flash image SHA512 hash value of each explorer chip
+ * and update the flash if it does not match the SHA512 hash
+ * of the image in PNOR.
+ *
+ * @param[out] o_stepError Error handle for logging istep failures
+ *
+ */
+void updateAll(ISTEP_ERROR::IStepError& o_stepError);
+
+}//namespace expupd
+
+#endif
diff --git a/src/include/usr/expupd/expupd_reasoncodes.H b/src/include/usr/expupd/expupd_reasoncodes.H
new file mode 100644
index 000000000..d5837206a
--- /dev/null
+++ b/src/include/usr/expupd/expupd_reasoncodes.H
@@ -0,0 +1,54 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/expupd/expupd_reasoncodes.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2019 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __EXPUPD_REASONCODES_H
+#define __EXPUPD_REASONCODES_H
+
+#include <hbotcompid.H>
+
+namespace EXPUPD
+{
+
+ enum ExpUpdModuleId
+ {
+ MOD_OCMB_FW_VALIDATE_IMAGE = 0x01,
+ MOD_PARSE_TAGGED_DATA_TRIPLET = 0x02,
+ };
+
+ enum ExpUpdReasonCode
+ {
+ INVALID_PARMS = EXPUPD_COMP_ID | 0x01,
+ INVALID_EYE_CATCHER = EXPUPD_COMP_ID | 0x02,
+ INVALID_HEADER_VERSION = EXPUPD_COMP_ID | 0x03,
+ INVALID_HEADER_SIZE = EXPUPD_COMP_ID | 0x04,
+ MISSING_SHA512_HASH = EXPUPD_COMP_ID | 0x05,
+ INVALID_DATA_TRIPLET_SIZE = EXPUPD_COMP_ID | 0x06,
+ INVALID_HASH_TRIPLET_SIZE = EXPUPD_COMP_ID | 0x07,
+ INVALID_TAG_ID = EXPUPD_COMP_ID | 0x08,
+ };
+
+}; // namespace EXPUPD
+
+#endif
diff --git a/src/include/usr/expupd/ocmbFwImage_const.H b/src/include/usr/expupd/ocmbFwImage_const.H
new file mode 100644
index 000000000..b97b1adcf
--- /dev/null
+++ b/src/include/usr/expupd/ocmbFwImage_const.H
@@ -0,0 +1,111 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/expupd/ocmbFwImage_const.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2019 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __OCMBFWIMAGE_CONST_H
+#define __OCMBFWIMAGE_CONST_H
+
+namespace expupd
+{
+
+// ********************************WARNING**********************************
+//
+// THIS FILE MUST BE KEPT IN SYNC WITH src/build/buildpnor/pkgOcmbFw.pl
+//
+// ********************************WARNING**********************************
+
+
+/**
+ * @brief Eyecatcher value is the ascii representation of the
+ * null terminated string, "OCMBHDR".
+ */
+constexpr uint64_t EYE_CATCHER_VALUE = 0x4F434D4248445200ULL;
+
+constexpr uint32_t MAX_BIN_TRACE = 256;
+
+/**
+ * @brief Miscellaneous constants related to the OCMB firmware header
+ */
+enum OCMBFW_HEADER_CONSTS: uint32_t
+{
+ HEADER_VERSION_MAJOR = 1,
+ HEADER_VERSION_MINOR = 0,
+ HEADER_MAX_SIZE = 4096,
+};
+
+/**
+ * @brief Header for the OCMB flash image content
+ */
+typedef struct ocmbFwHeader
+{
+ // See EYE_CATCHER_VALUE above
+ uint64_t eyeCatcher;
+
+ // The major and minor version of this header
+ uint32_t majorVersion;
+ uint32_t minorVersion;
+
+ // The total size of this header (must be 8 byte aligned)
+ uint32_t headerSize;
+
+ // The number of "tagged data triplets" included
+ // in this header. (see taggedTriplet_t)
+ uint32_t numTriplets;
+
+ // Variable sized, unordered tagged data triplets start here
+}ocmbFwHeader_t;
+
+/**
+ * @brief Tag Id's for tagged triplets
+ */
+enum TRIPLET_TAG_IDS: uint32_t
+{
+ // Data contains 64 bytes of SHA512 hash data
+ TAG_SHA512 = 1,
+
+ // Data contains a null-terminated string of comma separated
+ // key/value pairs with the following format:
+ // <key1>=<value1>,<key2>=<value2>,<key3>=<value3>
+ //
+ // Keys and values are defined by the manufacturer and must
+ // not contain the characters "=" or ","
+ TAG_KEY_VALUE_PAIRS = 2,
+};
+
+/**
+ * @brief Tagged triplet data format
+ */
+typedef struct taggedTriplet
+{
+ // Identifies the data format for this triplet
+ uint32_t tagId;
+
+ // Size of the data that follows (must be 8 byte aligned)
+ uint32_t dataSize;
+
+ // variable sized data starts here
+}taggedTriplet_t;
+
+} //namespace expupd
+
+#endif
OpenPOWER on IntegriCloud