qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PCI Bios fixup


From: Fabrice Bellard
Subject: Re: [Qemu-devel] PCI Bios fixup
Date: Sat, 09 Sep 2006 14:10:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Right, this is better. An even better fix would be to clear CS.RPL before the popf.

Regards,

Fabrice.

Samuel Thibault wrote:
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


_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]