X-Envelope-To: From: "Javier Calleja" To: "djgpp" Subject: Problems mixing hardware and software interrupts Date: Fri, 25 Jun 1999 15:23:29 +0200 Message-ID: <01bebf0d$eaa03300$0720a8c0@salmon.ctv.es> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0014_01BEBF1E.AE290300" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0014_01BEBF1E.AE290300 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi world: I have a problem with my application. I am using an interrupt = software (interrupt 0x60) with a real mode handler and an hardware = interrupt (interrupt 3) with a protected mode handler. I have detected that sometimes, when I execute the handler, the = interrupt does not return to go up. To install the handler I use the = _go32_dpmi_allocate_iret_wrapper and = _go32_dpmi_set_protected_mode_interrupt_vector functions. At the end of = the handler I send an EOI to the interrupt controller:=20 outp(MASTER_PIC,EOI) But the interrupt does not return to turn on. And the rest of the = program run fine. To install the software interrupt I use the = _go32_dpmi_allocate_real_mode_callback_retf function. I have detected that sometimes, when I am inside the hardware = interrupt, the software interrupt turn on and the handler is executed. = Then, the hardware interrupt never turn up. But if I put a 'disable' = instruction at the begining of the hardware interrupt handler, the = software interrupt handler is not generated in the hardware interrupt, = but more late the hardware interrupt is lost, but the rest of the = programm run fine. I have read in delorie documentation that: " where the CPU's interrupt is virtualizad, IRET may not restore the = interrupt flag. Therefore clients should execute a STI instruction.or = else interrupts remain disabled." Must I make a STI before the IRET -outp(MASTER_PIC,EOI)- instruction? How can I make an STI instruction in DJGPP? =20 Dismuntel S.A.L. Av. Pais Valenciano 155, E 46680-Algemes=ED (Valencia) Espa=F1a Tlf:+34-96-2481217 FAX:+34-96-2481217 =20 email:dismuntel AT apdo DOT com ------=_NextPart_000_0014_01BEBF1E.AE290300 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi world:
 
   I have a problem with my = application.=20 I am using an interrupt software (interrupt 0x60) with a real mode = handler and=20 an hardware interrupt (interrupt 3) with a protected mode = handler.
 
  I have detected that sometimes, = when I=20 execute the handler, the interrupt does not return to go up. To install = the=20 handler I use the  _go32_dpmi_allocate_iret_wrapper and =20 _go32_dpmi_set_protected_mode_interrupt_vector functions. At the end of = the=20 handler I send an EOI to the interrupt controller:
 =20 outp(MASTER_PIC,EOI)
 
  But the = interrupt does not=20 return to turn on. And the rest of the program run fine.
 
  To install the = software=20 interrupt I use the _go32_dpmi_allocate_real_mode_callback_retf=20 function.
 
  I have detected = that=20 sometimes, when I am inside the hardware interrupt, the software = interrupt turn=20 on and the handler is executed. Then, the hardware interrupt never turn = up. But=20 if I put a 'disable' instruction at the begining of the hardware = interrupt=20 handler, the software interrupt handler is not generated in the hardware = interrupt, but more late the hardware interrupt is lost, but the rest of = the=20 programm run fine.
 
  I have read in = delorie=20 documentation that:
   " = where the CPU's=20 interrupt is virtualizad, IRET may not restore the interrupt flag. = Therefore=20 clients should execute a STI instruction.or else interrupts remain=20 disabled." 
 
 
  Must I make a = STI before the=20 IRET -outp(MASTER_PIC,EOI)- instruction?
  How can I make = an STI=20 instruction in DJGPP? 
  =  
 
Dismuntel S.A.L.
Av. = Pais=20 Valenciano 155, E
46680-Algemesí=20 (Valencia)
España
Tlf:+34-96-2481217
FAX:+34-96-2481217=20
email:dismuntel AT apdo DOT com
------=_NextPart_000_0014_01BEBF1E.AE290300--