dma confusion

caustikcaustik Member Posts: 32 ■■□□□□□□□□
came across this question?

"Which DMA channel is used by the first Direct Memory Access controller?"
answer was channel 4.

which dma does the second use? or do they both use 4?

there are 2 right ? one for 0-3 and one for 4-7 cascading at 0 & 4

Comments

  • PlantwizPlantwiz Mod Posts: 5,057 Mod
    Hopefully, I won't add to your confusion :)

    DMA = Direct Memory Access (which you may already understand).

    So, DMA allows devices to bypass the CPU and transmit information between the RAM and Device more quickly than had it also needed to go through the CPU.

    8-Bit ISA Bus DMA channels:
    There are 4 channels 0-4. Three of the channels are available to the expansion slots. However the HDD and FDD usually occupy two so that only leaves one available.

    DMA
    0 - Dynamic RAM Refresh No-bus
    1 - Open 8-bit slot
    2 - FD Controller 8-bit slot
    3 - HD Controller 8-bit slot

    However, most of us barely recall the days when there were only 4 channels as the 16-Bit ISA Bus was came about during the 286 days. Like IRQ (assuming you understand IRQ), DMA cascades into a second DMA creating 8 channels but only leaving 7 available.

    So, The first controller (0-3) has the second controller (5-7) cascaded to it via channel 4.

    0-3 use an 8bit transfer while 5-7 use a 16bit.

    DMA are for ISA cards. PCI cards don't use these channels though some may emulate the use of the DMA channels (like sound cards using old software).


    DMA 1 and 5 - mostly used by ISA Sound Cards or newer PCI sound cards emulate an older card to be backward compatible.
    DMA 2 is the 'standard' DMA channel used by all systems and typically (universally) used by the Floppy Controller
    DMA 3 - Parallel ports using EPP/ECP
    DMA 4 is not usable and will not appear in bus slots


    Anyway, you won't hear of many DMA conflict (compared with IRQ conflicts) as there just are not that many items that can use DMA, but you'll want to be aware of it as a possibilty.

    Frankly, I don't think I every recall a system from Pentium or higher that ever had a DMA issue (????Thinking, but not recalling any). Possibly an older system running ISA Sound, NIC and SCSI might have had a slight problem now-and-again. DMA can be shared, but the devices like a SCSI Tape Drive and a NIC if they shared the same channel couldn't function simultaneously. (like if you wanted to run the tape drive for backup, you wouldn't be able to use the network connection).



    SO, to bring myself back to your question:

    0-3 is the first controller. To allow 8 channels (or 7) the second controller is cascaded (piggy-backed) on with the first via the first available channel of the second DMA = 4.
    that is worded poorly icon_redface.gif

    DMA as a whole is 8 channels, but it really cannot be 8 so one channel is lost to bridge the two. Kind of like stringing a bunch of routers together... You start with 4 ports and you need more, so you add another 4 port however, 1 port is needed to connect the two togther (uplink) so now you have 7.
    Plantwiz
    _____
    "Grammar and spelling aren't everything, but this is a forum, not a chat room. You have plenty of time to spell out the word "you", and look just a little bit smarter." by Phaideaux

    ***I'll add you can Capitalize the word 'I' to show a little respect for yourself too.

    'i' before 'e' except after 'c'.... weird?
  • caustikcaustik Member Posts: 32 ■■□□□□□□□□
    thnx that helped

    just didnt get how the first controller was connected to the second via channel 4 if it only handles 0-3

    i found good explaination here: http://members.iweb.net.au/~pstorr/pcbook/book2/dma.htm

    "The second 8237 device is cascaded to the first through channel 4 (ie the second chip's channel 0) leaving channels 5,6 and 7 available. The second 8237 device actually connects to the processors DMA input line and the first device (the one that provides DMA0 to DMA3) connects into the DMA0 of the second device."

    so the HRQ line(on first chip) is wired to channel 4 (0 on second chip) wich is why/how the first controller uses it
  • PlantwizPlantwiz Mod Posts: 5,057 Mod
    My pleasure. So long as you understand it or have a better understanding to continue to research it - that is all that matters :)

    If you need anything else - just drop a note (post) ;)
    Plantwiz
    _____
    "Grammar and spelling aren't everything, but this is a forum, not a chat room. You have plenty of time to spell out the word "you", and look just a little bit smarter." by Phaideaux

    ***I'll add you can Capitalize the word 'I' to show a little respect for yourself too.

    'i' before 'e' except after 'c'.... weird?
Sign In or Register to comment.