summaryrefslogtreecommitdiff
path: root/hw/mips_jazz.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity1-4/+4
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-22serial: split serial.cGerd Hoffmann1-0/+1
Split serial.c into serial.c, serial.h and serial-isa.c. While being at creating a serial.h header file move the serial prototypes from pc.h to the new serial.h. The latter leads to s/pc.h/serial.h/ in tons of boards which just want the serial bits from pc.h Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-20create struct for machine initialization argumentsEduardo Habkost1-8/+6
This should help us to: - More easily add or remove machine initialization arguments without having to change every single machine init function; - More easily make mechanical changes involving the machine init functions in the future; - Let machine initialization forward the init arguments to other functions more easily. This change was half-mechanical process: first the struct was added with the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local variable initialization to all functions. Then the compiler helped me locate the local variables that are unused, so they could be removed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-02Support 'help' as a synonym for '?' in command line optionsPeter Maydell1-1/+1
For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-04mips_jazz: Pass MIPSCPU to main_cpu_reset()Andreas Färber1-3/+4
Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Hervé Poussineau <hpoussin@reactos.org>
2012-06-04mips_jazz: Use cpu_mips_init() to obtain MIPSCPUAndreas Färber1-2/+4
Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Hervé Poussineau <hpoussin@reactos.org>
2012-03-14mips hw/: Don't use CPUStateAndreas Färber1-3/+3
Scripted conversion: for file in hw/mips_*.[hc]; do sed -i "s/CPUState/CPUMIPSState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14Rename cpu_reset() to cpu_state_reset()Andreas Färber1-1/+1
Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22jazz-led: convert to QOMHervé Poussineau1-1/+1
Some simplifications in I/O functions are possible because Jazz LED only registers one byte of I/O. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17pcspk: Convert to qdevJan Kiszka1-1/+2
Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Pass alternative IRQ output object on initializationJan Kiszka1-1/+1
HPET legacy emulation will require control over the PIT IRQ output. To enable this, add support for an alternative IRQ output object to the PIT factory function. If the isa_irq number is < 0, this object will be used. This also removes the IRQ number property from the PIT class as we now use a generic GPIO output pin that is connected by the factory function. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Factor out interface headerJan Kiszka1-0/+1
Move the public interface of the PIT into its own header file and update all users. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-04vmstate, memory: decouple vmstate from memory APIAvi Kivity1-3/+6
Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-20audio: remove unused parameter isa_picHervé Poussineau1-1/+1
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-20isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() ↵Hervé Poussineau1-6/+7
functions NULL is a valid bus/device, so there is no change in behaviour. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-24dp8393x: convert to memory APIAvi Kivity1-1/+1
Fixes address space leak on hotunplug. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24rc4030: convert to memory APIAvi Kivity1-1/+2
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24parallel: convert to memory APIAvi Kivity1-1/+2
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24jazz_led: convert to memory APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02serial: Add MemoryRegion parameter to serial_mm_initRichard Henderson1-4/+4
Remove the get_system_memory() call from serial_mm_init, pushing it back into the callers. In many cases we already have the system memory region available. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02serial: Remove ioregister parameter from serial_mm_initRichard Henderson1-2/+2
All callers passed 1. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02serial: Use enum device_endian in serial_mm_init parameterRichard Henderson1-10/+4
The use of DEVICE_NATIVE_ENDIAN cleans up lots of ifdefs in many of the callers. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25pckbd: Convert to MemoryRegionRichard Henderson1-1/+3
Slightly non-obvious with mips_jazz passing in the region structure to populate. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25mips_jazz: initialize i8259 after the ISA busAvi Kivity1-1/+1
Succeeding i8259 conversion to ISA requires this. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25isa: Pass i/o address space to isa_bus_newRichard Henderson1-7/+10
Not used yet, but at least we're provided with the correct region. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-18mips_jazz: convert to memory APIAvi Kivity1-45/+45
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-27g364fb: convert to qdevHervé Poussineau1-1/+14
Extract G364 ROM contents from device emulation to machine emulation, so device emulation can be reused in other machines (Commodore Amiga) Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-25Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"Anthony Liguori1-2/+1
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1. From Avi: Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this out - it isn't trivial. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-25g364fb: convert to memory APIAvi Kivity1-1/+2
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-22vga: drop get_system_memory() from vga devices and derivativesAvi Kivity1-1/+2
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-2/+2
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-20ds1225y: convert to qdev device, and use it in MIPS Jazz emulationHervé Poussineau1-2/+8
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20i8254: convert to qdevBlue Swirl1-2/+2
Convert to qdev. Don't expose PITState. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-25audio: consolidate audio_init()Isaku Yamahata1-22/+2
consolidate audio_init() and remove references to shoundhw. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-12-11isa_mmio: Always use little endianAlexander Graf1-6/+1
This patch converts the ISA MMIO bridge code to always use little endian mmio. All bswap code that existed was only there to convert from native cpu endianness to little endian ISA devices. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-12-11Add endianness as io mem parameterAlexander Graf1-2/+4
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>
2010-09-11ESP: fix ESP DMA access when DMA is not enabledBlue Swirl1-2/+2
Sending ESP a command caused it to trigger DMA immediately even if DMA was not enabled at the DMA controller. Add a signal from DMA controller to ESP to tell ESP about changes in DMA enable bit. Also use the correct function for setting up GPIO outputs. This fixes NetBSD 1.6.1 through 3.0 boot. Thanks to Artyom Tarasenko for extensive debugging of the problem. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-24Rearrange block headersBlue Swirl1-0/+1
Changing block.h or blockdev.h resulted in recompiling most objects. Move DriveInfo typedef and BlockInterfaceType enum definitions to qemu-common.h and rearrange blockdev.h use to decrease churn. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-06qemu_ram_alloc: Add DeviceState and name parametersAlex Williamson1-2/+2
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-27Remove useless device dependency of HAS_AUDIOBlue Swirl1-4/+0
System architecture dictates whether HAS_AUDIO is defined. It's then useless to check for HAS_AUDIO in files which are only used on those architectures which always have audio. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-13hpet/rtc: Rework RTC IRQ replacement by HPETJan Kiszka1-1/+1
Allow the intercept the RTC IRQ for the HPET legacy mode. Then push routing to IRQ8 completely into the HPET. This allows to turn hpet_in_legacy_mode() into a private function. Furthermore, this stops the RTC from clearing IRQ8 even if the HPET is in control. This patch comes with a side effect: The RTC timers will no longer be stoppend when there is no IRQ consumer, possibly causing a minor performance degration. But as the guest may want to redirect the RTC to the SCI in that mode, it should normally disable unused IRQ source anyway. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile dma only onceBlue Swirl1-1/+12
Use a qemu_irq to request CPU exit. 7 compilations less for the full build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15rtc: make rtc_xxx accept/return ISADevice instead of RTCState.Isaku Yamahata1-0/+1
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice instead of RTCState. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27Compile some MIPS devices only onceBlue Swirl1-0/+1
Move CPU specific declarations to a separate file. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile serial only onceBlue Swirl1-4/+14
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile isa_mmio only onceBlue Swirl1-1/+6
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-09scsi: move scsi.h -> esp.hGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15MIPS jazz: create isa busRoy Tam1-0/+2
As i8259 in mips_jazz.c is not correctly connected to the isa bus, the mc146818rtc isa devices fails to be created. Signed-off-by: Roy Tam <roytam@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-06Make NICInfo string fields non-constMark McLoughlin1-1/+1
We now only assign strdup()ed strings to these fields, never static strings. aliguori: fix build for ppc_prep and mips_jazz Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05floppy: add drive properties.Gerd Hoffmann1-3/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>