* [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
@ 2014-02-11 22:46 Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode Hervé Poussineau
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Hervé Poussineau @ 2014-02-11 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau, Anthony Liguori, Michael S. Tsirkin
With those two patches, I'm able to run a real BIOS in QEMU (Iwill P55XB2)
However, QEMU crashes when rebooting the computer after leaving BIOS settings.
Hervé Poussineau (2):
pam: partly fix write-only mode
pckbd: return 'keyboard enabled' on read input port command
hw/input/pckbd.c | 2 +-
hw/pci-host/pam.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
@ 2014-02-11 22:46 ` Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 2/2] pckbd: return 'keyboard enabled' on read input port command Hervé Poussineau
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Hervé Poussineau @ 2014-02-11 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau, Anthony Liguori, Michael S. Tsirkin
In write-only mode, writes are forwarded to RAM, while reads should not be
handled (ie should return 0xff).
Assume that in this mode, no read access is ever done, as they shouldn't
give any sensible result.
So, in write-only mode, alias PAM region to RAM, instead of PCI memory
(which can even be mapped to some device!)
This fixes Award BIOS, which use this mode to shadow system BIOS and video BIOS.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/pci-host/pam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c
index ec6be46..e1e95aa 100644
--- a/hw/pci-host/pam.c
+++ b/hw/pci-host/pam.c
@@ -68,7 +68,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory,
/* XXX: should distinguish read/write cases */
memory_region_init_alias(&mem->alias[0], OBJECT(dev), "pam-pci", pci_address_space,
start, size);
- memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", pci_address_space,
+ memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", ram_memory,
start, size);
for (i = 0; i < 4; ++i) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 2/2] pckbd: return 'keyboard enabled' on read input port command
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode Hervé Poussineau
@ 2014-02-11 22:46 ` Hervé Poussineau
2014-03-03 22:05 ` [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-03-05 18:46 ` Michael S. Tsirkin
3 siblings, 0 replies; 10+ messages in thread
From: Hervé Poussineau @ 2014-02-11 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau, Anthony Liguori, Michael S. Tsirkin
Bit 7 of Input Port is the keyboard inhibit switch.
0 means keyboard inhibited, while 1 means keyboard enabled.
Incidentaly, this also fixes an error encountered while booting
an Award BIOS: "Keyboard is locked out - Unlock the key".
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/input/pckbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 655b8c5..29af3d7 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -281,7 +281,7 @@ static void kbd_write_command(void *opaque, hwaddr addr,
kbd_update_irq(s);
break;
case KBD_CCMD_READ_INPORT:
- kbd_queue(s, 0x00, 0);
+ kbd_queue(s, 0x80, 0);
break;
case KBD_CCMD_READ_OUTPORT:
kbd_queue(s, s->outport, 0);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 2/2] pckbd: return 'keyboard enabled' on read input port command Hervé Poussineau
@ 2014-03-03 22:05 ` Hervé Poussineau
2014-03-04 23:49 ` Michael S. Tsirkin
2014-03-05 18:46 ` Michael S. Tsirkin
3 siblings, 1 reply; 10+ messages in thread
From: Hervé Poussineau @ 2014-03-03 22:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Michael S. Tsirkin
Ping.
QEMU crash at reboot is due to not resetting PAM registers at i440fx
reset, but a patch has already been rejected on ML:
http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
Hervé
Hervé Poussineau a écrit :
> With those two patches, I'm able to run a real BIOS in QEMU (Iwill P55XB2)
> However, QEMU crashes when rebooting the computer after leaving BIOS settings.
>
> Hervé Poussineau (2):
> pam: partly fix write-only mode
> pckbd: return 'keyboard enabled' on read input port command
>
> hw/input/pckbd.c | 2 +-
> hw/pci-host/pam.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-03-03 22:05 ` [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
@ 2014-03-04 23:49 ` Michael S. Tsirkin
2014-03-05 8:15 ` Paolo Bonzini
2014-03-05 18:50 ` Andreas Färber
0 siblings, 2 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2014-03-04 23:49 UTC (permalink / raw)
To: Hervé Poussineau; +Cc: qemu-devel, Anthony Liguori
On Mon, Mar 03, 2014 at 11:05:17PM +0100, Hervé Poussineau wrote:
> Ping.
>
> QEMU crash at reboot is due to not resetting PAM registers at i440fx
> reset, but a patch has already been rejected on ML:
> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
>
> Hervé
I thought an alternative fix is being worked on?
http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
> Hervé Poussineau a écrit :
> >With those two patches, I'm able to run a real BIOS in QEMU (Iwill P55XB2)
> >However, QEMU crashes when rebooting the computer after leaving BIOS settings.
> >
> >Hervé Poussineau (2):
> > pam: partly fix write-only mode
> > pckbd: return 'keyboard enabled' on read input port command
> >
> > hw/input/pckbd.c | 2 +-
> > hw/pci-host/pam.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-03-04 23:49 ` Michael S. Tsirkin
@ 2014-03-05 8:15 ` Paolo Bonzini
2014-03-05 21:48 ` Hervé Poussineau
2014-03-05 18:50 ` Andreas Färber
1 sibling, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2014-03-05 8:15 UTC (permalink / raw)
To: Michael S. Tsirkin, Hervé Poussineau; +Cc: qemu-devel, Anthony Liguori
Il 05/03/2014 00:49, Michael S. Tsirkin ha scritto:
> On Mon, Mar 03, 2014 at 11:05:17PM +0100, Hervé Poussineau wrote:
>> Ping.
>>
>> QEMU crash at reboot is due to not resetting PAM registers at i440fx
>> reset, but a patch has already been rejected on ML:
>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
>>
>> Hervé
>
> I thought an alternative fix is being worked on?
> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
Hervé, how does the BIOS do the reset?
Paolo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
` (2 preceding siblings ...)
2014-03-03 22:05 ` [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
@ 2014-03-05 18:46 ` Michael S. Tsirkin
3 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2014-03-05 18:46 UTC (permalink / raw)
To: Hervé Poussineau; +Cc: qemu-devel, Anthony Liguori
On Tue, Feb 11, 2014 at 11:46:01PM +0100, Hervé Poussineau wrote:
> With those two patches, I'm able to run a real BIOS in QEMU (Iwill P55XB2)
> However, QEMU crashes when rebooting the computer after leaving BIOS settings.
>
> Hervé Poussineau (2):
> pam: partly fix write-only mode
> pckbd: return 'keyboard enabled' on read input port command
Thanks, I've applied this.
> hw/input/pckbd.c | 2 +-
> hw/pci-host/pam.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-03-04 23:49 ` Michael S. Tsirkin
2014-03-05 8:15 ` Paolo Bonzini
@ 2014-03-05 18:50 ` Andreas Färber
2014-03-05 21:47 ` Hervé Poussineau
1 sibling, 1 reply; 10+ messages in thread
From: Andreas Färber @ 2014-03-05 18:50 UTC (permalink / raw)
To: Michael S. Tsirkin, Hervé Poussineau
Cc: David Woodhouse, qemu-devel, Anthony Liguori
Am 05.03.2014 00:49, schrieb Michael S. Tsirkin:
> On Mon, Mar 03, 2014 at 11:05:17PM +0100, Hervé Poussineau wrote:
>> Ping.
>>
>> QEMU crash at reboot is due to not resetting PAM registers at i440fx
>> reset, but a patch has already been rejected on ML:
>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
>>
>> Hervé
>
> I thought an alternative fix is being worked on?
> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
And I was told an alternative fix had been applied - was I misinformed?
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-03-05 18:50 ` Andreas Färber
@ 2014-03-05 21:47 ` Hervé Poussineau
0 siblings, 0 replies; 10+ messages in thread
From: Hervé Poussineau @ 2014-03-05 21:47 UTC (permalink / raw)
To: Andreas Färber
Cc: David Woodhouse, qemu-devel, Anthony Liguori, Michael S. Tsirkin
Le mer. 05 mars 2014 19:50:04 CET, Andreas Färber a écrit :
> Am 05.03.2014 00:49, schrieb Michael S. Tsirkin:
>> On Mon, Mar 03, 2014 at 11:05:17PM +0100, Hervé Poussineau wrote:
>>> Ping.
>>>
>>> QEMU crash at reboot is due to not resetting PAM registers at i440fx
>>> reset, but a patch has already been rejected on ML:
>>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
>>>
>>> Hervé
>>
>> I thought an alternative fix is being worked on?
>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
>
> And I was told an alternative fix had been applied - was I misinformed?
>
> Andreas
>
In current master, I don't see any reset of PAM registers in
hw/pci-host/piix.c .
However, piix3 has a reset function.
Hervé
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness
2014-03-05 8:15 ` Paolo Bonzini
@ 2014-03-05 21:48 ` Hervé Poussineau
0 siblings, 0 replies; 10+ messages in thread
From: Hervé Poussineau @ 2014-03-05 21:48 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Hervé Poussineau, qemu-devel, Anthony Liguori,
Michael S. Tsirkin
Le 05/03/2014 09:15, Paolo Bonzini a écrit :
> Il 05/03/2014 00:49, Michael S. Tsirkin ha scritto:
>> On Mon, Mar 03, 2014 at 11:05:17PM +0100, Hervé Poussineau wrote:
>>> Ping.
>>>
>>> QEMU crash at reboot is due to not resetting PAM registers at i440fx
>>> reset, but a patch has already been rejected on ML:
>>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02928.html
>>>
>>> Hervé
>>
>> I thought an alternative fix is being worked on?
>> http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
>
> Hervé, how does the BIOS do the reset?
>
> Paolo
At cold boot, BIOS is shadowed to RAM, and then hot-patched, so a warm boot won't do the same thing.
At BIOS exit, BIOS jumps to the new warm boot path.
This warm path doesn't work and crashes QEMU with "qemu: fatal: Trying to execute code outside RAM or ROM at 0x000a1249" ; I've no idea why exactly.
Resetting PAM registers prevents the shadowed copy to be visible, and BIOS does again a cold boot, which works.
Hervé
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-03-05 21:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode Hervé Poussineau
2014-02-11 22:46 ` [Qemu-devel] [PATCH 2/2] pckbd: return 'keyboard enabled' on read input port command Hervé Poussineau
2014-03-03 22:05 ` [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-03-04 23:49 ` Michael S. Tsirkin
2014-03-05 8:15 ` Paolo Bonzini
2014-03-05 21:48 ` Hervé Poussineau
2014-03-05 18:50 ` Andreas Färber
2014-03-05 21:47 ` Hervé Poussineau
2014-03-05 18:46 ` Michael S. Tsirkin
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).