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