All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH target-arm v1 1/1] arm: cortex-a9: Fix cache-line size
Date: Mon, 18 Aug 2014 13:12:13 +1000	[thread overview]
Message-ID: <20140818031213.GB10292@toto> (raw)
In-Reply-To: <CAEgOgz5JNiz_EYhtVWLZ=5XmZcFqApeCH+Ka2xyUoYPE6W5-jw@mail.gmail.com>

On Mon, Aug 18, 2014 at 12:57:43PM +1000, Peter Crosthwaite wrote:
> On Mon, Aug 18, 2014 at 12:18 PM, Edgar E. Iglesias
> <edgar.iglesias@gmail.com> wrote:
> > On Sun, Aug 17, 2014 at 06:59:59PM -0700, Peter Crosthwaite wrote:
> >> Caches are 16 bytes in A9. Self identify in CCSIDR accordingly.
> >
> > Hi,
> >
> > This is a bit confusing, caches are not 16bytes on the a9, they are configurable.
> 
> Sorry my bad. Should read "cache-line" and "32-bytes". Will fix in v2.
> I agree about about the configurability of the actual cache size but
> not touching that this patch.
> 
> > Cache lines are 32 bytes. The reported associativity doesn't match
> > either.
> 
> For 16KB caches (as the comment in the code indicates),
> > I think you want the lower bits to be fe01c.
> 
> Splitting that out, associativity = 3 (+1 = 4 for a9 4x assoc caching)
> which is correct. Will update that next spin. But line size field = 4
> which would correspond to line size of 256B.
> 
> I think line size needs to be 1 as in this patch but the other fields
> need tweaking.
> 
> Adding in your assoc fix though we should now have 0x19. in lower
> fields. Then num-sets =
> 
> 16k / 4 assoc / 32 line sz = 128 so add in 0xfe000.
> 
> I think the magic number is 0xfe019.

Yes, agreed.

Cheers,
Edgar

      reply	other threads:[~2014-08-18  3:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  1:59 [Qemu-devel] [PATCH target-arm v1 1/1] arm: cortex-a9: Fix cache-line size Peter Crosthwaite
2014-08-18  2:18 ` Edgar E. Iglesias
2014-08-18  2:57   ` Peter Crosthwaite
2014-08-18  3:12     ` Edgar E. Iglesias [this message]

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=20140818031213.GB10292@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --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.