PCI Bios fixup
Hi,
The patch that qemu applies to bochs bios is a bit bugged:
pci_pro_fail:
pop edi
pop esi
- sti
popf
stc
+ and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu retf
The and operation clears carry... So that pci functions always leave carry clear, and hence tell operating systems that they always work... This should rather be:
pci_pro_fail:
pop edi
pop esi
- sti
popf
+ and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu stc
retf
Samuel
Right, this is better. An even better fix would be to clear CS.RPL before the popf.
Regards,
Fabrice.
Quoted 35 lines · Samuel Thibault
Hi,
The patch that qemu applies to bochs bios is a bit bugged:
pci_pro_fail:
pop edi
pop esi(quoted diff) +1
-1- sti popf stc + and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu retfThe and operation clears carry... So that pci functions always leave carry clear, and hence tell operating systems that they always work... This should rather be:
pci_pro_fail:
pop edi
pop esi(quoted diff) +1
-1- sti popf + and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu stc retfSamuel
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel