]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
armv8/cache: Fix page table creation
authorThierry Reding <treding@nvidia.com>
Wed, 22 Jul 2015 23:10:11 +0000 (17:10 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:50:52 +0000 (13:50 +0200)
commit217651fccee1c9f1d7a6930a083bb88155f6c73e
tree988b26983c0c171c6b40068b17eedf556c73e4cf
parentbea941b56cee533f2ed4ed5c091914778537aea1
armv8/cache: Fix page table creation

While generating the page tables, a running integer index is shifted by
SECTION_SHIFT (29) and causes overflow for any integer bigger than 7.
The page tables therefore alias to the same 8 sections and cause U-Boot
to hang once the MMU is enabled.

Fix this by making the index a 64-bit unsigned integer and so avoid the
overflow.

swarren notes: currently "i" ranges from 0..8191 on all ARM64 boards, and
"j" varies depending on RAM size; from 4 to 11 for a board with 4GB at
physical address 2GB, as some Tegra boards have.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv8/cache_v8.c