Re: [Qemu-devel] [PATCH v4 3/9] target-avr: adding a sample AVR board

2016-07-05 Thread Peter Maydell
On 5 July 2016 at 23:22, Michael Rolnik wrote: > Peter, > > I do not understand this comment > > Exactly one of these memory regions (your main "RAM") should be > allocated via memory_region_allocate_system_memory() > [which does the vmstate_register_ram_global() for that MR].

Re: [Qemu-devel] [PATCH v4 3/9] target-avr: adding a sample AVR board

2016-07-05 Thread Michael Rolnik
Peter, I do not understand this comment *Exactly one of these memory regions (your main "RAM") should beallocated via memory_region_allocate_system_memory()[which does the vmstate_register_ram_global() for that MR].The idea is that every board has one-and-only-one main RAM MR.(We should

Re: [Qemu-devel] [PATCH v4 3/9] target-avr: adding a sample AVR board

2016-06-06 Thread Peter Maydell
On 6 June 2016 at 11:37, Michael Rolnik wrote: > Signed-off-by: Michael Rolnik > --- > hw/Makefile.objs | 1 + > hw/avr/Makefile.objs | 1 + > hw/avr/sample-io.c | 217 > +++ > hw/avr/sample.c

Re: [Qemu-devel] [PATCH v4 3/9] target-avr: adding a sample AVR board

2016-06-06 Thread Richard Henderson
On 06/06/2016 03:37 AM, Michael Rolnik wrote: +void write_Rx(CPUAVRState *env, int inst, uint8_t data) +{ +env->r[inst] = data; +} +uint8_t read_Rx(CPUAVRState *env, int inst) Spacing. But more importantly... +static +void sample_io_write(void *opaque, hwaddr offset, uint64_t value,

[Qemu-devel] [PATCH v4 3/9] target-avr: adding a sample AVR board

2016-06-06 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- hw/Makefile.objs | 1 + hw/avr/Makefile.objs | 1 + hw/avr/sample-io.c | 217 +++ hw/avr/sample.c | 118 4 files changed, 337 insertions(+) create