<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Shinya & Donald for the suggestions.<br>
<br>
Following is our cache configuration.<br>
<br>
Cache Size (KB): 8KBytes<br>
Associativity (Lines Per Set): <span style="font-weight: bold;">4-Ways</span><br>
Way Size (KB): <span style="font-weight: bold;">2KBytes</span><br>
Number of Sets:<span style="font-weight: bold;">128 Sets</span><br>
Cache Line Size: <span style="font-weight: bold;">16-bytes per
line</span><br>
<br>
One more thing I found out is that the cache works when configured in
write-through mode (with or without write allocate). The only mode
which is giving problem is "write-back, write allocate".<br>
<br>
Two more points:<br>
1) By the time the program hangs, relocation is done and program starts
executing from DDR. It hangs somewhere down the program.<br>
2) Whenever it hangs, it's reading gp value from stack and getting
wrong value. When I single step through the code which actually puts it
on the stack (sw), then this program goes further. Doesn't hang at this
point.<br>
<br>
I will try this piece of code and see if it makes any difference.<br>
<br>
Best Regards,<br>
Viswanath Bandi<br>
<br>
Hoi-Ho Chan wrote:
<blockquote
cite="mid:7aee76880801071830g5689b6e1u9e4451ce14c23dd1@mail.gmail.com"
type="cite">
<pre wrap="">I had a similar problem with running U-boot on a 4KEc processor on
cached memory, u-boot got stuck after display the memory sizes. Then I
added a routine like this:
ulong start_addr = KSEG0;
ulong end_addr = start_addr + CFG_DCACHE_SIZE;
while (start_addr < end_addr) {
__asm__ __voltaile__(".set noreorder; \
.set mips3; \
cache %1, (%0);
.set mips0;
.set reorder"::"r"(start_addr),
"i"(Index_Writeback_Inv_D));
start_addr += CFG_CACHELINE_SIZE;
}
and then call it at lib_mips/board.c right before relocate_code(...)
seems to work for me.
Thanks
Donald
On Jan 5, 2008 4:55 AM, Viswanath Bandi <a class="moz-txt-link-rfc2396E" href="mailto:bandiv@txc.stpn.soft.net"><bandiv@txc.stpn.soft.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi All,
I am trying to run U-boot on a MIPS 4KEc processor mapped onto FPGA. The
code is working fine when KSEG0 is configured as un-cached segment (K0
field in CP0 register 16 configured as 2). But when I make this as
cached segment, the code crashes and I see that the values on the stack
are not written correctly. Due to this the program causes some exception
or the other.
In order to isolate the problem between icache and dcache, I want to try
and access IRAM using KSEG1 addresses (0xA0000000 onwards) and DRAM
using KSEG0 addresses (0x80000000) or vice versa. Is the possible? Can
it be done through some configuration changes or #defines? This way I
can find out whether instruction is the culprit for not writing the
value in memory or the data cache.
I would very much appreciate any information in this regard.
Best Regards,
Viswanath Bandi
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
<a class="moz-txt-link-freetext" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a>
_______________________________________________
U-Boot-Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:U-Boot-Users@lists.sourceforge.net">U-Boot-Users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>