Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35148 )
Change subject: soc/intel/common/timer: Make TSC frequency calculation dynamically ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35148/3/src/soc/intel/common/block/... File src/soc/intel/common/block/timer/timer.c:
https://review.coreboot.org/c/coreboot/+/35148/3/src/soc/intel/common/block/... PS3, Line 50: * EAX Bit 31-0 : An unsignd integer which has the processor base frequency unsigned
https://review.coreboot.org/c/coreboot/+/35148/3/src/soc/intel/common/block/... PS3, Line 67: return 0; Returning 0 from this function should be forbidden. IMHO it is better to put an assert() here and return some "reasonable but large" clockrate. Reason for this is the value is/may be used as a divisor (like done in tsc/delay_tsc.c) and will result in divide-by-zero exception at some non-obvious location. Larger frequency here causes udelay() to last longer than it should, but it's better making things slower than faster.
See CB:31430