coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
power_limit.c File Reference
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/power_limit.h>
#include <soc/msr.h>
#include <soc/systemagent.h>
Include dependency graph for power_limit.c:

Go to the source code of this file.

Functions

void set_power_limits (u8 power_limit_1_time, struct soc_power_limits_config *conf)
 
u8 get_cpu_tdp (void)
 

Variables

static const u8 power_limit_time_sec_to_msr []
 
static const u8 power_limit_time_msr_to_sec []
 

Function Documentation

◆ get_cpu_tdp()

u8 get_cpu_tdp ( void  )

Definition at line 199 of file power_limit.c.

References cpu_tdp, msr_struct::lo, MSR_PKG_POWER_SKU, MSR_PKG_POWER_SKU_UNIT, and rdmsr().

Referenced by fill_vr_domain_config(), get_sku_index(), get_vccin_aux_imon_iccmax(), soc_systemagent_init(), and variant_update_power_limits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_power_limits()

Variable Documentation

◆ power_limit_time_msr_to_sec

const u8 power_limit_time_msr_to_sec[]
static
Initial value:
= {
[0x00] = 0,
[0x0a] = 1,
[0x0b] = 2,
[0x4b] = 3,
[0x0c] = 4,
[0x2c] = 5,
[0x4c] = 6,
[0x6c] = 7,
[0x0d] = 8,
[0x2d] = 10,
[0x4d] = 12,
[0x6d] = 14,
[0x0e] = 16,
[0x2e] = 20,
[0x4e] = 24,
[0x6e] = 28,
[0x0f] = 32,
[0x2f] = 40,
[0x4f] = 48,
[0x6f] = 56,
[0x10] = 64,
[0x30] = 80,
[0x50] = 96,
[0x70] = 112,
[0x11] = 128,
}

Definition at line 40 of file power_limit.c.

Referenced by set_power_limits().

◆ power_limit_time_sec_to_msr

const u8 power_limit_time_sec_to_msr[]
static
Initial value:
= {
[0] = 0x00,
[1] = 0x0a,
[2] = 0x0b,
[3] = 0x4b,
[4] = 0x0c,
[5] = 0x2c,
[6] = 0x4c,
[7] = 0x6c,
[8] = 0x0d,
[10] = 0x2d,
[12] = 0x4d,
[14] = 0x6d,
[16] = 0x0e,
[20] = 0x2e,
[24] = 0x4e,
[28] = 0x6e,
[32] = 0x0f,
[40] = 0x2f,
[48] = 0x4f,
[56] = 0x6f,
[64] = 0x10,
[80] = 0x30,
[96] = 0x50,
[112] = 0x70,
[128] = 0x11,
}

Definition at line 11 of file power_limit.c.

Referenced by set_power_limits().