Attention is currently required from: Subrata Banik, Angel Pons, Aamir Bohra. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/50913 )
Change subject: intel/common/block/cpu: Add APIs to get CPU info from lapic ID ......................................................................
Patch Set 2:
(1 comment)
File src/soc/intel/common/block/cpu/cpulib.c:
https://review.coreboot.org/c/coreboot/+/50913/comment/b78f4f3e_c9374510 PS2, Line 413: /* Check for extended CPU topology CPUID support */ : if (cpuid_regs.eax >= CPUID_EXTENDED_CPU_TOPOLOGY) : cpu_id_op = CPUID_EXTENDED_CPU_TOPOLOGY; : if (cpuid_regs.eax >= CPUID_EXTENDED_CPU_TOPOLOGY_V2) : cpu_id_op = CPUID_EXTENDED_CPU_TOPOLOGY_V2; suggestion: the two ifs next to each other could be misread, reversing the order allows you to use else-if which looks more natural at a glance, e.g: ``` /* Check for extended CPU topology CPUID support */ if (cpuid_regs.eax >= CPUID_EXTENDED_CPU_TOPOLOGY_V2) cpu_id_op = CPUID_EXTENDED_CPU_TOPOLOGY_V2; else if (cpuid_regs.eax >= CPUID_EXTENDED_CPU_TOPOLOGY) cpu_id_op = CPUID_EXTENDED_CPU_TOPOLOGY;
```
It also allows an `else` branch here that, if reached, should cause failure, otherwise cpu_id_op has an undefined value below when calling cpuid_ext