summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-04-25 15:21:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-04-25 15:31:41 +0200
commit62aa3186bcbfbe242068c41aacb30b518c5aaea1 (patch)
tree32f3af4118c1b36cffb4356f3b7baed884ea3918 /c
parentlibcsupport: POSIX conformance for _exit() (diff)
downloadrtems-62aa3186bcbfbe242068c41aacb30b518c5aaea1.tar.bz2
bsp/mpc55xx: Add MMU tag translate initializer
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc55xx/include/regs-mmu.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/regs-mmu.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/regs-mmu.h
index aaddeec228..ef2c533f91 100644
--- a/c/src/lib/libcpu/powerpc/mpc55xx/include/regs-mmu.h
+++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/regs-mmu.h
@@ -150,22 +150,25 @@ extern "C" {
} B;
};
-#define MPC55XX_MMU_TAG_INITIALIZER(idx, addr, size, x, w, r, io) \
+#define MPC55XX_MMU_TAG_TRANSLATE_INITIALIZER(idx, addreff, addrreal, size, x, w, r, io) \
{ \
.MAS0 = { .B = { .TLBSEL = 1, .ESEL = (idx) } }, \
.MAS1 = { .B = { \
.VALID = 1, .IPROT = 1, .TID = 0, .TS = 0, .TSIZE = (size) } \
}, \
.MAS2 = { .B = { \
- .EPN = (addr) >> 10, .VLE = 0, \
+ .EPN = (addreff) >> 10, .VLE = 0, \
.W = (io) == 2, .I = (io) == 1, .M = 0, .G = (io) == 1, .E = 0 } \
}, \
.MAS3 = { .B = { \
- .RPN = (addr) >> 10, .U0 = 0, .U1 = 0, .U2 = 0, .U3 = 0, .UX = 0, \
+ .RPN = (addrreal) >> 10, .U0 = 0, .U1 = 0, .U2 = 0, .U3 = 0, .UX = 0, \
.SX = (x), .UW = 0, .SW = (w), .UR = 0, .SR = (r) } \
} \
}
+#define MPC55XX_MMU_TAG_INITIALIZER(idx, addr, size, x, w, r, io) \
+ MPC55XX_MMU_TAG_TRANSLATE_INITIALIZER(idx, addr, addr, size, x, w, r, io)
+
#define MPC55XX_MMU_1K 0
#define MPC55XX_MMU_2K 1
#define MPC55XX_MMU_4K 2