Attention is currently required from: Furquan Shaikh, Subrata Banik, Aamir Bohra. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/50880 )
Change subject: intel/fsp2_0: Fix the mp_get_processor_info ......................................................................
Patch Set 1:
(8 comments)
File src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c:
https://review.coreboot.org/c/coreboot/+/50880/comment/6a33df3e_dea9f299 PS1, Line 22: cpuid_regs = cpuid(0); : assert(cpuid_regs.eax >= 0xb); /* cpuid_regs.eax is max input value for cpuid */ nit: could be ``` assert (cpu_have_cpuid() && cpuid_get_max_func() >= 0xb); ```
https://review.coreboot.org/c/coreboot/+/50880/comment/d3807195_cd8dba90 PS1, Line 26: ecx = 0; : while (1) { : cpuid_regs = cpuid_ext(0xb, ecx); : if (ecx == 0) { : *thread_bits = (cpuid_regs.eax & 0x1f); : } else { : *core_bits = (cpuid_regs.eax & 0x1f) - *thread_bits; : break; : } : ecx++; : } isn't this just: ``` cpuid_regs = cpuid_ext(0xb, 0); *thread_bits = cpuid_regs.eax & 0x1f;
cpuid_regs = cpuid_ext(0xb, 1); *core_bits = (cpuid_regs.eax & 0x1f) - *thread_bits; ```
https://review.coreboot.org/c/coreboot/+/50880/comment/eab6c46e_eb8b8844 PS1, Line 42: if (package != NULL) nit: `if (package)`
https://review.coreboot.org/c/coreboot/+/50880/comment/d44a7e65_e02b3e77 PS1, Line 44: if (core != NULL) nit: `if (core)`
https://review.coreboot.org/c/coreboot/+/50880/comment/04ad4ee2_1268dfc9 PS1, Line 45: ~((~0) << core_bits)) the double-inversion reads a little tricky, how about: ``` ((1 << core_bits) - 1) ```
https://review.coreboot.org/c/coreboot/+/50880/comment/8a2df522_e8d97281 PS1, Line 46: if (thread != NULL) nit: `if (thread)`
https://review.coreboot.org/c/coreboot/+/50880/comment/58dcc02f_b46f70a8 PS1, Line 47: ~((~0) << thread_bits) same here: ``` ((1 << thead_bits) - 1) ```
https://review.coreboot.org/c/coreboot/+/50880/comment/50ee07a2_9384036e PS1, Line 128: /* Run on APs */ : if (mp_run_on_aps((void *)procedure, argument, : MP_RUN_ON_ALL_CPUS, timeout_usec)) { : printk(BIOS_DEBUG, "%s: Exit with Failure\n", __func__); : return FSP_NOT_STARTED; : } : : /* Run on BSP */ : procedure(argument); Since this is an unrelated change in behavior, would you mind doing this in a separate CL?