Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pci / n8 / include_private / n8_device_info.h
blobc5b03edca25300ec02578e14f775f41b0b993285
1 /*-
2 * Copyright (C) 2001-2003 by NBMK Encryption Technologies.
3 * All rights reserved.
5 * NBMK Encryption Technologies provides no support of any kind for
6 * this software. Questions or concerns about it may be addressed to
7 * the members of the relevant open-source community at
8 * <tech-crypto@netbsd.org>.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are
12 * met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer in the documentation and/or other materials provided
20 * with the distribution.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /*****************************************************************************
36 * @(#) n8_device_info.h 1.22@(#)
37 *****************************************************************************/
39 /*****************************************************************************/
40 /** @file n8_device_info.h
41 * @brief NSP2000 Device Driver IOCtl resources
43 * This file contains all data structures, constants, and prototypes used by
44 * the IOCtl handler of the NSP2000 Device Driver.
46 *****************************************************************************/
48 /*****************************************************************************
49 * Revision history:
50 * 05/08/03 brr Add user pool count to driver info.
51 * 04/21/03 brr Added support for multiple memory banks.
52 * 04/01/03 brr Include n8_sdk_config instead of n8_driver_parms.
53 * 10/22/02 brr Added N8_Open_t enums & mode to NSPDevice_t.
54 * 09/25/02 brr Eliminate event wait types.
55 * 09/18/02 brr Added strutures to return data needed by diagnostics.
56 * 06/12/02 hml Added field for the session id to NSPdriverInfo_t.
57 * 06/10/02 hml Added fields for request bank and request pool to
58 * NSPdriverInfo_t.
59 * 05/31/02 brr Removed all references to the shared memory pointer.
60 * 05/07/02 brr Added bncAddress to NSPdriverInfo_t.
61 * 02/25/02 brr Reworked so N8_GetConfig returns all driver info in a single
62 * call.
63 * 02/18/02 brr Removed oboslete context memory references.
64 * 01/31/02 brr Added shared memory pointer so ISR knows the data type.
65 * 01/21/02 msz Added event wait type information.
66 * 01/21/02 brr Modified to remove the mmap on each buffer on allocation.
67 * 12/06/01 brr Correct context memory detection for NSP2000.
68 * 11/11/01 mmd Original version.
69 ****************************************************************************/
72 #ifndef N8_DEVICE_INFO_H
73 #define N8_DEVICE_INFO_H
75 #if 0
76 #include "n8_common.h"
77 #include "n8_sdk_config.h"
78 #endif
79 #include "n8_pub_common.h"
81 typedef enum
83 N8_OPEN_UTIL = 0,
84 N8_OPEN_APP = 1,
85 N8_OPEN_DIAG = 2
86 } N8_Open_t;
88 typedef struct
90 unsigned short HardwareVersion; /* PCI Device ID */
91 unsigned char RevisionID; /* PCI Revision ID */
92 N8_Hardware_t hardwareType; /* Device type for this chip */
93 unsigned long RNqueueSize; /* Size of RN queue in (entries) */
94 unsigned long PKqueueSize; /* Size of PK queue in (entries) */
95 unsigned long EAqueueSize; /* Size of EA queue in (entries) */
96 unsigned long SKS_size; /* Size of SKS in bytes */
97 unsigned long contextMemsize; /* Size of context memory (bytes)*/
98 } NSPdevice_t;
100 typedef struct
102 uint32_t requestPoolSize; /* Size of memory pool for this
103 process. */
104 uint32_t requestPoolBase; /* Physical base address of the */
105 /* request pool for this process */
106 } NSPrequestPool_t;
108 typedef struct
110 uint32_t numChips; /* Number of NSP2000 detected by */
111 /* the driver upon installation. */
112 uint32_t driverVersion; /* SW version of this driver. */
113 uint32_t eaMemorySize; /* Size of preallocated EA memory*/
114 uint32_t eaMemoryBase; /* Physical base address of the */
115 /* preallocated EA kernel memory.*/
116 uint32_t pkMemorySize; /* Size of preallocated PK memory*/
117 uint32_t pkMemoryBase; /* Physical base address of the */
118 /* preallocated PK kernel memory.*/
119 uint32_t userPools; /* Number of user pools allocated*/
120 /* by the driver. */
121 unsigned long bncAddress; /* Physical address of BNC const.*/
122 unsigned long sessionID; /* The session ID */
123 int mode;
125 NSPdevice_t chipInfo[MAX_NSP_INSTANCES];
126 } NSPdriverInfo_t;
128 typedef struct
130 uint32_t chip; /* Chip number for requested info */
131 uint32_t registerSize; /* Size of register address space */
132 uint32_t registerBase; /* Physical base address of the */
133 /* NSP registers. */
134 uint32_t eaQueueSize; /* Size of EA queue (in bytes) */
135 uint32_t eaQueueBase; /* Physical base address of the */
136 /* EA queue. */
137 uint32_t pkQueueSize; /* Size of PK queue (in bytes) */
138 uint32_t pkQueueBase; /* Physical base address of the */
139 /* PK queue. */
140 uint32_t rnQueueSize; /* Size of RN queue (in bytes) */
141 uint32_t rnQueueBase; /* Physical base address of the */
142 /* RN queue. */
143 } NSPdiagInfo_t;
145 #endif /* N8_DEVICE_INFO_H */