librsmwrsm.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 (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _LIBRSMWRSM_H
#define _LIBRSMWRSM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* Private Header file for librsmwrsm.c */
#define WRSMLIB_CACHELINE_SIZE 64
#define WRSMLIB_ALIGN 64
#define WRSMLIB_CACHELINE_SHIFT 6
/*
* number of controllers is set by the wrsm.conf file. as there is no
* way to dynamically relay this information to the plugin library,
* maxcontrollers is set here to the maximum number of controllers a system
* could ever have.
*/
#define MAXCONTROLLERS 64
#define STRIPE_STRIDE 128
#define SAFARI_OFFSET 64
#define MAXWCISTRIPING 4
#define STRIPE_MASK 1
typedef unsigned char wrsm_barrier_state_t;
/*
* The following type may be allocated on the stack, then using the function
* wrsmlib_align a properly aligned message buffer is extracted.
* once wrsmlib_blkcopy is fixed - alignment here won't be needed
*/
/* plugin specific structures */
typedef struct {
/*
* this struct is a static array in the plugin. for each controller,
* it maintains the related opened (> 0) file descriptors and the count
* for the number of open request on that controller. the library will
* request the driver to close the controller on the last close request for
* that particular controller.
*/
typedef struct {
int fd;
typedef struct {
/*
* Performs a 64-byte block copy, used for remote read/write/interrupts.
* Assumes both addresses are 64-byte aligned, and does no checking.
*/
void
/*
* Performs a 64-byte block store, used for remote writes.
* Assumes that the dst addr is 64-byte aligned, and does no checking.
*/
void
#ifdef __cplusplus
}
#endif
#endif /* _LIBRSMWRSM_H */