Mail Archives: djgpp/1999/10/06/05:16:44
From: | "Martin Czamai" <Martin_Czamai AT peak-service DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | interrupt service routine in protected mode for a PCI device
|
Date: | 6 Oct 1999 05:42:38 GMT
|
Organization: | germany.net Onlinedienste
|
Lines: | 42
|
Message-ID: | <7tenge$6tb$1@newshost.germany.net>
|
NNTP-Posting-Host: | d21173.netzdienste.de
|
X-Trace: | newshost.germany.net 939188558 7083 151.189.115.97 (6 Oct 1999 05:42:38 GMT)
|
X-Complaints-To: | news AT germany DOT net
|
NNTP-Posting-Date: | 6 Oct 1999 05:42:38 GMT
|
X-Priority: | 3
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300
|
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300
|
X-MSMail-Priority: | Normal
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hi all,
can anybody tell me, whats wrong with this code?
...
BYTE PCI_INT = GetINT(Device); // Interrupt Line Number read from
the configuration space
// interrupt service routine (ISR) must NOT be swaped out to file
_go32_dpmi_lock_code(ISR, (DWORD)LOCK_ISR - (DWORD)ISR);
// _go32_dpmi_lock_data((void*) &Msg, (long)sizeof(Msg)); //
currently not used
_go32_dpmi_get_protected_mode_interrupt_vector(PCI_INT,
&OldHandler);
Handler.pm_offset = (int)ISR;
_go32_dpmi_allocate_iret_wrapper(&Handler);
_go32_dpmi_set_protected_mode_interrupt_vector(PCI_INT, &Handler);
...
// SYSTEM CRASHES NOW!!! (sinply hangs up)
notes:
Handler and OldHandler are of type _go32_dpmi_seginfo and global defined.
ISR is defined in an other file the following way:
...
void ISR(void)
{ assert(0); // not implemented
}
void LOCK_ISR(void) // dummy function to recognize size of the ISR via
some pointer arithmetic
{
}
...
Please send your comments/solutions to Martin_Czamai AT peak-service DOT com .
Thank you and best regards
Martin
- Raw text -