summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vga and cirrus_vga: substitute switch for equivalent assigntmentJuan Quintela2009-09-092-27/+2Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cirrus_vga: make cirrus_read_hidden_dac() return its resultJuan Quintela2009-09-091-5/+5
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: change tabs to spacesJuan Quintela2009-09-091-3/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cirrus_vga: Add a VGACommonState local var to cirrus_vga_ioport_{read, write}Juan Quintela2009-09-091-80/+82
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga and cirrus_vga: create vga_ioport_invalid() and use it everywhereJuan Quintela2009-09-093-14/+19
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split vga-isa-mm.oJuan Quintela2009-09-094-98/+131
| | | | | | | | | It is only used in mips softmmu, compile only there. it_shift field was only used for vga_isa_mm, move it from VGACommonState to ISAVGAMMstate. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: export vga_mem_{read,write}Juan Quintela2009-09-092-2/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split isa bits inco vga-isa.cJuan Quintela2009-09-093-23/+52
| | | | | | | | Adjust all the VGAState in VGACommonState Compile vga-isa.o in the targets that use it Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split pci bits into vga-pci.cJuan Quintela2009-09-093-137/+170
| | | | | | | | Adjust all the VGAState in VGACommonState Compile vga-pci.o only for targets that use it. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split vga_{load, save} into pci and common partsJuan Quintela2009-09-093-19/+37
| | | | | | | | | Once there adjust VGAState <-> VGACommonState Export vga_common_save/vga_common_load (nreeded by wmvare_vga Remove vga.pci_dev field, it is not needed anymore Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: export vga_ioport_{read,write}Juan Quintela2009-09-092-4/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cirrus_vga: prefix vga_ioport_{read, write} with cirrusJuan Quintela2009-09-091-14/+14
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: remove useless cast from void *Juan Quintela2009-09-091-5/+5
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* USB: use opaque parameter passing for monitor handleBlue Swirl2009-09-072-8/+10
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc64: use ISA bus for i8042Blue Swirl2009-09-061-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc64: remove unused variablesBlue Swirl2009-09-061-7/+1Star
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Make ioport default tables constBlue Swirl2009-09-061-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix indentationBlue Swirl2009-09-061-26/+26
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* When targeting PPU use rlwinm instead of andi. if possiblemalc2009-09-061-8/+54
| | | | | | andi. is microcoded and slow there. Signed-off-by: malc <av1474@comtv.ru>
* Checks in select_soundhw were never intended to accept abbreviationsmalc2009-09-061-1/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Fix Sparse warnings: add "static"Blue Swirl2009-09-053-3/+3
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* esp: handle "select without attention"Artyom Tarasenko2009-09-051-5/+23
| | | | | | | | | | | | | | | | | Up to now "select without attention" was handled the same way as "select with attention". According to http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt select without ATN sends the CDB (Command Descriptor Block) directly, whereas select with ATN sends one message phase byte followed by 6, 10, or 12 command phase bytes. The attached patch implements the behaviour described above. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> [blauwirbel@gmail.com: cleaned up formatting] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Include sys-queue.h early to override system queue definitions on BSDBlue Swirl2009-09-041-0/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Shuffle lines to avoid gcc 3 warning about redundant redeclarationBlue Swirl2009-09-043-18/+18
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Bring pcbios, seabios, and vgabios into the tree as git submodules. Right now,Anthony Liguori2009-09-0431-2097/+26Star
| | | | | | they aren't integrated into the build but we can do that incrementally. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* mips malta: Fix fdc regression and use qdev for i8042 setupStefan Weil2009-09-045-22/+19Star
| | | | | | | | | | | | | | | | | 8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc) breaks MIPS Malta: Tried to create isa device isa-fdc with no isa bus present Fix this by creating an isa bus for piix4. This change also requires some more qdev related changes (similar changes were applied to pc.c) and allows cleaning of piix3/piix4 code. Thanks to Gerd Hoffmann for his hints. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QDict unit-testsLuiz Capitulino2009-09-043-1/+367
| | | | | | | | | | | | This suite contains tests to assure that QDict API works as expected. To execute it you should have check installed and build QEMU with check support enabled (--enable-check-utests) and then run: $ ./check-qdict Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QDict test data fileLuiz Capitulino2009-09-041-0/+4999
| | | | | | | | | | | | | | | This file is used by the QDict stress test, it adds 5k nodes on the dictionary and performs various operations. My original file had 21k entries and almost 400k of size. After some discussion with Eduardo Habkost, I decided to reduce the size. There are ways to generate this kind of data dynamically, but it has its problems too. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QString unit-testsLuiz Capitulino2009-09-043-1/+102
| | | | | | | | | | | | This suite contains tests to assure that QString API works as expected. To execute it you should have check installed and build QEMU with check support enabled (--enable-check-utests) and then run: $ ./check-qstring Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QInt unit-testsLuiz Capitulino2009-09-043-1/+113
| | | | | | | | | | | | This suite contains tests to assure that QInt API works as expected. To execute it you should have check installed and build QEMU with check support enabled (--enable-check-utests) and then run: $ ./check-qint Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add check supportLuiz Capitulino2009-09-041-0/+31
| | | | | | | | | | | | | | Check is a unit testing framework for C. All the QObjects have unit-tests and more will be written for the future data types. More info about check can be found at: http://check.sourceforge.net/ Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Update supported types documentationLuiz Capitulino2009-09-041-1/+3
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: fail when 'i' type is greater than 32-bitLuiz Capitulino2009-09-041-0/+6
| | | | | | | | | | | The 'i' argument type is for 32-bit only and most handlers will use an 'int' to store its value. It's better to fail gracefully when the user enters a value greater than 32-bit than to get subtle casting bugs. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Drop args[] handling codeLuiz Capitulino2009-09-041-61/+10Star
| | | | | | | | This commit drops all the code used to handle the 'args[]' array, as now we use a dictionary to pass arguments. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Drop str_allocated[]Luiz Capitulino2009-09-041-11/+2Star
| | | | | | | | It's not used anymore, as QDict is now used to handle string memory allocation/deallocation. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Drop unused macrosLuiz Capitulino2009-09-041-12/+0Star
| | | | | | | | GET_TLONG() and GET_TPHYSADDR() are not needed anymore, QInt can handle such conversions. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Split monitor_handle_command()Luiz Capitulino2009-09-041-34/+39
| | | | | | | | | | | | In order to help the integration with unit-tests and having a better design, this commit splits monitor_handle_command() into two parts. The parsing code is moved to a function called monitor_parse_command(), while allocating memory and calling the handler is still done by monitor_handle_command(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_10 to use QDictLuiz Capitulino2009-09-041-18/+8Star
| | | | | | | | This commit ports command handlers that receive ten arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Drop handler_8 and handler_9Luiz Capitulino2009-09-041-16/+0Star
| | | | | | | | | | | Commit 79c4f6b08009a1d23177c2be8bd003253cf3686a added handler_8 and handler_9 handling, but there isn't any command handler with those number of arguments. Just drop them. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_7 to use QDictLuiz Capitulino2009-09-041-12/+10Star
| | | | | | | | This commit ports command handlers that receive seven arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_6 to use QDictLuiz Capitulino2009-09-041-8/+6Star
| | | | | | | | This commit ports command handlers that receive six arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_5 to use QDictLuiz Capitulino2009-09-041-21/+28
| | | | | | | | | | This commit ports command handlers that receive five arguments to use the new monitor's dictionary. Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_4 to use QDictLuiz Capitulino2009-09-041-13/+9Star
| | | | | | | | | | This commit ports command handlers that receive four arguments to use the new monitor's dictionary. Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_3 to use QDictLuiz Capitulino2009-09-045-23/+28
| | | | | | | | This commit ports command handlers that receive three arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_2 to use QDictLuiz Capitulino2009-09-047-20/+35
| | | | | | | | This commit ports command handlers that receive two arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_1 to use QDictLuiz Capitulino2009-09-048-47/+67
| | | | | | | | This commit ports command handlers that receive one argument to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Port handler_0 to use QDictLuiz Capitulino2009-09-043-11/+12
| | | | | | | | | | | | This commit ports command handlers that receive no arguments to use the new monitor's dictionary. It might seem no sense to do this, as the handlers have no arguments, but at the end of this porting work all handlers will have the same structure. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Export QDict headerLuiz Capitulino2009-09-041-0/+1
| | | | | | | | Command handlers will have to use QDict functions, so export qdict.h through monitor.h. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Setup a QDict with arguments to handlersLuiz Capitulino2009-09-041-0/+18
| | | | | | | | | | | | | | | | | | | | With this commit monitor_handle_command() will be able to setup a QDict with arguments to command handlers. However, the current 'args[]' method is still being used, next changes will port commands to get their arguments from the dictionary. Two changes are worth noting: 1. The '/' argument type always adds the following standard keys in the dictionary: 'count', 'format' and 'size'. This way, the argument name used in the 'args_type' string doesn't matter 2. The optional argument type '?' doesn't need to pass the additional 'has_arg' argument, hanlders can do the same check with qdict_haskey() Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: New format for handlers argument typesLuiz Capitulino2009-09-042-59/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current handlers argument types, as defined in qemu-monitor.hx file, are a sequence of chars where each one represents one argument type of the command handler. The number of chars is also used to know how many arguments a given handler accepts. This commit defines a new format, which makes mandatory the use of a name for each argument. For example, do_eject() command handler is currently defined as: { "eject", "-fB", do_eject, ... } With the new format it becomes: { "eject", "force:-f,filename:B", do_eject, ... } This way the Monitor will be capable of setting up a dictionary, using each argument's name as the key and the argument itself as the value. This commit also adds two new functions: key_get_info() and next_arg_type(), both are used to parse the new format. Currently key_get_info() consumes the 'key' part of the new format and discards it, this way the current parsing code is not affected by this change. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>