All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Data Chache enable
@ 2006-05-02 17:07 PDF conversion
  2006-05-02 17:55 ` Jerry Van Baren
  2006-05-02 19:06 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: PDF conversion @ 2006-05-02 17:07 UTC (permalink / raw)
  To: u-boot

Processor: MPC8260
U-boot Version: 1.1.2
Project: Communication SDH

I am trying to avoid the D chache exception 200 when I
enable D cache. 

I know that the documentation indicates: "Data cache
cannot be enabled on systems like 8xx or 8260(where
access to IMMR region must be uncached). D cache
cannot be diabled on other systems where we (mis-)use
d-cache to hold an initial stach & some data..."

Are there any new commands I can include in the U-Boot
boot loader?

Does any one know what the specific register settings
are to avoid the data cache exception. 

If there is any documentation I overlooked please
indicate. 

I am new to this.

Thank you,
Regards,

 -Om

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Data Chache enable
  2006-05-02 17:07 [U-Boot-Users] Data Chache enable PDF conversion
@ 2006-05-02 17:55 ` Jerry Van Baren
  2006-05-02 22:52   ` Wolfgang Denk
  2006-05-02 19:06 ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Jerry Van Baren @ 2006-05-02 17:55 UTC (permalink / raw)
  To: u-boot

PDF conversion wrote:
> Processor: MPC8260
> U-boot Version: 1.1.2
> Project: Communication SDH
> 
> I am trying to avoid the D chache exception 200 when I
> enable D cache. 
> 
> I know that the documentation indicates: "Data cache
> cannot be enabled on systems like 8xx or 8260(where
> access to IMMR region must be uncached). D cache
> cannot be diabled on other systems where we (mis-)use
> d-cache to hold an initial stach & some data..."
> 
> Are there any new commands I can include in the U-Boot
> boot loader?
> 
> Does any one know what the specific register settings
> are to avoid the data cache exception. 
> 
> If there is any documentation I overlooked please
> indicate. 
> 
> I am new to this.
> 
> Thank you,
> Regards,
> 
>  -Om

Exception 0200 is Machine Check, it has nothing directly to do with data 
caching except for the fact that you are enabling data cache 
inappropriately.

The simplest way to use data cache the way you appear to want to use it 
is to use the BATs to map your I/O memory (minimum: IMMR region) as 
uncached and the rest of your used memory (flash + RAM) as cached.  If 
you don't do that, _everything_ is cached which is a Very Bad Thing[tm], 
as you found out.  I am not aware of anybody having success enabling 
data cache without BATs/MMUs and successfully maintaining cache 
coherency by hand (which is what you are hinting at).

You didn't answer Wolfgang's question "Why do you want to enable data 
cache in u-boot???"  Normally there no need to do that, so you are 
either doing something very unusual or you don't understand the problem 
you are trying to solve.  If you tell us the problem, we might be able 
to give better advice (or at least tell you why we are saying "don't do 
that").

gvb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Data Chache enable
  2006-05-02 17:07 [U-Boot-Users] Data Chache enable PDF conversion
  2006-05-02 17:55 ` Jerry Van Baren
@ 2006-05-02 19:06 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-05-02 19:06 UTC (permalink / raw)
  To: u-boot

I asked you before: Please provide a real  name.  This  is  the  last
reply  I  send  to  somebody  who hides behind a silly name like "PDF
conversion". Please READ the netiquette.

In message <20060502170715.88092.qmail@web37103.mail.mud.yahoo.com> you wrote:
> 
> I am trying to avoid the D chache exception 200 when I
> enable D cache. 

The fix is simple: don't enable D-Cache.

> I know that the documentation indicates: "Data cache
> cannot be enabled on systems like 8xx or 8260(where

What exatly is not clear in the word "cannot"?

Do you understand what "can not" means?

> Are there any new commands I can include in the U-Boot
> boot loader?

There are many commands that can be enabled,  but  probably  none  of
them will help you doing things that cannot be done.

> Does any one know what the specific register settings
> are to avoid the data cache exception. 
> 
> If there is any documentation I overlooked please
> indicate. 

It seems you did not overlook something, but  you  obviously  try  to
ignore a couple of things.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
They say a little knowledge is a dangerous thing,  but it is not  one
half so bad as a lot of ignorance.   - Terry Pratchett, _Equal Rites_

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Data Chache enable
  2006-05-02 17:55 ` Jerry Van Baren
@ 2006-05-02 22:52   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-05-02 22:52 UTC (permalink / raw)
  To: u-boot

Dear Jerry,

in message <44579D00.3060802@smiths-aerospace.com> you wrote:
> > Processor: MPC8260 
> > Purpose: SDH unit
...
> You didn't answer Wolfgang's question "Why do you want to enable data 
> cache in u-boot???"  Normally there no need to do that, so you are 
> either doing something very unusual or you don't understand the problem 
> you are trying to solve.  If you tell us the problem, we might be able 
> to give better advice (or at least tell you why we are saying "don't do 
> that").

Well, the indication was in the subject  line,  which  in  the  first
posting  included "(performance improvement)" - the big question like
with all optimizations is: is he really trying to  optimize  anything
that  has  a significant effect? I have seen a couple of "SDH units",
and have an idea about the typical time needed to boot such a  box  -
and  I  bet  a  couple of beer that the time spent in U-boot to load,
uncompress and start the Linux kernel will be less than 1  %  (*)  of
the  total  boot  time  (=  time  needed  from  power  on  until  the
application startup has been completed).

So even if enabling the data cache would give us 10.000%  performance
improvement  (which it will not, 10% are more likely), we would still
only save less than 1% of the total time. My  recommendation  (and  I
sent  this  to  "Mr. PDF conversion" in a private message [because he
wrote off the list, too]) is always to slaughter the fat pigs  first,
i. e. start optimization where most of the time is lost^H^H^H^Hspent.
And  I  bet another beer that this is neither U-Boot nor Linux kernel
startup.


(*) I explicitely exclude from  this  bet  any  completely  braindead
    design  decisions  like  loading a compressed kernel image from a
    huge JFFS2 file system, etc.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Knowledge, sir, should be free to all!
	-- Harry Mudd, "I, Mudd", stardate 4513.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-02 22:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-02 17:07 [U-Boot-Users] Data Chache enable PDF conversion
2006-05-02 17:55 ` Jerry Van Baren
2006-05-02 22:52   ` Wolfgang Denk
2006-05-02 19:06 ` Wolfgang Denk

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.