diff options
author | Timur Tabi <timur@freescale.com> | 2010-03-29 12:51:07 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-03-30 10:50:22 -0500 |
commit | 9ff32d8ccf0e23b5577c25610f001af8d761b4a2 (patch) | |
tree | 43cce2d1c3caf0a05fdbb33f6a44855f4965433f /board/freescale | |
parent | 33f57bd553edf29dffef5a6c7d76e169c79a6049 (diff) | |
download | u-boot-imx-9ff32d8ccf0e23b5577c25610f001af8d761b4a2.zip u-boot-imx-9ff32d8ccf0e23b5577c25610f001af8d761b4a2.tar.gz u-boot-imx-9ff32d8ccf0e23b5577c25610f001af8d761b4a2.tar.bz2 |
mpc86xx: set the DDR BATs after calculating true DDR size
After determining how much DDR is actually in the system, set DBAT0 and
IBAT0 accordingly. This ensures that the CPU won't attempt to access
(via speculation) addresses outside of actual memory.
On 86xx systems, DBAT0 and IBAT0 (the BATs for DDR) are initialized to 2GB
and kept that way. If the system has less than 2GB of memory (typical for
an MPC8610 HPCD), the CPU may attempt to access this memory during
speculation. The zlib code is notorious for generating such memory reads,
and indeed on the MPC8610, uncompressing the Linux kernel causes a machine
check (without this patch).
Currently we are limited to power of two sized DDR since we only use a
single bat. If a non-power of two size is used that is less than
CONFIG_MAX_MEM_MAPPED u-boot will crash.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/mpc8610hpcd/mpc8610hpcd.c | 2 | ||||
-rw-r--r-- | board/freescale/mpc8641hpcn/mpc8641hpcn.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index 784a2ed..ab5f800 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -127,6 +127,8 @@ initdram(int board_type) dram_size = fixed_sdram(); #endif + setup_ddr_bat(dram_size); + puts(" DDR: "); return dram_size; } diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index c521527..443c9fd 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -74,6 +74,8 @@ initdram(int board_type) dram_size = fixed_sdram(); #endif + setup_ddr_bat(dram_size); + puts(" DDR: "); return dram_size; } |