fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _SD_MISC_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_MISC_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_FIFO_WAIT 1000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_FIFO_WSPIN 100
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef _KERNEL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern _dm_process_vars_t dynmem_processing_dm;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int sdbc_wrthru_len;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern nsc_size_t sdbc_max_fbas;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int sdbc_max_devs;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _init(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_data_log(int num, _sd_cctl_t *centry, nsc_off_t st,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte nsc_size_t len);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_data_log_chain(int num, _sd_cctl_t *centry, nsc_off_t fba_pos,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte nsc_size_t fba_len);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_reflect_ignore(ucaddr_t from, ucaddr_t to, int size);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_reflect(ucaddr_t from, ucaddr_t to, int size, int flag);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_timed_block(clock_t ticks, kcondvar_t *cvp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_unblock(kcondvar_t *cvp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_zap_stats(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_cache_sizes(int *asize, int *wsize);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sd_print(int level, char *fmt, ...);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_get_cd_blk(int cd, nsc_off_t blk, _sd_cctl_t **cc, caddr_t *data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char **filename);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _KERNEL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SD_MISC_H */