- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
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 0CHCH0_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
TRANSMIT PROC
PUSHFD ; Save IFCLI
XOR AX,AX
OUT LATCHB,AL ; Page
OUT CLEAR_F,AL
OUT CH0_A,AL ; Source: 0x0000
OUT CH0_A,AL MOV AL,16 OUT CH1_A,AL ; Destination: 0x000F
XOR AX,AX OUT CH1_A,AL MOV AL,32 OUT CH0_C,AL ; Length XOR AX,AX OUT CH0_C,AL
MOV AL,32
OUT CH1_C,ALXOR AX,AX
OUT CH1_C,AL
MOV AL,88H
OUT MODE,AL ; Chanel 0, read, increment, blocks.MOV AL,85H OUT MODE,AL ; Chanel 1, write, increment, blocks.
MOV AL,1 OUT CMMD,AL ; Memory-to-memory
MOV AL,0CH OUT MASKS,AL ; Unmask chanels 0, 1
; MOV AL,4 ; OUT REQ,AL ; Request to chanel 0.
MOV AL,5 OUT REQ,AL ; Request to chanel 1.
@@: ; IN AL,STATUS ; TEST AL,1 ; JZ @B POPFD ; Restore IF
RET TRANSMIT ENDP
;
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.
Thank.
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page