Page 1 of 1

Page fault when returning from IRQ7 dummy

Posted: Sat Mar 04, 2006 11:48 am
by McZ
I have read in the FAQ that you may need a IRQ7 dummy so I have tried to implement one because I got a few IRQ7 calls recently but now I get a Page fault at 0x27 instead.

This is how I do:

Code: Select all

; 39: IRQ7
_isr39:
    cli
    push byte 0
    push byte 39
    
    push eax

    mov eax, 0x0B
    out 0x20, eax
    in eax, 0x20
    
    or eax, 0x80
    jz NotSet
    pop eax
    ret
    
NotSet:    
    pop eax
    jmp isr_common_stub
my asm skills isn't verry good at the moment, been to lazy ::)

Re:Page fault when returning from IRQ7 dummy

Posted: Sat Mar 04, 2006 12:04 pm
by Pype.Clicker
McZ wrote: now I get a Page fault at 0x27 instead.

Code: Select all

; 39: IRQ7
_isr39:
    cli
    push byte 0
    push byte 39
    
    push eax
    ...
    pop eax
    ret
guess why :P




still clueless ?
1. it's useless to call CLI in an irq handler if your IDT table is set up properly.
2. you push 3 words, and only pop 1
3. you try to exit an interrupt handler with RET instead of IRET

Re:Page fault when returning from IRQ7 dummy

Posted: Sat Mar 04, 2006 12:36 pm
by McZ
oops :o missed that one.

not a good day to be coding when had a few (read many) drinks yesterday ::)