how to install my driver?

hi !.

i have been porting device driver for vxworks or linux to Qnx 6.30.

uot pci -v is:

PCI version = 2.10

Class = Bridge (Unknown)
Vendor ID = 10b5h, PLX Technology
Device ID = 9080h, PCI 9080 High performance PCI to Local Bus chip
PCI index = 0h
Class Codes = 068000h
Revision ID = 2h
Bus number = 3
Device number = 0
Function num = 0
Status Reg = 280h
Command Reg = 117h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 10h un-cacheable
Subsystem Vendor ID = 4144h
Subsystem ID = 41h
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = INT A
Interrupt line = 3
CPU Interrupt = 0h

I believe that already single it reduces to me to activate the interruptions “interruptattach”, i have some problem with that, for now i would like that checked my exits and say to me on the basis of your experience if everything is correct .

outs:

admxrc2: init_module: entered
admxrc2: driver_init: entered
admxrc2: initDriverParams: driverParams.pciWriteAndInvalidate = 0
admxrc2: initDriverParams: driverParams.model.admxrc2.pci9656ErrataFix = 0
admxrc2: initDriverParams: driverParams.maxDmaDesc = ADMXRC_MAX_DMADESC
admxrc2: initDriverParams: driverParams.maxPlxDesc = ADMXRC_MAX_PLXDESC_PER_CHANNEL
admxrc2: initDriverParams: driverParams.model.admxrc2pl.unlockFlash = 0
admxrc2: pci_reg_devices: entered
admxrc2: pci_reg_devices: i=0 10b5 9080
admxrc2: pci_reg_devices: i=1 10b5 9080
admxrc2: Found Device
admxrc2: BAR 0 star = fe9ffc00 end = fe9ffcff
admxrc2: BAR 1 star = a801 end = a8ff
admxrc2: BAR 2 star = fe400000 end = fe7fffff
admxrc2: BAR 3 star = fe000000 end = fe3fffff
admxrc2: irql: i=3
admxrc2: Revision ID : =2
admxrc2: PCI Command/Status = 20900106
admxrc2: init_board: entered, index = 0
admxrc2: onCreateDevice: entered
admxrc2: onCreateDevice: PCI device, id=10b5:9080 subId=4144:0041 revId=02
admxrc2: identifyDevice: ADM-XRCII-Lite
admxrc2: allocateResources: entered
admxrc2: os_kernel_malloc_dma: size=528 kern=0x2330c000 log=0x0807700008077000
admxrc2: os_kernel_malloc_dma: size=528 kern=0x2330b000 log=0x0807800008078000
admxrc2: allocateResources: successful
admxrc2: onCreateDevice: successful
admxrc2: onStartDevice: entered
admxrc2: BAR0 io = 0 physbase = 0xfe9ffc00fe9ffc00 physlen = 0x000001000x00000100
admxrc2: BAR1 io = 1 physbase = 0x0000a8010000a801 physlen = 0x000000ff0x000000ff
admxrc2: BAR2 io = 0 physbase = 0xfe400000fe400000 physlen = 0x004000000x00400000
admxrc2: BAR3 io = 0 physbase = 0xfe000000fe000000 physlen = 0x004000000x00400000
admxrc2: BAR4 io = 1 physbase = 0xb031e672b031e672 physlen = 0x00039ca30x00039ca3
admxrc2: BAR5 io = -1338785556 physbase = 0x0804778c0804778c physlen = 0xa82f39d80xa82f39d8
admxrc2: IRQ phys = 3
admxrc2: BAR0 io = 0 sysbase = 0xfe9ffc00fe9ffc00 syslen = 0x0000010000000100
admxrc2: BAR1 io = 1 sysbase = 0x0000a8000000a800 syslen = 0x000000ff000000ff
admxrc2: BAR2 io = 0 sysbase = 0xfe400000fe400000 syslen = 0x0040000000400000
admxrc2: BAR3 io = 0 sysbase = 0xfe000000fe000000 syslen = 0x0040000000400000
admxrc2: BAR4 io = 1 sysbase = 0xb031e670b031e670 syslen = 0x00039ca300039ca3
admxrc2: BAR5 io = -1338785556 sysbase = 0x0804778008047780 syslen = 0xa82f39d8a82f39d8
admxrc2: IRQ sys = 3
admxrc2: onStartDevice: mapping BAR0
admxrc2: os_map_kernel: physical addres = fe9ffc00 map to 0x40100c00
admxrc2: onStartDevice: mapping BAR2
admxrc2: os_map_kernel: physical addres = fe400000 map to 0x40101000
admxrc2: onStartDevice: mapping BAR3
admxrc2: os_map_kernel: physical addres = fe000000 map to 0x40501000
admxrc2: onStartDevice: attaching interrupt handler
admxrc2: initCard: entered
admxrc2: initCard9080: entered
admxrc2: identifyFlash: entered
admxrc2: ADMXRC_SetupCardInfo: entered
admxrc2: getCardInfoPci9080: entered
admxrc2: ADMXRC_SetupCardInfo: successful
admxrc2: os_allow_mapping: phys = 0xfe400000fe400000 length = 0x0040000000400000 context = 0x0
admxrc2: os_allow_mapping: created region 0x8075280
admxrc2: os_allow_mapping: phys = 0xfe000000fe000000 length = 0x0040000000400000 context = 0x1
admxrc2: os_allow_mapping: created region 0x80752a8
admxrc2: onStartDevice: Successful

admxrc2: pci_reg_devices: i=2 10b5 9656
admxrc2: pci_reg_devices: i=3 4144 43
admxrc2: pci_reg_devices: i=4 4144 43
admxrc2: pci_reg_devices: i=5 10b5 9656
admxrc2: pci_reg_devices: i=6 10b5 9656
admxrc2: pci_reg_devices: i=7 4144 44
admxrc2: cleanup_module: entered
admxrc2: close_board: entered
admxrc2: onStopDevice: entered
admxrc2: onStopDevice: detaching interrupt handler
admxrc2: onStopDevice: unmapping BAR0
admxrc2: onStopDevice: unmapping BAR2
admxrc2: onStopDevice: unmapping BAR3
admxrc2: onDeleteDevice: entered
admxrc2: freeResources: entered
admxrc2: driver_uninit: entered

the function main


main(...)
{

 admxrcDrv(1);
 admxrcDrvStop();    

}

well, now can you tell me how to generate devn-admxrc.so, how compile

gcc … *.o *.o *.o *.o

and how i can mount my driver? , mount -T ??? /lib/dll/devn-admxrc.so
y other thing, as I can be sure that when mount … it execute or call it firts this function admxrcDrv(int); and when unmount calls admxrcDrvStop();

ahmm, someone have some examples of interruptattach or examples “source code” of device drivers PCI that can give me, thanks!!!

i`m sorry, my english es bad :frowning:, I hope not to incomodar them and I thank for its amiability .

thankssss!!!

i’m sorry, jeje, i think that firts have read “writing a resource manager” :smiley:.

i have found the answer, :smiley:.
thanks!!

I suggest you read documentation that covers writing drivers for io-net.
Otherwise you’ll be unable to mount your driver into io-net :slight_smile: (I suppose you are writing a network driver as you specify a ‘devn-’ prefix for your library name.)
Everything that concerns network driver development is well documented. I suggest you reading both 6.3.x and 6.2.1 documentation set on this topic as some of the useful functionality is not covered in newer documentation, but is still very helpful in writing drivers.

best regards
MikeP