Skip to content

Commit 0227fc0

Browse files
author
Ian Seyler
committed
Add code for updating RX descriptors
1 parent 2ef6732 commit 0227fc0

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/drivers/net/i8254x.asm

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,25 +221,22 @@ net_i8254x_reset_nextdesc:
221221
; OUT: Nothing
222222
net_i8254x_config:
223223
push rdi
224-
push rsi
225224
push rcx
226225
push rax
227226

228-
; mov rsi, [rdx+nt_base]
229-
; mov rdi, [rdx+nt_rx_desc]
230-
; mov ecx, i8254x_MAX_DESC
231-
;
232-
;next_record:
233-
; stosq
234-
; add rdi, 8
235-
; add rax, 2048
236-
; dec ecx
237-
; cmp ecx, 0
238-
; jnz next_record
227+
mov rdi, [rdx+nt_rx_desc]
228+
mov ecx, i8254x_MAX_DESC
229+
call os_virt_to_phys
230+
next_record:
231+
stosq
232+
add rdi, 8
233+
add rax, 2048
234+
dec ecx
235+
cmp ecx, 0
236+
jnz next_record
239237

240238
pop rax
241239
pop rcx
242-
pop rsi
243240
pop rdi
244241
ret
245242
; -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)