summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Fix exit on 'pci_add' Monitor commandLuiz Capitulino2009-10-053-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user issues one of the following commands to the Monitor: pci_add pci_addr=auto nic model=None pci_add pci_addr=auto nic model=? QEMU will exit, because the function used to perform sanity checks (qemu_check_nic_model_list()) exits on error. This function is used by the startup code, where it makes sense to exit on error, but in the Monitor it doesn't. Changing qemu_check_nic_model_list() to not exit on error is not possible though, as it's used by the board init code (the PC one), where all board specific code must have void return. The way I've chosen to fix this was to introduce a new function called pci_nic_supported(), which checks if the NIC is supported and returns true or false accordingly. The new function is used only by the Monitor, it performs the necessary check and returns an error in case the NIC is not supported, thus qemu_check_nic_model_list()'s exit is never trigged. The following should be observed: 1. Only the specified NIC is checked, the default one is assumed to be supported 2. The NIC query command (model=?) won't work with pci_add, the right way to do this with the Monitor is to add a new command Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Add VMState supportJan Kiszka2009-10-052-29/+192
| | | | | | | | Register all relevant fields of Musicpal device states with the VMState framework. This involves a few type changes of state variables. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Make PIT emulation more robustJan Kiszka2009-10-051-6/+28
| | | | | | | | Stop the periodic timers of the PIT on reset, disabling via the control register and invalid parameters. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: True reset support for audio deviceJan Kiszka2009-10-051-2/+4
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: True reset support for GPIOJan Kiszka2009-10-051-3/+14
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Coding style fixesJan Kiszka2009-10-052-41/+59
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Clean up typecastsJan Kiszka2009-10-051-5/+5
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Rework GPIO input eventsJan Kiszka2009-10-051-75/+75
| | | | | | | | | | | | | | | | The qdev_gpio conversion of 343ec8e caused come polarity mismatch of key event pins and left an overly complex solution behind. Take this chance and refactor the GPIO input system of the Musicpal, moving it closer to reality: - Instantiate all 32 GPIO input pins and do the routing only via qdev_connect_gpio_out. - Implement IMR and IER registers. They manage the GPIO pin IRQ. IMR seems to enable IRQs on rising edges, IER on falling ones. At least this matches what the Musicpal fireware require. - Move key pin logic inversion from the GPIO layer to musicpal_key. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* musicpal: Catch null TX qeueuesJan Kiszka2009-10-051-1/+3
| | | | | | | | | | They likely represent invalid queues that should be skipped. We already do this for RX queues. Wish I had a spec... Credits go to malc for analyzing the issue and suggesting this fix. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add suppot for field_exist() testJuan Quintela2009-10-051-0/+26
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add *TL functions to vmstateJuan Quintela2009-10-051-0/+19
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove i2c_slave_load/saveJuan Quintela2009-10-052-13/+0
| | | | | | | All its users moved to vmstate Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port lm832x deviceJuan Quintela2009-10-051-70/+37
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* lm832x: make fields to have the same types that they are saved/loadedJuan Quintela2009-10-051-19/+22
| | | | | | | | | They were saved as uint8_t already. To make things simpler, I just reg == -1 used to indicate an error, I create LM832x_GENERAL_ERROR with vale 0xff to represet it Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add support for arrays of pointersJuan Quintela2009-10-051-0/+15
| | | | | | | We need this to send arrays of timers Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port twl92230 deviceJuan Quintela2009-10-051-110/+88
| | | | | | | | | Just don't look. struct tm members are ints' and they are sent as uint16_t. VMState code complains as it should. Have to create hacky int32_as_uint16 type. Don't ever think about copying it Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* twl92230: change pwrbtn_state to uint8_tJuan Quintela2009-10-051-1/+1
| | | | | | | its value is always the level of an interrupt, 0 or 1 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port tmp105 deviceJuan Quintela2009-10-051-31/+25
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tmp105: change len and alorm to uint8_tJuan Quintela2009-10-051-2/+2
| | | | | | | | They were using only with very small integers, and they are sent/read as bytes. They can't become negative as far as I can see Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: create VMSTATE_INT16_ARRAYJuan Quintela2009-10-051-0/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port ssd0303 deviceJuan Quintela2009-10-051-43/+22
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port pxa2xx_i2c deviceJuan Quintela2009-10-051-28/+26
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: create VMSTATE_STRUCT_POINTERJuan Quintela2009-10-051-0/+9
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port max7310 deviceJuan Quintela2009-10-051-33/+18
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port wm8750 deviceJuan Quintela2009-10-051-75/+45
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: create VMSTATE_I2C_SLAVEJuan Quintela2009-10-052-1/+12
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add uint8 arrayJuan Quintela2009-10-051-0/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port i2c_slave deviceJuan Quintela2009-10-051-7/+26
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port i2c_bus deviceJuan Quintela2009-10-051-12/+19
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* i2c: addresses are load/save as uint8_t values, change types to reflect thisJuan Quintela2009-10-056-34/+35
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Add support for uint8_tJuan Quintela2009-10-052-0/+38
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add support for sending partial arraysJuan Quintela2009-10-051-0/+12
| | | | | | | | | | This one is needed for changees happening on fdc. It allows you to send arrays of structs whose size we want to send it is another field with type uint8_t. (If you have been able to read the whole sentence without stoping for breathing, you can use it. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove ps2_kbd_load_old()Juan Quintela2009-10-051-12/+4
| | | | | | | | Now that we have version_id on post_load() we don't need the old load function Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove const from pre_save() functionsJuan Quintela2009-10-054-8/+8
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add version_id argument to post_loadJuan Quintela2009-10-0511-11/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove const for put operationsJuan Quintela2009-10-053-5/+5
| | | | | | | | | | In a later patch, we introduce pre_save() and post_save() functions. The whole point of that operation is to change things in the state. Without this patch, we have to remove the const qualifier in each use with a cast Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: move back dirty_log functions to vga.cJuan Quintela2009-10-052-12/+12
| | | | | | | They are needed there on qemu-kvm. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cirrus_vga: also assign gr0/1 when writting shadow_gr0/1Juan Quintela2009-10-051-0/+2
| | | | | | | | | This is a regression/bug caused by previous vga_cleanup. This fixes Ubuntu installer reported by: Pierre Riteau Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "eepro100: Remove unused device status entries"Aurelien Jarno2009-10-051-16/+62
| | | | This reverts commit 3031efabd0bb744126a53f32c5426580b5d394d5.
* eepro100: Add more i825xx devicesStefan Weil2009-10-041-8/+94
| | | | | | | | | | | | | The new devices added here are still not functional - partially because some patches are still missing, partially because I cannot test them. Nevertheless they belong to the same family and will be supported by this driver some day. As soon as they work, they will also be added to hw/pci.c. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* eepro100: Remove unused device status entriesStefan Weil2009-10-041-62/+16
| | | | | | | | | | | | A lot of entries are unused (they were added by copy + paste from other drivers during development of eepro100.c). Removing them from nic_save, nic_load makes any old saved status incompatible, so a new version for the virtual machine data was needed, too. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/omap_dma: add matching {} in if 0Michael S. Tsirkin2009-10-041-60/+62
| | | | | | | | | MULTI_REQ is never defined, so it doesn't matter much, but since we have an if statement there, let's add {} to clarify what it should do if it's uncommented, and indent the code properly. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-01226-2225/+2225
| | | | | | | | | | | | 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-01226-2225/+2225
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* escc: fix another coding style nitMichael S. Tsirkin2009-09-301-2/+2
| | | | | | | | | Fix another place with =- to be "= -". to avoid confusion with old-style "-=" (which we also have, and needs to be fixed). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* twl92230: fix old style increment/decrement usageMichael S. Tsirkin2009-09-301-2/+2
| | | | | | | | Modern compilers do not parse "=-" as decrement: you must use "-=" for that. Same for "=+"/"+=". Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* omap_dma: fix unbalanced { in commented out codeMichael S. Tsirkin2009-09-301-1/+3
| | | | | | | Fix unbalanced {} in commented out code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* escc: fix coding style nitMichael S. Tsirkin2009-09-301-2/+2
| | | | | | | | | Put space between = and - assigning a negative number to avoid confusion with old-style "-=" (which we also have, and needs to be fixed). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* eepro100: Fix format strings in debug messagesStefan Weil2009-09-261-7/+7
| | | | | | | size_t arguments need %zu instead of %d. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* eepro100: Replace sprintf by snprintfStefan Weil2009-09-261-3/+3
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud