Changeset 46499 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 11, 2013 3:54:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevDMA.cpp
r45025 r46499 170 170 CTL_W_CLRMASK, /* Clear all DRQ mask bits. */ 171 171 CTL_W_MASK /* Write all DRQ mask bits. */ 172 }; 173 174 /* DMA transfer modes. */ 175 enum { 176 DMODE_DEMAND, /* Demand transfer mode. */ 177 DMODE_SINGLE, /* Single transfer mode. */ 178 DMODE_BLOCK, /* Block transfer mode. */ 179 DMODE_CASCADE /* Cascade mode. */ 172 180 }; 173 181 … … 541 549 /* Addresses and counts are shifted for 16-bit channels. */ 542 550 start_cnt = ch->u16CurCount << dc->is16bit; 551 /* NB: The device is responsible for examining the DMA mode and not 552 * transferring more than it should if auto-init is not in use. 553 */ 543 554 end_cnt = ch->pfnXferHandler(pThis->pDevIns, ch->pvUser, (ctlidx * 4) + chidx, 544 555 start_cnt, (ch->u16BaseCount + 1) << dc->is16bit); 545 556 ch->u16CurCount = end_cnt >> dc->is16bit; 557 /* Set the TC (Terminal Count) bit if transfer was completed. */ 558 if (ch->u16CurCount == ch->u16BaseCount + 1) 559 switch (opmode) 560 { 561 case DMODE_DEMAND: 562 case DMODE_SINGLE: 563 case DMODE_BLOCK: 564 dc->u8Status |= RT_BIT(chidx); 565 Log3(("TC set for DMA channel %d\n", (ctlidx * 4) + chidx)); 566 break; 567 default: 568 break; 569 } 546 570 Log3(("DMA position %d, size %d\n", end_cnt, (ch->u16BaseCount + 1) << dc->is16bit)); 547 571 }
Note:
See TracChangeset
for help on using the changeset viewer.