Attention is currently required from: Yidi Lin.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78888?usp=email )
Change subject: libpayload/libc/time: Fix possible overflow in multiplication ......................................................................
Patch Set 4:
(2 comments)
File payloads/libpayload/libc/time.c:
https://review.coreboot.org/c/coreboot/+/78888/comment/cbb2c4c2_3a5f2949 : PS4, Line 181: 1000000 nit: might look better to initialize `mult` earlier and use it here.
Actually, might look nicer to use USECS_PER_SEC to initialize `mult` rather than the raw number, too.
https://review.coreboot.org/c/coreboot/+/78888/comment/9c10c058_b929617b : PS4, Line 189: * hz to uint32_t. This is architecture-independent code, so this comment doesn't belong here. I think the best option is to change timer_hz() to return a uint32_t (for the rdtsc.c case it should be good enough to add an assert that the multiplication doesn't overflow, we should be able to assume in practice that the timestamp counters will never be that fast).