diff options
author | Pekka Enberg <penberg@kernel.org> | 2012-02-24 20:20:16 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-01 16:39:54 +0100 |
commit | 48bed025ffe213f807e1f2baea6332cca147b739 (patch) | |
tree | aa33036f7e6b8e20af001d40ee5ec854120cb444 | |
parent | e7e2950aa6ab3467e15ef7506793a0e582f5c667 (diff) | |
download | kvmtool-48bed025ffe213f807e1f2baea6332cca147b739.tar.gz |
kvmtool, seabios: Ignore BIOS POST legacy registers
This makes SeaBIOS limp along all the way to boot menu:
[penberg@tux kvm]$ ./vm run --firmware /usr/share/seabios/bios.bin
# lkvm run -k ../../arch/x86/boot/bzImage -m 448 -c 4 --name guest-11658
Start bios (version 0.6.0)
Unable to unlock ram - bridge not found
Ram Size=0x00100000 (0x0000000000000000 high)
CPU Mhz=13
Found 1 cpu(s) max supported 1 cpu(s)
PCI: bus=0 devfn=0x08: vendor_id=0x1af4 device_id=0x1009
PCI: bus=0 devfn=0x10: vendor_id=0x1af4 device_id=0x1009
PCI: bus=0 devfn=0x18: vendor_id=0x1af4 device_id=0x1000
region 0: 0x00000000
region 1: 0x00000000
WARNING - Unable to allocate resource at mptable_init:26!
WARNING - Unable to allocate resource at smbios_init:381!
Scan for VGA option rom
WARNING - Timeout at i8042_wait_read:35!
Found 2 lpt ports
Found 4 serial ports
Scan for option roms
Press F12 for boot menu.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | hw/i8042.c | 8 | ||||
-rw-r--r-- | x86/ioport.c | 15 |
2 files changed, 23 insertions, 0 deletions
@@ -19,6 +19,7 @@ * Registers */ #define I8042_DATA_REG 0x60 +#define I8042_PORT_B_REG 0x61 #define I8042_COMMAND_REG 0x64 /* @@ -307,6 +308,10 @@ static bool kbd_in(struct ioport *ioport, struct kvm *kvm, u16 port, void *data, ioport__write32(data, value); break; } + case I8042_PORT_B_REG: { + ioport__write8(data, 0x20); + break; + } default: return false; } @@ -327,6 +332,9 @@ static bool kbd_out(struct ioport *ioport, struct kvm *kvm, u16 port, void *data kbd_write_data(value); break; } + case I8042_PORT_B_REG: { + break; + } default: return false; } diff --git a/x86/ioport.c b/x86/ioport.c index 03a1286d..11a15923 100644 --- a/x86/ioport.c +++ b/x86/ioport.c @@ -73,6 +73,9 @@ void ioport__setup_arch(struct kvm *kvm) { /* Legacy ioport setup */ + /* 0000 - 001F - DMA1 controller */ + ioport__register(kvm, 0x0000, &dummy_read_write_ioport_ops, 32, NULL); + /* 0x0020 - 0x003F - 8259A PIC 1 */ ioport__register(kvm, 0x0020, &dummy_read_write_ioport_ops, 2, NULL); @@ -85,6 +88,9 @@ void ioport__setup_arch(struct kvm *kvm) /* 0x00A0 - 0x00AF - 8259A PIC 2 */ ioport__register(kvm, 0x00A0, &dummy_read_write_ioport_ops, 2, NULL); + /* 00C0 - 001F - DMA2 controller */ + ioport__register(kvm, 0x00C0, &dummy_read_write_ioport_ops, 32, NULL); + /* PORT 00E0-00EF are 'motherboard specific' so we use them for our internal debugging purposes. */ ioport__register(kvm, IOPORT_DBG, &debug_ops, 1, NULL); @@ -95,9 +101,18 @@ void ioport__setup_arch(struct kvm *kvm) /* 0x00F0 - 0x00FF - Math co-processor */ ioport__register(kvm, 0x00F0, &dummy_write_only_ioport_ops, 2, NULL); + /* PORT 0278-027A - PARALLEL PRINTER PORT (usually LPT1, sometimes LPT2) */ + ioport__register(kvm, 0x0278, &dummy_read_write_ioport_ops, 3, NULL); + + /* PORT 0378-037A - PARALLEL PRINTER PORT (usually LPT2, sometimes LPT3) */ + ioport__register(kvm, 0x0378, &dummy_read_write_ioport_ops, 3, NULL); + /* PORT 03D4-03D5 - COLOR VIDEO - CRT CONTROL REGISTERS */ ioport__register(kvm, 0x03D4, &dummy_read_write_ioport_ops, 1, NULL); ioport__register(kvm, 0x03D5, &dummy_write_only_ioport_ops, 1, NULL); ioport__register(kvm, 0x402, &seabios_debug_ops, 1, NULL); + + /* 0510 - QEMU BIOS configuration register */ + ioport__register(kvm, 0x510, &dummy_read_write_ioport_ops, 2, NULL); } |