picldevtree.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PICLDEVTREE_H
#define _PICLDEVTREE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include "picldefs.h"
#define DEVICE_TYPE_BLOCK "block"
#define DEVICE_TYPE_BYTE "byte"
#define DEVICE_TYPE_DISK "disk"
#define DEVICE_TYPE_SES "ses"
#define DEVICE_TYPE_FP "fp"
#define HASH_TABLE_SIZE 64
#define HASH_INDEX(s, x) ((int)((x) & ((s) - 1)))
#define MAX_NAMEVAL_SIZE 80
#define CONFFILE_LINELEN_MAX 1024
#define KSTAT_STATE_BEGIN "state_begin"
#define KSTAT_CPU_INFO "cpu_info"
#define ASR_DISABLED "disabled"
#define ASR_FAILED "failed"
#define DEVTREE_CONFFILE_NAME "picldevtree.conf"
#define ASRTREE_CONFFILE_NAME "picl_asr.conf"
#define CONFFILE_COMMENT_CHAR '#'
/*
* Constants
*/
#define FFB_MANUF_BUFSIZE 256
#define MAX_STATE_SIZE 32
/*
* Hash table structure
*/
typedef struct hash_elem {
} hash_elem_t;
typedef struct {
int hash_size;
hash_elem_t **tbl;
} hash_t;
/*
* name to class map entries in the conf file
*/
typedef struct conf_entries {
char *name;
char *piclclass;
struct conf_entries *next;
/*
* name to address to class map for asr2
*/
typedef struct asr_conf_entries {
char *name;
char *piclclass;
char *status;
char *address;
char *props;
struct asr_conf_entries *next;
/*
* type, name, val property triplet for asr2
*/
typedef struct asr_prop_triplet {
char *proptype;
char *propname;
char *propval;
/*
* built-in name to class mapping table
*/
typedef struct {
char name[MAX_NAMEVAL_SIZE];
char piclclass[PICL_CLASSNAMELEN_MAX];
/*
* property name to type mapping table
*/
typedef struct {
char pname[PICL_PROPNAMELEN_MAX];
int type;
/* known values for manufacturer's JED code */
#define MANF_BROOKTREE 214
#define MANF_MITSUBISHI 28
#define FFB_NAME "ffb"
/* FFB strap reg union */
typedef union {
struct {
} fld;
} strap_un_t;
/* FFB mnufacturer union */
typedef union {
struct {
} fld;
} manuf_t;
typedef struct ffb_sys_info {
typedef struct memspecs {
} memspecs_t;
/*
* UnitAddress property related constants and data structures
*/
#define DEFAULT_ADDRESS_CELLS 2
#define MAX_UNIT_ADDRESS_LEN 256
typedef struct {
char *class; /* class name */
int addrcellcnt; /* #addrcell expected, if non-zero */
#ifdef __cplusplus
}
#endif
#endif /* _PICLDEVTREE_H */