There were some problems when programming DMA(bas. 8237А) controller in copy memory mode(memory-to-memory). I ask for your help.
I'm trying to copy the physical memory. You must perform the second movement of the memory controller, as the x16 registers and the address range 16M. First, try to run through the first movement of memory controller as a test.
To verify the results of operations and loading initial data used by the mapping of the first page of physical memory by the function(OS: NT, Protected mode, Ring 0) MmMapIoSpace(), but not in this sense.
My Motherboard: Gigabyte GA-8IPE1000MK, CPU: P4
After reviewing the documentation on the controller has written the following code.
LATCHB EQU 83H
CLEAR_F EQU 0CH
CH0_A EQU 00H
CH1_A EQU 02H
CH0_C EQU 01H
CH1_C EQU 03H
MODE EQU 0BH
CMMD EQU 08H
MASKS EQU 0FH
REQ EQU 09H
STATUS EQU 08H
PUSHFD ; Save IF
OUT LATCHB,AL ; Page
OUT CH0_A,AL ; Source: 0x0000
OUT CH1_A,AL ; Destination: 0x000F
OUT CH0_C,AL ; Length
OUT MODE,AL ; Chanel 0, read, increment, blocks.
OUT MODE,AL ; Chanel 1, write, increment, blocks.
OUT CMMD,AL ; Memory-to-memory
OUT MASKS,AL ; Unmask chanels 0, 1
; MOV AL,4
; OUT REQ,AL ; Request to chanel 0.
OUT REQ,AL ; Request to chanel 1.
; IN AL,STATUS
; TEST AL,1
; JZ @B
POPFD ; Restore IF
As a result, this code does not work. The memory is filled with the value 0xFFFF.. The documentation for this mode(memory-to-memory) is described very briefly. Perhaps this mode is not supported..
I would like to see a working example or a detailed description of the programming mode.