All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Bob Breuer <breuerr@mc.net>
Cc: "Andreas Färber" <andreas.faerber@web.de>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>
Subject: [Qemu-devel] Re: [PATCH v2] sparc32: ledma extra registers need tracing too
Date: Mon, 20 Dec 2010 21:20:08 +0000	[thread overview]
Message-ID: <AANLkTiksuiAbp_kwEW55G8EaQa5H64otYbSCmVt-sFOp@mail.gmail.com> (raw)
In-Reply-To: <4D0F9895.6030700@mc.net>

Thanks, applied.

On Mon, Dec 20, 2010 at 5:55 PM, Bob Breuer <breuerr@mc.net> wrote:
> Also trace the extra registers, and update the comments with new
> info from Artyom Tarasenko.
>
> Signed-off-by: Bob Breuer <breuerr@mc.net>
> ---
> Since the extra registers are aliased, we could instead alias them at
> a higher level.  Solaris9 boots to single-user with either option.
>
> diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
> index 56be8c8..e75694b 100644
> --- a/hw/sparc32_dma.c
> +++ b/hw/sparc32_dma.c
> @@ -44,7 +44,7 @@
>  /* We need the mask, because one instance of the device is not page
>    aligned (ledma, start address 0x0010) */
>  #define DMA_MASK (DMA_SIZE - 1)
> -/* ledma has more than 4 registers, Solaris reads the 5th one */
> +/* OBP says 0x20 bytes for ledma, the extras are aliased to espdma */
>  #define DMA_ETH_SIZE (8 * sizeof(uint32_t))
>  #define DMA_MAX_REG_OFFSET (2 * DMA_SIZE - 1)
>
> @@ -170,7 +170,10 @@ static uint32_t dma_mem_readl(void *opaque, target_phys_addr_t addr)
>     uint32_t saddr;
>
>     if (s->is_ledma && (addr > DMA_MAX_REG_OFFSET)) {
> -        return 0; /* extra mystery register(s) */
> +        /* aliased to espdma, but we can't get there from here */
> +        /* buggy driver if using undocumented behavior, just return 0 */
> +        trace_sparc32_dma_mem_readl(addr, 0);
> +        return 0;
>     }
>     saddr = (addr & DMA_MASK) >> 2;
>     trace_sparc32_dma_mem_readl(addr, s->dmaregs[saddr]);
> @@ -183,7 +186,9 @@ static void dma_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
>     uint32_t saddr;
>
>     if (s->is_ledma && (addr > DMA_MAX_REG_OFFSET)) {
> -        return; /* extra mystery register(s) */
> +        /* aliased to espdma, but we can't get there from here */
> +        trace_sparc32_dma_mem_writel(addr, 0, val);
> +        return;
>     }
>     saddr = (addr & DMA_MASK) >> 2;
>     trace_sparc32_dma_mem_writel(addr, s->dmaregs[saddr], val);
>
>
>

  reply	other threads:[~2010-12-20 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18 17:09 [Qemu-devel] [PATCH] sparc32: ledma extra registers Bob Breuer
2010-12-18 18:53 ` [Qemu-devel] " Blue Swirl
2010-12-18 20:26   ` Andreas Färber
2010-12-19 19:37     ` Bob Breuer
2010-12-19 20:00       ` [Qemu-devel] [PATCH] sparc32: ledma extra registers need tracing too Bob Breuer
2010-12-20 17:55         ` [Qemu-devel] [PATCH v2] " Bob Breuer
2010-12-20 21:20           ` Blue Swirl [this message]
2010-12-20 10:22       ` [Qemu-devel] Re: [PATCH] sparc32: ledma extra registers Artyom Tarasenko
2010-12-20 17:33         ` Bob Breuer
2010-12-21  9:28           ` Artyom Tarasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTiksuiAbp_kwEW55G8EaQa5H64otYbSCmVt-sFOp@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=andreas.faerber@web.de \
    --cc=atar4qemu@gmail.com \
    --cc=breuerr@mc.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.