3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER START
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * The contents of this file are subject to the terms of the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Common Development and Distribution License (the "License").
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You may not use this file except in compliance with the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * See the License for the specific language governing permissions
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * and limitations under the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * When distributing Covered Code, include this CDDL HEADER in each
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * If applicable, add the following below this CDDL HEADER, with the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * fields enclosed by brackets "[]" replaced with your own identifying
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * information: Portions Copyright [yyyy] [name of copyright owner]
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER END
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Use is subject to license terms.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#pragma ident "%Z%%M% %I% %E% SMI"
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Set up a logical group number that a logical device belongs to.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_fzc_ldg_num_set(hpi_handle_t handle, uint8_t ld, uint8_t ldg)
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs HXGE_REG_WR32(handle, LD_GRP_CTRL + LD_NUM_OFFSET(ld), gnum.value);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Get device state vectors.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_ldsv_ldfs_get(hpi_handle_t handle, uint8_t ldg, uint32_t *vector0_p,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs if ((status = hpi_ldsv_get(handle, ldg, VECTOR0, vector0_p))) {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs if ((status = hpi_ldsv_get(handle, ldg, VECTOR1, vector1_p))) {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Get device state vectors.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_ldsv_get(hpi_handle_t handle, uint8_t ldg, ldsv_type_t vector,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs switch (vector) {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_ldsv_get Invalid Input: ldsv type <0x%x>", vector));
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Set the mask bits for both ldf0 and ldf1.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_intr_mask_set(hpi_handle_t handle, uint8_t ld, uint8_t ldf_mask)
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs "hpi_intr_mask_set: ld %d offset 0x%0x mask 0x%x",
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Set interrupt timer and arm bit.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_intr_ldg_mgmt_set(hpi_handle_t handle, uint8_t ldg, boolean_t arm,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_intr_ldg_mgmt_set Invalid Input: ldg <0x%x>", ldg));
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_intr_ldg_mgmt_set Invalid Input"
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs HXGE_REG_WR32(handle, LD_INTR_MGMT + LDSV_OFFSET(ldg), mgm.value);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_intr_ldg_mgmt_set: ldg %d reg offset 0x%x",
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Set the timer resolution.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_fzc_ldg_timer_res_set(hpi_handle_t handle, uint32_t res)
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_fzc_ldg_timer_res_set Invalid Input: res <0x%x>",
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Set the system interrupt data.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs " hpi_fzc_sid_set Invalid Input: vector <0x%x>",
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs return (HPI_FAILURE | HPI_VIR_SID_VEC_INVALID(sid.vector));
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs HXGE_REG_WR32(handle, SID + LDG_SID_OFFSET(sid.ldg), sd.value);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Mask/Unmask the device error mask bits.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_fzc_sys_err_mask_set(hpi_handle_t handle, boolean_t mask)
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Get the system error stats.