- Feb 19, 2016
-
-
Markus Armbruster authored
We set machine_class to the default first, and update it to the real one later. Any use of machine_class in between is almost certainly wrong (there are no such uses right now). Set it once and for all instead. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Eduardo Habkost authored
Set error location so the error_report() calls will show appropriate command-line argument or config file info. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1455303747-19776-5-git-send-email-ehabkost@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eduardo Habkost authored
Set error location so the error_report() calls will show appropriate command-line argument or config file info. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1455303747-19776-4-git-send-email-ehabkost@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eduardo Habkost authored
After looping through all command-line arguments, error location info becomes obsolete, and any function calling error_report() will print misleading information. This breaks error reporting for some option handling, like: $ qemu-system-x86_64 -icount rr=x -vnc :0 qemu-system-x86_64: -vnc :0: Invalid icount rr option: x $ qemu-system-x86_64 -m size= -vnc :0 qemu-system-x86_64: -vnc :0: missing 'size' option value Fix this by resetting location info as soon as we exit the command-line handling loop. With this, replay_configure() and set_memory_options() won't print any location info yet, but at least they won't print incorrect information. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1455303747-19776-3-git-send-email-ehabkost@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> ["Do not insert code here" comment added to prevent regressions] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Marcel Apfelbaum authored
Commit e1ce0c3cb (vl.c: fix regression when reading machine type from config file) fixed the error message when the machine type was supplied inside the config file. However now the option name is not displayed correctly if the error happens when the machine is specified at command line. Running ./x86_64-softmmu/qemu-system-x86_64 -M q35-1.5 -redir tcp:8022::22 will result in the error message: qemu-system-x86_64: -redir tcp:8022::22: unsupported machine type Use -machine help to list supported machines Fixed it by restoring the error location and also extracted the code dealing with machine options into a separate function. Reported-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Signed-off-by:
Marcel Apfelbaum <marcel@redhat.com> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1455303747-19776-2-git-send-email-ehabkost@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Feb 18, 2016
-
-
Peter Maydell authored
target-arm queue: * implement or fix various EL3 trap behaviour for system registers * clean up the trap/undef handling of the SRS instruction * add some missing AArch64 performance monitor system registers * implement reset for the PL061 GPIO device * QOMify sd.c and the pxa2xx_mmci device * SD card emulation fixes for booting Tianocore UEFI on RPi2 * QOMify various ARM timer devices # gpg: Signature made Thu 18 Feb 2016 15:19:31 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-target-arm-20160218-1: (36 commits) hw/timer: QOM'ify pxa2xx_timer hw/timer: QOM'ify pl031 hw/timer: QOM'ify exynos4210_rtc hw/timer: QOM'ify exynos4210_pwm hw/timer: QOM'ify exynos4210_mct hw/timer: QOM'ify arm_timer (pass 2) hw/timer: QOM'ify arm_timer (pass 1) hw/sd: use guest error logging rather than fprintf to stderr hw/sd: model a power-up delay, as a workaround for an EDK2 bug hw/sd: implement CMD23 (SET_BLOCK_COUNT) for MMC compatibility hw/sd/pxa2xx_mmci: Add reset function hw/sd/pxa2xx_mmci: Convert to VMStateDescription hw/sd/pxa2xx_mmci: Update to use new SDBus APIs hw/sd/pxa2xx_mmci: convert to SysBusDevice object sdhci_sysbus: Create SD card device in users, not the device itself hw/sd/sdhci.c: Update to use SDBus APIs hw/sd: Add QOM bus which SD cards plug in to hw/sd/sd.c: Convert sd_reset() function into Device reset method hw/sd/sd.c: QOMify hw/sd/sdhci.c: Remove x-drive property ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
assign pl031_init to pl031_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
assign exynos4210_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
assign DeviceClass::vmsd instead of using vmstate_register function Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Xiaoqiang Zhao authored
* assign icp_pit_init to icp_pit_info.instance_init * split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Andrew Baumann authored
Some of these errors may be harmless (e.g. probing unimplemented commands, or issuing CMD12 in the wrong state), and may also be quite frequent. Spamming the standard error output isn't desirable in such cases. Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by:
Andrew Baumann <Andrew.Baumann@microsoft.com> Message-id: 1454902521-21164-4-git-send-email-Andrew.Baumann@microsoft.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Andrew Baumann authored
The SD spec for ACMD41 says that a zero argument is an "inquiry" ACMD41, which does not start initialisation and is used only for retrieving the OCR. However, Tianocore EDK2 (UEFI) has a bug [1]: it first sends an inquiry (zero) ACMD41. If that first request returns an OCR value with the power up bit (0x80000000) set, it assumes the card is ready and continues, leaving the card in the wrong state. (My assumption is that this works on hardware, because no real card is immediately powered up upon reset.) This change models a delay of 0.5ms from the first ACMD41 to the power being up. However, it also immediately sets the power on upon seeing a non-zero (non-enquiry) ACMD41. This speeds up UEFI boot, it should also account for guests that simply delay after card reset and then issue an ACMD41 that they expect will succeed. [1] https://github.com/tianocore/edk2/blob/master/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c#L279 (This is the loop starting with "We need to wait for the MMC or SD card is ready") Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrew Baumann <Andrew.Baumann@microsoft.com> Message-id: 1454902521-21164-3-git-send-email-Andrew.Baumann@microsoft.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Andrew Baumann authored
CMD23 is optional for SD but required for MMC, and the UEFI bootloader used for Windows on Raspberry Pi 2 issues it. Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by:
Andrew Baumann <Andrew.Baumann@microsoft.com> Message-id: 1454902521-21164-2-git-send-email-Andrew.Baumann@microsoft.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
Add a reset function to the pxa2xx_mmci device; previously it had no handling for system reset at all. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1455646193-13238-11-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Convert the pxa2xx_mmci device from manual save/load functions to a VMStateDescription structure. This is a migration compatibility break. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1455646193-13238-10-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Now the PXA2xx MMCI device is QOMified itself, we can update it to use the SDBus APIs to talk to the SD card. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1455646193-13238-9-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Convert the pxa2xx_mmci device to be a sysbus device. In this commit we only change the device itself, and leave the interface to the SD card using the old non-SDBus APIs. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1455646193-13238-8-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Move the creation of the SD card device from the sdhci_sysbus device itself into the boards that create these devices. This allows us to remove the cannot_instantiate_with_device_add notation because we no longer call drive_get_next in the device model. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Message-id: 1455646193-13238-7-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Update the SDHCI code to use the new SDBus APIs. This commit introduces the new command line options required to connect a disk to sdhci-pci: -device sdhci-pci -drive id=mydrive,[...] -device sd,drive=mydrive Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Message-id: 1455646193-13238-6-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Add a QOM bus for SD cards to plug in to. Note that since sd_enable() is used only by one board and there only as part of a broken implementation, we do not provide it in the SDBus API (but instead add a warning comment about the old function). Whoever converts OMAP and the nseries boards to QOM will need to either implement the card switch properly or move the enable hack into the OMAP MMC controller model. In the SDBus API, the old-style use of sd_set_cb to register some qemu_irqs for notification of card insertion and write-protect toggling is replaced with methods in the SDBusClass which the card calls on status changes and methods in the SDClass which the controller can call to find out the current status. The query methods will allow us to remove the abuse of the 'register irqs' API by controllers in their reset methods to trigger the card to tell them about the current status again. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Message-id: 1455646193-13238-5-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Convert the sd_reset() function into a proper Device reset method. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1455646193-13238-4-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Turn the SD card into a QOM device. This conversion only changes the device itself; the various functions which are effectively methods on the device are not touched at this point. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Message-id: 1455646193-13238-3-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
The following commits will remove support for the old sdhci-pci command line syntax using the x-drive property: -device sdhci-pci,x-drive=mydrive -drive id=mydrive,[...] and replace it with an explicit sd device: -device sdhci-pci -drive id=mydrive,[...] -device sd,drive=mydrive (This is OK because x-drive is experimental.) This commit removes the x-drive property so that old style command lines will fail with a reasonable error message: -device sdhci-pci,x-drive=mydrive: Property '.x-drive' not found Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@xilinx.com> Reviewed-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1455646193-13238-2-git-send-email-peter.maydell@linaro.org
-
Wei Huang authored
This patch removes the float_high field of PL061State, which doesn't seem to be used anywhere. Because this changes the device state, the version ID is also bumped up for the reason of compatiblity. Signed-off-by:
Wei Huang <wei@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1455729552-28026-3-git-send-email-wei@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Wei Huang authored
Current QEMU doesn't clear PL061 state after reset. This causes a weird issue with guest reboot via GPIO. Here is the device state with two reboot requests: (PL061State fields) data old_in_data istate VM boot 0 0 0 After 1st ACPI reboot request 8 8 8 After VM PL061 driver ACK 8 8 0 After VM reboot 8 8 0 ------------------------------------------------------------ 2nd ACPI reboot request 8 In the second reboot request above, because the old_in_data field is 8, QEMU decides that there is a pending edge IRQ already (see pl061_update()) in input; so it doesn't raise up IRQ again. As a result the second reboot request is lost. The correct way is to clear PL061 device state after reset. The default reset state is found from the documents listed below. Per Peter's suggestion that QEMU automatically calls reset function after device initialization, this patch removes calling pl061_reset() from pl061_initfn(). Reference: [1] PL061 Technical Reference Manual [2] Stellaris LM3S8962 Microcontroller Data Sheet [3] Stellaris LM3S5P31 Microcontroller Data Sheet Signed-off-by:
Wei Huang <wei@redhat.com> Message-id: 1455729552-28026-2-git-send-email-wei@redhat.com Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Alistair Francis authored
The Linux kernel accesses this register early in its setup. Signed-off-by:
Christopher Covington <christopher.covington@linaro.org> Signed-off-by:
Alistair Francis <alistair.francis@xilinx.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: b30d536cb16ec57b4412172bb6dbc3f00d293e7d.1455060548.git.alistair.francis@xilinx.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Alistair Francis authored
Signed-off-by:
Aaron Lindsay <alindsay@codeaurora.org> Signed-off-by:
Alistair Francis <alistair.francis@xilinx.com> Tested-by:
Nathan Rossi <nathan@nathanrossi.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 50deeafb24958a5b6d7f594b5dda399a022c0e5b.1455060548.git.alistair.francis@xilinx.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Alistair Francis authored
Signed-off-by:
Aaron Lindsay <alindsay@codeaurora.org> Signed-off-by:
Alistair Francis <alistair.francis@xilinx.com> Tested-by:
Nathan Rossi <nathan@nathanrossi.com> Message-id: da0563119a9f56fd5fbdc26e7ed19a8a8457c5b9.1455060548.git.alistair.francis@xilinx.com [PMM: Use 0 for PMCEID0 values for A15 and A57 since our PMU does not currently implement any events.] Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
Make get_r13_banked() raise an exception at runtime for the corner case of SRS from System mode, so that we can UNDEF it; this brings us in to line with the ARM ARM's set of permitted CONSTRAINED UNPREDICTABLE choices. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-
Peter Maydell authored
The user-mode versions of get/set_r13_banked() exist just to assert if they're ever called -- the translate time code should never emit calls to them because SRS from user mode always UNDEF. There's no code in the softmmu versions that can't compile in CONFIG_USER_ONLY, and the assertion is not particularly useful, so combine the two functions rather than having completely split versions under ifdefs. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-
Peter Maydell authored
Move bank_number()'s implementation into internals.h, so it's available in the user-mode-only compile as well. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-
Peter Maydell authored
Move get/set_r13_banked() from helper.c to op_helper.c. This will let us add exception-raising code to them, and also puts them in the same file as get/set_user_reg(), which makes some conceptual sense. (The original reason for the helper.c/op_helper.c split was that only op_helper.c had access to the CPU env pointer; this distinction has not been true for a long time, though, and so the split is now rather arbitrary.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-
Peter Maydell authored
The SRS instruction is: * UNDEFINED in Hyp mode * UNPREDICTABLE in User or System mode * UNPREDICTABLE if the specified mode isn't accessible * trapped to EL3 if EL3 is AArch64 and we are at Secure EL1 Clean up the code to handle all these cases cleanly, including picking UNDEF as our choice of UNPREDICTABLE behaviour rather blindly trusting the mode field passed in the instruction. As part of this, move the check for IS_USER into gen_srs() itself rather than having it done by the caller. The exception is that we don't UNDEF for calls from System mode, which need a runtime check. This will be dealt with in the following commits. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-
Peter Maydell authored
If access to FPEXC32_EL2 is trapped by CPTR_EL2.TFP or CPTR_EL3.TFP, this should be reported with a syndrome register indicating an FP access trap, not one indicating a system register access trap. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-
Peter Maydell authored
Implement the debug register traps controlled by MDCR_EL2.TDA and MDCR_EL3.TDA. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-
Peter Maydell authored
Implement trapping of the "debug ROM" registers, which are controlled by MDCR_EL2.TDRA for EL2 but by the more general MDCR_EL3.TDA for EL3. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-
Peter Maydell authored
Implement the traps to EL2 and EL3 controlled by the bits MDCR_EL2.TDOSA MDCR_EL3.TDOSA. These can configurably trap accesses to the "powerdown debug" registers. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sergey Fedorov <serge.fdrv@gmail.com>
-