- Jul 11, 2020
-
-
Philippe Mathieu-Daudé authored
While LOAD instructions use the target register as first argument, STORE instructions use it as second argument: LD Rd, X // Rd <- (X) ST Y, Rd // (Y) <- Rr Reported-by:
Joaquin de Andres <me@xcancerberox.com.ar> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200707070021.10031-4-f4bug@amsat.org>
-
Philippe Mathieu-Daudé authored
$PC is 16-bit wide. Other registers display addresses on a byte granularity. To have a coherent ouput, display $PC using byte granularity too. Reviewed-by:
Thomas Huth <huth@tuxfamily.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200707070021.10031-3-f4bug@amsat.org>
-
Philippe Mathieu-Daudé authored
Since commit 1f5c00cf tlb_flush() is called from cpu_common_reset(). Reviewed-by:
Thomas Huth <huth@tuxfamily.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200707070021.10031-2-f4bug@amsat.org>
-
Thomas Huth authored
The new section explains basic ways of using AVR target in QEMU. Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> [thuth: Converted doc from texi to Sphinx syntax] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-31-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
The test is based on https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out. it also demostrates that timer and IRQ are working As the path name demonstrates, the FreeRTOS tests target a board based on a ATMega2560 MCU. We have one, the Arduino MEGA2560. Complementary documentation: https://feilipu.me/2012/01/15/ethermega-arduino-mega-2560-and-freertos/ https://feilipu.me/2015/11/24/arduino_freertos/ (see 'Compatibility') Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [rth: Squash multiple avocado fixups from f4bug] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
Michael Rolnik authored
Print out 'T' through serial port. The Arduino Duemilanove is based on a AVR5 CPU, while the Arduino MEGA2560 on a AVR6 CPU. Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [rth: Squash Arduino adjustments from f4bug] Tested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-29-huth@tuxfamily.org>
-
Philippe Mathieu-Daudé authored
Arduino boards are build with AVR chipsets. Add some of these boards: - Arduino Duemilanove - Arduino Uno - Arduino Mega For more information: https://www.arduino.cc/en/Main/Products https://store.arduino.cc/arduino-genuino/most-popular [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Joaquin de Andres <me@xcancerberox.com.ar> [thuth: sysbus_init_child_obj() ==> object_initialize_child()] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-26-huth@tuxfamily.org>
-
Philippe Mathieu-Daudé authored
Add some AVR microcontrollers from the ATmega family: - middle range: ATmega168 and ATmega328 - high range: ATmega1280 and ATmega2560 For product comparison: https://www.microchip.com/wwwproducts/ProductCompare/ATmega168P/ATmega328P https://www.microchip.com/wwwproducts/ProductCompare/ATmega1280/ATmega2560 Datasheets: http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> [thuth: Rebased to master, fixed object_initialize_child() calls etc.] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-25-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Philippe Mathieu-Daudé authored
Add avr_load_firmware() function to load firmware in ELF or raw binary format. [AM: Corrected the type of the variable containing e_flags] [AM: Moved definition of e_flags conversion function to boot.c] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-24-huth@tuxfamily.org> [PMD: Replace load_image_targphys() by load_image_mr()] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This is a simple device of just one register, and whenever this register is written to it calls qemu_set_irq function for each of 8 bits/IRQs. It is used to implement AVR Power Reduction. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [rth: Squash include fix and file rename from f4bug] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-22-huth@tuxfamily.org>
-
Michael Rolnik authored
These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins). [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Ed Robbins <E.J.C.Robbins@kent.ac.uk> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [rth: Squash info mtree fixes and a file rename from f4bug] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> [PMD: Use qemu_log_mask(LOG_UNIMP), replace goto by return] Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-21-huth@tuxfamily.org> [PMD: Check cpu-frequency-hz property in realize()] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins). [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [rth: Squash I/O size fix and file rename from f4bug] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-20-huth@tuxfamily.org>
-
Michael Rolnik authored
Add a single code line that will automatically provide 'machine none' test. Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-28-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Add AVR related definitions into QEMU, make AVR support buildable. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-23-huth@tuxfamily.org> [PMD: Fixed @avr tag in qapi/machine.json] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Provide function disassembles executed instruction when '-d in_asm' is provided. Example: $ qemu-system-avr -bios free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf -d in_asm ... IN: 0x0000014a: CALL 0x3808 IN: main 0x00003808: CALL 0x4b4 IN: vParTestInitialise 0x000004b4: LDI r24, 255 0x000004b6: STS r24, 0 0x000004b8: MULS r16, r20 0x000004ba: OUT $1, r24 0x000004bc: LDS r24, 0 0x000004be: MULS r16, r20 0x000004c0: OUT $2, r24 0x000004c2: RET ... Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Suggested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> [rth: Fix spacing and const mnemonic arrays] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-19-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Initialize TCG register variables. Co-developed-by:
Richard Henderson <richard.henderson@linaro.org> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-18-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Add the core of translation mechanism. Co-developed-by:
Richard Henderson <richard.henderson@linaro.org> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-17-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes: - BREAK - NOP - SLEEP - WDR Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-16-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes: - LSR, ROR - ASR - SWAP - SBI, CBI - BST, BLD - BSET, BCLR Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-15-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes: - MOV, MOVW - LDI, LDS LDX LDY LDZ - LDDY, LDDZ - STS, STX STY STZ - STDY, STDZ - LPM, LPMX - ELPM, ELPMX - SPM, SPMX - IN, OUT - PUSH, POP - XCH - LAS, LAC LAT Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-14-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes: - RJMP, IJMP, EIJMP, JMP - RCALL, ICALL, EICALL, CALL - RET, RETI - CPSE, CP, CPC, CPI - SBRC, SBRS, SBIC, SBIS - BRBC, BRBS Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-13-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes: - ADD, ADC, ADIW - SBIW, SUB, SUBI, SBC, SBCI - AND, ANDI - OR, ORI, EOR - COM, NEG - INC, DEC - MUL, MULS, MULSU - FMUL, FMULS, FMULSU - DES Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-12-huth@tuxfamily.org> [PMD: Added qemu_log_mask(LOG_UNIMP) in trans_DES()] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Start implementation of instructions by adding register definitions. Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-11-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Add helpers for instructions that need to interact with QEMU. Also, add stubs for unimplemented instructions. Instructions SPM and WDR are left unimplemented because they require emulation of complex peripherals. The implementation of instruction SLEEP is very limited due to the lack of peripherals to generate wake interrupts. Memory access instructions are implemented here because some address ranges actually refer to CPU registers. Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-10-huth@tuxfamily.org> [PMD: Replace cpu_physical_memory() API by address_space_ldst() API to fix running on big-endian host, reported and suggested by Peter Maydell] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Jul 10, 2020
-
-
Michael Rolnik authored
AVR core types are: - avr5 - avr51 - avr6 Each core type covers multiple AVR MCUs, mentioned in the comments before definition of particular AVR core type (part of this patch). AVR core type defines shared features that are valid for all AVR MCUs belonging in that type. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-9-huth@tuxfamily.org> [PMD: Only include reviewed cores: avr5/avr51/avr6] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This patch introduces enumeration "AVRFeature" that will be used for defining various AVR core types. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-8-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes GDB hooks for reading from wnd wrtiting to AVR registers, and xml register definition file as well. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [thuth: Fixed avr_cpu_gdb_read_register() parameter] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-7-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
Add migration-related functions of AVR CPU class object. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-6-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This patch introduces three memory-management-related functions that will become part of AVR CPU class object. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-5-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This patch introduces functions avr_cpu_do_interrupt() and avr_cpu_exec_interrupt() that are part of AVR CPU class object. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-4-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This patch introduces AVR CPU class object and its basic elements and functions. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [thuth: Adjusted reset and parent_reset handling] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-3-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Michael Rolnik authored
This includes definitions of various basic parameters needed for integration of a new platform into QEMU. [AM: Split a larger AVR introduction patch into logical units] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by:
Michael Rolnik <mrolnik@gmail.com> Co-developed-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [thuth: Simplify MAINTAINERS right from the start] Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-2-huth@tuxfamily.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Peter Maydell authored
Error reporting patches patches for 2020-07-07 # gpg: Signature made Fri 10 Jul 2020 14:24:42 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2020-07-07-v2: (53 commits) xen: Use ERRP_GUARD() nbd: Use ERRP_GUARD() virtio-9p: Use ERRP_GUARD() fw_cfg: Use ERRP_GUARD() pflash: Use ERRP_GUARD() sd: Use ERRP_GUARD() scripts: Coccinelle script to use ERRP_GUARD() error: New macro ERRP_GUARD() hmp: Ignore Error objects where the return value suffices qdev: Ignore Error objects where the return value suffices qemu-img: Ignore Error objects where the return value suffices error: Avoid error_propagate() after migrate_add_blocker() qapi: Purge error_propagate() from QAPI core qapi: Smooth visitor error checking in generated code qapi: Smooth another visitor error checking pattern block/parallels: Simplify parallels_open() after previous commit error: Reduce unnecessary error propagation error: Eliminate error_propagate() manually error: Eliminate error_propagate() with Coccinelle, part 2 error: Eliminate error_propagate() with Coccinelle, part 1 ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). No such cases are being fixed here. This commit is generated by command sed -n '/^X86 Xen CPUs$/,/^$/{s/^F: //p}' MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-9-armbru@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again.]
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix several such cases, e.g. in nbd_read(). This commit is generated by command sed -n '/^Network Block Device (NBD)$/,/^$/{s/^F: //p}' \ MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-8-armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again.]
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such a case in v9fs_device_realize_common(). This commit is generated by command sed -n '/^virtio-9p$/,/^$/{s/^F: //p}' MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Acked-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Christian Schoenebeck <qemu_oss@crudebyte.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-7-armbru@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again.]
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). No such cases are being fixed here. This commit is generated by command sed -n '/^Firmware configuration (fw_cfg)$/,/^$/{s/^F: //p}' \ MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-6-armbru@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again. Coccinelle script rerun for commit 32031489 "hw/nvram/fw_cfg: Add the FW_CFG_DATA_GENERATOR interface"]
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). No such cases are being fixed here. This commit is generated by command sed -n '/^Parallel NOR Flash devices$/,/^$/{s/^F: //p}' \ MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-5-armbru@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again.]
-
Vladimir Sementsov-Ogievskiy authored
If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp directly 3. ERRP_GUARD() leaves errp as is if it's not NULL or &error_fatal, this means that we don't break error_abort (we'll abort on error_set, not on error_propagate) If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_GUARD() macro. Otherwise, this info will not be added when errp == &error_fatal (the program will exit prior to the error_append_hint() or error_prepend() call). No such cases are being fixed here. This commit is generated by command sed -n '/^SD (Secure Card)$/,/^$/{s/^F: //p}' \ MAINTAINERS | \ xargs git ls-files | grep '\.[hc]$' | \ xargs spatch \ --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h \ --in-place --no-show-diff --max-width 80 Reported-by:
Kevin Wolf <kwolf@redhat.com> Reported-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-4-armbru@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci. Commit message tweaked again.]
-
Vladimir Sementsov-Ogievskiy authored
Script adds ERRP_GUARD() macro invocations where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff \ --max-width 80 FILES... Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200707165037.1026246-3-armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and auto-propagated-errp.cocci to errp-guard.cocci]
-