All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: 'Peter Maydell' <peter.maydell@linaro.org>
Cc: 'QEMU Developers' <qemu-devel@nongnu.org>,
	'Christoffer Dall' <christoffer.dall@linaro.org>,
	'Eric Auger' <eric.auger@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 2/3] hw/arm/gic: Kill code duplication
Date: Wed, 05 Aug 2015 09:30:27 +0300	[thread overview]
Message-ID: <00f901d0cf48$385dca10$a9195e30$@samsung.com> (raw)
In-Reply-To: <CAFEAcA_7qJ_Lds-Jb_=muiz+8v+y9wvf5fvZh9-6L_iYLxX9bA@mail.gmail.com>

 Hello!

> > -    memory_region_init_io(&s->cpuiomem[0], OBJECT(s), &gic_thiscpu_ops, s,
> > -                          "gic_cpu", 0x100);
> 
> This memory region is size 0x100, as the comment says it must be...
> 
> > +    if (s->revision != REV_NVIC) {
> > +        /* CPU interface (NVIC doesn't have this) */
> > +        memory_region_init_io(&s->cpuiomem[0], OBJECT(s), ops ? &ops[1] : NULL,
> > +                              s, "gic_cpu", 0x1000);
> 
> ...but here it is 0x1000.
> 
> The a9mpcore container component creates a layout where there are
> other things immediately after the 0x100 region, so we can't
> make it bigger for GICv1.

 I have checked the code, We have "revision" property, and for a9mpcore it appears to be set to 1 (default). So will it be OK if i rely on revision here ? I mean: "s->revision == 2 ? 0x1000 : 0x100". Revision == 2 is also used by ZynqMP model, which seems to have a9 CPU (according to some 'a9' names in the code), but its memory layout actually can accommodate this, they say that single region is 4K.
 All models that use KVM set revision to 2 and therefore expect full-sized region.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

  reply	other threads:[~2015-08-05  6:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 11:54 [Qemu-devel] [PATCH 0/3] hw/arm/gic: Code duplication removal Pavel Fedin
2015-07-29 11:54 ` [Qemu-devel] [PATCH 1/3] Merge memory_region_init_reservation() into memory_region_init_io() Pavel Fedin
2015-08-04 15:47   ` Peter Maydell
2015-07-29 11:54 ` [Qemu-devel] [PATCH 2/3] hw/arm/gic: Kill code duplication Pavel Fedin
2015-08-04 15:46   ` Peter Maydell
2015-08-05  6:30     ` Pavel Fedin [this message]
2015-07-29 11:54 ` [Qemu-devel] [PATCH 3/3] Introduce gic_class_name() instead of repeating condition Pavel Fedin
2015-08-04 15:46   ` Peter Maydell

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='00f901d0cf48$385dca10$a9195e30$@samsung.com' \
    --to=p.fedin@samsung.com \
    --cc=christoffer.dall@linaro.org \
    --cc=eric.auger@linaro.org \
    --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.