summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorDonald Washburn <dwashbur@us.ibm.com>2017-07-25 08:42:11 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-24 15:53:30 -0400
commitd93a520bdb774eefa74839aa124789516999b587 (patch)
tree7b34d79e74c91693ff6114735c0a75596b072cae /src/include
parent24eb981a9b4e452fd59d82136000adb6e0d16f2a (diff)
downloadtalos-hostboot-d93a520bdb774eefa74839aa124789516999b587.tar.gz
talos-hostboot-d93a520bdb774eefa74839aa124789516999b587.zip
Implemented SBE Passthrough for Attribute Override.
*Wrote a runtime SBE pass-through function to invoke the runtime apply_attribute_overrides function. The caller is required to place the request data in the SBE COMMS reserved memory area and invoke the sbe_message_passing function. The request data consists of an sbeMessage_t header followed by binary override data which can be obtained from the attributeOverride tool. Upon completion of the sbe_message_passing function, the respose data will be written to the SBE COMMS AREA. *Added support for accessing system attributes at runtime. RTC: 152409 Change-Id: Ieed3e026350cc272e6268e7802971551d3f39ed4 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44311 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/sbeio/runtime/sbe_msg_passing.H8
-rw-r--r--src/include/usr/sbeio/runtime/sbeio_attr_override.H60
-rw-r--r--src/include/usr/sbeio/sbeioreasoncodes.H2
3 files changed, 70 insertions, 0 deletions
diff --git a/src/include/usr/sbeio/runtime/sbe_msg_passing.H b/src/include/usr/sbeio/runtime/sbe_msg_passing.H
index 035047a28..53899d9f5 100644
--- a/src/include/usr/sbeio/runtime/sbe_msg_passing.H
+++ b/src/include/usr/sbeio/runtime/sbe_msg_passing.H
@@ -30,6 +30,12 @@
#include <errl/errlmanager.H>
#include <targeting/common/target.H>
+//Determine the Data Offset of an SBE Message
+#define SBE_MSG_DATA_OFFSET \
+static_cast<uint32_t>((reinterpret_cast<uint64_t>(\
+ (((const SBE_MSG::sbeMessage_t*)(0))->data)) - \
+reinterpret_cast<uint64_t>( \
+&(((const SBE_MSG::sbeMessage_t*)(0))->cmdHdr))))
namespace SBE_MSG
{
@@ -82,6 +88,8 @@ namespace SBE_MSG
PASSTHRU_HTMGT_GET_PSTATE = 0x00E00002, // HTMGT Get PState Table
// Command Class 0xE1 - HBRT Messages
PASSTHRU_HBRT_GET_PSTATE = 0x00E10001, // HBRT Get PState Table
+ PASSTHRU_HBRT_OVERRIDE_ATTR = 0x00E10002, // HBRT Apply Override
+ // attributes
};
diff --git a/src/include/usr/sbeio/runtime/sbeio_attr_override.H b/src/include/usr/sbeio/runtime/sbeio_attr_override.H
new file mode 100644
index 000000000..ee826d128
--- /dev/null
+++ b/src/include/usr/sbeio/runtime/sbeio_attr_override.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/sbeio/runtime/sbeio_attr_override.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017 */
+/* [+] 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 __SBE_MSG_SBEIO_ATTR_OVERRIDE_H
+#define __SBE_MSG_SBEIO_ATTR_OVERRIDE_H
+
+#include <errl/errlentry.H>
+#include <targeting/common/target.H>
+
+namespace SBE_MSG
+{
+
+/**
+ * @brief SBE pass-through command for applying attribute overrides at runtime.
+ * This command acts as a bridge between sbe pass-through and the
+ * runtime apply_attr_override function.
+ *
+ * @param[in] i_targetHandle - The target of the request.
+ * @param[in] i_reqDataSize - Size of the attribute overrides blob.
+ * @param[in] i_reqData - Attribute overrides binary.
+ * @param[out] o_rspStatus - The return value from the apply_attr_overrides
+ * @param[out] o_rspDataSize - Set to 0 on return.
+ * @param[out] o_rspData - Not Used.
+ *
+ * @return nullptr upon success, pointer to ErrlEntry if an error occurred.
+ *
+ */
+errlHndl_t sbeApplyAttrOverrides(
+ TARGETING::TargetHandle_t i_targetHandle,
+ uint32_t i_reqDataSize,
+ uint8_t * i_reqData,
+ uint32_t * o_rspStatus,
+ uint32_t * o_rspDataSize,
+ uint8_t * o_rspData
+ );
+
+}
+
+#endif
diff --git a/src/include/usr/sbeio/sbeioreasoncodes.H b/src/include/usr/sbeio/sbeioreasoncodes.H
index 4746ff16e..4a6200ccc 100644
--- a/src/include/usr/sbeio/sbeioreasoncodes.H
+++ b/src/include/usr/sbeio/sbeioreasoncodes.H
@@ -49,6 +49,7 @@ enum sbeioModuleId
SBEIO_FIFO_CONTINUE_MPIPL = 0x04,
SBEIO_RUNTIME = 0x05,
SBEIO_MEM_REGION = 0x06,
+ SBEIO_RUNTIME_ATTR_OVERRIDE = 0x07,
};
/**
@@ -99,6 +100,7 @@ enum sbeioReasonCode
SBEIO_RT_FUNCTION_NOT_FOUND = SBEIO_COMP_ID | 0x39,
SBEIO_RT_NO_INTERFACE_POINTER = SBEIO_COMP_ID | 0x3A,
SBEIO_RT_NO_INTERFACE_FUNCTION = SBEIO_COMP_ID | 0x3B,
+ SBEIO_RT_NO_APPLY_ATTR_FUNCTION = SBEIO_COMP_ID | 0x3C,
// SBE Unsecure Memory Region error codes
SBEIO_MEM_REGION_DOES_NOT_EXIST = SBEIO_COMP_ID | 0x50,
OpenPOWER on IntegriCloud