From 4efbe58fb57314f422578a543fe3f47ffc854b68 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Wed, 10 Dec 2008 15:02:07 +0000 Subject: MIPS Magnum: fix memory-mapped i8042 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current implementation of memory-mapped i8042 controller is atm implemented with an interface shift (it_shift) parameter, like most all memory-mapped devices in Qemu. However, this isn't suitable for MIPS Magnum, where i8042 controller is at 0x80005000 up to 0x80005fff. Thomas Bogendoerfer (from #mipslinux) tested the behaviour of a real machine, and found that odd addresses are for status/command register, and even addresses for data register. Attached patch implements this behaviour by replacing the it_shift parameter by a mask one. Incidentally, keyboard now works on OpenBSD 2.3, which accesses i8042 controller at 0x80005060 and 0x80005061. Signed-off-by: Hervé Poussineau Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5962 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mips_jazz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/mips_jazz.c') diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index cdf2196204..0dcc332c40 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -229,7 +229,7 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, cpu_register_physical_memory(0x80004000, 0x00001000, s_rtc); /* Keyboard (i8042) */ - i8042_mm_init(rc4030[6], rc4030[7], 0x80005000, 0); + i8042_mm_init(rc4030[6], rc4030[7], 0x80005000, 0x1000, 0x1); /* Serial ports */ if (serial_hds[0]) -- cgit v1.2.3