nb/amd/amdfam10: Use 64 bits in multiplication

The literal needs to be cast to a uint64 to prevent num_nodes
from being implicitly promoted to a signed int.

Change-Id: Id2fa328fb8d0a9827c7c78157c024736e9b26dc4
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1347343
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
This commit is contained in:
Jacob Garber 2019-06-04 10:30:41 -06:00 committed by Patrick Georgi
parent 8de6cb975f
commit 09c31d557f
1 changed files with 1 additions and 1 deletions

View File

@ -779,7 +779,7 @@ static void amdfam10_domain_read_resources(struct device *dev)
/* Calculate CC6 storage area size */
if (interleaved)
qword = (0x1000000 * num_nodes);
qword = (uint64_t)0x1000000 * num_nodes;
else
qword = 0x1000000;