Re: [Qemu-devel] [PATCH pic32 2/7] Stop simulation when processor is suspended forever by WAIT instruction with interrupts disabled.

2015-07-10 Thread Serge Vakulenko
2015-07-09 9:29 GMT-07:00 Christopher Covington : > On 06/30/2015 09:57 PM, Serge Vakulenko wrote: >> >> $ /usr/local/qemu-mips/bin/qemu-system-mipsel -M pic32mx7-max32 >> -nographic -monitor none -serial stdio -bios boot-max32.hex -kernel >> unix.hex -sd sdcard.

Re: [Qemu-devel] [PATCH pic32 v2 5/5] Two new machine platforms: pic32mz7 and pic32mz.

2015-07-06 Thread Serge Vakulenko
On Mon, Jul 6, 2015 at 12:33 AM, Antony Pavlov wrote: > On Sun, 5 Jul 2015 21:18:11 -0700 > Serge Vakulenko wrote: > >> On Wed, Jul 1, 2015 at 6:41 AM, Aurelien Jarno wrote: >> > On 2015-06-30 21:12, Serge Vakulenko wrote: >> >> Signed-off-by: Serge

[Qemu-devel] [PATCH pic32 v3 15/16] pic32: add file pic32_ethernet.c

2015-07-05 Thread Serge Vakulenko
Implement pic32 Ethernet interface. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_ethernet.c | 557 +++ 1 file changed, 557 insertions(+) create mode 100644 hw/mips/pic32_ethernet.c diff --git a/hw/mips/pic32_ethernet.c b/hw/mips/pic32_ethernet.c

[Qemu-devel] [PATCH pic32 v3 07/16] pic32: add file pic32mz.h

2015-07-05 Thread Serge Vakulenko
Hardware register definitions for PIC32MZ microcontroller family. Signed-off-by: Serge Vakulenko --- hw/mips/pic32mz.h | 2093 + 1 file changed, 2093 insertions(+) create mode 100644 hw/mips/pic32mz.h diff --git a/hw/mips/pic32mz.h b/hw/mips

[Qemu-devel] [PATCH pic32 v3 08/16] pic32: add file mips_pic32mx7.c

2015-07-05 Thread Serge Vakulenko
microcontroller on Geoff's Maximite computer Signed-off-by: Serge Vakulenko --- hw/mips/mips_pic32mx7.c | 1641 +++ 1 file changed, 1641 insertions(+) create mode 100644 hw/mips/mips_pic32mx7.c diff --git a/hw/mips/mips_pic32mx7.c b/hw/mips/mips_pic

[Qemu-devel] [PATCH pic32 v3 11/16] pic32: add file pic32_uart.c

2015-07-05 Thread Serge Vakulenko
Implement pic32 UART peripheral interface. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_uart.c | 228 +++ 1 file changed, 228 insertions(+) create mode 100644 hw/mips/pic32_uart.c diff --git a/hw/mips/pic32_uart.c b/hw/mips/pic32_uart.c new

[Qemu-devel] [PATCH pic32 v3 16/16] pic32: update makefiles to cover pic32 support

2015-07-05 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- default-configs/mipsel-softmmu.mak | 1 + hw/mips/Makefile.objs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/default-configs/mipsel-softmmu.mak b/default-configs/mipsel-softmmu.mak index 0162ef0..b300eff 100644 --- a/default-configs

[Qemu-devel] [PATCH pic32 v3 14/16] pic32: add file pic32_sdcard.c

2015-07-05 Thread Serge Vakulenko
Implement access to SD card, attached to pic32 SPI port. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_sdcard.c | 428 + 1 file changed, 428 insertions(+) create mode 100644 hw/mips/pic32_sdcard.c diff --git a/hw/mips/pic32_sdcard.c b/hw/mips

[Qemu-devel] [PATCH pic32 v3 13/16] pic32: add file pic32_spi.c

2015-07-05 Thread Serge Vakulenko
Implement pic32 SPI peripheral interface. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_spi.c | 121 1 file changed, 121 insertions(+) create mode 100644 hw/mips/pic32_spi.c diff --git a/hw/mips/pic32_spi.c b/hw/mips/pic32_spi.c new file

[Qemu-devel] [PATCH pic32 v3 10/16] pic32: add file pic32_load_hex.c

2015-07-05 Thread Serge Vakulenko
It allows to load executables in Intel .hex or Motorola .srec format. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_load_hex.c | 238 +++ 1 file changed, 238 insertions(+) create mode 100644 hw/mips/pic32_load_hex.c diff --git a/hw/mips

[Qemu-devel] [PATCH pic32 v3 09/16] pic32: add file mips_pic32mz.c

