Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

IRQ ISR IDT [3] Very weeeird results (DOSX)

posted by DOS386, 16.08.2007, 10:28

> tested DPMI IRQ 0 routing to ring 3 on a P4 1.6 GHz with increasing
> frequency (reprogramming the timer) and it worked up to 180 kHz.

Does it mean that main "thread" performance sank to almost 0 then ?

If YES, then the IRQ wastes 10'000 cycles per piece ... and it's desperately inefficient and unusable :no:

> > Is this true under HDPMI32 ? Does HDPMI32 poll the PIT to distinguish
> them
> > ?
>
> No. it uses the value of ESP to determine if it's an IRQ or an exception.

YES. At least to my 1st question :-P

My disassembled code seems lost :no:

It just compares the ESP against a value stored in a magic place of the stack (or 1 of 4 stacks) ?

> I think this is an excellent exercise for learning low-level programming,
> so I don't want to spoil this pleasure by telling how it is done.

Thanks :-D

Well, it seems to work now :clap:

[image]

; ************************
; *** !!! Hack IDT !!! ***
; ************************

; Ban interrupts

        CLI                       ; Ban all

        mov   al,$FE
        out   $21,al              ; Ban all except timer after STI

; Backup existing values

        mov  ebx,[edi+16]
        mov  eax,[ebx+$40]
        mov  [edi+16+4],eax
        mov  eax,[ebx+$44]
        mov  [edi+16+8],eax

; Prepare

        lea   edx,[ebp+sspalhack] ; Low 16 in DX
        mov   eax,edx
        shr   eax,16              ; High 16 in AX
        mov   cx,cs

;Write

        mov  ebx,[edi+16]
        mov  [ebx+$40],dx          ; Low 16
        mov  [ebx+$42],cx          ; CS
        mov  [ebx+$44], word $EE00 ; Junk 0 | Magic value $EE
        mov  [ebx+$46],ax          ; High 16


Using magic value $EE - same as HDPMI32 places there (to jump to Ring 0 and switch stack ?) and VESAMTRR (to shoot the great "protection" :lol3: ) and my flat ZERO-based CS :-)

Well, there results are much better than your 180 KHz on 1.6 GHz ... but pretty weird :confused: :

- Ring0 DexOS version is slower than Ring3 HDPMI32 version :no:

- 1.7 GHz P4 is slower than 500 MHz P3 :no: (seems to slow down extremely on OUT instruction :no: )

EDIT by rr: Changed subject. Three "e"'s are enough!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 91 users online (0 registered, 91 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum