soc/intel/alderlake: Fix unknown max speed in SMBIOS

The current SMBIOS for coreboot is missing processor info for Alder Lake
and Raptor Lake SoC, specifically, voltage, max speed,
and upgrade (socket type). This patch implements max speed function.
Refer to SMBIOS spec sheet for documentation:
https://web.archive.org/web/20221012222420/https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf

BUG=NONE
BRANCH=firmware-brya-14505.B
TEST=Boot and verified that SMBIOS max speed value is correct.

Signed-off-by: Zhixing Ma <zhixing.ma@intel.com>
Change-Id: I09bcccc6f97238f7328224af8b852751114896fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67913
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Zhixing Ma 2022-09-27 11:11:58 -07:00 committed by Felix Held
parent e109a6a47f
commit eb35327681
2 changed files with 15 additions and 0 deletions

View File

@ -45,6 +45,7 @@ ramstage-y += tcss.c
ramstage-y += vr_config.c
ramstage-y += xhci.c
ramstage-$(CONFIG_SOC_INTEL_CRASHLOG) += crashlog.c
ramstage-y += smbios.c
smm-y += elog.c
smm-y += p2sb.c

View File

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <intelblocks/cpulib.h>
#include <intelblocks/msr.h>
#include <smbios.h>
/* AlderLake bus clock is fixed at 100MHz */
#define ADL_BCLK 100
/* Provide the max turbo frequency of the CPU */
unsigned int smbios_cpu_get_max_speed_mhz(void)
{
return cpu_get_max_turbo_ratio() * ADL_BCLK;
}