coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
power_limit.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
#ifndef _SOC_INTEL_COMMON_BLOCK_POWER_LIMIT_H_
4
#define _SOC_INTEL_COMMON_BLOCK_POWER_LIMIT_H_
5
6
#define MCH_PKG_POWER_LIMIT_LO 0x59a0
7
#define MCH_PKG_POWER_LIMIT_HI 0x59a4
8
#define MCH_DDR_POWER_LIMIT_LO 0x58e0
9
#define MCH_DDR_POWER_LIMIT_HI 0x58e4
10
11
#define MSR_VR_CURRENT_CONFIG 0x601
12
#define MSR_PL3_CONTROL 0x615
13
#define MSR_PLATFORM_POWER_LIMIT 0x65c
14
15
/* Default power limit value in secs */
16
#define MOBILE_SKU_PL1_TIME_SEC 28
17
18
#define MILLIWATTS_TO_WATTS 1000
19
20
struct
soc_power_limits_config
{
21
/* PL1 Override value in Watts */
22
uint16_t
tdp_pl1_override
;
23
/* PL2 Override value in Watts */
24
uint16_t
tdp_pl2_override
;
25
/* SysPL2 Value in Watts */
26
uint16_t
tdp_psyspl2
;
27
/* SysPL3 Value in Watts */
28
uint16_t
tdp_psyspl3
;
29
/* SysPL3 window size */
30
uint32_t
tdp_psyspl3_time
;
31
/* SysPL3 duty cycle */
32
uint32_t
tdp_psyspl3_dutycycle
;
33
/* PL4 Value in Watts */
34
uint16_t
tdp_pl4
;
35
/* Estimated maximum platform power in Watts */
36
uint16_t
psys_pmax
;
37
};
38
39
/* Configure power limits for turbo mode */
40
void
set_power_limits
(
u8
power_limit_1_time,
41
struct
soc_power_limits_config
*
config
);
42
43
u8
get_cpu_tdp
(
void
);
44
45
#endif
/* _SOC_INTEL_COMMON_BLOCK_POWER_LIMIT_H_ */
config
enum board_config config
Definition:
memory.c:448
set_power_limits
void set_power_limits(u8 power_limit_1_time, struct soc_power_limits_config *config)
Definition:
power_limit.c:72
get_cpu_tdp
u8 get_cpu_tdp(void)
Definition:
power_limit.c:199
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
u8
uint8_t u8
Definition:
stdint.h:45
soc_power_limits_config
Definition:
power_limit.h:20
soc_power_limits_config::tdp_psyspl3_dutycycle
uint32_t tdp_psyspl3_dutycycle
Definition:
power_limit.h:32
soc_power_limits_config::tdp_psyspl2
uint16_t tdp_psyspl2
Definition:
power_limit.h:26
soc_power_limits_config::tdp_pl1_override
uint16_t tdp_pl1_override
Definition:
power_limit.h:22
soc_power_limits_config::psys_pmax
uint16_t psys_pmax
Definition:
power_limit.h:36
soc_power_limits_config::tdp_pl2_override
uint16_t tdp_pl2_override
Definition:
power_limit.h:24
soc_power_limits_config::tdp_pl4
uint16_t tdp_pl4
Definition:
power_limit.h:34
soc_power_limits_config::tdp_psyspl3_time
uint32_t tdp_psyspl3_time
Definition:
power_limit.h:30
soc_power_limits_config::tdp_psyspl3
uint16_t tdp_psyspl3
Definition:
power_limit.h:28
src
soc
intel
common
block
include
intelblocks
power_limit.h
Generated by
1.9.1