1e2529962Sae112802 /* 2e2529962Sae112802 * CDDL HEADER START 3e2529962Sae112802 * 4e2529962Sae112802 * The contents of this file are subject to the terms of the 5e2529962Sae112802 * Common Development and Distribution License (the "License"). 6e2529962Sae112802 * You may not use this file except in compliance with the License. 7e2529962Sae112802 * 8e2529962Sae112802 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9e2529962Sae112802 * or http://www.opensolaris.org/os/licensing. 10e2529962Sae112802 * See the License for the specific language governing permissions 11e2529962Sae112802 * and limitations under the License. 12e2529962Sae112802 * 13e2529962Sae112802 * When distributing Covered Code, include this CDDL HEADER in each 14e2529962Sae112802 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15e2529962Sae112802 * If applicable, add the following below this CDDL HEADER, with the 16e2529962Sae112802 * fields enclosed by brackets "[]" replaced with your own identifying 17e2529962Sae112802 * information: Portions Copyright [yyyy] [name of copyright owner] 18e2529962Sae112802 * 19e2529962Sae112802 * CDDL HEADER END 20e2529962Sae112802 */ 21e2529962Sae112802 /* 22e2529962Sae112802 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23e2529962Sae112802 * Use is subject to license terms. 24e2529962Sae112802 */ 25e2529962Sae112802 26e2529962Sae112802 #ifndef _PICLSBL_H 27e2529962Sae112802 #define _PICLSBL_H 28e2529962Sae112802 29e2529962Sae112802 #ifdef __cplusplus 30e2529962Sae112802 extern "C" { 31e2529962Sae112802 #endif 32e2529962Sae112802 33e2529962Sae112802 picl_nodehdl_t root_node; 34e2529962Sae112802 35e2529962Sae112802 /* lookup struct for ptree callback */ 36e2529962Sae112802 typedef struct disk_lookup { 37e2529962Sae112802 char *path; 38e2529962Sae112802 picl_nodehdl_t disk; 39e2529962Sae112802 int result; 40e2529962Sae112802 } disk_lookup_t; 41e2529962Sae112802 42e2529962Sae112802 #define DISK_FOUND 0x00 43e2529962Sae112802 #define DISK_NOT_FOUND 0x01 44e2529962Sae112802 45e2529962Sae112802 #define PCPLIB "libpcp.so" 46e2529962Sae112802 #define LIB_PCP_PATH "/usr/platform/sun4v/lib/" 47e2529962Sae112802 #define LED_CHANNEL "/devices/virtual-devices@100/led@d:glvc" 48e2529962Sae112802 #define PCPINIT_TIMEOUT 0x05 49e2529962Sae112802 #define PCPCOMM_TIMEOUT 0x10 50e2529962Sae112802 51e2529962Sae112802 #define NAC_DISK_PREFIX "HDD" 52e2529962Sae112802 53*08c92e0eSMary Beale /* sun4v platforms that do not need to handle SBL events */ 54*08c92e0eSMary Beale #define ERIE_PLATFORM "SUNW,Sun-Fire-T1000" 55*08c92e0eSMary Beale #define ERIE_PLATFORM2 "SUNW,SPARC-Enterprise-T1000" 56*08c92e0eSMary Beale 57e2529962Sae112802 /* message types */ 58e2529962Sae112802 #define PCP_SBL_CONTROL 0x3 59e2529962Sae112802 #define PCP_SBL_CONTROL_R 0x4 60e2529962Sae112802 61e2529962Sae112802 /* pcp request structure */ 62e2529962Sae112802 typedef struct pcp_sbl_req { 63e2529962Sae112802 uint32_t sbl_id; 64e2529962Sae112802 uint32_t sbl_action; 65e2529962Sae112802 } pcp_sbl_req_t; 66e2529962Sae112802 67e2529962Sae112802 /* sbl_action */ 68e2529962Sae112802 #define PCP_SBL_ENABLE 0x1 69e2529962Sae112802 #define PCP_SBL_DISABLE 0x2 70e2529962Sae112802 71e2529962Sae112802 /* pcp response structure */ 72e2529962Sae112802 typedef struct pcp_sbl_resp { 73e2529962Sae112802 uint32_t status; 74e2529962Sae112802 uint32_t sbl_id; 75e2529962Sae112802 uint32_t sbl_state; 76e2529962Sae112802 } pcp_sbl_resp_t; 77e2529962Sae112802 78e2529962Sae112802 /* status */ 79e2529962Sae112802 #define PCP_SBL_OK 0x1 80e2529962Sae112802 #define PCP_SBL_ERROR 0x2 81e2529962Sae112802 82e2529962Sae112802 /* sbl_state */ 83e2529962Sae112802 #define SBL_STATE_ON 0x1 84e2529962Sae112802 #define SBL_STATE_OFF 0x2 85e2529962Sae112802 #define SBL_STATE_UNKNOWN 0x3 86e2529962Sae112802 87e2529962Sae112802 #ifdef __cplusplus 88e2529962Sae112802 } 89e2529962Sae112802 #endif 90e2529962Sae112802 91e2529962Sae112802 #endif /* _PICLSBL_H */ 92