2015-07-05 Thread Serge Vakulenko
microcontroller on chipKIT WiFire board Signed-off-by: Serge Vakulenko --- hw/mips/mips_pic32mz.c | 2829 1 file changed, 2829 insertions(+) create mode 100644 hw/mips/mips_pic32mz.c diff --git a/hw/mips/mips_pic32mz.c b/hw/mips/mips_pic32mz.c new

[Qemu-devel] [PATCH pic32 v3 05/16] pic32: add file pic32_peripherals.h

2015-07-05 Thread Serge Vakulenko
Data definitions and function declarations for simulation of pic32 microcontrollers. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_peripherals.h | 210 1 file changed, 210 insertions(+) create mode 100644 hw/mips/pic32_peripherals.h diff --git a

[Qemu-devel] [PATCH pic32 v3 12/16] pic32: add file pic32_gpio.c

2015-07-05 Thread Serge Vakulenko
Implement pic32 generic input/output ports. Signed-off-by: Serge Vakulenko --- hw/mips/pic32_gpio.c | 39 +++ 1 file changed, 39 insertions(+) create mode 100644 hw/mips/pic32_gpio.c diff --git a/hw/mips/pic32_gpio.c b/hw/mips/pic32_gpio.c new file mode

[Qemu-devel] [PATCH pic32 v3 06/16] pic32: add file pic32mx.h

2015-07-05 Thread Serge Vakulenko
Hardware register definitions for PIC32MX microcontroller family. Signed-off-by: Serge Vakulenko --- hw/mips/pic32mx.h | 1290 + 1 file changed, 1290 insertions(+) create mode 100644 hw/mips/pic32mx.h diff --git a/hw/mips/pic32mx.h b/hw/mips

[Qemu-devel] [PATCH pic32 v3 04/16] pic32: add two MIPS processor variants: M4K and microAptivUP

2015-07-05 Thread Serge Vakulenko
Needed for pic32mx (M4K) and pic32mz (microAptivUP) simulation. Signed-off-by: Serge Vakulenko --- target-mips/translate_init.c | 46 1 file changed, 46 insertions(+) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index

[Qemu-devel] [PATCH pic32 v3 00/16] add support for pic32 microcontrollers

2015-07-05 Thread Serge Vakulenko
Please find below a set of patches, which allow to simulate Microchip PIC32 microcontrollers on QEMU. For examples of real PIC32 applications running on QEMU, see page: https://github.com/sergev/qemu/wiki (1) Make the CPU clock frequency configurable per platform. Currently the clock rate for

[Qemu-devel] [PATCH pic32 v3 02/16] pic32: use LCG algorithm for generated random index of TLBWR instruction

2015-07-05 Thread Serge Vakulenko
replaced with LCG algorithm from ISO/IEC 9899 standard, the sequence looks much better, with about the same computational effort needed. Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/mips/cputimer.c b/hw/mips

[Qemu-devel] [PATCH pic32 v3 03/16] pic32: add support for external interrupt controller mode (EIC)

2015-07-05 Thread Serge Vakulenko
EIC is required for pic32 microcontroller. Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 17 +++-- hw/mips/mips_int.c | 8 +++- target-mips/cpu.h| 8 +++- target-mips/helper.c | 18 -- 4 files changed, 41 insertions(+), 10 deletions

[Qemu-devel] [PATCH pic32 v3 01/16] pic32: make the CPU clock frequency configurable per platform

2015-07-05 Thread Serge Vakulenko
Currently the clock rate for all MIPS platforms is fixed at 100MHz. Need to make it 40MHz for pic32mx7. Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c| 15 +++ hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 4

Re: [Qemu-devel] [PATCH pic32 v2 5/5] Two new machine platforms: pic32mz7 and pic32mz.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 10:56 PM, Antony Pavlov wrote: > On Tue, 30 Jun 2015 21:12:34 -0700 > Serge Vakulenko wrote: > >> Signed-off-by: Serge Vakulenko >> --- >> hw/mips/Makefile.objs |3 + >> hw/mips/mips_pic32mx7.c | 1652 +++

Re: [Qemu-devel] [PATCH pic32 v2 5/5] Two new machine platforms: pic32mz7 and pic32mz.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 6:41 AM, Aurelien Jarno wrote: > On 2015-06-30 21:12, Serge Vakulenko wrote: >> Signed-off-by: Serge Vakulenko >> --- >> hw/mips/Makefile.objs |3 + >> hw/mips/mips_pic32mx7.c | 1652 + >> h

Re: [Qemu-devel] [PATCH pic32 v2 4/5] Two new processor variants: M4K and microAptivP.

2015-07-05 Thread Serge Vakulenko
On Fri, Jul 3, 2015 at 3:04 PM, Maciej W. Rozycki wrote: > On Wed, 1 Jul 2015, Aurelien Jarno wrote: > >> > diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c >> > index ddfaff8..430a547 100644 >> > --- a/target-mips/translate_init.c >> > +++ b/target-mips/translate_init.c >>

