2 * $FreeBSD: src/sys/compat/ndis/resource_var.h,v 1.2 2004/03/29 02:15:29 wpaul Exp $
3 * $DragonFly: src/sys/emulation/ndis/resource_var.h,v 1.1 2004/07/29 20:51:34 dillon Exp $
6 typedef int cm_resource_type
;
12 typedef struct physaddr physaddr
;
15 InterfaceTypeUndefined
= -1,
35 typedef enum interface_type interface_type
;
37 #define CmResourceTypeNull 0 /* ResType_All or ResType_None (0x0000) */
38 #define CmResourceTypePort 1 /* ResType_IO (0x0002) */
39 #define CmResourceTypeInterrupt 2 /* ResType_IRQ (0x0004) */
40 #define CmResourceTypeMemory 3 /* ResType_Mem (0x0001) */
41 #define CmResourceTypeDma 4 /* ResType_DMA (0x0003) */
42 #define CmResourceTypeDeviceSpecific 5 /* ResType_ClassSpecific (0xFFFF) */
43 #define CmResourceTypeBusNumber 6 /* ResType_BusNumber (0x0006) */
44 #define CmResourceTypeMaximum 7
45 #define CmResourceTypeNonArbitrated 128 /* Not arbitrated if 0x80 bit set */
46 #define CmResourceTypeConfigData 128 /* ResType_Reserved (0x8000) */
47 #define CmResourceTypeDevicePrivate 129 /* ResType_DevicePrivate (0x8001) */
48 #define CmResourceTypePcCardConfig 130 /* ResType_PcCardConfig (0x8002) */
50 enum cm_share_disposition
{
51 CmResourceShareUndetermined
= 0, /* Reserved */
52 CmResourceShareDeviceExclusive
,
53 CmResourceShareDriverExclusive
,
57 typedef enum cm_share_disposition cm_share_disposition
;
59 /* Define the bit masks for Flags when type is CmResourceTypeInterrupt */
61 #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0
62 #define CM_RESOURCE_INTERRUPT_LATCHED 1
64 /* Define the bit masks for Flags when type is CmResourceTypeMemory */
66 #define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
67 #define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
68 #define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
69 #define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
71 #define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
72 #define CM_RESOURCE_MEMORY_24 0x0010
73 #define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
75 /* Define the bit masks for Flags when type is CmResourceTypePort */
77 #define CM_RESOURCE_PORT_MEMORY 0x0000
78 #define CM_RESOURCE_PORT_IO 0x0001
79 #define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
80 #define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
81 #define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
82 #define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
83 #define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
84 #define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
86 /* Define the bit masks for Flags when type is CmResourceTypeDma */
88 #define CM_RESOURCE_DMA_8 0x0000
89 #define CM_RESOURCE_DMA_16 0x0001
90 #define CM_RESOURCE_DMA_32 0x0002
91 #define CM_RESOURCE_DMA_8_AND_16 0x0004
92 #define CM_RESOURCE_DMA_BUS_MASTER 0x0008
93 #define CM_RESOURCE_DMA_TYPE_A 0x0010
94 #define CM_RESOURCE_DMA_TYPE_B 0x0020
95 #define CM_RESOURCE_DMA_TYPE_F 0x0040
97 struct cm_partial_resource_desc
{
99 uint8_t cprd_sharedisp
;
112 uint32_t cprd_vector
;
113 uint32_t cprd_affinity
;
125 uint32_t cprd_data
[3];
128 uint32_t cprd_datasize
;
135 typedef struct cm_partial_resource_desc cm_partial_resource_desc
;
137 struct cm_partial_resource_list
{
138 uint16_t cprl_version
;
139 uint16_t cprl_revision
;
141 cm_partial_resource_desc cprl_partial_descs
[1];
144 typedef struct cm_partial_resource_list cm_partial_resource_list
;
146 struct cm_full_resource_list
{
147 interface_type cfrl_type
;
148 uint32_t cfrl_busnum
;
149 cm_partial_resource_desc cfrl_partiallist
;
152 typedef struct cm_full_resource_list cm_full_resource_list
;
154 struct cm_resource_list
{
156 cm_full_resource_list crl_rlist
;
159 typedef struct cm_resource_list cm_resource_list
;
161 typedef cm_partial_resource_list ndis_resource_list
;