* [Qemu-devel] PCI Bios fixup
@ 2006-09-07 1:02 Samuel Thibault
2006-09-09 12:10 ` Fabrice Bellard
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Thibault @ 2006-09-07 1:02 UTC (permalink / raw)
To: qemu-devel; +Cc: guillem
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] PCI Bios fixup
2006-09-07 1:02 [Qemu-devel] PCI Bios fixup Samuel Thibault
@ 2006-09-09 12:10 ` Fabrice Bellard
0 siblings, 0 replies; 2+ messages in thread
From: Fabrice Bellard @ 2006-09-09 12:10 UTC (permalink / raw)
To: samuel.thibault; +Cc: guillem, qemu-devel
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
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-09 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 1:02 [Qemu-devel] PCI Bios fixup Samuel Thibault
2006-09-09 12:10 ` Fabrice Bellard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).