Re: [Qemu-devel] [PATCH pic32 v2 4/5] Two new processor variants: M4K and microAptivP.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 6:37 AM, Aurelien Jarno wrote: > On 2015-06-30 21:12, Serge Vakulenko wrote: >> Signed-off-by: Serge Vakulenko >> --- >> target-mips/cpu.h| 2 ++ >> target-mips/translate_init.c | 46 >> +++

Re: [Qemu-devel] [PATCH pic32 v2 3/5] Added support for external interrupt controller (EIC) mode.

2015-07-05 Thread Serge Vakulenko
On Sun, Jul 5, 2015 at 8:05 PM, Serge Vakulenko wrote: > On Wed, Jul 1, 2015 at 4:07 AM, Aurelien Jarno wrote: >> On 2015-06-30 21:12, Serge Vakulenko wrote: >>> diff --git a/target-mips/cpu.h b/target-mips/cpu.h >>> index c476166..ab830ee 100644 >>> --- a/tar

Re: [Qemu-devel] [PATCH pic32 v2 3/5] Added support for external interrupt controller (EIC) mode.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 4:07 AM, Aurelien Jarno wrote: > On 2015-06-30 21:12, Serge Vakulenko wrote: >> Signed-off-by: Serge Vakulenko >> --- >> hw/mips/cputimer.c | 17 +++-- >> hw/mips/mips_int.c | 12 ++-- >> target-mips/cpu.h| 9 +

Re: [Qemu-devel] [PATCH pic32 v2 0/5] Support for Microchip pic32mx7 and pic32mz microcontrollers

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 10:31 PM, Antony Pavlov wrote: > On Tue, 30 Jun 2015 21:12:29 -0700 > Serge Vakulenko wrote: > >> Please find below a set of patches, which allow to simulate Microchip PIC32 >> microcontrollers on QEMU. For examples of real PIC32 applications running

