diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2017-01-04 21:59:42 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-01-06 18:40:44 +0100 |
commit | 61dac130b2319301969ddf2cb471913045cb9378 (patch) | |
tree | ba45b991afd2938fe84370093213ddec42cd579e | |
parent | 766c3fec2d8cfc8d0d7bcfd94f98bace8d3309e9 (diff) | |
download | coreboot-61dac130b2319301969ddf2cb471913045cb9378.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/timer/rdtsc.c b/payloads/libpayload/drivers/timer/rdtsc.c index 4a425a5bbd..9607b66b7a 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) |