public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] MIPS cache management (and build) questions.
@ 2007-09-13  7:26 Paul Marciano
  2007-09-13  7:38 ` Stefan Roese
  2007-09-13  9:54 ` Shinya Kuribayashi
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Marciano @ 2007-09-13  7:26 UTC (permalink / raw)
  To: u-boot

Hi,

I'm working on bringing U-Boot 1.2.0 up on a MIPS 24Kc
core (MIPS32R2).  It has gone relatively smoothly -
with a couple of hiccups that I want to point out here
in case I'm missing something.

1. I needed to gdb through the code, so I turned off
-Os, and the build failed with strcmp and friends
missing.  It seems that the MIPS port in-lines them
with -Os but omits them completely without it.  Adding
'C' versions of the functions fixed that.

2. I'm using do_bootelf() to invoke my image.  The
lines:
    addr = load_elf_image(addr);
    ...
    if (dcache_status())
        dcache_disable();
    ...
    (function call through addr)

The comment embedded in the code says the dcache is
flushed already, but in cpu/mips/cpu.c, the function
flush_cache() is empty so the dcache isn't flushed.

As it's not flushed, and dcache_disable() just turns
it off, if the run address is somewhere that hasn't
naturally spilled out of the dcache during the load,
the CPU will fetch garbage.

Also, as the 'addr' variable is now on the stack (in a
non-optimized compile), that variable pops out of
existence and jumping through it shoots the processor
off into the weeds.


Perhaps I'm just very green and am missing something
here.  Does MIPS get no love, or am I missing
something fundamental?

Can someone please clue me in?

Thanks,
Paul.



       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

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

end of thread, other threads:[~2007-09-13  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-13  7:26 [U-Boot-Users] MIPS cache management (and build) questions Paul Marciano
2007-09-13  7:38 ` Stefan Roese
2007-09-13  9:54 ` Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox