qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6] nios2: Add Altera JTAG UART emulation


From: Tobias Klauser
Subject: Re: [Qemu-devel] [PATCH v6] nios2: Add Altera JTAG UART emulation
Date: Tue, 14 Mar 2017 14:56:05 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On 2017-02-13 at 01:56:43 +0100, Juro Bystricky <address@hidden> wrote:
> Add the Altera JTAG UART model.
> 
> Hardware emulation based on:
> https://www.altera.com/en_US/pdfs/literature/ug/ug_embedded_ip.pdf
> (Please see "Register Map" on page 65)
> 
> Signed-off-by: Juro Bystricky <address@hidden>

After instantiating an Altera UART in nios2_10m50_ghrd_init
(hw/nios2/10m50_devboard.c) using the following:

    altera_juart_create(1, 0xf8001530, irq[7], 64);

and adjusting the use of VMSTATE_VBUFFER_UINT32() to omit the _start argument
(see below), I was able to successfully boot Linux with console on Altera JTAG
UART with "qemu-system-nios2 -M 10m50-ghrd" using this patch.

Feel free to add my

Tested-by: Tobias Klauser <address@hidden>

> diff --git a/hw/char/altera_juart.c b/hw/char/altera_juart.c
[...]
> +static const VMStateDescription vmstate_altera_juart = {
> +    .name = "altera-juart" ,
> +    .version_id = 1,
> +    .minimum_version_id = 1,
> +    .fields = (VMStateField[]) {
> +        VMSTATE_UINT32(jdata, AlteraJUARTState),
> +        VMSTATE_UINT32(jcontrol, AlteraJUARTState),
> +        VMSTATE_VBUFFER_UINT32(rx_fifo, AlteraJUARTState, 1, NULL, 0, 
> rx_fifo_size),

This should now be

        VMSTATE_VBUFFER_UINT32(rx_fifo, AlteraJUARTState, 1, NULL, 
rx_fifo_size),

due to commit 59046ec29ad4 ("migration: consolidate VMStateField.start")
getting rid of the _start macro argument.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]