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 2000 Sun Microsystems, Inc. All rights reserved.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Use is subject to license terms.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#pragma ident "%Z%%M% %I% %E% SMI"
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern "C" {
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_STATE if (sgfru_debug & SGFRU_DBG_STATE) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_HANDLE if (sgfru_debug & SGFRU_DBG_HANDLE) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_NODE if (sgfru_debug & SGFRU_DBG_NODE) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_SECTION if (sgfru_debug & SGFRU_DBG_SECTION) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_SEGMENT if (sgfru_debug & SGFRU_DBG_SEGMENT) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_PACKET if (sgfru_debug & SGFRU_DBG_PACKET) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_PAYLOAD if (sgfru_debug & SGFRU_DBG_PAYLOAD) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define PR_MBOX if (sgfru_debug & SGFRU_DBG_MBOX) printf
03831d35f7499c87d51205817c93e9a8d42c4baestevel#else /* DEBUG */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* DEBUG */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define MAX_PAYLOADSIZE 0x1000 /* No support for Tag Type G 2**48 */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define MAX_SEGMENTSIZE 0x10000 /* New SEEPROM size likely to be 64k */
03831d35f7499c87d51205817c93e9a8d42c4baestevel dev_info_t *fru_pdip; /* parent's devinfo structure */
03831d35f7499c87d51205817c93e9a8d42c4baesteveltypedef struct {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Prototypes
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_attach(dev_info_t *dip, ddi_attach_cmd_t cmd);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_detach(dev_info_t *dip, ddi_detach_cmd_t cmd);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_open(dev_t *dev_p, int flag, int otyp, cred_t *cred_p);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_close(dev_t dev, int flag, int otyp, cred_t *cred_p);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_ioctl(dev_t dev, int cmd, intptr_t arg, int mode,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * functions local to this driver.
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getchildlist(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getchildhandles(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getnodeinfo(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getsections(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getsegments(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_addsegment(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_readsegment(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_writesegment(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getpackets(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_appendpacket(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getpayload(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_updatepayload(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_getnum(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_delete(const sgfru_init_arg_t *iargp);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyin_frup(const sgfru_init_arg_t *argp, frup_info_t *frup);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyin_fru(const sgfru_init_arg_t *argp, fru_info_t *fru);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyin_segment(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyin_append(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyin_buffer(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_fru(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_handle(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_handles(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_nodes(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_sections(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_segments(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_packets(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int sgfru_copyout_buffer(const sgfru_init_arg_t *argp,
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* _SGFRU_PRIV_H */