From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Accessing IRAM & DRAM through different segments in MIPS
Date: Sun, 06 Jan 2008 13:55:54 +0900 [thread overview]
Message-ID: <47805F5A.8070204@ruby.dti.ne.jp> (raw)
In-Reply-To: <477F6206.5030103@txc.stpn.soft.net>
Viswanath Bandi wrote:
> 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.
Ok.
> 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
IMHO it's possible but very hard to do, and
> it be done through some configuration changes or #defines? This way I
we don't have such debugging alternatives, sorry.
> can find out whether instruction is the culprit for not writing the
> value in memory or the data cache.
How do you configure 4KEc caches? I'm interested in 1) its size and 2)
the numbers of its ways. Hmm, some ideas come to mind. For the first
setp does attached patch work for you?
diff --git a/cpu/mips/cache.S b/cpu/mips/cache.S
index 443240e..05735f4 100644
--- a/cpu/mips/cache.S
+++ b/cpu/mips/cache.S
@@ -29,10 +29,10 @@
#include <asm/addrspace.h>
#include <asm/cacheops.h>
- /* 16KB is the maximum size of instruction and data caches on
- * MIPS 4K.
+ /* 64KB is the maximum size of instruction and data caches on
+ * MIPS 4KE.
*/
-#define MIPS_MAX_CACHE_SIZE 0x4000
+#define MIPS_MAX_CACHE_SIZE 0x10000
/*
* cacheop macro to automate cache operations
next prev parent reply other threads:[~2008-01-06 4:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-05 10:55 [U-Boot-Users] Accessing IRAM & DRAM through different segments in MIPS Viswanath Bandi
2008-01-06 4:55 ` Shinya Kuribayashi [this message]
2008-01-08 2:30 ` Hoi-Ho Chan
2008-01-09 8:03 ` Viswanath Bandi
2008-01-09 9:45 ` Shinya Kuribayashi
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=47805F5A.8070204@ruby.dti.ne.jp \
--to=skuribay@ruby.dti.ne.jp \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox