summaryrefslogtreecommitdiffstats
path: root/src/include/usr/util
diff options
context:
space:
mode:
authorRoland Veloz <rveloz@us.ibm.com>2017-12-04 17:37:05 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-21 00:12:25 -0500
commit44d0f070400aabde3a06eb7b836923577a117cc0 (patch)
tree464a51f429057595436e47e510913a9a7a03f8d2 /src/include/usr/util
parenta334e5aa3f11fe4f4657ba89139ac0a543845af1 (diff)
downloadblackbird-hostboot-44d0f070400aabde3a06eb7b836923577a117cc0.tar.gz
blackbird-hostboot-44d0f070400aabde3a06eb7b836923577a117cc0.zip
Handles FSP reset-reload in HBRT messages
For every instance where a firmware_request is made, it is possible to get an error if the FSP is doing a reset/reload. Now, if an error returned from the firmware_request call indicates that the FSP is doing a reset/reload, the firmware_request call will be made again. Also refactored the code. Consolidated the calls to firmware_request to another file to facilitate the adding/updating of messages. Change-Id: I5be440927ab255c55b40a0a0ed26f786d31a9317 RTC:182606 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50505 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/util')
-rw-r--r--src/include/usr/util/runtime/rt_fwreq_helper.H60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/include/usr/util/runtime/rt_fwreq_helper.H b/src/include/usr/util/runtime/rt_fwreq_helper.H
new file mode 100644
index 000000000..ceac3a031
--- /dev/null
+++ b/src/include/usr/util/runtime/rt_fwreq_helper.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/util/runtime/rt_fwreq_helper.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2010,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 __RUNTIME_FWREQ_HELPER_H
+#define __RUNTIME_FWREQ_HELPER_H
+
+#include <errl/errlentry.H> // errlHndl_t
+
+/**
+ * @brief This is a wrapper function for the
+ * hostInterfaces::firmware_request method. This method
+ * will do the repetitious job of checking for errors,
+ * retry call if necessary and logging errors.
+ * @details
+ * req_len bytes are sent to runtime firmware, and resp_len
+ * bytes received in response.
+ *
+ * Both req and resp are allocated by the caller. If resp_len
+ * is not large enough to contain the full response, an error
+ * is returned.
+ *
+ * @param[in] i_reqLen length of request data
+ * @param[in] i_req request data
+ * @param[inout] o_respLen in: size of request data buffer
+ * out: length of response data
+ * @param[in] o_resp response data
+ * @return errlHndl_t NULL if successful, otherwise a pointer
+ * to the error log.
+ * @see src/include/runtime/interface.h for definition of call
+ */
+errlHndl_t
+firmware_request_helper(uint64_t i_reqLen,
+ void *i_req,
+ uint64_t* o_respLen,
+ void *o_resp);
+
+
+
+#endif // __RUNTIME_FWREQ_HELPER_H
OpenPOWER on IntegriCloud