coreboot-kgpe-d16/src/arch
Yidi Lin 85d7809e0c arch/arm64/arch_timer: Fix possible overflow in multiplication
The value from raw_read_cntfrq_el0() could be large enough to cause
overflow when multiplied by USECS_PER_SEC. To prevent this, both
USECS_PER_SEC and tfreq can be reduced by dividing them by their GCD.

BUG=b:307790895
TEST=emerge-geralt coreboot
TEST=boot to kernel and check the timestamps from `cbmem`

Change-Id: I366667de05392913150414f0fa9058725be71c52
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78800
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-04 17:09:00 +00:00
..
arm tree: Drop repeated words 2023-02-07 04:37:31 +00:00
arm64 arch/arm64/arch_timer: Fix possible overflow in multiplication 2023-11-04 17:09:00 +00:00
ppc64 arch/ppc64/rom_media.c: move to mainboard/emulation/qemu-power* 2023-04-03 13:22:53 +00:00
riscv arch/riscv: Add clang as supported architecture 2023-06-11 19:25:34 +00:00
x86 arch/x86/memcpy.c: Optimize code for 64bit 2023-11-01 15:47:03 +00:00