All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Bob Breuer <breuerr@mc.net>,
	Anthony Liguori <aliguori@amazon.com>,
	Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCHv3 1/2] sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM
Date: Wed, 07 May 2014 21:56:00 +0200	[thread overview]
Message-ID: <536A8FD0.6000401@redhat.com> (raw)
In-Reply-To: <5316F701.5020500@redhat.com>

Il 05/03/2014 11:05, Paolo Bonzini ha scritto:
> Il 19/02/2014 10:05, Mark Cave-Ayland ha scritto:
>> +#define CG3_REG_SIZE            0x20
>> +
>> +#define CG3_REG_FBC_CTRL        0x10
>> +#define CG3_REG_FBC_STATUS      0x11
>> +#define CG3_REG_FBC_CURSTART    0x12
>> +#define CG3_REG_FBC_CUREND      0x13
>> +#define CG3_REG_FBC_VCTRL       0x14
>> +
>> +typedef struct CG3State {
> ...
>
>> +    uint8_t regs[16];
>
> ...
>
>> +    case CG3_REG_FBC_CURSTART ... CG3_REG_SIZE:
>> +        val = s->regs[addr - 0x10];
>> +        break;
>> +    default:
>
> Something weird here, you can access regs[16] if addr == CG3_REG_SIZE.
>
> The same happens in the write path.

Ping.  I cannot fix it without access to the datasheet, though I suspect 
you want CG3_REG_SIZE - 1.

Paolo

  reply	other threads:[~2014-05-07 19:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  9:05 [Qemu-devel] [PATCHv3 0/2] sun4m: Implement Sun CG3 framebuffer for QEMU Mark Cave-Ayland
2014-02-19  9:05 ` [Qemu-devel] [PATCHv3 1/2] sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM Mark Cave-Ayland
2014-02-19 13:35   ` Leandro Dorileo
2014-02-19 21:39     ` Mark Cave-Ayland
2014-02-20 12:23       ` Leandro Dorileo
2014-05-08 14:34       ` Andreas Färber
2014-05-19 13:03         ` Mark Cave-Ayland
2014-05-19 17:09           ` Andreas Färber
2014-03-05 10:05   ` Paolo Bonzini
2014-05-07 19:56     ` Paolo Bonzini [this message]
2014-05-08 14:44       ` Mark Cave-Ayland
2014-05-08 14:49         ` Paolo Bonzini
2014-02-19  9:05 ` [Qemu-devel] [PATCHv3 2/2] sun4m: Add Sun CG3 framebuffer initialisation function Mark Cave-Ayland
2014-02-19 13:01 ` [Qemu-devel] [PATCHv3 0/2] sun4m: Implement Sun CG3 framebuffer for QEMU Andreas Färber
2014-02-19 21:35   ` Mark Cave-Ayland
2014-02-23 17:42     ` Mark Cave-Ayland

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=536A8FD0.6000401@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=atar4qemu@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=breuerr@mc.net \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --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.