summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-16 16:13:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-16 16:13:30 +0000
commitdb4903f61ec2098375d66eadfc9a9876d4ece2ab (patch)
treeb8ef75732eba1da40fe36f4638b37eea0ea6f59f /c
parent2009-10-16 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-db4903f61ec2098375d66eadfc9a9876d4ece2ab.tar.bz2
2009-10-16 Jennifer Averett <jennifer.averett@OARcorp.com>
* mpc6xx/mmu/bat.c: Resolved bug: It is not an overlap if the batindex being set is the batindex of the overlap.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libcpu/powerpc/ChangeLog5
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog
index e92f1861eb..22562b32f7 100644
--- a/c/src/lib/libcpu/powerpc/ChangeLog
+++ b/c/src/lib/libcpu/powerpc/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-16 Jennifer Averett <jennifer.averett@OARcorp.com>
+
+ * mpc6xx/mmu/bat.c: Resolved bug: It is not an overlap if the batindex
+ being set is the batindex of the overlap.
+
2009-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/include/io.h, shared/include/mmu.h: Change extern inline to
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c
index b876f32f08..e2090fd4a5 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c
@@ -8,7 +8,7 @@
*
* MPC750
* Risc Microporcessor User's Manual
- * Motorola REF : MPC750UM/AD 8/97
+ * Mtorola REF : MPC750UM/AD 8/97
*
* Copyright (C) 1999 Eric Valette (valette@crf.canon.fr)
* Canon Centre Recherche France.
@@ -160,7 +160,7 @@ bat_addrs_put (ubat * bat, int typ, int idx)
* cache.
*/
static void
-bat_addrs_init (void)
+bat_addrs_init ()
{
ubat bat;
@@ -204,7 +204,7 @@ bat_addrs_init (void)
}
static void
-do_dssall (void)
+do_dssall ()
{
/* Before changing BATs, 'dssall' must be issued.
* We check MSR for MSR_VE and issue a 'dssall' if
@@ -227,7 +227,7 @@ do_dssall (void)
/* Clear I/D bats 4..7 ONLY ON 7455 etc. */
static void
-clear_hi_bats (void)
+clear_hi_bats ()
{
do_dssall ();
CLRBAT (DBAT4);
@@ -380,8 +380,9 @@ setbat (int typ, int bat_index, unsigned long virt, unsigned long phys,
init_done = 1;
}
}
-
- if (size >= (1 << 17) && (err = check_overlap (typ, virt, size)) >= 0) {
+
+ err = check_overlap (typ, virt, size);
+ if ((size >= (1 << 17)) && (err >= 0) && (err != bat_index)) {
rtems_interrupt_enable (level);
printk ("BATs must not overlap; area 0x%08x..0x%08x hits %cBAT %i\n",
virt, virt + size, (TYP_I == typ ? 'I' : 'D'), err);