- Mar 17, 2020
-
-
Damien Hedde authored
Since we can now send packets of arbitrary length: simplify gdb_monitor_write() and send the whole payload in one packet. Suggested-by:
Luc Michel <luc.michel@greensocs.com> Signed-off-by:
Damien Hedde <damien.hedde@greensocs.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20191211160514.58373-3-damien.hedde@greensocs.com> Message-Id: <20200316172155.971-28-alex.bennee@linaro.org>
-
Damien Hedde authored
Remove the packet size upper limit by using a GByteArray instead of a statically allocated array for last_packet. Thus we can now send big packets. Also remove the last_packet_len field and use last_packet->len instead. Signed-off-by:
Damien Hedde <damien.hedde@greensocs.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191211160514.58373-2-damien.hedde@greensocs.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-27-alex.bennee@linaro.org>
-
Alex Bennée authored
This test exercises the gdbstub while runing the sve-iotcl test. I haven't plubmed it into make system as we need a way of verifying if gdb has the right support for SVE. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200316172155.971-26-alex.bennee@linaro.org>
-
Alex Bennée authored
This is a fairly bare-bones test of setting the various vector sizes for SVE which will only fail if the PR_SVE_SET_VL can't reduce the user-space vector length by powers of 2. However we will also be able to use it in a future test which exercises the GDB stub. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-25-alex.bennee@linaro.org>
-
Alex Bennée authored
A very simple test case which sets and reads SVE registers while running a test case. We don't really need to compile a SVE binary for this case but we will later so keep it simple for now. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-24-alex.bennee@linaro.org>
-
Alex Bennée authored
The test runners job is to start QEMU with guest debug enabled and then spawn a gdb process running a test script that exercises the functionality it wants to test. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-23-alex.bennee@linaro.org>
-
Alex Bennée authored
This is useful, especially when testing relatively new gdbstub features that might not be in distro packages yet. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-22-alex.bennee@linaro.org>
-
Alex Bennée authored
This tests a bunch of registers that the kernel allows userspace to read including the CPUID registers. We need a SVE aware compiler as we are testing the id_aa64zfr0_el1 register in the set. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-21-alex.bennee@linaro.org>
-
Alex Bennée authored
For system emulation we need to check the state of the GIC before we report the value. However this isn't relevant to exporting of the value to linux-user and indeed breaks the exported value as set by modify_arm_cp_regs. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-20-alex.bennee@linaro.org>
-
Alex Bennée authored
We also expose a the helpers to read/write the the registers. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-19-alex.bennee@linaro.org>
-
Alex Bennée authored
The Linux kernel chooses the default of 64 bytes for SVE registers on the basis that it is the largest size on known hardware that won't grow the signal frame. We still honour the sve-max-vq property and userspace can expand the number of lanes by calling PR_SVE_SET_VL. This should not make any difference to SVE enabled software as the SVE is of course vector length agnostic. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-18-alex.bennee@linaro.org>
-
Alex Bennée authored
This is described as optional but I'm not convinced of the numbering when multiple target fragments are sent. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-17-alex.bennee@linaro.org>
-
Alex Bennée authored
We will want to generate similar dynamic XML for gdbstub support of SVE registers (the upstream doesn't use XML). To that end lightly rename a few things to make the distinction. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-16-alex.bennee@linaro.org>
-
Alex Bennée authored
Instead of passing a pointer to memory now just extend the GByteArray to all the read register helpers. They can then safely append their data through the normal way. We don't bother with this abstraction for write registers as we have already ensured the buffer being copied from is the correct size. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Acked-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20200316172155.971-15-alex.bennee@linaro.org>
-
Alex Bennée authored
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-14-alex.bennee@linaro.org>
-
Alex Bennée authored
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-13-alex.bennee@linaro.org>
-
Alex Bennée authored
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-12-alex.bennee@linaro.org>
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-11-alex.bennee@linaro.org>
-
Alex Bennée authored
This is in preparation for further re-factoring of the register API with the rest of the code. Theoretically the read register function could overwrite the MAX_PACKET_LENGTH buffer although currently all registers are well within the size range. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Tested-by:
Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20200316172155.971-10-alex.bennee@linaro.org>
-
Alex Bennée authored
Rather than having a static buffer replace str_buf with a GString which we know can grow on demand. Convert the internal functions to take a GString instead of a char * and length. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Tested-by:
Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20200316172155.971-9-alex.bennee@linaro.org>
-
Alex Bennée authored
We only have one GDBState which should be allocated at the time we process any commands. This will make further clean-up a bit easier. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200316172155.971-8-alex.bennee@linaro.org>
-
Alex Bennée authored
Instead of allocating make this entirely static. We shall reduce the size of the structure in later commits and dynamically allocate parts of it. We introduce an init and reset helper function to keep all the manipulation in one place. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20200316172155.971-7-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
Since commit f5852efa we can display GLib errors with the QEMU error reporting API. Set it to the 'error' level, as this helps understanding failures from QEMU calls to GLib on Travis-CI. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200316101544.22361-1-philmd@redhat.com> Message-Id: <20200316172155.971-6-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
Building the qemu:debian-amd64 fails when building VirGL: make[2]: Entering directory '/usr/src/virglrenderer/src/gallium/auxiliary' CC cso_cache/cso_cache.lo CC cso_cache/cso_hash.lo CC os/os_misc.lo CC util/u_debug.lo CC util/u_debug_describe.lo CC util/u_format.lo GEN util/u_format_table.c Traceback (most recent call last): File "./util/u_format_table.py", line 168, in <module> main() File "./util/u_format_table.py", line 164, in main write_format_table(formats) File "./util/u_format_table.py", line 132, in write_format_table print(" %s,\t/* is_array */" % (bool_map(format.is_array()),)) File "/usr/src/virglrenderer/src/gallium/auxiliary/util/u_format_parse.py", line 164, in is_array return self.array_element() != None File "/usr/src/virglrenderer/src/gallium/auxiliary/util/u_format_parse.py", line 73, in __eq__ return self.type == other.type and self.norm == other.norm and self.pure == other.pure and self.size == other.size AttributeError: 'NoneType' object has no attribute 'type' make[2]: Leaving directory '/usr/src/virglrenderer/src/gallium/auxiliary' make[2]: *** [Makefile:906: util/u_format_table.c] Error 1 make[1]: *** [Makefile:631: install-recursive] Error 1 VirGL commits a8962eda1..a613dcc82 fix this problem. Update to VirGL 0.8.0 which contains them. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200212202709.12665-4-philmd@redhat.com> Message-Id: <20200316172155.971-5-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
The GLX configure option has been removed in 71c75f201d [*]. We missed that when updating to v0.7.0 in commit fab3220f. This silents: configure: creating ./config.status config.status: creating virglrenderer.pc ... configure: WARNING: unrecognized options: --with-glx [*] https://gitlab.freedesktop.org/virgl/virglrenderer/commit/71c75f201d Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200212202709.12665-3-philmd@redhat.com> Message-Id: <20200316172155.971-4-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
freedesktop.org is moving to a GitLab instance, use the new url. - https://www.fooishbar.org/blog/gitlab-fdo-introduction/ - https://gitlab.freedesktop.org/freedesktop/freedesktop/-/wikis/home Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200212202709.12665-2-philmd@redhat.com> Message-Id: <20200316172155.971-3-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
We often run Linux kernels to test QEMU. We sometimes need to build them manually to use non-default features. We only miss the tiny 'bc' tool. The ncurses library is helpful to run 'make menuconfig'. Finally, gdb-multiarch allow us to debug a TCG guest when its architecture is different than the host. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200212202738.12986-1-philmd@redhat.com> Message-Id: <20200316172155.971-2-alex.bennee@linaro.org>
-
Peter Maydell authored
target-arm: * hw/arm/pxa2xx: Do not wire up OHCI for PXA255 * aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command * m25p80: Improve command handling for Jedec and unsupported commands * hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write() * hw/arm/fsl-imx6, imx6ul: Wire up USB controllers * hw/arm/fsl-imx6ul: Instantiate unimplemented pwm and can devices # gpg: Signature made Tue 17 Mar 2020 11:40:01 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20200317: hw/arm/pxa2xx: Do not wire up OHCI for PXA255 aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command m25p80: Improve command handling for unsupported commands m25p80: Improve command handling for Jedec commands m25p80: Convert to support tracing hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write() hw/arm/fsl-imx6: Wire up USB controllers hw/arm/fsl-imx6ul: Wire up USB controllers hw/arm/fsl-imx6ul: Instantiate unimplemented pwm and can devices hw/arm/fsl-imx6ul: Fix USB interrupt numbers hw/usb: Add basic i.MX USB Phy support Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
usb: bugfixes for usb-serial @ xhci. # gpg: Signature made Tue 17 Mar 2020 09:50:04 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/usb-20200317-pull-request: usb-serial: Fix timeout closing the device usb-serial: Increase receive buffer to 496 usb-serial: chunk data to wMaxPacketSize usb-serial: Move USB_TOKEN_IN into a helper function Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
PXA255 does not support a USB OHCI controller, so don't wire it up. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313160215.28155-1-linux@roeck-us.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
The Linux kernel recently started using FAST_READ_4 commands. This results in flash read failures. At the same time, the m25p80 emulation is seen to read 8 more bytes than expected. Adjusting the expected number of dummy cycles to match FAST_READ fixes the problem. Fixes: f95c4bff ("aspeed/smc: snoop SPI transfers to fake dummy cycles") Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
Whenever an unsupported command is encountered, the current code interprets each transferred byte as new command. Most of the time, those 'commands' are interpreted as new unknown commands. However, in rare cases, it may be that for example address or length information passed with the original command is by itself a valid command. If that happens, the state machine may get completely confused and, worst case, start writing data into the flash or even erase it. To avoid the problem, transition into STATE_READING_DATA and keep sending a value of 0 until the chip is deselected after encountering an unsupported command. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
When requesting JEDEC data using the JEDEC_READ command, the Linux kernel always requests 6 bytes. The current implementation only returns three bytes, and interprets the remaining three bytes as new commands. While this does not matter most of the time, it is at the very least confusing. To avoid the problem, always report up to 6 bytes of JEDEC data. Fill remaining data with 0. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
While at it, add some trace messages to help debug problems seen when running the latest Linux kernel. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Chen Qun authored
The current code causes clang static code analyzer generate warning: hw/net/imx_fec.c:858:9: warning: Value stored to 'value' is never read value = value & 0x0000000f; ^ ~~~~~~~~~~~~~~~~~~ hw/net/imx_fec.c:864:9: warning: Value stored to 'value' is never read value = value & 0x000000fd; ^ ~~~~~~~~~~~~~~~~~~ According to the definition of the function, the two “value” assignments should be written to registers. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Chen Qun <kuhn.chenqun@huawei.com> Message-id: 20200313123242.13236-1-kuhn.chenqun@huawei.com Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
With this patch, the USB controllers on 'sabrelite' are detected and can be used to boot the system. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313014551.12554-6-linux@roeck-us.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
IMX6UL USB controllers are quite similar to IMX7 USB controllers. Wire them up the same way. The only real difference is that wiring up phy devices is necessary to avoid phy reset timeouts in the Linux kernel. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313014551.12554-5-linux@roeck-us.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
Recent Linux kernels (post v4.20) crash due to accesses to flexcan and pwm controllers. Instantiate as unimplemented devices to work around the problem. Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313014551.12554-4-linux@roeck-us.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
USB1 and USB2 interrupt numbers were swapped. USB_PHY2 interrupt number is 45. That didn't really matter up to now since the interrupts were not used, but it needs to be fixed to be able to wire up the USB controllers. Fixes: 31cbf933 ("i.MX6UL: Add i.MX6UL SOC") Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313014551.12554-3-linux@roeck-us.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Guenter Roeck authored
Add basic USB PHY support as implemented in i.MX23, i.MX28, i.MX6, and i.MX7 SoCs. The only support really needed - at least to boot Linux - is support for soft reset, which needs to reset various registers to their initial value. Otherwise, just record register values. Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Message-id: 20200313014551.12554-2-linux@roeck-us.net Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-