00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef _MCA_
00025
#define _MCA_
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
typedef struct _DMA_PAGE{
00036 UCHAR
Reserved1;
00037 UCHAR
Channel2;
00038 UCHAR
Channel3;
00039 UCHAR
Channel1;
00040 UCHAR
Reserved2[3];
00041 UCHAR
Channel0;
00042 UCHAR
Reserved3;
00043 UCHAR
Channel6;
00044 UCHAR
Channel7;
00045 UCHAR
Channel5;
00046 UCHAR
Reserved4[3];
00047 UCHAR
RefreshPage;
00048 }
DMA_PAGE, *
PDMA_PAGE;
00049
00050
00051
00052
00053
00054
typedef struct _DMA1_ADDRESS_COUNT {
00055 UCHAR DmaBaseAddress;
00056 UCHAR DmaBaseCount;
00057 }
DMA1_ADDRESS_COUNT, *
PDMA1_ADDRESS_COUNT;
00058
00059
00060
00061
00062
00063
typedef struct _DMA2_ADDRESS_COUNT {
00064 UCHAR
DmaBaseAddress;
00065 UCHAR
Reserved1;
00066 UCHAR
DmaBaseCount;
00067 UCHAR
Reserved2;
00068 }
DMA2_ADDRESS_COUNT, *
PDMA2_ADDRESS_COUNT;
00069
00070
00071
00072
00073
00074
typedef struct _DMA1_CONTROL {
00075
DMA1_ADDRESS_COUNT DmaAddressCount[4];
00076 UCHAR
DmaStatus;
00077 UCHAR
DmaRequest;
00078 UCHAR
SingleMask;
00079 UCHAR
Mode;
00080 UCHAR
ClearBytePointer;
00081 UCHAR
MasterClear;
00082 UCHAR
ClearMask;
00083 UCHAR
AllMask;
00084 }
DMA1_CONTROL, *
PDMA1_CONTROL;
00085
00086
00087
00088
00089
00090
typedef struct _DMA2_CONTROL {
00091
DMA2_ADDRESS_COUNT DmaAddressCount[4];
00092 UCHAR
DmaStatus;
00093 UCHAR
Reserved1;
00094 UCHAR
DmaRequest;
00095 UCHAR
Reserved2;
00096 UCHAR
SingleMask;
00097 UCHAR
Reserved3;
00098 UCHAR
Mode;
00099 UCHAR
Reserved4;
00100 UCHAR
ClearBytePointer;
00101 UCHAR
Reserved5;
00102 UCHAR
MasterClear;
00103 UCHAR
Reserved6;
00104 UCHAR
ClearMask;
00105 UCHAR
Reserved7;
00106 UCHAR
AllMask;
00107 UCHAR
Reserved8;
00108 }
DMA2_CONTROL, *
PDMA2_CONTROL;
00109
00110 typedef struct _MCA_DMA_CONTROLLER {
00111 UCHAR
DmaFunctionLsb;
00112 UCHAR
DmaFunctionMsb;
00113 UCHAR
DmaFunctionData;
00114 UCHAR
Reserved01;
00115 UCHAR
ScbAttentionPort;
00116 UCHAR
ScbCommandPort;
00117 UCHAR
Reserved02;
00118 UCHAR
ScbStatusPort;
00119 }
MCA_DMA_CONTROLLER, *
PMCA_DMA_CONTROLLER;
00120
00121
00122
00123
00124
00125 typedef struct _PROGRAMMABLE_OPTION_SELECT {
00126 UCHAR
AdapterIdLsb;
00127 UCHAR
AdapterIdMsb;
00128 UCHAR
OptionSelectData1;
00129 UCHAR
OptionSelectData2;
00130 UCHAR
OptionSelectData3;
00131 UCHAR
OptionSelectData4;
00132 UCHAR
SubaddressExtensionLsb;
00133 UCHAR
SubaddressExtensionMsb;
00134 }
PROGRAMMABLE_OPTION_SELECT, *
PPROGRAMMABLE_OPTION_SELECT;
00135
00136
00137
00138
00139
00140 typedef struct _MCA_CONTROL {
00141 DMA1_CONTROL Dma1BasePort;
00142 UCHAR
Reserved0[8];
00143 UCHAR
ExtendedDmaBasePort[8];
00144 UCHAR
Interrupt1ControlPort0;
00145 UCHAR
Interrupt1ControlPort1;
00146 UCHAR
Reserved1[64 - 1];
00147 UCHAR
SystemControlPortB;
00148 UCHAR
Reserved2[32 - 2];
00149 DMA_PAGE DmaPageLowPort;
00150 UCHAR
Reserved3;
00151 UCHAR
CardSelectedFeedback;
00152 UCHAR
SystemControlPortA;
00153 UCHAR
Reserved4;
00154 UCHAR
SystemBoardSetup;
00155 UCHAR
Reserved5;
00156 UCHAR
AdapterSetup;
00157 UCHAR
AdapterSetup2;
00158 UCHAR
Reserved7[8];
00159 UCHAR
Interrupt2ControlPort0;
00160 UCHAR
Interrupt2ControlPort1;
00161 UCHAR
Reserved8[32-2];
00162 DMA2_CONTROL Dma2BasePort;
00163 UCHAR
Reserved9[32];
00164 PROGRAMMABLE_OPTION_SELECT Pos;
00165 }
MCA_CONTROL, *
PMCA_CONTROL;
00166
00167
00168
00169
00170
00171 #define MCA_ADAPTER_SETUP_ON 0x008
00172 #define MCA_ADAPTER_SETUP_OFF 0x000
00173
00174
00175
00176
00177
00178 typedef struct _DMA_EXTENDED_FUNCTION {
00179 UCHAR
ChannelNumber : 3;
00180 UCHAR
Reserved : 1;
00181 UCHAR
Command : 4;
00182 }
DMA_EXTENDED_FUNCTION, *
PDMA_EXTENDED_FUNCTION;
00183
00184
00185
00186
00187
00188 #define WRITE_IO_ADDRESS 0x00 // write I/O address reg
00189 #define WRITE_MEMORY_ADDRESS 0x20 // write memory address reg
00190 #define READ_MEMORY_ADDRESS 0x30 // read memory address reg
00191 #define WRITE_TRANSFER_COUNT 0x40 // write transfer count reg
00192 #define READ_TRANSFER_COUNT 0x50 // read transfer count reg
00193 #define READ_STATUS 0x60 // read status register
00194 #define WRITE_MODE 0x70 // write mode register
00195 #define WRITE_ARBUS 0x80 // write arbus register
00196 #define SET_MASK_BIT 0x90 // set bit in mask reg
00197 #define CLEAR_MASK_BIT 0xa0 // clear bit in mask reg
00198 #define MASTER_CLEAR 0xd0 // master clear
00199
00200
00201
00202
00203
00204
typedef struct _DMA_EXTENDED_MODE {
00205 UCHAR
ProgrammedIo : 1;
00206 UCHAR
AutoInitialize : 1;
00207 UCHAR
DmaOpcode : 1;
00208 UCHAR
TransferDirection : 1;
00209 UCHAR
Reserved1 : 2;
00210 UCHAR
DmaWidth : 1;
00211 UCHAR
Reserved2 : 1;
00212 }
DMA_EXTENDED_MODE, *
PDMA_EXTENDED_MODE;
00213
00214
00215
00216
00217
00218 #define DMA_EXT_USE_PIO 0x01
00219 #define DMA_EXT_NO_PIO 0x00
00220 #define DMA_EXT_VERIFY 0x00
00221 #define DMA_EXT_DATA_XFER 0x01
00222 #define DMA_EXT_WIDTH_8_BIT 0x00
00223 #define DMA_EXT_WIDTH_16_BIT 0x01
00224
00225
00226
00227
00228
00229 #define DMA_MODE_READ 0x00 // read data into memory
00230 #define DMA_MODE_WRITE 0x08 // write data from memory
00231 #define DMA_MODE_VERIFY 0x00 // verify data
00232 #define DMA_MODE_TRANSFER 0x04 // transfer data
00233
00234
00235
00236
00237
00238 #define MAX_MCA_DMA_CHANNEL_NUMBER 0x07 // maximum MCA DMA channel number
00239
#endif