Rev 2455 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2455 | Rev 5057 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ja .use_second_dma_controller |
15 | ja .use_second_dma_controller |
16 | jb @f |
16 | jb @f |
17 | .dma_setup_error: |
17 | .dma_setup_error: |
18 | if DEBUG |
18 | if DEBUG |
19 | mov esi, msgErrDMAsetup |
19 | mov esi, msgErrDMAsetup |
20 | call SysMsgBoardStr |
20 | invoke SysMsgBoardStr |
21 | end if |
21 | end if |
22 | mov dword[esp], START.stop |
22 | mov dword[esp], START.stop |
23 | ret |
23 | ret |
24 | @@: |
24 | @@: |
25 | if use_cli_sti |
25 | if use_cli_sti |
Line 31... | Line 31... | ||
31 | out 0xC, al;clear byte pointer flip-flop register |
31 | out 0xC, al;clear byte pointer flip-flop register |
Line 32... | Line 32... | ||
32 | 32 | ||
33 | lea eax, [ebx+0x58];auto-init mode for channel (ebx) |
33 | lea eax, [ebx+0x58];auto-init mode for channel (ebx) |
Line -... | Line 34... | ||
- | 34 | out 0xB, al;DMA channel 0-3 mode register |
|
- | 35 | ||
- | 36 | mov eax, [SB16Buffer] |
|
- | 37 | invoke GetPhysAddr |
|
- | 38 | mov ecx, eax |
|
34 | out 0xB, al;DMA channel 0-3 mode register |
39 | shr eax, 16 |
35 | - | ||
36 | movzx edx, byte[ebx+dma_table];page register |
40 | |
Line 37... | Line 41... | ||
37 | mov al, DMAPage |
41 | movzx edx, byte[ebx+dma_table];page register |
Line 38... | Line 42... | ||
38 | out dx, al |
42 | out dx, al |
39 | 43 | ||
Line 40... | Line 44... | ||
40 | lea edx, [ebx*2];DMA channel 0-3 base address |
44 | lea edx, [ebx*2];DMA channel 0-3 base address |
41 | 45 | ||
Line 42... | Line 46... | ||
42 | mov al, 0;LSB is 0 |
46 | mov al, cl;LSB |
Line 43... | Line 47... | ||
43 | out dx, al |
47 | out dx, al |
Line 76... | Line 80... | ||
76 | out 0xD8, al;clear byte pointer flip-flop register |
80 | out 0xD8, al;clear byte pointer flip-flop register |
Line 77... | Line 81... | ||
77 | 81 | ||
78 | lea eax, [ebx+0x58];auto-init mode for channel (ebx+4) |
82 | lea eax, [ebx+0x58];auto-init mode for channel (ebx+4) |
Line -... | Line 83... | ||
- | 83 | out 0xD6, al;DMA channel 4-7 mode register |
|
- | 84 | ||
- | 85 | mov eax, [SB16Buffer] |
|
- | 86 | invoke GetPhysAddr |
|
- | 87 | mov ecx, eax |
|
- | 88 | shr eax, 16 |
|
79 | out 0xD6, al;DMA channel 4-7 mode register |
89 | shr ecx, 1 ; 16-bit DMA takes offset in words |
80 | - | ||
81 | movzx edx, byte[ebx+dma_table+4];page register |
90 | |
Line 82... | Line 91... | ||
82 | mov al, DMAPage |
91 | movzx edx, byte[ebx+dma_table+4];page register |
Line 83... | Line 92... | ||
83 | out dx, al |
92 | out dx, al |
84 | 93 | ||
Line 85... | Line 94... | ||
85 | lea edx, [ebx*4+0xC0];DMA channel 4-7 base address |
94 | lea edx, [ebx*4+0xC0];DMA channel 4-7 base address |
86 | 95 | ||
Line 87... | Line 96... | ||
87 | mov al, 0;LSB is 0 ;for 16bit DMA this contains |
96 | mov al, cl;LSB;for 16bit DMA this contains |
88 | out dx, al;A1-A8 lines of address bus, A0 is zero |
97 | out dx, al;A1-A8 lines of address bus, A0 is zero |