/*
* 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 1999-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_1394_ADAPTERS_HCI1394_IXL_H
#define _SYS_1394_ADAPTERS_HCI1394_IXL_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Structures and defines for IXL processing.
* 1. Structures tracking per-command state [created during compilation
* and stored in each command's compiler_privatep].
* 2. Structures used for state tracking during IXL program compilation.
* 3. Structures used during IXL dynamic update for assessment and the
* performing the update itself.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* function return codes from hci1394_ixl_dma_sync()
*/
/* (info only, not err) */
/* (might be info only) */
/* (stuck or lost) */
/* fatal internal errors from hci1394_ixl_dma_sync() */
/*
* maximum number of jump IXL commands permitted between two data transfer
* commands. This allows for several label and jump combinations to exist, but
* an infinite loop without any transfers.
*/
/*
* xfer control structures - for execution and update control of compiled
* ixl program.
*
* For pkt, buf and special xfer start ixl commands, address
* of allocated xfer_ctl struct is set into ixl compiler_privatep.
*
* For pkt xfer non-start ixl commands, address of pkt xfer start ixl
* command is set into compiler_privatep and the index [1-n] of
* this non-start pkt xfer ixl command to its related component in the
* generated descriptor block is set into compiler_resv.
*
* The xfer_ctl_dma struct array is needed because allocation of subsequent
* descriptor blocks may be from different memory pages (i.e. not contiguous)
* and thus, during update processing, subsequent descriptor block addrs
* can't be calculated (e.g. change of buf addr or size or modification to
* set tag&sync, setskipmode or jump cmds).
*/
typedef struct hci1394_xfer_ctl_dma {
/*
* dma descriptor block's bound addr (with "Z" bits set); is used to
* exec path, not link path); Note:("Z" bits)*16 is size of this
* descriptor block; individual component's format depends on IXL cmd
* type;
*/
/*
* kernel virtual (unbound) addr of last component of allocated
* descriptor block; start addr of descriptor block can be calculated
* by adding size of a descriptor block component(16) and subtracting
* ("Z" bits)*16; Note: if ixl cmd is xmit_hdr_only, must add 2*desc
* block component(32), instead;
* used to obtain value for store timestamp cmd; used to set new
* used to set new tag and sync on update calls;
*/
/*
* pointer to the hci1394_buf_info_t structure corresponding to the
* mapped DMA memory into which this descriptor was written. Contains
* calls.
*/
typedef struct hci1394_xfer_ctl {
/* (for pkt=1) */
/* these are allocated */
/*
* IXL Compiler temporary working variables for building IXL context program.
* (i.e. converting IXL program to a list of hci descriptor blocks)
*/
typedef struct hci1394_comp_ixl_vars_s {
/* START RECV ONLY SECTION */
/* END RECV ONLY SECTION */
/* START XMIT ONLY SECTION */
/* END XMIT ONLY SECTION */
/*
* hci1394_comp_ixl_vars.xfer_hci_flush - xfer descriptor block build hci
* flush evaluation flags
*/
/* hci1394_comp_ixl_vars.xfer_state - xfer descriptr block build state values */
/*
* IXL Dynamic Update temporary working variables.
* (used when assessing feasibility of an update based on where the hardware
* is, and for performing the actual update.)
*/
typedef struct hci1394_upd_locn_info {
typedef struct hci1394_ixl_update_vars {
/* currently exec xfer and MAX_LOCN-1 xfers following */
/* hci changing */
/* pkthdrs hci */
int *resultp);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_1394_ADAPTERS_HCI1394_IXL_H */