diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2017-08-23 10:29:57 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-10-06 14:22:35 -0400 |
commit | 2a1cc4f4045ddfb247a7be1a18593a9836db8412 (patch) | |
tree | 880c73ec0af9e7ffb14df3686a8a5502cdfad8cd /src/include | |
parent | 7e787acb321e220f9ba0f4a17a408e06b5b4cef0 (diff) | |
download | talos-hostboot-2a1cc4f4045ddfb247a7be1a18593a9836db8412.tar.gz talos-hostboot-2a1cc4f4045ddfb247a7be1a18593a9836db8412.zip |
Updated VPD from HBRT on FSP systems
Created a generic message type that is used as a mailbox message that
is passed from HBRT to FSP. The new generic message type is used
to make a VPD write call.
Change-Id: I21240d19909f786d525e2a98878000af4aea6e9f
RTC:171488
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45048
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/runtime/generic_hbrt_fsp_message.H | 73 | ||||
-rw-r--r-- | src/include/runtime/interface.h | 16 | ||||
-rw-r--r-- | src/include/usr/vpd/vpdreasoncodes.H | 5 |
3 files changed, 91 insertions, 3 deletions
diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H new file mode 100644 index 000000000..742270e66 --- /dev/null +++ b/src/include/runtime/generic_hbrt_fsp_message.H @@ -0,0 +1,73 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/runtime/generic_hbrt_fsp_message.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2013,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__GENERIC_HBRT_FSP_MESSAGE_H +#define __RUNTIME__GENERIC_HBRT_FSP_MESSAGE_H + +#include <builtins.h> + +/** @file generic_hbrt_fsp_message.H + * @brief A generic structure for passing data + * + * This file has a generic struct to be used by the + * FSP/HWSV team to send and receive data. + */ + +/** + * This struct sends an MBox message to the FSP + */ +struct GenericFspMboxMessage_t +{ + uint32_t msgq; // Example: MBOX::FSP_VPD_MSGQ + uint32_t msgType; // Example: VPD_MSG_TYPE:VPD_WRITE_PROC + struct // flags + { + uint32_t __reserved__async:1; + uint32_t __reserved__pseudosync:1; + uint32_t __reserved__unused:30; + }; + uint64_t data; // generic member that can be used + // to do casting to other types: + // MyDataType_t* mydatatype = + // (MyDataType_t*)&(l_generic_msg.data); +} PACKED ; + +/** + * This struct receives the response message from the FSP + */ +struct GenericFspRspMessage_t +{ + uint32_t msgq; // Example: MBOX::FSP_VPD_MSGQ + uint32_t msgType; // Example: VPD_MSG_TYPE:VPD_WRITE_PROC + struct // flags + { + uint32_t __reserved__async:1; + uint32_t __reserved__pseudosync:1; + uint32_t __reserved__unused:30; + }; + uint32_t errPlid; // error log id +} PACKED ; + + +#endif // __RUNTIME__GENERIC_HBRT_FSP_MESSAGE_H diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 7fe940a99..e436cc699 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -46,6 +46,7 @@ #include <stdint.h> #include <time.h> #include <limits.h> +#include "generic_hbrt_fsp_message.H" /** Memory error types defined for memory_error() interface. */ enum MemoryError_t @@ -504,6 +505,7 @@ typedef struct hostInterfaces HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3, HBRT_FW_MSG_HBRT_FSP = 4, HBRT_FW_MSG_TYPE_ERROR_LOG = 5, + HBRT_FW_MSG_HBRT_FSP_RESP = 6, }; struct hbrt_fw_msg // define struct hbrt_fw_msg @@ -546,9 +548,19 @@ typedef struct hostInterfaces // uint8_t *myData = // (uint8_t*)&l_req_fw_msg->error_log.i_data; } __attribute__ ((packed)) error_log; - }; - }; + // This struct is sent from HBRT with + // io_type set to HBRT_FW_MSG_HBRT_FSP + // This struct sends an MBox message to the FSP + struct GenericFspMboxMessage_t generic_message; + + // This struct is sent from FSP with + // io_type set to HBRT_FW_MSG_HBRT_FSP_RESP + // This struct receives a message from the FSP + struct GenericFspRspMessage_t generic_message_resp; + + }; // end union + }; // end struct hbrt_fw_msg // Created a static constexpr to return the base size of hbrt_fw_msg // Can't do #define - sizeof not allowed to be used in #defines diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H index ca1f34872..8007d0a7b 100644 --- a/src/include/usr/vpd/vpdreasoncodes.H +++ b/src/include/usr/vpd/vpdreasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2016 */ +/* Contributors Listed Below - COPYRIGHT 2013,2017 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -92,6 +92,7 @@ enum vpdModuleId VPD_RT_WRITE_PNOR = 0x81, VPD_BLD_RT_IMAGE = 0x82, VPD_SEND_MBOX_WRITE_MESSAGE = 0x83, + VPD_RT_FIRMWARE_REQUEST = 0x84, }; @@ -139,6 +140,8 @@ enum vpdReasonCode VPD_WRITE_DEST_UNRESOLVED = VPD_COMP_ID | 0x34, VPD_CACHE_SIZE_EXCEEDED = VPD_COMP_ID | 0x35, VPD_INVALID_LENGTH = VPD_COMP_ID | 0x36, + VPD_RT_NULL_FIRMWARE_REQUEST_PTR = VPD_COMP_ID | 0x37, + VPD_RT_WRITE_MSG_ERR = VPD_COMP_ID | 0x38, }; |