PC: improve emulation correctness
cover PC: improve emulation correctness
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(-)
Signature · 1 line
1.7.10.4
PATCH 1/2 pam: partly fix write-only mode
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.
--- hw/pci-host/pam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/pam.c +1 -1
@@ -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) {
Signature · 1 line
1.7.10.4
PATCH 2/2 pckbd: return 'keyboard enabled' on read input port command
In reply to Hervé PoussineauBit 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".
--- hw/input/pckbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/input/pckbd.c +1 -1
@@ -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 );
Signature · 1 line
1.7.10.4
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é
Quoted 11 lines · Hervé Poussineau
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 commandhw/input/pckbd.c | 2 +- hw/pci-host/pam.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines · Hervé Poussineau
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.htmlHervé
I thought an alternative fix is being worked on?
http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.html
Quoted 12 lines
Quoted 11 lines · Hervé Poussineau
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 commandhw/input/pckbd.c | 2 +- hw/pci-host/pam.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Il 05/03/2014 00:49, Michael S. Tsirkin ha scritto:
Quoted 11 lines · Hervé Poussineau
Quoted 7 lines
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.htmlHervé
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
Quoted 8 lines · Paolo Bonzini
Il 05/03/2014 00:49, Michael S. Tsirkin ha scritto:
Quoted 7 lines · Hervé Poussineau
Quoted 6 lines
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
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Hervé
I thought an alternative fix is being worked on?
http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.htmlHervé, 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é
Am 05.03.2014 00:49, schrieb Michael S. Tsirkin:
Quoted 11 lines · Hervé Poussineau
Quoted 7 lines
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.htmlHervé
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
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 8 lines · Andreas Färber
Am 05.03.2014 00:49, schrieb Michael S. Tsirkin:
Quoted 7 lines · Hervé Poussineau
Quoted 6 lines
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
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Hervé
I thought an alternative fix is being worked on?
http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg02967.htmlAnd 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é
Quoted 6 lines · Hervé Poussineau
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.
Quoted 6 lines
hw/input/pckbd.c | 2 +- hw/pci-host/pam.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Signature · 1 line
1.7.10.4