sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

18745 Commits

Author SHA1 Message Date
Paul Brook ad4cf3f6b7 libcacard configure fixes
libcacard is only used by system emulation.
Only define libcacard_libs/cflags once.

Signed-off-by: Paul Brook <paul@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 09:58:21 -06:00
Paolo Bonzini 1bbbdabd56 coroutine: switch to QSLIST
QSLIST can be used for a free list, do it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 08:33:33 -06:00
Paolo Bonzini cf904cfa7c qemu-queue: drop QCIRCLEQ
The main advantage of circular lists (the fact that the head node
has the same memory layout as any other node) is completely negated
by the implementation in qemu-queue.h.  Not surprisingly, nobody
uses QCIRCLEQ.  While this might change if RCU is ever adopted by
QEMU, the QLIST is also RCU-friendly and in fact it is used in a
RCU-like manner by 9pfs already.  So, just kill QCIRCLEQ.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 08:33:33 -06:00
Paolo Bonzini 6095aa88e4 qemu-queue: add QSLIST
Based on http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.53
with only the prefix change.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 08:33:33 -06:00
Paolo Bonzini 31552529a7 notifier: switch to QLIST
Notifiers do not need to access both ends of the list, and using
a QLIST also simplifies the API.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 08:33:32 -06:00
Anthony Liguori c77de088b1 Merge remote-tracking branch 'bonzini/nbd-for-anthony' into staging
* bonzini/nbd-for-anthony:
  nbd: add git tree to MAINTAINERS
  open /dev/nbd in nbd_client_thread
  do not chdir(/) in qemu-nbd before opening all files
2012-02-17 06:50:58 -06:00
Anthony Liguori 3d7f572140 Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
* pmaydell/arm-devs.for-upstream: (22 commits)
  hw/pl031: Actually raise interrupt on timer expiry
  MAINTAINERS: Add hw/highbank.c maintainer
  Remove unnecessary includes of primecell.h
  hw/primecell.h: Remove obsolete pl080_init() declaration
  hw/arm_sysctl: Drop legacy init function
  hw/vexpress.c: Add vexpress-a15 machine
  arm_boot: Pass base address of GIC CPU interface, not whole GIC
  hw/vexpress.c: Instantiate the motherboard CLCD
  hw/vexpress.c: Factor out daughterboard-specific initialization
  hw/vexpress.c: Move secondary CPU boot code to SRAM
  hw/vexpress.c: Make motherboard peripheral memory map table-driven
  hw/a15mpcore.c: Add Cortex-A15 private peripheral model
  MAINTAINERS: Add maintainers for Exynos SOC.
  Exynos4210: added display controller implementation
  hw/exynos4210.c: Add LAN support for SMDKC210.
  hw/lan9118: Add basic 16-bit mode support.
  ARM: exynos4210: MCT support.
  ARM: exynos4210: basic Power Management Unit implementation
  ARM: exynos4210: PWM support.
  ARM: exynos4210: UART support
  ...
2012-02-17 06:50:07 -06:00
Anthony Liguori a19255a369 Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
  linux-user: brk() debugging
  virtio: Remove unneeded g_free() check in virtio_cleanup()
  net: remove extra spaces in help messages
  fmopl: Fix typo in function name
  vl.c: Fix typo in variable name
  ide: fix compilation errors when DEBUG_IDE is set
  cpu-exec.c: Correct comment about this file and indentation cleanup
  CODING_STYLE: Clarify style for enum and function type names
  linux-user: fail execve() if env/args too big
2012-02-17 06:48:47 -06:00
Paolo Bonzini e5950790cb nbd: add git tree to MAINTAINERS
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17 12:41:59 +01:00
Paolo Bonzini a6ac2313a8 open /dev/nbd in nbd_client_thread
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17 12:41:59 +01:00
Michael Tokarev 9faf31b68f do not chdir(/) in qemu-nbd before opening all files
When qemu-nbd becomes a daemon it calls daemon(3) with
nochdir=0, so daemon(3) changes current directory to /.
But at this time, qemu-nbd did not open any user-specified
files yet, so by changing current directory, all non-absolute
paths becomes wrong.  The solution is to pass nochdir=1 to
daemon(3) function, and to chdir("/") after all init has
been performed, before entering the main loop, -- just like
a good daemon should do.

