/*
* 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) 1998-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_RSM_RSMPI_H
#define _SYS_RSM_RSMPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _KERNEL
typedef void * ddi_as_handle_t;
#endif
struct __rsm_resource_callback_arg;
struct __rsm_callback_arg;
/* Values for resource callback function pointer */
/* rsm_seg_create() flags values */
/* The following definitions used to describe the ranges fro rsm_intr_t */
#define RSM_INTR_T_DRV_BASE 0
/* kstat's ks_name for RSMPI controller drivers */
/* named kstat component names */
/* The following are the possible values of RSM_KS_CTLR_STATE */
struct __rsm_send_q_handle;
/* rsm_intr_send_q_create flags values */
typedef struct {
void *is_data;
int is_flags;
} rsm_send_t;
/* rsm_send_t flags values */
typedef enum {
typedef enum {
struct __rsm_intr_hand_arg;
struct __rsm_registry_item;
typedef int rsm_intr_pri_t;
typedef struct {
/*
* ae_addr can be set to the following value to mean that the permissions
* should apply to all nodes accessible through this RSM controller
*/
struct __rsm_controller_handle;
/*
* The following typedef is used to represent a controller object.
*/
typedef struct rsm_controller_object {
void *data,
typedef struct {
enum { RSM_MEM_VADDR,
union {
struct {
void *vaddr;
} vr;
} ms_memory;
typedef struct {
typedef struct {
typedef struct {
char *attr_name;
/*
* The following three defines are possible values for attr_error_behavior
* field of the rsm_controller_attr_t struct.
*/
#define RSM_ERR_NOCHANGE 0
typedef struct rsm_ops {
/*
* structure revision number:
*/
/*
* export side memory segment operations:
*/
int (*rsm_seg_create)
int (*rsm_seg_destroy)
int (*rsm_bind)
int (*rsm_unbind)
int (*rsm_rebind)
int (*rsm_publish)
int (*rsm_unpublish)
int (*rsm_republish)
/*
* import side memory segment operations
*/
int (*rsm_connect)
int (*rsm_disconnect)
/*
* import side memory segment operations (read access functions):
*/
int (* rsm_get8)
int (* rsm_get16)
int (* rsm_get32)
int (* rsm_get64)
int (* rsm_get)
void *datap,
/*
* import side memory segment operations (write access functions)
*/
int (* rsm_put8)
int (* rsm_put16)
int (* rsm_put32)
int (* rsm_put64)
int (* rsm_put)
void *datap,
/*
* import side memory segment operations (mapping)
*/
dev_info_t **dipp,
int (*rsm_unmap)
/*
* import side memory segment operations (barriers):
*/
int (* rsm_open_barrier_region)
int (* rsm_open_barrier_regions)
int (* rsm_open_barrier_node)
int (* rsm_open_barrier_ctrl)
int (* rsm_open_barrier_region_thr)
int (* rsm_open_barrier_regions_thr)
int (* rsm_open_barrier_node_thr)
int (* rsm_open_barrier_ctrl_thr)
int (* rsm_close_barrier)
(rsm_barrier_t *barrier);
int (* rsm_reopen_barrier)
(rsm_barrier_t *barrier);
int (* rsm_order_barrier)
(rsm_barrier_t *barrier);
int (* rsm_thread_init)
int (* rsm_thread_fini)
int (* rsm_get_barrier_mode)
int (* rsm_set_barrier_mode)
/*
* sending side interrupt operations:
*/
int (* rsm_sendq_create)
int (* rsm_sendq_config)
int (* rsm_sendq_destroy)
int (* rsm_send)
rsm_send_t *is,
/*
* receiving side interrupt operations:
*/
int (* rsm_register_handler)
int (* rsm_unregister_handler)
/* scatter-gather I/O */
int (* rsm_memseg_import_getv)
int (* rsm_memseg_import_putv)
/* Management operation */
int (*rsm_get_peers)
/* Extension operation */
int (*rsm_extension)
char *extname,
void *extobj);
} rsm_ops_t;
/*
* service module function templates:
*/
/*
* MACROS for Clients requesting services via RSMPI module
*/
/*
* Export Side segment operations
*/
callback_arg) \
(callback), (callback_arg))
((memseg))
callback_arg) \
callback_arg) \
(callback), (callback_arg))
((memseg))
callback, callback_arg) \
(callback_arg))
((im_memseg))
/*
* import side memory segment operations (read access functions)
*/
/*
* import side memory segment operations (write access functions)
*/
/*
* import side memory segment operations (mapping):
*/
((im_memseg))
/*
* import side memory segment operations (barriers):
*/
((barrier))
((barrier));
((barrier))
((controller).handle)
((controller).handle)
/*
* sending side interrupt operations:
*/
((iq))
/*
* receiving side interrupt operations:
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_RSM_RSMPI_H */