Attention is currently required from: Arthur Heymans. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59317
to review the following change.
Change subject: cpu/intel/model_1067x: Use apic exposed in static.c directly ......................................................................
cpu/intel/model_1067x: Use apic exposed in static.c directly
This allows for buildtime checking of the presence of the chip_config.
Change-Id: Ifa83ccf6033cbb135c7ec2e9593596dba4c6e3b5 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/intel/model_1067x/model_1067x_init.c 1 file changed, 4 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/59317/1
diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index 3e4de1f..9736692 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -30,10 +30,8 @@ { msr_t msr;
- /* Find pointer to CPU configuration. */ - const struct device *lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC); - const struct cpu_intel_model_1067x_config *const conf = - (lapic && lapic->chip_info) ? lapic->chip_info : NULL; + /* pointer to CPU configuration. */ + const struct cpu_intel_model_1067x_config *const conf = config_of(__apic_acac_0);
/* Is C5 requested and supported? */ const int c5 = conf && conf->c5 && @@ -88,10 +86,8 @@ { msr_t msr;
- /* Find pointer to CPU configuration. */ - const struct device *lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC); - struct cpu_intel_model_1067x_config *const conf = - (lapic && lapic->chip_info) ? lapic->chip_info : NULL; + /* pointer to CPU configuration. */ + const struct cpu_intel_model_1067x_config *const conf = config_of(__apic_acac_0);
msr = rdmsr(MSR_EXTENDED_CONFIG); /* Super LFM supported? */