Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mca.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 Copyright (c) 1991 NCR Corporation 00005 00006 Module Name: 00007 00008 mca.h 00009 00010 Abstract: 00011 00012 This module contains the defines and structure definitions for 00013 Micro Channel machines. 00014 00015 Author: 00016 00017 David Risner (o-ncrdr) 21-Jul-1991 00018 00019 Revision History: 00020 00021 00022 --*/ 00023 00024 #ifndef _MCA_ 00025 #define _MCA_ 00026 00027 00028 00029 00030 00031 // 00032 // Define the DMA page register structure (for 8237 compatibility) 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 // Define DMA 1 address and count structure (for 8237 compatibility) 00052 // 00053 00054 typedef struct _DMA1_ADDRESS_COUNT { 00055 UCHAR DmaBaseAddress; 00056 UCHAR DmaBaseCount; 00057 } DMA1_ADDRESS_COUNT, *PDMA1_ADDRESS_COUNT; 00058 00059 // 00060 // Define DMA 2 address and count structure (for 8237 compatibility) 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 // Define DMA 1 control register structure (for 8237 compatibility) 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 // Define DMA 2 control register structure (for 8237 compatibility) 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; // Offset 0x018 00112 UCHAR DmaFunctionMsb; // Offset 0x019 00113 UCHAR DmaFunctionData; // Offset 0x01a 00114 UCHAR Reserved01; 00115 UCHAR ScbAttentionPort; // Offset 0x01c 00116 UCHAR ScbCommandPort; // Offset 0x01d 00117 UCHAR Reserved02; 00118 UCHAR ScbStatusPort; // Offset 0x01f 00119 } MCA_DMA_CONTROLLER, *PMCA_DMA_CONTROLLER; 00120 00121 // 00122 // Define Programmable Option Select register set 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 // Define Micro Channel i/o address map 00138 // 00139 00140 typedef struct _MCA_CONTROL { 00141 DMA1_CONTROL Dma1BasePort; // Offset 0x000 00142 UCHAR Reserved0[8]; 00143 UCHAR ExtendedDmaBasePort[8]; // Offset 0x018 00144 UCHAR Interrupt1ControlPort0; // Offset 0x020 00145 UCHAR Interrupt1ControlPort1; // Offset 0x021 00146 UCHAR Reserved1[64 - 1]; 00147 UCHAR SystemControlPortB; // Offset 0x061 00148 UCHAR Reserved2[32 - 2]; 00149 DMA_PAGE DmaPageLowPort; // Offset 0x080 00150 UCHAR Reserved3; 00151 UCHAR CardSelectedFeedback; // Offset 0x091 00152 UCHAR SystemControlPortA; // Offset 0x092 00153 UCHAR Reserved4; 00154 UCHAR SystemBoardSetup; // Offset 0x094 00155 UCHAR Reserved5; 00156 UCHAR AdapterSetup; // Offset 0x096 00157 UCHAR AdapterSetup2; // Offset 0x097 00158 UCHAR Reserved7[8]; 00159 UCHAR Interrupt2ControlPort0; // Offset 0x0a0 00160 UCHAR Interrupt2ControlPort1; // Offset 0x0a1 00161 UCHAR Reserved8[32-2]; 00162 DMA2_CONTROL Dma2BasePort; // Offset 0x0c0 00163 UCHAR Reserved9[32]; 00164 PROGRAMMABLE_OPTION_SELECT Pos; // Offset 0x100 00165 } MCA_CONTROL, *PMCA_CONTROL; 00166 00167 // 00168 // Define POS adapter setup equates for use with AdapterSetup field above 00169 // 00170 00171 #define MCA_ADAPTER_SETUP_ON 0x008 00172 #define MCA_ADAPTER_SETUP_OFF 0x000 00173 00174 // 00175 // Define DMA Extended Function register 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 // Define Command values 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 // Define DMA Extended Mode register 00202 // 00203 00204 typedef struct _DMA_EXTENDED_MODE { 00205 UCHAR ProgrammedIo : 1; // 0 = do not use programmed i/o address 00206 UCHAR AutoInitialize : 1; 00207 UCHAR DmaOpcode : 1; // 0 = verify memory, 1 = data transfer 00208 UCHAR TransferDirection : 1; // 0 = read memory, 1 = write memory 00209 UCHAR Reserved1 : 2; 00210 UCHAR DmaWidth : 1; // 0 = 8bit, 1 = 16bit 00211 UCHAR Reserved2 : 1; 00212 } DMA_EXTENDED_MODE, *PDMA_EXTENDED_MODE; 00213 00214 // 00215 // DMA Extended Mode equates for use with the _DMA_EXTENDED_MODE structure. 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 // DMA mode option definitions 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 // DMA extended mode constants 00236 // 00237 00238 #define MAX_MCA_DMA_CHANNEL_NUMBER 0x07 // maximum MCA DMA channel number 00239 #endif

Generated on Sat May 15 19:40:42 2004 for test by doxygen 1.3.7