This patch is applicable for -stable.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17 12:41:48 +01:00
Peter Maydell 13a16f1d91 hw/pl031: Actually raise interrupt on timer expiry
Fix a typo in pl031_interrupt() which meant we were setting a bit
in the interrupt mask rather than the interrupt status register
and thus not actually raising an interrupt. This fix allows the
rtctest program from the kernel's Documentation/rtc.txt to pass
rather than hanging.

Reported-by: Daniel Forsgren <daniel.forsgren@enea.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Andreas Färber <afaerber@suse.de>
2012-02-17 11:13:45 +00:00
Mark Langsdorf 766fd09fb3 MAINTAINERS: Add hw/highbank.c maintainer
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:44 +00:00
Peter Maydell 22168e6660 Remove unnecessary includes of primecell.h
The primecell.h header now only has the definitions of constants
indicating the usage of the arm_sysctl GPIO lines; remove obsolete
includes of it from source files which don't care about those GPIO
lines.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:42 +00:00
Peter Maydell 2a9577034a hw/primecell.h: Remove obsolete pl080_init() declaration
Remove an obsolete declaration of pl080_init(), which has been
incorrect since the conversion of pl080 to qdev back in 2009.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:39 +00:00
Peter Maydell 54de1e5b3a hw/arm_sysctl: Drop legacy init function
Drop the legacy init function arm_sysctl_init(), since it has no
users left any more. This allows us to drop the awkward '1' from
the actual device init function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Andreas Färber <afaerber@suse.de>
2012-02-17 11:13:36 +00:00
Peter Maydell 961f195e6c hw/vexpress.c: Add vexpress-a15 machine
Add the vexpress-a15 machine, and the A-Series memory map it uses.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17 11:13:34 +00:00
Peter Maydell 96eacf6413 arm_boot: Pass base address of GIC CPU interface, not whole GIC
The arm_boot secondary boot loader code needs the address of
the GIC CPU interface. Obtaining this from the base address
of the private peripheral region was possible for A9 and 11MPcore,
but the A15 puts the GIC CPU interface in a different place.
So make boards pass in the GIC CPU interface address directly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:26 +00:00
Peter Maydell b720687868 hw/vexpress.c: Instantiate the motherboard CLCD
Instantiate the CLCD on the vexpress motherboard as well as one on
the daughterboard -- the A15 daughterboard does not have a CLCD
and so relies on the motherboard one.

At the moment QEMU doesn't provide infrastructure for selecting
which display device gets to actually show graphics -- the first
one registered is it. Fortunately this works for the major use
case (Linux): if the daughterboard has a CLCD it will come first
and be used, otherwise we fall back to the motherboard CLCD.
So we don't (currently) need to implement the control register
which allows software to tell the mux which video output to pass
through to the outside world.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17 11:13:24 +00:00
Peter Maydell 4c3b29b8ad hw/vexpress.c: Factor out daughterboard-specific initialization
Factor out daughterboard specifics into a data structure and
daughterboard initialization function, in preparation for adding
vexpress-a15 support.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:23 +00:00
Peter Maydell aac1e02c1d hw/vexpress.c: Move secondary CPU boot code to SRAM
On real Versatile Express hardware, the boot ROM puts the secondary
CPU bootcode/holding pen in SRAM. We can therefore rely on Linux not
trashing this memory until secondary CPUs have booted up, and can
put our QEMU-specific pen code in the same place. This allows us to
drop the odd "hack" RAM page we were using before.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:21 +00:00
Peter Maydell 2558e0a67b hw/vexpress.c: Make motherboard peripheral memory map table-driven
Pull the addresses used for mapping motherboard peripherals into
memory out into a table. This will allow us to simply provide a
second table to implement the "Cortex-A Series" memory map used by
the A15 variant of Versatile Express, as well as the current
"Legacy" map used by A9.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17 11:13:19 +00:00
Peter Maydell 5d782e0805 hw/a15mpcore.c: Add Cortex-A15 private peripheral model
Add a model of the Cortex-A15 memory mapped private peripheral
space. This is fairly simple because the only memory mapped
bit of the A15 is the GIC.

