From 43182b4a0efd008ae5aab3ccfcc6d644437cd111 Mon Sep 17 00:00:00 2001 From: crazii Date: Sat, 2 Mar 2024 01:37:31 +0800 Subject: [PATCH] bugfix --- Src/HDPMI/HDPMI.ASM | 16 +++++++++++----- Src/HDPMI/I2FHDPMI.ASM | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Src/HDPMI/HDPMI.ASM b/Src/HDPMI/HDPMI.ASM index a8f40b6..4d71640 100644 --- a/Src/HDPMI/HDPMI.ASM +++ b/Src/HDPMI/HDPMI.ASM @@ -1677,7 +1677,7 @@ testIRQ_end: if ?DEBUGLOG cmp esi, 0 je @F - @printf "int %b nested: %b ori %X ", ax, word ptr ss:wIntCount, word ptr ss:wIrqOrgPm + @printf <"irq %b nested: %b ori %X",lf>, ax, word ptr ss:wIntCount, word ptr ss:wIrqOrgPm ;@printf <"lpms_call_int: %b %lX %lX", lf>, ax, edi, offset r3vect08 @@: endif @@ -1992,7 +1992,7 @@ if ?IRQ_ROUTE or ?IRQ_ROUTE_IVT endif if ?DEBUGLOG ;@printf <"ied %X, LPMSused: %b", lf>, bx, word ptr ss:[bLPMSused] - @printf <"ied "> + @printf <"ied",lf> endif @@: pop ebx @@ -2030,7 +2030,7 @@ rpmstacki_nested proc ;@printf <"RTINTN: %lX:%lX", lf>, dword ptr ds, ebx ;@printf <"RTINTN: %lX:%lX %lX", lf>, dword ptr [ebx+4], dword ptr [ebx+8], dword ptr [ebx+12] -if ?NO_NESTED_INTR +if ?NO_NESTED_INTR and 0 ;incase that client modifies flags before IRET test [ebx - sizeof IRETSPM].IRETSPM.rFL, 200h jz @F @@ -2058,7 +2058,7 @@ stillpm: endif if ?DEBUGLOG ;@printf <"iedn, %X", lf>, bx - @printf <"iedn%X %X">, ss:[wIrqOrgPm],bx + @printf <"iedn%X %X", lf>, ss:[wIrqOrgPm],bx endif @@: endif ;?IRQ_ROUTE or ?IRQ_ROUTE_IVT @@ -3564,7 +3564,9 @@ endif mov ax,ss:[wTmpRegAX] if ?DEBUGLOG + pushfd @printf <"lpms_call_int intrmcb",lf> + popfd endif jmp lpms_call_int ;LPMS switch + jump to ring 3 align 4 @@ -3601,7 +3603,11 @@ rpmstackr2 endp ;fall thru! rpmstackr proc if ?DEBUGLOG - @printf <"intrmcb_pm end",lf> + push eax + pushfd + pop eax + @printf <"intrmcb_pm end %X",lf>, ax + pop eax endif lea esp, [esp + sizeof IRET32] ;skip the IRET32 frame dec ss:[cIntRMCB] diff --git a/Src/HDPMI/I2FHDPMI.ASM b/Src/HDPMI/I2FHDPMI.ASM index a1ef02f..9f711cd 100644 --- a/Src/HDPMI/I2FHDPMI.ASM +++ b/Src/HDPMI/I2FHDPMI.ASM @@ -846,6 +846,8 @@ _I2f168A_Hdpmi_UpdateIRQRoute proc near public dec cl mov es:[irqroute_clientivt+ecx*4],0 mov ss:[irqroutetable_rmvec+ecx*4],0 + mov edx, ss:[ecx*4][intrmcbrs.rm_vec] + mov ss:[irqroutetable_rmvec_backup+ecx*4],edx test cl,cl jnz @B @@ -917,8 +919,6 @@ skiprm: mov es:[irqroute_clientivt+ecx*4],edx mov edx, ss:[ebx*4][intrmcbrs.rm_vec] mov ss:[irqroutetable_rmvec+ebx*4],edx - mov ss:[irqroutetable_rmvec_backup+ebx*4],edx - next: test cl, cl