From 61dac130b2319301969ddf2cb471913045cb9378 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 4 Jan 2017 21:59:42 +0100 Subject: libpayload: timer: cast cpu_khz to make sure 64bit math is used Change-Id: Iaf84de2330b433076a66c22fa72ffb45e957c0dc Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1261177 Reviewed-on: https://review.coreboot.org/18034 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- payloads/libpayload/drivers/timer/rdtsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/drivers') 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) -- cgit v1.2.3