Note that we don't currently model a VGIC and therefore don't
map the VGIC related bits of the GIC.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:17 +00:00
Evgeny Voevodin fc63dcff46 MAINTAINERS: Add maintainers for Exynos SOC.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:16 +00:00
Mitsyanko Igor 30628cb12d Exynos4210: added display controller implementation
Exynos4210 display controller (FIMD) has 5 hardware windows with alpha and
chroma key blending functions.

Signed-off-by: Mitsyanko Igor <i.mitsyanko@samsung.com>
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:14 +00:00
Evgeny Voevodin 2c2c6496f8 hw/exynos4210.c: Add LAN support for SMDKC210.
SMDKC210 uses lan9215 chip, but lan9118 in 16-bit mode seems to
be enough.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:12 +00:00
Evgeny Voevodin 1248f8d4cb hw/lan9118: Add basic 16-bit mode support.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:11 +00:00
Evgeny Voevodin 12c775db14 ARM: exynos4210: MCT support.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:09 +00:00
Maksim Kozlov df91b48f64 ARM: exynos4210: basic Power Management Unit implementation
Patch adds basic model for Exynos4210 SoC PMU.
This model implements PMU registers just as a bulk of memory. Currently,
the only reason this device exists is that secondary CPU boot loader
uses PMU INFORM5 register as a holding pen.

Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com>
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:07 +00:00
Evgeny Voevodin 62db8bf39b ARM: exynos4210: PWM support.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:05 +00:00
Maksim Kozlov e5a4914efc ARM: exynos4210: UART support
Add basic support of exynos4210 UART

Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com>
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:13:02 +00:00
Evgeny Voevodin 0caa711335 ARM: Samsung exynos4210-based boards emulation
Add initial support of NURI and SMDKC210 boards

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:12:59 +00:00
Evgeny Voevodin 8e03cf1eeb ARM: exynos4210: IRQ subsystem support.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17 11:12:57 +00:00
Peter Maydell 9de36b1a7c Make -machine/-enable-kvm options merge into a single list
Make the "machine" option list use list merging, so that multiple
-machine arguments (and the -enable-kvm argument) all merge together
into a single list. Drop the calls to qemu_opts_reset() which meant
that only the last -machine or -enable-kvm option had any effect.

This fixes the bug where "-enable-kvm -machine foo" would ignore
the '-enable-kvm' option, and "-machine foo -enable-kvm" would
ignore the '-machine foo' option.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 09:10:13 +01:00
Peter Maydell da93318a9f qemu-option: Add support for merged QemuOptsLists
Add support for option lists which are merged together, so that
"-listname foo=bar -listname bar=baz" is equivalent to "-listname
foo=bar,bar=baz" rather than generating two separate lists of options.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 09:08:22 +01:00
Peter Maydell a84fac1426 target-arm/helper.c: tb_flush() on CPU reset
Since target-arm has some CPUState fields for which we take the approach
of baking assumptions about them into translated code and then calling
tb_flush() when the fields change, we must also tb_flush on CPU reset,
because reset is a change of those fields.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 08:34:43 +01:00
Stefan Weil 761c9eb0fa hw/arm: Remove redundant arguments from set_kernel_args*
The parameters initrd_size and base are already included
in the info parameter, so there is no need to pass them
separately.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>,
2012-02-17 08:30:19 +01:00
Vasily Khoruzhick 4f56da61b9 pxa2xx_lcd: SRAM is valid location for the framebuffer
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 08:25:43 +01:00
Peter Maydell 2d2624a001 target-arm/helper.c: Correct FPSID value for Cortex-A9
The correct FPSID for the Cortex-A9 (according to the TRM) is
0x41033090 for the r0p0 that we claim to model.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 08:15:06 +01:00
Paolo Bonzini dd4427a619 nseries: attach monitor powerdown request to menelaus
I noticed some unused code in the twl92230, probably from before
qdev-ification.  This patch makes the machine use the chip's pwrbtn
signal.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 07:42:22 +01:00
Anthony Liguori 6c263e26a5 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master:
  apic: Fix legacy vmstate loading for KVM
  kvm: Implement kvm_irqchip_in_kernel like kvm_enabled
  kvm: Allow to set shadow MMU size
