Rev 3545 | Rev 4325 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3545 | Rev 3618 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | ; |
- | |
- | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
- | 2 | ;; ;; |
|
2 | ; Netcfg v1.02 |
3 | ;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;; |
3 | ; |
- | |
- | 4 | ;; Distributed under terms of the GNU General Public License ;; |
|
- | 5 | ;; ;; |
|
4 | ; Application to load network drivers in KolibriOS |
6 | ;; netcfg.asm - Network driver control center for KolibriOS ;; |
5 | ; |
- | |
- | 7 | ;; ;; |
|
6 | ; By hidnplayr |
8 | ;; Written by hidnplayr@kolibrios.org ;; |
7 | ; |
- | |
- | 9 | ;; ;; |
|
- | 10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
|
- | 11 | ;; Version 2, June 1991 ;; |
|
- | 12 | ;; ;; |
|
- | 13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
Line 8... | Line 14... | ||
8 | 14 | ||
Line 9... | Line 15... | ||
9 | format binary as "" |
15 | format binary as "" |
10 | 16 | ||
Line 19... | Line 25... | ||
19 | dd (I_END+0x100) ; esp |
25 | dd (I_END+0x100) ; esp |
20 | dd param, 0x0 ; I_Param , I_Icon |
26 | dd param, 0x0 ; I_Param , I_Icon |
Line 21... | Line 27... | ||
21 | 27 | ||
Line 22... | Line 28... | ||
22 | type_ethernet equ 1 |
28 | type_ethernet equ 1 |
Line 23... | Line 29... | ||
23 | 29 | ||
24 | include '../macros.inc' |
30 | include '../../macros.inc' |
Line 25... | Line 31... | ||
25 | 31 | ||
Line 241... | Line 247... | ||
241 | mov [PCI_Interface], al ; Save it |
247 | mov [PCI_Interface], al ; Save it |
242 | mov cl , 0x3c ; Register to read (Get IRQ) |
248 | mov cl , 0x3c ; Register to read (Get IRQ) |
243 | @@: mcall 62 ; Read it |
249 | @@: mcall 62 ; Read it |
244 | mov [PCI_IRQ], al ; Save it |
250 | mov [PCI_IRQ], al ; Save it |
Line 245... | Line -... | ||
245 | - | ||
246 | ; cmp byte [PCI_Class], 0 ; device from before class codes |
- | |
247 | ; je @f |
- | |
248 | 251 | ||
- | 252 | cmp byte [PCI_Class], 2 ; network controller |
|
- | 253 | je @f |
|
- | 254 | ||
- | 255 | cmp byte [PCI_Class], 6 ; bridge type device |
|
- | 256 | jne nextDev |
|
- | 257 | ||
249 | cmp byte [PCI_Class], 2 ; network controller |
258 | cmp byte [PCI_SubClass], 7 ; Cardbus bridge |
- | 259 | jne nextDev |
|
- | 260 | ||
- | 261 | mov bl, 6 ; get a dword |
|
- | 262 | mov bh, byte [V_Bus] ; bus of pci device |
|
- | 263 | mov ch, byte [V_Dev] ; device number/function |
|
- | 264 | mov cl, 0x40 ; offset to subsystem device/vendor id |
|
- | 265 | mcall 62 ; get ID's |
|
- | 266 | ||
- | 267 | mov word [PCI_Device], ax ; There is a device here, save the ID's |
|
- | 268 | shr eax, 16 ; |
|
250 | jne nextDev |
269 | mov word [PCI_Vendor], ax ; |
Line 251... | Line 270... | ||
251 | ; @@: |
270 | @@: |
252 | 271 | ||
Line 253... | Line 272... | ||
253 | cmp byte[param], 0 |
272 | cmp byte[param], 0 |