/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
*/
/*
*/
#ifndef _LDC_H
#define _LDC_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/processor.h>
/* Types */
/* LDC transport mode */
typedef enum {
} ldc_mode_t;
/* LDC message payload sizes */
/* LDC Channel Status */
typedef enum {
} ldc_status_t;
/* Callback return values */
#define LDC_SUCCESS 0
/* LDC callback mode */
typedef enum {
/* Callback events */
/* LDC device classes */
typedef enum {
} ldc_dev_t;
/* Channel nexus registration */
typedef struct ldc_cnex {
} ldc_cnex_t;
/* LDC attribute structure */
typedef struct ldc_attr {
} ldc_attr_t;
/* LDC memory cookie */
typedef struct ldc_mem_cookie {
/*
* LDC Memory Map Type
* Specifies how shared memory being created is shared with its
*/
/*
* Default mapin size supported with legacy f/w.
*/
/* LDC Memory Access Permissions */
/* LDC Memory Copy Direction */
typedef enum {
/* LDC [dring] memory info */
typedef struct ldc_mem_info {
/* LDC channel info */
typedef struct ldc_info {
} ldc_info_t;
/* API functions */
/*
* Shared Memory (Direct Map) Acquire and Release API
*
* LDC_ON_TRAP and LDC_NO_TRAP provide on_trap protection for clients accessing
* imported LDC_DIRECT_MAP'd shared memory segments. Use of these macros is
* analogous to the ldc_mem_acquire/release and ldc_mem_dring_acquire/release
* interfaces for LDC_SHADOW_MAP'd segments. After LDC_ON_TRAP is called,
* unless an error is returned, LDC_NO_TRAP must be called.
*
* LDC_ON_TRAP returns zero on success and EACCES if a data access exception
* occurs after enabling protection, but before it is disabled. If EACCES is
* returned, the caller must not call LDC_NO_TRAP. In order to handle the
* EACCES error return, callers should take the same precautions that apply
* when calling on_trap() when calling LDC_ON_TRAP.
*
* LDC_ON_TRAP is implemented as a macro so that on_trap protection can be
* enabled without first executing a save instruction and obtaining a new
* register window. Aside from LDC clients calling on_trap() directly, one
* alternative approach is to implement the LDC_ON_TRAP function in assembly
* language without a save instruction and to then call on_trap() as a tail
* call.
*/
#define LDC_NO_TRAP() \
(no_trap(), 0)
#ifdef __cplusplus
}
#endif
#endif /* _LDC_H */