Re DMA:
>
> There are two types. DMA-controller based and Bus-master DMA.
>
> The controller based DMA uses a DMA controller that is near to to the
> CPU (either in the CPU chip or in a chip set). It uses only few lines to
> the peripheral. The standard PC chip sets have several DMA controllers,
> one of which is connected to the printer port, when setting same in the
> appropriate mode.
>
> Bus master DMA is completely done by the peripheral hardware. the CPU's
> memory controller is notified by some lines about DMA proceedings to
> ensure correct timing and cache invalidating.
>
> -Michael
Thanks. But I still confuse. What's happen if I want to build a buffered block PIO mode IDE controller? Am I supposed to map the register and buffer memory of the IDE controller to the main memory map and allow the DMA of the CPU to handle the transfer just like the "DMA-controller based" type?
On the other hand, what is the DMA mode of the harddisk? Does it work like what you mentioned "Bus-master DMA" type and it will handle data transfer?
Eric