• MCA busmaster adapter / DMA transfers

    From Christian Holzapfel@21:1/5 to All on Mon Nov 6 07:09:00 2023
    Imagine you're your favorite mid- to late-90's busmaster capable MCA adapter, let's say a network card.
    You have one single DMA level configured in your POS. It's yours.
    You are on a Type 2 planar (late SCB DMA instead of 16-bit PIO) or more, and you earn your money by writing data from the system memory onto the bus (TX), and also at random times from the bus into system memory (RX).

    You want to transfer data now.
    You knock on the PREEMPT# line, arbitrate, and then you win!
    What do you do to actually transfer the data?

    a) Do you fire an interrupt, wait for the CPU to pick it up, configure the system DMA controller to do the work?
    b) Do you, as a smart-ass busmaster card, instruct the DMA controller to do the work for you?
    c) Anything else?

    And finally, does it matter which direction the data is going?
    Like for RX it's the adapter to initiate the DMA transfer, and for TX it's the CPU? Or is it all the same?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Holzapfel@21:1/5 to All on Mon Nov 6 07:16:15 2023
    By the way, you as the card, you know the virtual source/target addresses for TX/RX in system memory.
    The driver gave it to you earlier.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Louis Ohland@21:1/5 to Christian Holzapfel on Mon Nov 6 13:25:02 2023
    No answers.

    I would think a busmaster [master] would tell the DMA controller that
    there is a DMA transfer. The DMA controller sets up the DMA transfer,
    then the busmaster sends it. The receiving device may be a busmaster
    itself, but for the porpoises of this transfer, it acts as a memory
    slave [to system memory] or I/O slave [to a port or adapter].

    The direction does not change the mechanism, but the MCA will call it M
    or I/O.

    Christian Holzapfel wrote:
    a) Do you fire an interrupt, wait for the CPU to pick it up, configure the system DMA controller to do the work?
    b) Do you, as a smart-ass busmaster card, instruct the DMA controller to do the work for you?
    c) Anything else?

    And finally, does it matter which direction the data is going?
    Like for RX it's the adapter to initiate the DMA transfer, and for TX it's the CPU? Or is it all the same?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)