Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32283 )
Change subject: soc/intel/common/timer: Calculate TSC frequency based on CPUID 0x15 ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/32283/4/src/soc/intel/common/block/timer/tim... File src/soc/intel/common/block/timer/timer.c:
https://review.coreboot.org/#/c/32283/4/src/soc/intel/common/block/timer/tim... PS4, Line 22: static int get_processor_model(void) : { : union cpuid_01 { : uint32_t eax; : struct { : unsigned stepping_id : 4; : unsigned model : 4; : unsigned family : 4; : unsigned reserved1 : 4; : unsigned ext_model : 4; : unsigned ext_family : 8; : unsigned reserved2 : 4; : } __packed fields; : }; : : union cpuid_01 eax_value; : : eax_value.eax = cpuid_eax(1); : : return (eax_value.fields.ext_model << 4) | eax_value.fields.model; : }
Please don't reinvent the wheel, use get_fms().
let me check that get_fms(&c, cpuid_eax(1)) is something what can be done i guess.