www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/30/19:45:41

From: "Jan Humme" <info AT imedia-engineering DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: PCI Interrupt Handler
Date: 30 Jun 1998 19:13:55 GMT
Organization: Imedia Engineering BV
Lines: 85
Message-ID: <6nbddj$a7j@news3.euro.net>
References: <359522D5 DOT B81D5AFD AT giga-net DOT com>
NNTP-Posting-Host: i214.asd.euronet.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Harold Roman 978-461-0402 Ext 223 wrote in message
<359522D5 DOT B81D5AFD AT giga-net DOT com>...
>Does anyone have experience writting an interrupt handler for a
>PCI device?
>
>I am having trouble getting an interrupt handler to work with my PCI
>device. I have no trouble when I register my handler to another
>interrupt (IRQ8 -- real time clock interrupt), but when I try to
>register the handler to my PCI device (IRQ9 or IRQ10 -- depending on
>which slot I move the card to) my handler never gets called.
>
>I am using: _go32_dpmi_chain_protected_mode_interrupt_vector( irq,
>newHandler ).
>
>I have verified that the device is really generating the interrupt.
>
>What am I forgetting? Do I have to unmask the interrupt? Do I need to
>map the PCI interrupts to the IRQ interrupts?

You have to unmask the IRQ in the 8159 interrupt controller of the PC, or it
won't come through. Mapping is done automatically for you by the BIOS at
startup of your PC.

Attached is what I believe to be an improved version ("my version") of an
simple hardware interrupt library that I once downloaded from DJ's server.
It does no locking, so it's best to switch virtual memory off.

It works fine for my PCI device.

Good luck.

Jan Humme.



begin 666 irq.zip
M4$L#! H````&`#:4S"0 AT U7"9,P8``)H.```%````25)1+D,-`@$2(Q05-C=H
MB9K;/ 4&$A-$Q?:6]U^J;*@0Q' 'B32H5*)7AG=1D$F=4BTJ56I5J%2G*#](
MHDJ/0H4*TJJ,\0XB.)W6+4BH<M_2+3M&>),%V?8MV3+?C;C'S)G3!O AT 6FQ=D
MT[1CT88MRQ;D%.-==\[YE AT MB&&)1N6S#9"_L+==ES!G9$7- ;Y AT Q01I]*\=[
M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$#YXT<.F)0P, C`P:+D253!!Q8\&#"
M*4R"6"D2<6+%BQDW=OP8<F08DRAAI-BAD:-'D"))`E6J4D' ,GCHE)'C!L1!
M.B!0J$ 3Q AT T9-E DOT _P*$C)P6*H0$#VGF3A AT R(.73"C%GS14Z9.6GTE$%QU>H<
M%E;=8)4S!ZU3!6O;OHW[D:]@JW+B."F[0RU;MUS9T'&,-4WDR883N[7[!6Z8
MQGT]2Z9L6?$8-F_FE/ERE3/DU88#`E!+`0(+``H````&`#:4S"0 AT U7"9,P8`
M`)H.```%``````````$`( ````````!)4E$N0U!+`0(+``H````!`-V3S"15
M.'A(T@```!T!```%``````````$`( ```%8&``!)4E$N2%!+!08``````@`"
+`&8```!+!P``````
`
end

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019