soc/intel: rename get_prmrr_size
get_prmrr_size does not return the actual PRMRR size but a valid PRMRR size with repect to the users choice in Kconfig. Thus, rename it from `get_prmrr_size` to `get_valid_prmrr_size` to avoid confusion about what it does. Also fix the broken comment in cpulib.h. Change-Id: Id243be50acb741f2c3118ddde082743d08983a53 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45414 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
1dac89633e
commit
490546f191
|
@ -235,7 +235,7 @@ static void soc_memory_init_params(FSPM_UPD *mupd)
|
||||||
/* Only for GLK */
|
/* Only for GLK */
|
||||||
FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
|
FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
|
||||||
|
|
||||||
m_cfg->PrmrrSize = get_prmrr_size();
|
m_cfg->PrmrrSize = get_valid_prmrr_size();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CpuMemoryTest in FSP tests 0 to 1M of the RAM after MRC init.
|
* CpuMemoryTest in FSP tests 0 to 1M of the RAM after MRC init.
|
||||||
|
|
|
@ -52,7 +52,7 @@ static void soc_memory_init_params(FSPM_UPD *mupd, const config_t *config)
|
||||||
mask |= (1 << i);
|
mask |= (1 << i);
|
||||||
}
|
}
|
||||||
m_cfg->PcieRpEnableMask = mask;
|
m_cfg->PcieRpEnableMask = mask;
|
||||||
m_cfg->PrmrrSize = get_prmrr_size();
|
m_cfg->PrmrrSize = get_valid_prmrr_size();
|
||||||
m_cfg->EnableC6Dram = config->enable_c6dram;
|
m_cfg->EnableC6Dram = config->enable_c6dram;
|
||||||
#if CONFIG(SOC_INTEL_COMETLAKE)
|
#if CONFIG(SOC_INTEL_COMETLAKE)
|
||||||
m_cfg->SerialIoUartDebugControllerNumber = CONFIG_UART_FOR_CONSOLE;
|
m_cfg->SerialIoUartDebugControllerNumber = CONFIG_UART_FOR_CONSOLE;
|
||||||
|
|
|
@ -340,7 +340,7 @@ void cpu_lt_lock_memory(void *unused)
|
||||||
msr_set_bit(MSR_LT_CONTROL, LT_CONTROL_LOCK_BIT);
|
msr_set_bit(MSR_LT_CONTROL, LT_CONTROL_LOCK_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_prmrr_size(void)
|
int get_valid_prmrr_size(void)
|
||||||
{
|
{
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -153,7 +153,7 @@ void mca_configure(void);
|
||||||
/* Lock chipset memory registers to protect SMM */
|
/* Lock chipset memory registers to protect SMM */
|
||||||
void cpu_lt_lock_memory(void *unused);
|
void cpu_lt_lock_memory(void *unused);
|
||||||
|
|
||||||
/* Get the a supported PRMRR size in bytes with respect users choice */
|
/* Get a supported PRMRR size in bytes with respect to users choice */
|
||||||
int get_prmrr_size(void);
|
int get_valid_prmrr_size(void);
|
||||||
|
|
||||||
#endif /* SOC_INTEL_COMMON_BLOCK_CPULIB_H */
|
#endif /* SOC_INTEL_COMMON_BLOCK_CPULIB_H */
|
||||||
|
|
|
@ -45,7 +45,7 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg,
|
||||||
mask |= (1 << i);
|
mask |= (1 << i);
|
||||||
}
|
}
|
||||||
m_cfg->PcieRpEnableMask = mask;
|
m_cfg->PcieRpEnableMask = mask;
|
||||||
m_cfg->PrmrrSize = get_prmrr_size();
|
m_cfg->PrmrrSize = get_valid_prmrr_size();
|
||||||
m_cfg->EnableC6Dram = config->enable_c6dram;
|
m_cfg->EnableC6Dram = config->enable_c6dram;
|
||||||
/* Disable BIOS Guard */
|
/* Disable BIOS Guard */
|
||||||
m_cfg->BiosGuard = 0;
|
m_cfg->BiosGuard = 0;
|
||||||
|
|
|
@ -220,7 +220,7 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg,
|
||||||
m_cfg->CmdTriStateDis = config->CmdTriStateDis;
|
m_cfg->CmdTriStateDis = config->CmdTriStateDis;
|
||||||
m_cfg->DdrFreqLimit = config->DdrFreqLimit;
|
m_cfg->DdrFreqLimit = config->DdrFreqLimit;
|
||||||
m_cfg->VmxEnable = CONFIG(ENABLE_VMX);
|
m_cfg->VmxEnable = CONFIG(ENABLE_VMX);
|
||||||
m_cfg->PrmrrSize = get_prmrr_size();
|
m_cfg->PrmrrSize = get_valid_prmrr_size();
|
||||||
for (i = 0; i < ARRAY_SIZE(config->PcieRpEnable); i++) {
|
for (i = 0; i < ARRAY_SIZE(config->PcieRpEnable); i++) {
|
||||||
if (config->PcieRpEnable[i])
|
if (config->PcieRpEnable[i])
|
||||||
mask |= (1<<i);
|
mask |= (1<<i);
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg,
|
||||||
memcpy(m_cfg->PcieClkSrcClkReq, config->PcieClkSrcClkReq,
|
memcpy(m_cfg->PcieClkSrcClkReq, config->PcieClkSrcClkReq,
|
||||||
sizeof(config->PcieClkSrcClkReq));
|
sizeof(config->PcieClkSrcClkReq));
|
||||||
|
|
||||||
m_cfg->PrmrrSize = get_prmrr_size();
|
m_cfg->PrmrrSize = get_valid_prmrr_size();
|
||||||
m_cfg->EnableC6Dram = config->enable_c6dram;
|
m_cfg->EnableC6Dram = config->enable_c6dram;
|
||||||
/* Disable BIOS Guard */
|
/* Disable BIOS Guard */
|
||||||
m_cfg->BiosGuard = 0;
|
m_cfg->BiosGuard = 0;
|
||||||
|
|
Loading…
Reference in New Issue