summaryrefslogtreecommitdiffstats
path: root/hw/pckbd.c
Commit message (Collapse)AuthorAgeFilesLines
* pc: move port 92 stuff back to pc.c from pckbd.cBlue Swirl2011-01-061-17/+2
| | | | | | | | | | | | | 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a introduced a bug concerning reset bit for port 92. Since the keyboard output port and port 92 are not compatible anyway, let's separate them. Reported-by: Peter Lieven <pl@dlh.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> -- v2: added reset handler and VMState
* Keep track of ISA ports ISA device is using in qdev.Gleb Natapov2010-12-111-0/+3
| | | | | | | Store all io ports used by device in ISADevice structure. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add endianness as io mem parameterAlexander Graf2010-12-111-1/+2
| | | | | | | | | | | | | As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pckbd: support for commands 0xf0-0xff: Pulse output bitBernhard Kohl2010-08-221-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | I have a guest OS which sends the command 0xfd to the keyboard controller during initialization. To get rid of the message "qemu: unsupported keyboard cmd=0x%02x\n" I added support for the pulse output bit commands. I found the following explanation here: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-11.html#ss11.3 Command 0xf0-0xff: Pulse output bit Bits 3-0 of the output port P2 of the keyboard controller may be pulsed low for approximately 6 µseconds. Bits 3-0 of this command specify the output port bits to be pulsed. 0: Bit should be pulsed. 1: Bit should not be modified. The only useful version of this command is Command 0xfe. (For MCA, replace 3-0 by 1-0 in the above.) Command 0xfe: System reset Pulse bit 0 of the output port P2 of the keyboard controller. This will reset the CPU. Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* savevm: Add DeviceState paramAlex Williamson2010-07-061-1/+1
| | | | | | | | | | When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pckbd: improve debuggingBlue Swirl2010-05-221-13/+15
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Compile pckbd only onceBlue Swirl2010-05-221-27/+59
| | | | | | | Use a qemu_irq to indicate A20 line changes. Move I/O port 92 to pckbd.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pckbd: don't use any static stateBlue Swirl2010-05-121-3/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add "static" to please SparseBlue Swirl2009-12-041-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* savevm: Port to qdev.vmsd all devices that have qdevJuan Quintela2009-12-031-1/+12
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Sparc64/x86: remove unneeded calls to device resetBlue Swirl2009-11-071-2/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-5/+5
| | | | | | | | | | | | In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Get rid of _t suffixmalc2009-10-011-5/+5
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* vmstate: port pckbd deviceJuan Quintela2009-09-111-24/+15
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev/isa: finish pckbd conversionGerd Hoffmann2009-09-101-22/+0
| | | | | | | drop old init path and switch remaining users to isa_create_simple(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: simplify isa irq assignmentsGerd Hoffmann2009-09-101-2/+2
| | | | | | | | | isa-bus owns the isa irqs now, so it can hand them out directly. There is no need for the separate isa_connect_irqs step, drop it. Also hard-code isa interrupts which can't be configured anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: drop iobase properties from isa busGerd Hoffmann2009-09-101-4/+4
| | | | | | | | | | Lot of ISA devices work at fixed addresses, so having iobase as bus property doesn't make much sense. Devices which can have different iobases will get a device property. Also simply hard-code stuff which can't be configured anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: add return value to init() callbacks.Gerd Hoffmann2009-08-271-1/+2
| | | | | | | | | | | | | | | | | | Sorry folks, but it has to be. One more of these invasive qdev patches. We have a serious design bug in the qdev interface: device init callbacks can't signal failure because the init() callback has no return value. This patch fixes it. We have already one case in-tree where this is needed: Try -device virtio-blk-pci (without drive= specified) and watch qemu segfault. This patch fixes it. With usb+scsi being converted to qdev we'll get more devices where the init callback can fail for various reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make CPURead/WriteFunc structure 'const'Blue Swirl2009-08-251-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev/isa: add qdev support to i8042 (aka ps/2 kbd+mouse).Gerd Hoffmann2009-08-101-0/+40
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* Revert "Introduce reset notifier order"Jan Kiszka2009-06-291-2/+2
| | | | | | | | | This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and updates later added users of qemu_register_reset), we solved the problem it originally addressed less invasively. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove io_index argument from cpu_register_io_memory()Avi Kivity2009-06-161-1/+1
| | | | | | | | | The parameter is always zero except when registering the three internal io regions (ROM, unassigned, notdirty). Remove the parameter to reduce the API's power, thus facilitating future change. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce reset notifier orderJan Kiszka2009-05-221-2/+2
| | | | | | | | | | | | | | | Add the parameter 'order' to qemu_register_reset and sort callbacks on registration. On system reset, callbacks with lower order will be invoked before those with higher order. Update all existing users to the standard order 0. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Delete some unused macros detected with -Wp,-Wunused-macros useblueswir12009-03-161-2/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
* MIPS Magnum: fix memory-mapped i8042aurel322008-12-101-18/+11
| | | | | | | | | | | | | | | | | | | | | | 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 <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5962 c046a42c-6fe2-441c-8c8c-71466251a162
* Change MMIO callbacks to use offsets, not absolute addresses.pbrook2008-12-011-4/+2
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix undeclared symbol warnings from sparseblueswir12008-10-261-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert "QEMU keyboard issue with Gujin-2.2" (Avi Kivity).balrog2008-07-191-1/+1
| | | | | | | | | | | This reverts commit r3421, which kills the mouse in SuSE Linux 9.1 (there were other reports of breakage earlier also). Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4905 c046a42c-6fe2-441c-8c8c-71466251a162
* Enhance PC kbd debugging (patch from Hervé Poussineau)balrog2008-02-101-6/+9
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3972 c046a42c-6fe2-441c-8c8c-71466251a162
* Add statics and missing #includes for prototypes.pbrook2007-11-181-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* "QEMU keyboard issue with Gujin-2.2", by Etienne Lorrain.ths2007-10-201-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3421 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths2007-09-171-2/+2
| | | | | | the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-5/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix incorrect target_ulong use in hw devicesblueswir12007-06-081-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2962 c046a42c-6fe2-441c-8c8c-71466251a162
* Support it_shift for mmapped pckbd.ths2007-04-161-12/+22
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2691 c046a42c-6fe2-441c-8c8c-71466251a162
* Memory-mapped interface for PS/2 controller, by Herve Poussineau.ths2007-04-161-2/+59
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2685 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify IRQ handling.pbrook2007-04-071-12/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
* VMMouse Emulation, by Anthony Liguori.ths2007-03-201-0/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2514 c046a42c-6fe2-441c-8c8c-71466251a162
* PS/2 interface - Allow custom IO ports + IRQ, by Herve Poussineau.ths2007-02-181-12/+23
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2431 c046a42c-6fe2-441c-8c8c-71466251a162
* Keyboard savevm fix (malc).pbrook2006-04-081-3/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1797 c046a42c-6fe2-441c-8c8c-71466251a162
* Add support for raw AT keyboard scancodes.pbrook2006-02-081-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1749 c046a42c-6fe2-441c-8c8c-71466251a162
* PS2 mouse and keyboard separation (Paul Brook)bellard2005-11-261-378/+40
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1658 c046a42c-6fe2-441c-8c8c-71466251a162
* cpu_single_env usage fixbellard2005-11-211-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
* mouse reset fixbellard2005-01-271-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1245 c046a42c-6fe2-441c-8c8c-71466251a162
* enabled wheel mouse supportbellard2005-01-171-2/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1228 c046a42c-6fe2-441c-8c8c-71466251a162
* kbd save/restorebellard2004-07-101-0/+48
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@991 c046a42c-6fe2-441c-8c8c-71466251a162
* new reset APIbellard2004-06-201-6/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@938 c046a42c-6fe2-441c-8c8c-71466251a162
* hid event handlingbellard2004-06-031-4/+8
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@880 c046a42c-6fe2-441c-8c8c-71466251a162
* keyboard irq generation fixbellard2004-04-291-21/+18
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@778 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud