diff options
author | Dave Liu <daveliu@freescale.com> | 2006-11-02 18:05:50 -0600 |
---|---|---|
committer | Kim Phillips <kim.phillips@freescale.com> | 2006-11-03 19:42:22 -0600 |
commit | 90f30a710a3c619b5405860a686c4ddfc495d4b6 (patch) | |
tree | ef3748781267f86bddbfc738294d44c583710d12 /board/mpc8360emds | |
parent | bf0b542d6773a5a1cbce77691f009b06d9aeb57d (diff) | |
download | u-boot-imx-90f30a710a3c619b5405860a686c4ddfc495d4b6.zip u-boot-imx-90f30a710a3c619b5405860a686c4ddfc495d4b6.tar.gz u-boot-imx-90f30a710a3c619b5405860a686c4ddfc495d4b6.tar.bz2 |
mpc83xx: Fix the incorrect dcbz operation
The 834x rev1.x silicon has one CPU5 errata.
The issue is when the data cache locked with
HID0[DLOCK], the dcbz instruction looks like no-op inst.
The right behavior of the data cache is when the data cache
Locked with HID0[DLOCK], the dcbz instruction allocates
new tags in cache.
The 834x rev3.0 and later and 8360 have not this bug inside.
So, when 834x rev3.0/8360 are working with ECC, the dcbz
instruction will corrupt the stack in cache, the processor will
checkstop reset.
However, the 834x rev1.x can work with ECC with these code,
because the sillicon has this cache bug. The dcbz will not
corrupt the stack in cache.
Really, it is the fault code running on fault sillicon.
This patch fix the incorrect dcbz operation. Instead of
CPU FP writing to initialise the ECC.
CHANGELOG:
* Fix the incorrect dcbz operation instead of CPU FP
writing to initialise the ECC memory. Otherwise, it
will corrupt the stack in cache, The processor will checkstop
reset.
Signed-off-by: Dave Liu <daveliu@freescale.com>
Diffstat (limited to 'board/mpc8360emds')
-rw-r--r-- | board/mpc8360emds/mpc8360emds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/mpc8360emds/mpc8360emds.c b/board/mpc8360emds/mpc8360emds.c index 5bbaa5c..a9b1d9e 100644 --- a/board/mpc8360emds/mpc8360emds.c +++ b/board/mpc8360emds/mpc8360emds.c @@ -535,6 +535,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /* write memory location injecting errors */ ppcDWstore((u32 *) i, pattern); + __asm__ __volatile__("sync"); /* disable injects */ ddr->ecc_err_inject &= ~ECC_ERR_INJECT_EIEN; @@ -543,10 +544,12 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /* read data, this generates ECC error */ ppcDWload((u32 *) i, ret); + __asm__ __volatile__("sync"); /* re-initialize memory, double word write the location again, * generates new ECC code this time */ ppcDWstore((u32 *) i, writeback); + __asm__ __volatile__("sync"); } enable_interrupts(); return 0; @@ -588,6 +591,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) * double word write the location again, * generates new ECC code this time */ ppcDWstore((u32 *) i, writeback); + __asm__ __volatile__("sync"); } enable_interrupts(); return 0; |