All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hawkins <dwh@ovro.caltech.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] MPC8349EMDS.h Why do the BAT entries use Memory coherency?
Date: Sat, 01 Mar 2008 16:29:27 -0800	[thread overview]
Message-ID: <47C9F4E7.3000709@ovro.caltech.edu> (raw)
In-Reply-To: <47C9CFEC.4050704@ovro.caltech.edu>

Hi all,

I'm just reading through the MPC8349EA-MDS-PB board
start-up code to understand it, eg. the initial SRAM
in data-cache trick.

In the BAT setups in include/configs/MPC8349EMDS.h,
some of the CFG_IBAT settings include the bit setting
BATL_MEMCOHERENCE, indicating that those BAT entries
are setting the M bit in the WIMG field, where
M = memory coherence.

I'm trying to understand why that bit is set.
Here's what the documents I've looked at say:

According to the Programming Environments Manual,
and Freescale AN1809 (minimal boot sequence app note),
if the M bit is set, accesses cause the processor to
'indicate' the access via a hardware signal. No doubt
this indication is so that another processor can
maintain coherence.

The e300 core reference manual indicates that in real
addressing mode, WIMG defaults to 0011b (p4-6), and
the on p4-7 it says

   'When the M attribute is set, and the access is
    performed, the global signal is asserted to
    indicate that the access is global.'

Then on p8-2 it shows that there is an e300 core
gbl# signal that reflects the state of the M bit.
Ok, so I can see what the hardware signal is that
asserts based on the M setting.

But in an MPC8349E/EA is there anything monitoring
the gbl# signal?

Chapter 7 of the MPC8349EA reference manual has an
overview of the core, but it doesn't comment on the
gbl# signal. There is a comment on p7-27 that

'the instruction cache is not snooped, and cache
  coherency must be maintained by software'

which I would interpret as meaning there ain't nobody
listening on gbl# for instruction accesses. Then for
the data caching, there is the comment on p7-29 that

'cache coherency is enforced by on-chip bus snooping logic'

But coherency with what? What other masters are there
that the core has to be coherent with?

I can see that the coherent system bus (CSB) is a
multi-master bus, and that the core is just another
master on that bus. But I don't think any of these devices
have a cache that they need to invalidate in response to the
processor asserting its gbl# signal (p6-11 just shows
request/grant, repeat, and priority signals to the arbiter).

So does anyone have an idea why the M bit would need to be
set for the MPC8349EA BAT entries?

FYI:
  - The M-bit is set for the BAT entries for:
     DDR, PCI memory, SDRAM, stack-in-dcache, and Flash)
  - The M-bit is not set for:
     PCI I/O, IMMRs, and BCSRs
    these are cache inhibited and guarded.

Cheers,
Dave

PS. This is the first time I've looked at the startup code
of a processor with an MMU, or BATs, so if I've missed the
obvious ... be kind :)

  reply	other threads:[~2008-03-02  0:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26  7:19 [U-Boot-Users] Altera Stratix II Markus Brunner
2008-02-26  7:23 ` Jean-Christophe PLAGNIOL-VILLARD
2008-02-28 22:18   ` eran liberty
2008-02-29 17:45     ` Detlev Zundel
2008-02-29 19:56       ` eran liberty
2008-02-29 21:18         ` Wolfgang Denk
2008-02-29 21:36           ` eran liberty
2008-02-29 21:46             ` Brent Cook
2008-03-01 19:36               ` Michael Schwingen
2008-02-29 23:55             ` Wolfgang Denk
2008-03-01 21:32               ` eran liberty
2008-03-01 21:51                 ` David Hawkins
2008-03-02  0:29                   ` David Hawkins [this message]
2008-03-03 17:55                     ` [U-Boot-Users] MPC8349EMDS.h Why do the BAT entries use Memory coherency? David Hawkins
     [not found]                       ` <47CD7DCF.1070207@ovro.caltech.edu>
2008-03-04 20:48                         ` [U-Boot-Users] BDI .cfg for MPC8349E/EA-MDS-PB [1/2] David Hawkins
2008-03-04 20:49                         ` [U-Boot-Users] BDI .cfg for MPC8349E/EA-MDS-PB [2/2] David Hawkins
2008-03-02  9:21                   ` [U-Boot-Users] Altera Stratix II eran liberty
2008-03-02  0:35                 ` Wolfgang Denk

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=47C9F4E7.3000709@ovro.caltech.edu \
    --to=dwh@ovro.caltech.edu \
    --cc=u-boot@lists.denx.de \
    /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.