linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortel.com>
To: linuxppc-dev@ozlabs.org, linuxppc64-dev@ozlabs.org
Subject: looking for help with scomc/scomd registers on 970
Date: Thu, 24 Feb 2005 10:54:17 -0600	[thread overview]
Message-ID: <421E06B9.2000504@nortel.com> (raw)

Not strictly linux related, but I thought someone might know the answer.

I've got a request from someone that wants to be able to flush the L2 on 
the 970.

The user manual has a procedure to do this, but it involves first 
flipping the cache to direct-mapped mode by setting SCOM register 
0x43000 bit 0x8000.  The only thing is, I can't find any linux code that 
ever touches the SCOM stuff, and the manual has no examples of *reading* 
from the SCOM area, just writing to it, so I'm not entirely sure how to 
do that.

A google search found the following snippet of darwin code:


lis r8,cFIR ; Get the Core FIR register address
ori r8,r8,0x8000 ; Set to read data
sync
mtspr scomc,r8 ; Request the Core FIR
mfspr r25,scomd ; Get the source
mfspr r8,scomc ; Get back the status (we just ignore it)
sync
isync	
			


This implies that bit 0x8000 needs to be set to specify a read command, 
and that we need to read the status after the read.  Does anyone know if 
this is in fact the case?

Also, in that code they make reference to early chip revisions that 
returned scom reads shifted by one bit.  Does anyone know which versions 
are affected?


Thanks,

Chris

             reply	other threads:[~2005-02-24 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24 16:54 Chris Friesen [this message]
2005-02-25  4:33 ` looking for help with scomc/scomd registers on 970 Benjamin Herrenschmidt

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=421E06B9.2000504@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc64-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).