]> git.baikalelectronics.ru Git - uboot.git/commit
common/memsize.c: Check for overflow in get_effective_memsize() only for mpc85xx
authorPali Rohár <pali@kernel.org>
Sat, 7 Jan 2023 21:55:26 +0000 (22:55 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 7 Jan 2023 23:01:53 +0000 (18:01 -0500)
commit9d452f5c687b189437d93ddcc8b660a3e7823181
treeb085c56447f8c18d3886a9a6d6fc0d3c183ad646
parentc916545012d137e5064b360e99e2e5aa22d766b6
common/memsize.c: Check for overflow in get_effective_memsize() only for mpc85xx

This reverts commit 9306ac3ce44b ("common/memsize.c: Fix
get_effective_memsize() to check for overflow") for non-mpc85xx platforms.

The changes to this generic function, which is intended to help with
32bit platforms with large amounts of memory has unintended side effects
(which in turn lead to boot failures) on other platforms which were
previously functional.

For now do overflow check only for powerpc mpc85xx platform. It is needed
to prevent crashing of P1/P2 boards with 4GB DDR module in 32-bit mode.

Fixes: 9306ac3ce44b ("common/memsize.c: Fix get_effective_memsize() to check for overflow")
Signed-off-by: Pali Rohár <pali@kernel.org>
common/memsize.c