Attention is currently required from: Anastasios Koutian, Nico Huber.
Angel Pons has posted comments on this change by Anastasios Koutian. ( https://review.coreboot.org/c/coreboot/+/83271?usp=email )
Change subject: cpu/intel/model_206ax: Allow turbo boost ratio limit configuration ......................................................................
Patch Set 5:
(3 comments)
File src/cpu/intel/model_206ax/chip.h:
https://review.coreboot.org/c/coreboot/+/83271/comment/4ace2853_03766272?usp... : PS5, Line 63: acrive typo: ac**t**ive
https://review.coreboot.org/c/coreboot/+/83271/comment/097a0704_6f46b39d?usp... : PS5, Line 63: int turbo_ratio_limit_4c; /* Turbo Ratio Limit for 4 cores acrive */
An array might look better?
Hmmm, but indices wouldn't make sense (0 .. 3 instead of 1 .. 4). But... What if?
``` union { /* Turbo Ratio Limits depending on the number of active cores */ struct { int limit_1c; int limit_2c; int limit_3c; int limit_4c; }; int raw[4]; } turbo_ratio_limits; ```
File src/cpu/intel/model_206ax/model_206ax_init.c:
https://review.coreboot.org/c/coreboot/+/83271/comment/a2ff1fc9_5faccd3b?usp... : PS5, Line 180: msr_t msr = rdmsr(MSR_TURBO_RATIO_LIMIT); : : if (conf->turbo_ratio_limit_1c) { : msr.lo &= ~0xff; : msr.lo |= (conf->turbo_ratio_limit_1c); : } : : if (conf->turbo_ratio_limit_2c) { : msr.lo &= ~(0xff << 8); : msr.lo |= (conf->turbo_ratio_limit_2c << 8); : } : : if (conf->turbo_ratio_limit_3c) { : msr.lo &= ~(0xff << 16); : msr.lo |= (conf->turbo_ratio_limit_3c << 16); : } : : if (conf->turbo_ratio_limit_4c) { : msr.lo &= ~(0xff << 24); : msr.lo |= (conf->turbo_ratio_limit_4c << 24); : } : : wrmsr(MSR_TURBO_RATIO_LIMIT, msr); nit: drop one tab ```suggestion msr_t msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
if (conf->turbo_ratio_limit_1c) { msr.lo &= ~0xff; msr.lo |= (conf->turbo_ratio_limit_1c); }
if (conf->turbo_ratio_limit_2c) { msr.lo &= ~(0xff << 8); msr.lo |= (conf->turbo_ratio_limit_2c << 8); }
if (conf->turbo_ratio_limit_3c) { msr.lo &= ~(0xff << 16); msr.lo |= (conf->turbo_ratio_limit_3c << 16); }
if (conf->turbo_ratio_limit_4c) { msr.lo &= ~(0xff << 24); msr.lo |= (conf->turbo_ratio_limit_4c << 24); }
wrmsr(MSR_TURBO_RATIO_LIMIT, msr); ```