2012-02-15 18:41:28 -06:00
Anthony Liguori cf5cfe0471 Merge remote-tracking branch 'kraxel/vnc.2' into staging
* kraxel/vnc.2:
  vnc: lift modifier keys on client disconnect.
  vnc: implement shared flag handling.
  vnc: fix ctrl key in vnc terminal emulation
  Fix vnc memory corruption with width = 1400
2012-02-15 18:40:53 -06:00
Anthony Liguori 006c891fc9 Merge remote-tracking branch 'kiszka/queues/slirp' into staging
* kiszka/queues/slirp:
  slirp: Prevent sending ICMP error replies to source-only addresses
  slirp: Remove unused variable and unused code
2012-02-15 18:40:26 -06:00
Anthony Liguori 7718564ba1 Merge remote-tracking branch 'kraxel/usb.38' into staging
* kraxel/usb.38: (28 commits)
  xhci: handle USB_RET_NAK
  xhci: remote wakeup support
  xhci: kill port arg from xhci_setup_packet
  xhci: stop on errors
  xhci: add trb type name lookup support.
  xhci: signal low- and fullspeed support
  usb: add USBBusOps->wakeup_endpoint
  usb: pass USBEndpoint to usb_wakeup
  usb: maintain async packet list per endpoint
  usb: Set USBEndpoint in usb_packet_setup().
  usb: add USBEndpoint->{nr,pid}
  usb: USBPacket: add status, rename owner -> ep
  usb: fold usb_generic_handle_packet into usb_handle_packet
  usb: kill handle_packet callback
  usb-xhci: switch to usb_find_device()
  usb-musb: switch to usb_find_device()
  usb-ohci: switch to usb_find_device()
  usb-ehci: switch to usb_find_device()
  usb-uhci: switch to usb_find_device()
  usb: handle dev == NULL in usb_handle_packet()
  ...
2012-02-15 17:25:25 -06:00
Anthony Liguori 65b31cc207 Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony:
  AHCI: Masking of IRQs actually masks them
  sheepdog: fix co_recv coroutine context
  AHCI: Fix port reset race
  rewrite QEMU_BUILD_BUG_ON
  qcow2: Keep unknown header extension when rewriting header
  qcow2: Update whole header at once
  vpc: Round up image size during fixed image creation
  vpc: Add support for Fixed Disk type
  iSCSI: add configuration variables for iSCSI
  qemu-io: add write -z option for bdrv_co_write_zeroes
  qed: add .bdrv_co_write_zeroes() support
  qed: replace is_write with flags field
  block: perform zero-detection during copy-on-read
  block: add .bdrv_co_write_zeroes() interface
  cutils: extract buffer_is_zero() from qemu-img.c
2012-02-15 17:18:04 -06:00
Anthony Liguori b2d4b3f7b8 device_add: don't add a /peripheral link until init is complete
Otherwise we end up with a dangling reference which causes qdev_free() to fail.

Reported-by: Michael Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15 09:39:21 -06:00
Andreas Färber 83f7d43a9e qom: Unify type registration
Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: malc <av1474@comtv.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15 09:39:21 -06:00
Paolo Bonzini 59f971d451 qdev: print error message before aborting
qdev_prop_set_* functions are always called by machine init functions
that should know what they're doing, so they abort on error.  Still,
an assert(!errp) does not aid debugging.  Print an error before aborting.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-14 18:57:33 +00:00
Paolo Bonzini 0a54a0ce3e qdev: allow setting properties to NULL
SPARC and PPC set properties to NULL.  This can be done with an
empty string value.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-14 18:57:32 +00:00
Blue Swirl 9d4df9c028
ppc: remove unused variables
Fix this error:
/src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
/src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set but not used [-Werror=unused-but-set-variable]

Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-11 11:03:50 +00:00