diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-04-28 00:54:00 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-05-24 09:28:01 -0400 |
commit | 3ad299af08fd1ed6a14c72a9d3fe4b89a5af5eec (patch) | |
tree | 510aa6aaded8f7476e5f43e7c7531908c906d222 /src/include/usr/secureboot | |
parent | 2383ff8f7e7617623873c39974fb3ce6f6bffc4c (diff) | |
download | talos-hostboot-3ad299af08fd1ed6a14c72a9d3fe4b89a5af5eec.tar.gz talos-hostboot-3ad299af08fd1ed6a14c72a9d3fe4b89a5af5eec.zip |
Establish Base Support For Sending Mailbox Messages Across XBUS/ABUS
This commit establishes base support for Secure Node Communications.
It creates a new device driver to operate the XBUS and ABUS Link
Mailboxes and adds base support for using these device drivers to
send and receive messages. It also adds a test to perform a 2-chip
XBUS Link Mailbox operation.
Change-Id: I19510888c0922e5bb857cffc9426399e79e113ba
RTC:191008
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58376
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
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>
Diffstat (limited to 'src/include/usr/secureboot')
-rw-r--r-- | src/include/usr/secureboot/nodecommif.H | 76 | ||||
-rw-r--r-- | src/include/usr/secureboot/secure_reasoncodes.H | 16 |
2 files changed, 92 insertions, 0 deletions
diff --git a/src/include/usr/secureboot/nodecommif.H b/src/include/usr/secureboot/nodecommif.H new file mode 100644 index 000000000..6787c99ea --- /dev/null +++ b/src/include/usr/secureboot/nodecommif.H @@ -0,0 +1,76 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/secureboot/nodecommif.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2018 */ +/* [+] 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 __NODECOMMIF_H +#define __NODECOMMIF_H + +#include <initservice/mboxRegs.H> +#include <config.h> +#include <errl/errlentry.H> + +namespace SECUREBOOT +{ + +namespace NODECOMM +{ + +/* + * @brief The Node Communications Device Driver can *only* support ABUS or + * XBUS operations. This enum will be passed in by callers and it + * will be verified that only the XBUS or ABUS values were passed in. + */ +enum node_comm_modes_t +{ + NCDD_MODE_XBUS = 0, + NCDD_MODE_ABUS = 1, + + // INVALID value and will be used for checks and asserts, like: + // assert(mode < NCDD_MODE_INVALID) + NCDD_MODE_INVALID = 2, +}; + +enum node_comm_link_mbox_info_t +{ + NCDD_MAX_ABUS_LINK_ID = 7, + NCDD_MAX_XBUS_LINK_ID = 5, + NCDD_MAX_MBOX_ID = 1, + NCDD_INVALID_LINK_MBOX = 0xFF, +}; + +/** + * @brief Execute a single transmission from one proc to another + * over the XBUS Link Mailbox facility + * + * @return errHndl_t Error log handle indicating success or failure + * @retval nullptr Test completed successfully + * @retval !nullptr Error log providing failure details + */ +errlHndl_t nodeCommXbus2ProcTest(void); + +} // End NODECOMM namespace + +} // End SECUREBOOT namespace + +#endif // End __NODECOMMIF_H + diff --git a/src/include/usr/secureboot/secure_reasoncodes.H b/src/include/usr/secureboot/secure_reasoncodes.H index 5dcb4bf5a..f692d4753 100644 --- a/src/include/usr/secureboot/secure_reasoncodes.H +++ b/src/include/usr/secureboot/secure_reasoncodes.H @@ -48,6 +48,13 @@ namespace SECUREBOOT MOD_SECURE_GET_ALL_SEC_REGS = 0x0E, MOD_SECURE_LOAD_HEADER = 0x0F, MOD_SECURE_VALIDATE_ECID_COUNT = 0x10, + + // Use 0x20-0x2F range for Node Communications + MOD_NCDD_CHECK_FOR_ERRORS = 0x20, + MOD_NCDD_WAIT_FOR_CMD_COMP = 0x21, + MOD_NC_XBUS_TEST = 0x22, + MOD_NC_MAP_ATTN = 0x23, + MOD_NCDD_PERFORM_OP = 0x24, }; enum SECUREReasonCode @@ -72,6 +79,15 @@ namespace SECUREBOOT RC_DEVICE_READ_ERR = SECURE_COMP_ID | 0x11, RC_INVALID_BASE_HEADER = SECURE_COMP_ID | 0x12, RC_INVALID_ECID_COUNT = SECURE_COMP_ID | 0x13, + + // Use 0x20-0x2F range for Node Communications + RC_NCDD_HW_ERROR_FOUND = SECURE_COMP_ID | 0x20, + RC_NCDD_CMD_COMP_TIMEOUT = SECURE_COMP_ID | 0x21, + RC_NC_DATA_MISCOMPARE = SECURE_COMP_ID | 0x22, + RC_NC_NO_ATTN_FOUND = SECURE_COMP_ID | 0x23, + RC_NC_TOO_MANY_ATTNS_FOUND = SECURE_COMP_ID | 0x24, + RC_NCDD_INVALID_ARGS = SECURE_COMP_ID | 0x25, + // Reason codes 0xA0 - 0xEF reserved for trustedboot_reasoncodes.H }; |