03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER START
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The contents of this file are subject to the terms of the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Common Development and Distribution License (the "License").
03831d35f7499c87d51205817c93e9a8d42c4baestevel * You may not use this file except in compliance with the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * See the License for the specific language governing permissions
03831d35f7499c87d51205817c93e9a8d42c4baestevel * and limitations under the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * When distributing Covered Code, include this CDDL HEADER in each
03831d35f7499c87d51205817c93e9a8d42c4baestevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If applicable, add the following below this CDDL HEADER, with the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * fields enclosed by brackets "[]" replaced with your own identifying
03831d35f7499c87d51205817c93e9a8d42c4baestevel * information: Portions Copyright [yyyy] [name of copyright owner]
03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER END
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Use is subject to license terms.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#pragma ident "%Z%%M% %I% %E% SMI"
03831d35f7499c87d51205817c93e9a8d42c4baestevel * By default, DR of non-Panther procs is not allowed into a Panther
03831d35f7499c87d51205817c93e9a8d42c4baestevel * domain with large page sizes enabled. Setting this to 0 will remove
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the restriction.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Initialize the data structs for the common part of the pkts
03831d35f7499c87d51205817c93e9a8d42c4baestevelsbdp_init_msg_pkt(sbbc_msg_t *msg, uint16_t sub_type, int len, caddr_t buf)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Convert a showboard data structure to the board structure shared
03831d35f7499c87d51205817c93e9a8d42c4baestevel * between sbd and sbdp
03831d35f7499c87d51205817c93e9a8d42c4baestevelsbdp_showbd_2_sbd_stat(show_board_t *shbp, sbd_stat_t *stp, int board)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This should go away since the SC should put the unknown
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We leave this here so Symon and other scripts don't have
03831d35f7499c87d51205817c93e9a8d42c4baestevel * a problem
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Get the status from the SC and then convert
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the info returned into something that sbd understands
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If the request times out or fails other than an illegal transaction
03831d35f7499c87d51205817c93e9a8d42c4baestevel * copy the info from our inventory
03831d35f7499c87d51205817c93e9a8d42c4baestevelsbdp_get_board_status(sbdp_handle_t *hp, sbd_stat_t *stp)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_SHOW_BOARD, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_SHOW_BOARD, len, (caddr_t)shbp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_shw_bd_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("show board completed: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This domain has no access to this board. Return failure
03831d35f7499c87d51205817c93e9a8d42c4baestevel if ((resp->msg_status == SG_MBOX_STATUS_BOARD_ACCESS_DENIED) ||
03831d35f7499c87d51205817c93e9a8d42c4baestevel * invalidate cached copy.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If we get any error see if we can return a cached copy of the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * board info. If one exists turn the busy flag on
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * we have a valid copy. Return it and set the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * busy flag on so the user know this is not the most
03831d35f7499c87d51205817c93e9a8d42c4baestevel * recent copy
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The sbbc returns the error in both parts (i.e rv and status)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * so since we just took care of it reset rv
03831d35f7499c87d51205817c93e9a8d42c4baestevel * revalidate our copy of the returned data
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MBOX("Showboard: board\t%d\n\trevision\t%d\n\ts_cond\t%d\n\t"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "s_power\t%d\n\ts_assigned\t%d\n\ts_claimed\t%d\n\t"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "s_present\t%d\n\ts_ledstatus\t%d\n\ts_type\t%s\n\t"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "s_info\t%s\n",
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Now that we got the info run through the sbd-sbdp translator
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Last add the platform options
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Call down to the SC to assign the board
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We simply return the status the SC told us
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_ASSIGN, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_ASSIGN, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to assign board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Call down to the SC to unassign the board
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We simply return the status the SC told us
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_ASSIGN, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_ASSIGN, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to unassign board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = prom_serengeti_attach_board(hp->h_wnode, hp->h_board);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = prom_serengeti_detach_board(hp->h_wnode, hp->h_board);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. First we call down to the SC to "attach/claim" this
03831d35f7499c87d51205817c93e9a8d42c4baestevel * board. As a side effect the SC updates the pda info so obp can create the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * device tree. If we are successful, we ask OBP to probe the board. OBP
03831d35f7499c87d51205817c93e9a8d42c4baestevel * creates new nodes on its own obp tree
03831d35f7499c87d51205817c93e9a8d42c4baestevel * As an added bonus, since we don't use the inkernel prober, we need to create
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the dev_info nodes but just to a point where they are created but
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Solaris can't use them (i.e BIND)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Currently, we pass the info in the extra data fields.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This may change in the SC. We need to change it then
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_CLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_CLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to claim board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to prom attach board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_UNCLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_UNCLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel (void) sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * XXX Until the Solaris large pages support heterogeneous cpu
03831d35f7499c87d51205817c93e9a8d42c4baestevel * domains, DR needs to prevent the addition of non-Panther cpus
03831d35f7499c87d51205817c93e9a8d42c4baestevel * to an all-Panther domain with large pages enabled.
03831d35f7499c87d51205817c93e9a8d42c4baestevel panther_pages_enabled = (page_num_pagesizes() > DEFAULT_MMU_PAGE_SIZES);
03831d35f7499c87d51205817c93e9a8d42c4baestevel panther_pages_enabled && sbdp_large_page_restriction) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel cmn_err(CE_WARN, "Domain shutdown is required to add a non-"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "UltraSPARC-IV+ board into an all UltraSPARC-IV+ domain");
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Now that the board has been successfully attached, obtain
03831d35f7499c87d51205817c93e9a8d42c4baestevel * platform-specific DIMM serial id information for the board.
03831d35f7499c87d51205817c93e9a8d42c4baestevel plat_ecc_capability_sc_get(PLAT_ECC_DIMM_SID_MESSAGE)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Undo the connect call. We first need to remove
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the "dummy (i.e unusable)" nodes from solaris. We then call down to OBP
03831d35f7499c87d51205817c93e9a8d42c4baestevel * to prune its tree. After all has been cleaned up from OBP and Solaris
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We call the SC to "detach/unclain" the board. A side effect is that the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * SC will clear the pda entries for this board
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("sbdp_disconnect_board: board = %d node = %d\n",
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to prom detach board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Currently, we pass the info in the extra data fields.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This may change in the SC. We need to change it then
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_UNCLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_UNCLAIM, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to unclaim board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* bring back the obp tree to what it was */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Now that the board has been successfully detached, discard
03831d35f7499c87d51205817c93e9a8d42c4baestevel * platform-specific DIMM serial id information for the board.
03831d35f7499c87d51205817c93e9a8d42c4baestevel plat_ecc_capability_sc_get(PLAT_ECC_DIMM_SID_MESSAGE)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Very simple. Just ask the SC to poweoff the board
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Return the status from the SC
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Can't check for bad options here since we use this for workaround
03831d35f7499c87d51205817c93e9a8d42c4baestevel * on poweron.
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_POWER, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_POWER, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to poweroff board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Ask the SC to poweron the board
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Return the status from the SC
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Check for options. If there are any, fail the operation
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (hp->h_opts != NULL && hp->h_opts->copts != NULL) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, ESBD_INVAL_OPT, hp->h_opts->copts);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_POWER, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_POWER, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to poweron board: rv = %d\n", rv);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We have args and need to process them
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "init", sizeof ("init")) == 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "quick", sizeof ("quick")) == 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "min", sizeof ("min")) == 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "default", sizeof ("default")) == 0 ||
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "mem1", sizeof ("mem1")) == 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (strncmp(cptr, "mem2", sizeof ("mem2")) == 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Entry point from sbd. Ask the SC to test the board. We still need to
03831d35f7499c87d51205817c93e9a8d42c4baestevel * worry about the diag level. The user may have changed it
03831d35f7499c87d51205817c93e9a8d42c4baestevel * NOTE: The flag field has 2 different meanings whether we are dealing
03831d35f7499c87d51205817c93e9a8d42c4baestevel * with a cpu/mem board or an io board. In the case of a cpu/mem board it
03831d35f7499c87d51205817c93e9a8d42c4baestevel * means retest the board to the diag level specified. In the case of an IO
03831d35f7499c87d51205817c93e9a8d42c4baestevel * board, it means: Perform the necessary steps to prepare the board
03831d35f7499c87d51205817c93e9a8d42c4baestevel * for the claim without running POST at the diag level specified.
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (-1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Only force retest on CPU boards
03831d35f7499c87d51205817c93e9a8d42c4baestevel * For CPULESS IO pass the force to the SC
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_TEST_BD, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_TEST_BD, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to test board: rv = %d status = %d\n",
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_set_err(sep, sbdp_sc_err_translation(resp->msg_status),
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Request the SC to update POST's memory slice table by swapping
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the entries for the two board numbers given
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This is used when performing a copy-rename operation.
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_SWAP_SLICES, len, (caddr_t)informp);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_SWAP_SLICES, len, (caddr_t)&cmd_rev);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to swap slices %d<->%d: rv = %d "
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_STOP_CPU, len, (caddr_t)&cpu);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_STOP_CPU, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_START_CPU, len, (caddr_t)&cpu);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_START_CPU, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * With the SIR implementation for CPU unconfigure, this mailbox
03831d35f7499c87d51205817c93e9a8d42c4baestevel * call is obsolete.
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(reqp, DR_MBOX_START_CPU_PAIRS, len, (caddr_t)&cpu);
03831d35f7499c87d51205817c93e9a8d42c4baestevel sbdp_init_msg_pkt(resp, DR_MBOX_START_CPU_PAIRS, 0, (caddr_t)NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevel rv = sbbc_mbox_request_response(reqp, resp, sbdp_mbox_wait);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (rv != 0 || (rv = resp->msg_status != SG_MBOX_STATUS_SUCCESS)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SBDP_DBG_MISC("failed to start cpu pair: rv = %d\n", rv);