Re: [Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-05 Thread Serge Vakulenko
On Fri, Jul 3, 2015 at 2:39 PM, Maciej W. Rozycki wrote: > On Wed, 1 Jul 2015, Aurelien Jarno wrote: > >> Secondly, I don't think calling random() is the correct thing to do. >> It's an expensive function that is not thread safe. Quoting the >> specification: >> >> "Within the required constrain

Re: [Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-05 Thread Serge Vakulenko
On Thu, Jul 2, 2015 at 12:52 AM, Antony Pavlov wrote: > On Tue, 30 Jun 2015 21:12:31 -0700 > Serge Vakulenko wrote: > >> Signed-off-by: Serge Vakulenko >> --- >> hw/mips/cputimer.c | 18 +- >> 1 file changed, 5 insertions(+), 13 deleti

Re: [Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 3:11 AM, Aurelien Jarno wrote: > On 2015-06-30 21:12, Serge Vakulenko wrote: >> Signed-off-by: Serge Vakulenko >> --- >> hw/mips/cputimer.c | 18 +- >> 1 file changed, 5 insertions(+), 13 deletions(-) >> >> di

Re: [Qemu-devel] [PATCH pic32 v2 1/5] Speed of MIPS CPU timer made configurable per platform.

2015-07-05 Thread Serge Vakulenko
On Wed, Jul 1, 2015 at 3:02 AM, Aurelien Jarno wrote: > On 2015-06-30 21:12, Serge Vakulenko wrote: >> @@ -153,5 +153,6 @@ void cpu_mips_clock_init (CPUMIPSState *env) >> */ >> if (!kvm_enabled()) { >> env->timer = timer_new_ns(QEMU_CLOC

Re: [Qemu-devel] [PATCH pic32 2/7] Stop simulation when processor is suspended forever by WAIT instruction with interrupts disabled.

2015-07-01 Thread Serge Vakulenko
Hi Peter, 2015-06-30 19:21 GMT-07:00 Peter Crosthwaite : > On Tue, Jun 30, 2015 at 6:57 PM, Serge Vakulenko wrote: >> Hi Peter and Leon, >> >> With a bit of thinking, I agree, that the question of session >> termination on WAIT instruction is quite complicated in c

[Qemu-devel] [PATCH pic32 v2 3/5] Added support for external interrupt controller (EIC) mode.

2015-07-01 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 17 +++-- hw/mips/mips_int.c | 12 ++-- target-mips/cpu.h| 9 - target-mips/helper.c | 20 ++-- 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/hw/mips/cputimer.c b/hw

[Qemu-devel] [PATCH pic32 v2 4/5] Two new processor variants: M4K and microAptivP.

2015-07-01 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- target-mips/cpu.h| 2 ++ target-mips/translate_init.c | 46 2 files changed, 48 insertions(+) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index ab830ee..9f5890c 100644 --- a/target-mips/cpu.h

[Qemu-devel] [PATCH pic32 v2 1/5] Speed of MIPS CPU timer made configurable per platform.

2015-07-01 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c| 13 +++-- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 4 ++-- hw/mips/mips_mipssim.c| 2 +- hw/mips/mips_r4k.c| 2 +- include/hw/mips/cpudevs.h | 2

[Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-01 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/mips/cputimer.c b/hw/mips/cputimer.c index 4f02a9f..94a29df 100644 --- a/hw/mips/cputimer.c +++ b/hw/mips/cputimer.c @@ -25,21 +25,13 @@ #include

[Qemu-devel] [PATCH pic32 v2 0/5] Support for Microchip pic32mx7 and pic32mz microcontrollers

2015-07-01 Thread Serge Vakulenko
-meb2 PIC32MZ microcontroller on Microchip MEB-II board pic32mz-wifire PIC32MZ microcontroller on chipKIT WiFire board Serge Vakulenko (5): Speed of MIPS CPU timer made configurable per platform. Fixed random index generation for TLBWR instruction. It was not quite random and di

Re: [Qemu-devel] [PATCH pic32 2/7] Stop simulation when processor is suspended forever by WAIT instruction with interrupts disabled.

2015-06-30 Thread Serge Vakulenko
7:10 AM, Leon Alrae wrote: >> Hi Serge, >> >> On 30/06/2015 06:02, Serge Vakulenko wrote: >>> Signed-off-by: Serge Vakulenko >>> --- >>> target-mips/op_helper.c | 7 +++ >>> 1 file changed, 7 insertions(+) >>> >>> diff --gi

Re: [Qemu-devel] [PATCH pic32 1/7] Speed of MIPS CPU timer made configurable per platform.

2015-06-30 Thread Serge Vakulenko
t; of > your patch. > The first is corrupted and there are some coding style issues. > And as Peter suggest use --cover-letter and git send email to send the > emails. > > Fred > > > On 30/06/2015 07:00, Serge Vakulenko wrote: >> >> Please find below a s

Re: [Qemu-devel] [PATCH pic32 1/7] Speed of MIPS CPU timer made configurable per platform.

2015-06-30 Thread Serge Vakulenko
Hi Peter, Thanks for feedback. I will prepare v2 patch set and resubmit it with cover letter, as you proposed. Some other issues fixed as well. Regards, --Serge 2015-06-30 0:44 GMT-07:00 Peter Crosthwaite : > Hi, > > On Mon, Jun 29, 2015 at 10:00 PM, Serge Vakulenko wrote: >&

[Qemu-devel] [PATCH pic32 7/7] Get rid of "WARNING: Image format was not specified" message for -sd option.

2015-06-29 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 69ad90c..56d02c6 100644 --- a/vl.c +++ b/vl.c @@ -1109,7 +1109,7 @@ static int cleanup_add_fd(void *opaque, QemuOpts *opts, Error **errp) #define FD_OPTS ""

[Qemu-devel] [PATCH pic32 4/7] Added support for external interrupt controller (EIC) mode.

2015-06-29 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 17 +++-- hw/mips/mips_int.c | 11 +-- target-mips/cpu.h| 9 - target-mips/helper.c | 20 ++-- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/hw/mips/cputimer.c b/hw

[Qemu-devel] [PATCH pic32 5/7] Two new processor variants: M4K and microAptivP.

2015-06-29 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- target-mips/cpu.h| 2 ++ target-mips/translate_init.c | 46 2 files changed, 48 insertions(+) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index ab830ee..9f5890c 100644 --- a/target-mips/cpu.h

[Qemu-devel] [PATCH pic32 3/7] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-06-29 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/mips/cputimer.c b/hw/mips/cputimer.c index 3d23c1b..ec0cffa 100644 --- a/hw/mips/cputimer.c +++ b/hw/mips/cputimer.c @@ -25,21 +25,13 @@ #include

[Qemu-devel] [PATCH pic32 2/7] Stop simulation when processor is suspended forever by WAIT instruction with interrupts disabled.

2015-06-29 Thread Serge Vakulenko
Signed-off-by: Serge Vakulenko --- target-mips/op_helper.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 2a9ddff..1b7caeb 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -22,6 +22,7 @@ #include "

[Qemu-devel] [PATCH pic32 1/7] Speed of MIPS CPU timer made configurable per platform.

2015-06-29 Thread Serge Vakulenko
o set a name of file with SD card image, a warning is printed: "WARNING: Image format was not specified". Fixed. Signed-off-by: Serge Vakulenko --- hw/mips/cputimer.c| 13 +++-- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.