summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h
index 4ab0c6f289..bcc15a1f8c 100644
--- a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h
+++ b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h
@@ -101,7 +101,8 @@ static inline uint64_t mem_chip_info_total_density_bytes(const struct mem_chip_i
for (i = 0; i < info->num_entries; i++) {
const struct mem_chip_entry *e = &info->entries[i];
- bytes += e->density_mbits * (e->channel_io_width / e->io_width) * (MiB / 8);
+ bytes += (uint64_t)e->density_mbits * (e->channel_io_width / e->io_width)
+ * (MiB / 8);
}
return bytes;