summaryrefslogtreecommitdiff
path: root/src/northbridge/amd
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-06-04 10:30:41 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-06-21 09:12:37 +0000
commit09c31d557fb731cac17821e547cdb644ee817463 (patch)
treec147c2a76675de60d360c861a31cbfe92b7898cb /src/northbridge/amd
parent8de6cb975f8cf5cd7a4a98b5784fea3d36ce8fec (diff)
downloadcoreboot-09c31d557fb731cac17821e547cdb644ee817463.tar.xz
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>
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 0c594b9f62..e28b89b8e4 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -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;