drivers/soc/cse: Fix overflow in CSE telemetry calculation
MSEC_TO_USEC(cse_perf_data.timestamp[i]) does overflow. Here is an example, if cse_perf_data.timestamp[i] value is 4304903 milliseconds. When multiplied by 1000 to convert to microseconds, the value becomes 0x979B58 instead of 0x100979B58. TEST=Boot to OS Change-Id: I09cc00aa595a821a57a34c38a4435e433e935ad3 Signed-off-by: Bora Guvendik <bora.guvendik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86215 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
This commit is contained in:
parent
5f77be4cfc
commit
4d5587b21e
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <intelblocks/cse.h>
|
||||
#include <timestamp.h>
|
||||
|
||||
#define MSEC_TO_USEC(x) (x * 1000)
|
||||
#define MSEC_TO_USEC(x) ((s64)x * 1000)
|
||||
|
||||
enum cb_err cse_get_boot_performance_data(struct cse_boot_perf_rsp *boot_perf_rsp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue