Deleted Added
full compact
resource_var.h (141963) resource_var.h (189488)
1/*-
2 * Copyright (c) 2005
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2005
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/compat/ndis/resource_var.h 141963 2005-02-16 05:41:18Z wpaul $
32 * $FreeBSD: head/sys/compat/ndis/resource_var.h 189488 2009-03-07 07:26:22Z weongyo $
33 */
34
35#ifndef _RESOURCE_VAR_H_
33 */
34
35#ifndef _RESOURCE_VAR_H_
36#define _RESOURCE_VAR_H_
36#define _RESOURCE_VAR_H_
37
38typedef int cm_resource_type;
39
40struct physaddr {
37
38typedef int cm_resource_type;
39
40struct physaddr {
41 uint64_t np_quad;
41 uint64_t np_quad;
42#ifdef notdef
42#ifdef notdef
43 uint32_t np_low;
44 uint32_t np_high;
43 uint32_t np_low;
44 uint32_t np_high;
45#endif
46};
47
48typedef struct physaddr physaddr;
49
50enum interface_type {
45#endif
46};
47
48typedef struct physaddr physaddr;
49
50enum interface_type {
51 InterfaceTypeUndefined = -1,
52 Internal,
53 Isa,
54 Eisa,
55 MicroChannel,
56 TurboChannel,
57 PCIBus,
58 VMEBus,
59 NuBus,
60 PCMCIABus,
61 CBus,
62 MPIBus,
63 MPSABus,
64 ProcessorInternal,
65 InternalPowerBus,
66 PNPISABus,
67 PNPBus,
68 MaximumInterfaceType
51 InterfaceTypeUndefined = -1,
52 Internal,
53 Isa,
54 Eisa,
55 MicroChannel,
56 TurboChannel,
57 PCIBus,
58 VMEBus,
59 NuBus,
60 PCMCIABus,
61 CBus,
62 MPIBus,
63 MPSABus,
64 ProcessorInternal,
65 InternalPowerBus,
66 PNPISABus,
67 PNPBus,
68 MaximumInterfaceType
69};
70
71typedef enum interface_type interface_type;
72
69};
70
71typedef enum interface_type interface_type;
72
73#define CmResourceTypeNull 0 /* ResType_All or ResType_None (0x0000) */
74#define CmResourceTypePort 1 /* ResType_IO (0x0002) */
75#define CmResourceTypeInterrupt 2 /* ResType_IRQ (0x0004) */
76#define CmResourceTypeMemory 3 /* ResType_Mem (0x0001) */
77#define CmResourceTypeDma 4 /* ResType_DMA (0x0003) */
78#define CmResourceTypeDeviceSpecific 5 /* ResType_ClassSpecific (0xFFFF) */
79#define CmResourceTypeBusNumber 6 /* ResType_BusNumber (0x0006) */
80#define CmResourceTypeMaximum 7
81#define CmResourceTypeNonArbitrated 128 /* Not arbitrated if 0x80 bit set */
82#define CmResourceTypeConfigData 128 /* ResType_Reserved (0x8000) */
83#define CmResourceTypeDevicePrivate 129 /* ResType_DevicePrivate (0x8001) */
84#define CmResourceTypePcCardConfig 130 /* ResType_PcCardConfig (0x8002) */
73#define CmResourceTypeNull 0 /* ResType_All or ResType_None (0x0000) */
74#define CmResourceTypePort 1 /* ResType_IO (0x0002) */
75#define CmResourceTypeInterrupt 2 /* ResType_IRQ (0x0004) */
76#define CmResourceTypeMemory 3 /* ResType_Mem (0x0001) */
77#define CmResourceTypeDma 4 /* ResType_DMA (0x0003) */
78#define CmResourceTypeDeviceSpecific 5 /* ResType_ClassSpecific (0xFFFF) */
79#define CmResourceTypeBusNumber 6 /* ResType_BusNumber (0x0006) */
80#define CmResourceTypeMaximum 7
81#define CmResourceTypeNonArbitrated 128 /* Not arbitrated if 0x80 bit set */
82#define CmResourceTypeConfigData 128 /* ResType_Reserved (0x8000) */
83#define CmResourceTypeDevicePrivate 129 /* ResType_DevicePrivate (0x8001) */
84#define CmResourceTypePcCardConfig 130 /* ResType_PcCardConfig (0x8002) */
85
86enum cm_share_disposition {
87 CmResourceShareUndetermined = 0, /* Reserved */
88 CmResourceShareDeviceExclusive,
89 CmResourceShareDriverExclusive,
90 CmResourceShareShared
91};
92
93typedef enum cm_share_disposition cm_share_disposition;
94
95/* Define the bit masks for Flags when type is CmResourceTypeInterrupt */
96
85
86enum cm_share_disposition {
87 CmResourceShareUndetermined = 0, /* Reserved */
88 CmResourceShareDeviceExclusive,
89 CmResourceShareDriverExclusive,
90 CmResourceShareShared
91};
92
93typedef enum cm_share_disposition cm_share_disposition;
94
95/* Define the bit masks for Flags when type is CmResourceTypeInterrupt */
96
97#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0
98#define CM_RESOURCE_INTERRUPT_LATCHED 1
97#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0
98#define CM_RESOURCE_INTERRUPT_LATCHED 1
99
100/* Define the bit masks for Flags when type is CmResourceTypeMemory */
101
99
100/* Define the bit masks for Flags when type is CmResourceTypeMemory */
101
102#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
103#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
104#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
105#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
102#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
103#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
104#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
105#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
106
106
107#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
108#define CM_RESOURCE_MEMORY_24 0x0010
109#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
107#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
108#define CM_RESOURCE_MEMORY_24 0x0010
109#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
110
111/* Define the bit masks for Flags when type is CmResourceTypePort */
112
110
111/* Define the bit masks for Flags when type is CmResourceTypePort */
112
113#define CM_RESOURCE_PORT_MEMORY 0x0000
114#define CM_RESOURCE_PORT_IO 0x0001
115#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
116#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
117#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
118#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
119#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
120#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
113#define CM_RESOURCE_PORT_MEMORY 0x0000
114#define CM_RESOURCE_PORT_IO 0x0001
115#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
116#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
117#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
118#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
119#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
120#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
121
122/* Define the bit masks for Flags when type is CmResourceTypeDma */
123
121
122/* Define the bit masks for Flags when type is CmResourceTypeDma */
123
124#define CM_RESOURCE_DMA_8 0x0000
125#define CM_RESOURCE_DMA_16 0x0001
126#define CM_RESOURCE_DMA_32 0x0002
127#define CM_RESOURCE_DMA_8_AND_16 0x0004
128#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
129#define CM_RESOURCE_DMA_TYPE_A 0x0010
130#define CM_RESOURCE_DMA_TYPE_B 0x0020
131#define CM_RESOURCE_DMA_TYPE_F 0x0040
124#define CM_RESOURCE_DMA_8 0x0000
125#define CM_RESOURCE_DMA_16 0x0001
126#define CM_RESOURCE_DMA_32 0x0002
127#define CM_RESOURCE_DMA_8_AND_16 0x0004
128#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
129#define CM_RESOURCE_DMA_TYPE_A 0x0010
130#define CM_RESOURCE_DMA_TYPE_B 0x0020
131#define CM_RESOURCE_DMA_TYPE_F 0x0040
132
133struct cm_partial_resource_desc {
134 uint8_t cprd_type;
135 uint8_t cprd_sharedisp;
136 uint16_t cprd_flags;
137 union {
138 struct {
139 physaddr cprd_start;

--- 60 unchanged lines hidden ---
132
133struct cm_partial_resource_desc {
134 uint8_t cprd_type;
135 uint8_t cprd_sharedisp;
136 uint16_t cprd_flags;
137 union {
138 struct {
139 physaddr cprd_start;

--- 60 unchanged lines hidden ---