In rombios.c at line 11256
call pcibios_real
jc pcibios_error
retf 2
pcibios_error:
The retf 2 instruction doesn't enable interrupts again like the iret will.
For example, try the following code (as a DOS guest):
org 100h
mov al,'A'
int 29h
mov ah,0B1h ; INT 1A - PCI BIOS v2.0c+ - FIND PCI CLASS CODE
mov al,003h ;
mov ecx,0C0300h ; xxxx_xxxx_0000_1100_0000_0011_0000_0000
; bits 31-24 unused
; bits 23-16 class
; bits 15-8 subclass
; bits 7-0 programming interface
mov si,0
int 1Ah
mov al,'B'
int 29h
call delay55ms
mov al,'C'
int 29h
.exit
delay55ms proc near uses es
xor ax,ax
mov es,ax
mov ax,es:[046Ch]
@@: cmp ax,es:[046Ch]
je short @b
mov ax,es:[046Ch]
@@: cmp ax,es:[046Ch]
je short @b
ret
delay55ms endp
Since the bios did not re enable the Interrupts, the BIOS timer tick at 0x0040:006C does not increment.
So, for a fix, would the following work:
call pcibios_real
jc pcibios_error
+ sti
retf 2
pcibios_error:
Or will you have to replace the flags value on the stack with the new flags value, then do a iret as expected?
Thanks,
Ben
Fixed in CVS now.