From 26aeed8f848ac7d0d957ba8df8dafd117569e693 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 9 Aug 2012 19:42:16 +0000 Subject: [PATCH] added rtl8169 device 0x813610ec, and a whole list of i8254x devices git-svn-id: svn://kolibrios.org@2917 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../net/applications/netcfg/drivers.inc | 79 ++--- .../net/applications/netcfg/proc32.inc | 270 ------------------ .../net/applications/netcfg/struct.inc | 180 ------------ 3 files changed, 40 insertions(+), 489 deletions(-) delete mode 100644 kernel/branches/net/applications/netcfg/proc32.inc delete mode 100644 kernel/branches/net/applications/netcfg/struct.inc diff --git a/kernel/branches/net/applications/netcfg/drivers.inc b/kernel/branches/net/applications/netcfg/drivers.inc index 2a6f906a20..631620e93d 100644 --- a/kernel/branches/net/applications/netcfg/drivers.inc +++ b/kernel/branches/net/applications/netcfg/drivers.inc @@ -38,6 +38,7 @@ dd 0x816810ec dd 0x816910ec dd 0x011616ec dd 0x43001186 +dd 0x813610ec dd 0x0 db '3C59X',0 @@ -144,45 +145,45 @@ db 'R6040',0 dd 0x604017F3 dd 0x0 -db 'i8254x' -dd 0x10008086 ; 82542 (Fiber) -dd 0x10018086 ; 82543GC (Fiber) -dd 0x10048086 ; 82543GC (Copper) -dd 0x10088086 ; 82544EI (Copper) -dd 0x10098086 ; 82544EI (Fiber) -dd 0x100A8086 ; 82540EM -dd 0x100C8086 ; 82544GC (Copper) -dd 0x100D8086 ; 82544GC (LOM) -dd 0x100E8086 ; 82540EM -dd 0x100F8086 ; 82545EM (Copper) -dd 0x10108086 ; 82546EB (Copper) -dd 0x10118086 ; 82545EM (Fiber) -dd 0x10128086 ; 82546EB (Fiber) -dd 0x10138086 ; 82541EI -dd 0x10148086 ; 82541ER -dd 0x10158086 ; 82540EM (LOM) -dd 0x10168086 ; 82540EP (Mobile) -dd 0x10178086 ; 82540EP -dd 0x10188086 ; 82541EI -dd 0x10198086 ; 82547EI -dd 0x101a8086 ; 82547EI (Mobile) -dd 0x101d8086 ; 82546EB -dd 0x101e8086 ; 82540EP (Mobile) -dd 0x10268086 ; 82545GM -dd 0x10278086 ; 82545GM -dd 0x10288086 ; 82545GM -dd 0x105b8086 ; 82546GB (Copper) -dd 0x10758086 ; 82547GI -dd 0x10768086 ; 82541GI -dd 0x10778086 ; 82541GI -dd 0x10788086 ; 82541ER -dd 0x10798086 ; 82546GB -dd 0x107a8086 ; 82546GB -dd 0x107b8086 ; 82546GB -dd 0x107c8086 ; 82541PI -dd 0x10b58086 ; 82546GB (Copper) -dd 0x11078086 ; 82544EI -dd 0x11128086 ; 82544GC +db 'i8254x',0 +dd 0x10008086 ; 82542 (Fiber) +dd 0x10018086 ; 82543GC (Fiber) +dd 0x10048086 ; 82543GC (Copper) +dd 0x10088086 ; 82544EI (Copper) +dd 0x10098086 ; 82544EI (Fiber) +dd 0x100A8086 ; 82540EM +dd 0x100C8086 ; 82544GC (Copper) +dd 0x100D8086 ; 82544GC (LOM) +dd 0x100E8086 ; 82540EM +dd 0x100F8086 ; 82545EM (Copper) +dd 0x10108086 ; 82546EB (Copper) +dd 0x10118086 ; 82545EM (Fiber) +dd 0x10128086 ; 82546EB (Fiber) +dd 0x10138086 ; 82541EI +dd 0x10148086 ; 82541ER +dd 0x10158086 ; 82540EM (LOM) +dd 0x10168086 ; 82540EP (Mobile) +dd 0x10178086 ; 82540EP +dd 0x10188086 ; 82541EI +dd 0x10198086 ; 82547EI +dd 0x101a8086 ; 82547EI (Mobile) +dd 0x101d8086 ; 82546EB +dd 0x101e8086 ; 82540EP (Mobile) +dd 0x10268086 ; 82545GM +dd 0x10278086 ; 82545GM +dd 0x10288086 ; 82545GM +dd 0x105b8086 ; 82546GB (Copper) +dd 0x10758086 ; 82547GI +dd 0x10768086 ; 82541GI +dd 0x10778086 ; 82541GI +dd 0x10788086 ; 82541ER +dd 0x10798086 ; 82546GB +dd 0x107a8086 ; 82546GB +dd 0x107b8086 ; 82546GB +dd 0x107c8086 ; 82541PI +dd 0x10b58086 ; 82546GB (Copper) +dd 0x11078086 ; 82544EI +dd 0x11128086 ; 82544GC dd 0x0 dd 0x0 ; driverlist end \ No newline at end of file diff --git a/kernel/branches/net/applications/netcfg/proc32.inc b/kernel/branches/net/applications/netcfg/proc32.inc deleted file mode 100644 index aa3ffc9702..0000000000 --- a/kernel/branches/net/applications/netcfg/proc32.inc +++ /dev/null @@ -1,270 +0,0 @@ - -; Macroinstructions for defining and calling procedures - -macro stdcall proc,[arg] ; directly call STDCALL procedure - { common - if ~ arg eq - reverse - pushd arg - common - end if - call proc } - -macro invoke proc,[arg] ; indirectly call STDCALL procedure - { common - if ~ arg eq - reverse - pushd arg - common - end if - call [proc] } - -macro ccall proc,[arg] ; directly call CDECL procedure - { common - size@ccall = 0 - if ~ arg eq - reverse - pushd arg - size@ccall = size@ccall+4 - common - end if - call proc - if size@ccall - add esp,size@ccall - end if } - -macro cinvoke proc,[arg] ; indirectly call CDECL procedure - { common - size@ccall = 0 - if ~ arg eq - reverse - pushd arg - size@ccall = size@ccall+4 - common - end if - call [proc] - if size@ccall - add esp,size@ccall - end if } - -macro proc [args] ; define procedure - { common - match name params, args> - \{ define@proc name, \{ prologue name,flag,parmbytes,localbytes,reglist \} - macro locals - \{ virtual at ebp-localbytes+current - macro label def \\{ match . type,def> \\\{ deflocal@proc .,label, - \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} - macro finish@proc \{ localbytes = (((current-1) shr 2)+1) shl 2 - end if \} } - -macro defargs@proc [arg] - { common - if ~ arg eq - forward - local ..arg,current@arg - match argname:type, arg - \{ current@arg equ argname - label ..arg type - argname equ ..arg - if dqword eq type - dd ?,?,?,? - else if tbyte eq type - dd ?,?,? - else if qword eq type | pword eq type - dd ?,? - else - dd ? - end if \} - match =current@arg,current@arg - \{ current@arg equ arg - arg equ ..arg - ..arg dd ? \} - common - args@proc equ current@arg - forward - restore current@arg - common - end if } - -macro deflocal@proc name,def,[val] - { common - match vars, all@vars \{ all@vars equ all@vars, \} - all@vars equ all@vars name - forward - local ..var,..tmp - match =label,def \{ ..tmp equ \} - match tmp,..tmp \{ ..var def val \} - match ,..tmp \{ label ..var val \} - match =?, val \{ ..tmp equ \} - match any =dup (=?), val \{ ..tmp equ \} - match tmp : value, ..tmp : val - \{ tmp: end virtual - initlocal@proc ..var,def value - virtual at tmp\} - common - match first rest, ..var, \{ name equ first \} } - -macro initlocal@proc name,def - { virtual at name - def - size@initlocal = $ - name - end virtual - position@initlocal = 0 - while size@initlocal > position@initlocal - virtual at name - def - if size@initlocal - position@initlocal < 2 - current@initlocal = 1 - load byte@initlocal byte from name+position@initlocal - else if size@initlocal - position@initlocal < 4 - current@initlocal = 2 - load word@initlocal word from name+position@initlocal - else - current@initlocal = 4 - load dword@initlocal dword from name+position@initlocal - end if - end virtual - if current@initlocal = 1 - mov byte [name+position@initlocal],byte@initlocal - else if current@initlocal = 2 - mov word [name+position@initlocal],word@initlocal - else - mov dword [name+position@initlocal],dword@initlocal - end if - position@initlocal = position@initlocal + current@initlocal - end while } - -macro endp - { purge ret,locals,endl - finish@proc - purge finish@proc - restore regs@proc - match all,args@proc \{ restore all \} - restore args@proc - match all,all@vars \{ restore all \} } - -macro local [var] - { common - locals - forward done@local equ - match varname[count]:vartype, var - \{ match =BYTE, vartype \\{ varname rb count - restore done@local \\} - match =WORD, vartype \\{ varname rw count - restore done@local \\} - match =DWORD, vartype \\{ varname rd count - restore done@local \\} - match =PWORD, vartype \\{ varname rp count - restore done@local \\} - match =QWORD, vartype \\{ varname rq count - restore done@local \\} - match =TBYTE, vartype \\{ varname rt count - restore done@local \\} - match =DQWORD, vartype \\{ label varname dqword - rq count+count - restore done@local \\} - match , done@local \\{ virtual - varname vartype - end virtual - rb count*sizeof.\#vartype - restore done@local \\} \} - match :varname:vartype, done@local:var - \{ match =BYTE, vartype \\{ varname db ? - restore done@local \\} - match =WORD, vartype \\{ varname dw ? - restore done@local \\} - match =DWORD, vartype \\{ varname dd ? - restore done@local \\} - match =PWORD, vartype \\{ varname dp ? - restore done@local \\} - match =QWORD, vartype \\{ varname dq ? - restore done@local \\} - match =TBYTE, vartype \\{ varname dt ? - restore done@local \\} - match =DQWORD, vartype \\{ label varname dqword - dq ?,? - restore done@local \\} - match , done@local \\{ varname vartype - restore done@local \\} \} - match ,done@local - \{ var - restore done@local \} - common - endl } diff --git a/kernel/branches/net/applications/netcfg/struct.inc b/kernel/branches/net/applications/netcfg/struct.inc deleted file mode 100644 index 557d293643..0000000000 --- a/kernel/branches/net/applications/netcfg/struct.inc +++ /dev/null @@ -1,180 +0,0 @@ -; Macroinstructions for defining data structures - -macro struct name - { fields@struct equ name - match child parent, name \{ fields@struct equ child,fields@\#parent \} - sub@struct equ - struc db [val] \{ \common fields@struct equ fields@struct,.,db, \} - struc dw [val] \{ \common fields@struct equ fields@struct,.,dw, \} - struc du [val] \{ \common fields@struct equ fields@struct,.,du, \} - struc dd [val] \{ \common fields@struct equ fields@struct,.,dd, \} - struc dp [val] \{ \common fields@struct equ fields@struct,.,dp, \} - struc dq [val] \{ \common fields@struct equ fields@struct,.,dq, \} - struc dt [val] \{ \common fields@struct equ fields@struct,.,dt, \} - struc rb count \{ fields@struct equ fields@struct,.,db,count dup (?) \} - struc rw count \{ fields@struct equ fields@struct,.,dw,count dup (?) \} - struc rd count \{ fields@struct equ fields@struct,.,dd,count dup (?) \} - struc rp count \{ fields@struct equ fields@struct,.,dp,count dup (?) \} - struc rq count \{ fields@struct equ fields@struct,.,dq,count dup (?) \} - struc rt count \{ fields@struct equ fields@struct,.,dt,count dup (?) \} - macro db [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,db, \} - macro dw [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dw, \} - macro du [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,du, \} - macro dd [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dd, \} - macro dp [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dp, \} - macro dq [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dq, \} - macro dt [val] \{ \common \local anonymous - fields@struct equ fields@struct,anonymous,dt, \} - macro rb count \{ \local anonymous - fields@struct equ fields@struct,anonymous,db,count dup (?) \} - macro rw count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dw,count dup (?) \} - macro rd count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dd,count dup (?) \} - macro rp count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dp,count dup (?) \} - macro rq count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dq,count dup (?) \} - macro rt count \{ \local anonymous - fields@struct equ fields@struct,anonymous,dt,count dup (?) \} - macro union \{ fields@struct equ fields@struct,,union,< - sub@struct equ union \} - macro struct \{ fields@struct equ fields@struct,,substruct,< - sub@struct equ substruct \} - virtual at 0 } - -macro ends - { match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt - restruc rb,rw,rd,rp,rq,rt - purge db,dw,du,dd,dp,dq,dt - purge rb,rw,rd,rp,rq,rt - purge union,struct - match name=,fields,fields@struct \\{ fields@struct equ - make@struct name,fields - fields@\\#name equ fields \\} - end virtual \} - match any, sub@struct \{ fields@struct equ fields@struct> \} - restore sub@struct } - -macro make@struct name,[field,type,def] - { common - if $ - display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah - err - end if - local define - define equ name - forward - local sub - match , field \{ make@substruct type,name,sub def - define equ define,.,sub, \} - match any, field \{ define equ define,.#field,type, \} - common - match fields, define \{ define@struct fields \} } - -macro define@struct name,[field,type,def] - { common - local list - list equ - forward - if ~ field eq . - name#field type def - sizeof.#name#field = $ - name#field - else - rb sizeof.#type - end if - local value - match any, list \{ list equ list, \} - list equ list - common - sizeof.#name = $ - restruc name - match values, list \{ - struc name value \\{ - match any, fields@struct \\\{ fields@struct equ fields@struct,.,name, \\\} - match , fields@struct \\\{ label . - forward - match , value \\\\{ field type def \\\\} - match any, value \\\\{ field type value - if ~ field eq . - rb sizeof.#name#field - ($-field) - end if \\\\} - common \\\} \\} \} } - -macro enable@substruct - { macro make@substruct substruct,parent,name,[field,type,def] - \{ \common - \local define - define equ parent,name - \forward - \local sub - match , field \\{ match any, type \\\{ enable@substruct - make@substruct type,name,sub def - purge make@substruct - define equ define,.,sub, \\\} \\} - match any, field \\{ define equ define,.\#field,type, \\} - \common - match fields, define \\{ define@\#substruct fields \\} \} } - -enable@substruct - -macro define@union parent,name,[field,type,def] - { common - virtual at 0 - forward - if ~ field eq . - virtual at 0 - parent#field type def - sizeof.#parent#field = $ - parent#field - end virtual - if sizeof.#parent#field > $ - rb sizeof.#parent#field - $ - end if - else if sizeof.#type > $ - rb sizeof.#type - $ - end if - common - sizeof.#name = $ - end virtual - struc name [value] \{ \common - label .\#name - last@union equ - forward - match any, last@union \\{ virtual at .\#name - field type def - end virtual \\} - match , last@union \\{ match , value \\\{ field type def \\\} - match any, value \\\{ field type value \\\} \\} - last@union equ field - common rb sizeof.#name - ($ - .\#name) \} } - -macro define@substruct parent,name,[field,type,def] - { common - virtual at 0 - forward - if ~ field eq . - parent#field type def - sizeof.#parent#field = $ - parent#field - else - rb sizeof.#type - end if - local value - common - sizeof.#name = $ - end virtual - struc name value \{ - label .\#name - forward - match , value \\{ field type def \\} - match any, value \\{ field type value - if ~ field eq . - rb sizeof.#parent#field - ($-field) - end if \\} - common \} } -