File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ net_i8254x_init:
8181 mov [ rdi + nt_transmit ], rax
8282 mov rax , net_i8254x_poll
8383 mov [ rdi + nt_poll ], rax
84+ mov rax , i8254x_MAX_DESC / 2
85+ mov [ rdi + 0x70 ], rax
8486
8587net_i8254x_init_error:
8688
@@ -339,10 +341,12 @@ net_i8254x_poll:
339341 and eax , i8254x_MAX_DESC - 1
340342 mov [ rdx + nt_rx_head ], eax ; Set rx_lasthead
341343
342- mov eax , [ rsi + i8254x_RDT ] ; Read the current Receive Descriptor Tail
344+ ; mov eax, [rsi+i8254x_RDT] ; Read the current Receive Descriptor Tail
345+ mov rax , [ rdx + 0x70 ]
343346 add eax , 1 ; Add 1 to the Receive Descriptor Tail
344347 and eax , i8254x_MAX_DESC - 1
345348 mov [ rsi + i8254x_RDT ], eax ; Write the updated Receive Descriptor Tail
349+ mov [ rdx + 0x70 ], rax
346350
347351net_i8254x_poll_end:
348352 pop rax
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ net_i8257x_init:
8484 mov [ rdi + nt_transmit ], rax
8585 mov rax , net_i8257x_poll
8686 mov [ rdi + nt_poll ], rax
87+ mov rax , i8257x_MAX_DESC / 2
88+ mov [ rdi + 0x70 ], rax
8789
8890net_i8257x_init_error:
8991
@@ -341,10 +343,12 @@ net_i8257x_poll:
341343 and eax , i8257x_MAX_DESC - 1
342344 mov [ rdx + nt_rx_head ], eax ; Set rx_lasthead
343345
344- mov eax , [ rsi + i8257x_RDT ] ; Read the current Receive Descriptor Tail
346+ ; mov eax, [rsi+i8257x_RDT] ; Read the current Receive Descriptor Tail
347+ mov rax , [ rdx + 0x70 ]
345348 add eax , 1 ; Add 1 to the Receive Descriptor Tail
346349 and eax , i8257x_MAX_DESC - 1
347350 mov [ rsi + i8257x_RDT ], eax ; Write the updated Receive Descriptor Tail
351+ mov [ rdx + 0x70 ], rax
348352
349353net_i8257x_poll_end:
350354 pop rax
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ net_i8259x_init:
8181 mov [ rdi + nt_transmit ], rax
8282 mov rax , net_i8259x_poll
8383 mov [ rdi + nt_poll ], rax
84+ mov rax , i8259x_MAX_DESC / 2
85+ mov [ rdi + 0x70 ], rax
8486
8587net_i8259x_init_error:
8688
@@ -268,7 +270,7 @@ net_i8259x_init_rx_enable_wait:
268270 jnc net_i8259x_init_rx_enable_wait
269271 xor eax , eax
270272 mov [ rsi + i8259x_RDH ], eax
271- mov eax , i8259x_MAX_DESC - 1
273+ mov eax , i8259x_MAX_DESC / 2
272274 mov [ rsi + i8259x_RDT ], eax
273275
274276; ; Set SECRXCTRL_RX_DIS
@@ -490,10 +492,12 @@ net_i8259x_poll:
490492 and eax , i8259x_MAX_DESC - 1
491493 mov [ rdx + nt_rx_head ], eax ; Set rx_lasthead
492494
493- mov eax , [ rsi + i8259x_RDT ] ; Read the current Receive Descriptor Tail
495+ ; mov eax, [rsi+i8259x_RDT] ; Read the current Receive Descriptor Tail
496+ mov rax , [ rdx + 0x70 ]
494497 add eax , 1 ; Add 1 to the Receive Descriptor Tail
495498 and eax , i8259x_MAX_DESC - 1
496499 mov [ rsi + i8259x_RDT ], eax ; Write the updated Receive Descriptor Tail
500+ mov [ rdx + 0x70 ], rax
497501
498502net_i8259x_poll_end:
499503 pop rax
You can’t perform that action at this time.
0 commit comments