Message-ID: <38CF57D7.1A344BB7@student.uni-ulm.de> Date: Wed, 15 Mar 2000 10:28:55 +0100 From: Karsten Schmidt X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Interrupt handler crashes after a minute Content-Type: multipart/mixed; boundary="------------9BBB8B929343571AB18AD6FA" NNTP-Posting-Host: mic17.e-technik.uni-ulm.de X-Trace: 15 Mar 2000 10:28:55 +0100, mic17.e-technik.uni-ulm.de Lines: 171 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------9BBB8B929343571AB18AD6FA Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I'm currently porting a Borland 16bit library to DJGPP and therefore I must chain the interrupt of a PCI device. When I use the _go32_dpmi_chain_protected_mode_interrupt_vector() the library seems to work fine for a while, but suddenly the program hangs and the only thing I can do is to reboot the machine. But on the other hand I can exit and restart the program again and again without any problems. I've attached the important parts of my library with the Borland function calls commented out. The program is running on the CWSDPR0 DOS extender, because I have to read the CR3 register of the CPU in order to get the physical address of a DMA buffer. Perhaps somebody has an idea. Thanks in advance -- Karsten If you want to reply directly send a mail to: Karsten*Schmidt AT student DOT uni-ulm DOT de and replace the * with a . (I hope this will prevent me from getting more spam). --------------9BBB8B929343571AB18AD6FA Content-Type: text/plain; charset=us-ascii; name="lib.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lib.cpp" #include #include #include #include #include #include #include "acl.h" #include "aclerr.h" #include "amcc32.h" #include "adr.h" #include #include #include "aclasic.h" #include "7200.h" typedef struct _card { _go32_dpmi_seginfo old_int; _go32_dpmi_seginfo my_int; } CARD; CARD card_array[PCI_MAXCARDS] = { {FALSE}, {FALSE}, {FALSE}, {FALSE}, }; U8 acl_CardNo, acl_ExistPciCards; U8 Ext_IRQ_Vect[PCI_MAXCARDS]; /*----------------------------------------------------------------------*/ int _7200_Initial(U8 card_number, U16 *pt_base_address, U8 *irq_no) { int i, irq_err = 0; U8 bus_num, dev_func, command, mask; U8 interrupt_line, int_vector; i = card_number; /* Read the Interrupt Line register to determine the hardware IRQ */ /* assigned to the S5933, then convert this to a software interrupt */ /* number to insert the interrupt vector for the S5933 */ if((read_configuration_byte(bus_num,dev_func,PCI_CS_INTERRUPT_LINE, &interrupt_line)==SUCCESSFUL) && (interrupt_line != 0xff)) { *irq_no = (unsigned char) interrupt_line; card_array[i].irq = interrupt_line; /* Enable Interrupts */ if(interrupt_line < 8) { int_vector = 0x08+interrupt_line; Ext_IRQ_Vect[i] = int_vector; mask = inportb(0x21); card_array[i].old_irq_mask = mask; mask = mask & ~(1<