File tree Expand file tree Collapse file tree 3 files changed +62
-2
lines changed
Expand file tree Collapse file tree 3 files changed +62
-2
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ net_i8254x_config:
227227 mov rdi , [ rdx + nt_rx_desc ]
228228 mov ecx , i8254x_MAX_DESC
229229 call os_virt_to_phys
230- next_record :
230+ net_i8254x_config_next_record :
231231 stosq
232232 add rdi , 8
233233 add rax , 2048
234234 dec ecx
235235 cmp ecx , 0
236- jnz next_record
236+ jnz net_i8254x_config_next_record
237237
238238 pop rax
239239 pop rcx
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ net_i8257x_init:
7878 call net_i8257x_reset
7979
8080 ; Store call addresses
81+ mov rax , net_i8257x_config
82+ mov [ rdi + nt_config ], rax
8183 mov rax , net_i8257x_transmit
8284 mov [ rdi + nt_transmit ], rax
8385 mov rax , net_i8257x_poll
@@ -214,6 +216,34 @@ net_i8257x_reset_nextdesc:
214216; -----------------------------------------------------------------------------
215217
216218
219+ ; -----------------------------------------------------------------------------
220+ ; net_i8257x_config -
221+ ; IN: RAX = Base address to store packets
222+ ; RDX = Interface ID
223+ ; OUT: Nothing
224+ net_i8257x_config:
225+ push rdi
226+ push rcx
227+ push rax
228+
229+ mov rdi , [ rdx + nt_rx_desc ]
230+ mov ecx , i8257x_MAX_DESC
231+ call os_virt_to_phys
232+ net_i8257x_config_next_record:
233+ stosq
234+ add rdi , 8
235+ add rax , 2048
236+ dec ecx
237+ cmp ecx , 0
238+ jnz net_i8257x_config_next_record
239+
240+ pop rax
241+ pop rcx
242+ pop rdi
243+ ret
244+ ; -----------------------------------------------------------------------------
245+
246+
217247; -----------------------------------------------------------------------------
218248; net_i8257x_transmit - Transmit a packet via an Intel 8257x NIC
219249; IN: RSI = Location of packet
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ net_i8259x_init:
7575 call net_i8259x_reset
7676
7777 ; Store call addresses
78+ mov rax , net_i8259x_config
79+ mov [ rdi + nt_config ], rax
7880 mov rax , net_i8259x_transmit
7981 mov [ rdi + nt_transmit ], rax
8082 mov rax , net_i8259x_poll
@@ -374,6 +376,34 @@ net_i8259x_init_tx_enable_wait:
374376; -----------------------------------------------------------------------------
375377
376378
379+ ; -----------------------------------------------------------------------------
380+ ; net_i8259x_config -
381+ ; IN: RAX = Base address to store packets
382+ ; RDX = Interface ID
383+ ; OUT: Nothing
384+ net_i8259x_config:
385+ push rdi
386+ push rcx
387+ push rax
388+
389+ mov rdi , [ rdx + nt_rx_desc ]
390+ mov ecx , i8259x_MAX_DESC
391+ call os_virt_to_phys
392+ net_i8259x_config_next_record:
393+ stosq
394+ add rdi , 8
395+ add rax , 2048
396+ dec ecx
397+ cmp ecx , 0
398+ jnz net_i8259x_config_next_record
399+
400+ pop rax
401+ pop rcx
402+ pop rdi
403+ ret
404+ ; -----------------------------------------------------------------------------
405+
406+
377407; -----------------------------------------------------------------------------
378408; net_i8259x_transmit - Transmit a packet via an Intel 8259x NIC
379409; IN: RSI = Location of packet
You can’t perform that action at this time.
0 commit comments