summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2017-01-04 21:59:42 +0100
committerMartin Roth <martinroth@google.com>2017-01-06 18:40:44 +0100
commit61dac130b2319301969ddf2cb471913045cb9378 (patch)
treeba45b991afd2938fe84370093213ddec42cd579e
parent766c3fec2d8cfc8d0d7bcfd94f98bace8d3309e9 (diff)
downloadcoreboot-61dac130b2319301969ddf2cb471913045cb9378.tar.gz
coreboot-61dac130b2319301969ddf2cb471913045cb9378.tar.bz2
coreboot-61dac130b2319301969ddf2cb471913045cb9378.zip
libpayload: timer: cast cpu_khz to make sure 64bit math is used
Change-Id: Iaf84de2330b433076a66c22fa72ffb45e957c0dc Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1261177 Reviewed-on: https://review.coreboot.org/18034 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--payloads/libpayload/drivers/timer/rdtsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/timer/rdtsc.c b/payloads/libpayload/drivers/timer/rdtsc.c
index 4a425a5bbd4c..9607b66b7aac 100644
--- a/payloads/libpayload/drivers/timer/rdtsc.c
+++ b/payloads/libpayload/drivers/timer/rdtsc.c
@@ -37,7 +37,7 @@
uint64_t timer_hz(void)
{
- return lib_sysinfo.cpu_khz * 1000;
+ return (uint64_t)lib_sysinfo.cpu_khz * 1000;
}
uint64_t timer_raw_value(void)