Changeset 71214 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 5, 2018 8:31:03 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevDMA.cpp
r71212 r71214 191 191 192 192 /* Convert DMA channel number (0-7) to controller number (0-1). */ 193 #define DMACH2C(c) (c < 4 ? 0 : 1)193 #define DMACH2C(c) (c < 4 ? 0 : 1) 194 194 195 195 #ifdef LOG_ENABLED 196 static int const dmaChannelMap[8] = {-1, 2, 3, 1, -1, -1, -1, 0};196 static int const g_aiDmaChannelMap[8] = {-1, 2, 3, 1, -1, -1, -1, 0}; 197 197 /* Map a DMA page register offset (0-7) to channel index (0-3). */ 198 # define DMAPG2CX(c) (dmaChannelMap[c])198 # define DMAPG2CX(c) (g_aiDmaChannelMap[c]) 199 199 #endif 200 200 201 static int const dmaMapChannel[4] = {7, 3, 1, 2}; 201 #ifdef IN_RING3 202 static int const g_aiDmaMapChannel[4] = {7, 3, 1, 2}; 202 203 /* Map a channel index (0-3) to DMA page register offset (0-7). */ 203 # define DMACX2PG(c) (dmaMapChannel[c])204 # define DMACX2PG(c) (g_aiDmaMapChannel[c]) 204 205 /* Map a channel number (0-7) to DMA page register offset (0-7). */ 205 #define DMACH2PG(c) (dmaMapChannel[c & 3]) 206 # define DMACH2PG(c) (g_aiDmaMapChannel[c & 3]) 207 #endif 206 208 207 209 /* Test the decrement bit of mode register. */ 208 #define IS_MODE_DEC(c) ((c) & 0x20)210 #define IS_MODE_DEC(c) ((c) & 0x20) 209 211 /* Test the auto-init bit of mode register. */ 210 #define IS_MODE_AI(c) ((c) & 0x10)212 #define IS_MODE_AI(c) ((c) & 0x10) 211 213 /* Extract the transfer type bits of mode register. */ 212 #define GET_MODE_XTYP(c) (((c) & 0x0c) >> 2)214 #define GET_MODE_XTYP(c) (((c) & 0x0c) >> 2) 213 215 214 216
Note:
See TracChangeset
for help on using the changeset viewer.