ppc: Move hash table

To avoid complications with ppc64, always use the ppc64 alignment.

v2:
* Initial. Suggested by Segher Boessenkool.

Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@906 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Andreas Färber
2010-10-16 17:36:12 +00:00
committed by Blue Swirl
parent 076573e064
commit 7a86728b19

View File

@@ -389,14 +389,11 @@ setup_mmu( unsigned long ramsize )
ofmem_t *ofmem; ofmem_t *ofmem;
unsigned long sdr1, sr_base, msr; unsigned long sdr1, sr_base, msr;
unsigned long hash_base; unsigned long hash_base;
unsigned long hash_mask = 0xffff0000; unsigned long hash_mask = 0xfff00000; /* alignment for ppc64 */
int i; int i;
/* SDR1: Storage Description Register 1 */ /* SDR1: Storage Description Register 1 */
if(is_ppc64())
hash_mask = 0xfff00000;
hash_base = (ramsize - 0x00100000 - HASH_SIZE) & hash_mask; hash_base = (ramsize - 0x00100000 - HASH_SIZE) & hash_mask;
memset((void *)hash_base, 0, HASH_SIZE); memset((void *)hash_base, 0, HASH_SIZE);
sdr1 = hash_base | ((HASH_SIZE-1) >> 16); sdr1 = hash_base | ((HASH_SIZE-1) >> 16);