coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vr_config.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
/* VR Settings for each domain */
4
5
#ifndef _SOC_VR_CONFIG_H_
6
#define _SOC_VR_CONFIG_H_
7
8
#include <fsp/api.h>
9
10
struct
vr_config
{
11
12
/*
13
* The below settings will take effect when this is set to 1
14
* for that domain.
15
*/
16
int
vr_config_enable
;
17
18
/* Power State X current cutoff in 1/4 Amp increments
19
* Range is 0-128A
20
*/
21
int
psi1threshold
;
22
int
psi2threshold
;
23
int
psi3threshold
;
24
25
/* Enable power state 3/4 for different domains */
26
int
psi3enable
;
27
int
psi4enable
;
28
29
/*
30
* Imon slope correction. Specified in 1/100 increment
31
* values. Range is 0-200. 125 = 1.25
32
*/
33
int
imon_slope
;
34
35
/*
36
* Imon offset correction. Units 1/4, Range 0-255.
37
* Value of 100 = 100/4 = 25 offset.
38
*/
39
int
imon_offset
;
40
41
/* VR Icc Max limit. 0-255A in 1/4 A units. 400 = 100A */
42
int
icc_max
;
43
44
/* VR Voltage Limit. Range is 0-7999mV */
45
int
voltage_limit
;
46
47
/* AC and DC Loadline in 1/100 mOhms. Range is 0-6249 */
48
int
ac_loadline
;
49
int
dc_loadline
;
50
};
51
52
#define VR_CFG_AMP(i) ((i) * 4)
53
#define VR_CFG_MOHMS(i) (uint16_t)((i) * 100)
54
55
/* VrConfig Settings for 4 domains
56
* 0 = System Agent, 1 = IA Core,
57
* 2 = GT unsliced, 3 = GT sliced
58
*/
59
enum
vr_domain
{
60
VR_SYSTEM_AGENT
,
61
VR_IA_CORE
,
62
VR_GT_UNSLICED
,
63
VR_GT_SLICED
,
64
NUM_VR_DOMAINS
65
};
66
67
#define VR_CFG_ALL_DOMAINS_ICC(sa, ia, gt_unsl, gt_sl) \
68
{ \
69
[VR_SYSTEM_AGENT] = VR_CFG_AMP(sa), \
70
[VR_IA_CORE] = VR_CFG_AMP(ia), \
71
[VR_GT_UNSLICED] = VR_CFG_AMP(gt_unsl), \
72
[VR_GT_SLICED] = VR_CFG_AMP(gt_sl), \
73
}
74
75
#define VR_CFG_ALL_DOMAINS_LOADLINE(sa, ia, gt_unsl, gt_sl) \
76
{ \
77
[VR_SYSTEM_AGENT] = VR_CFG_MOHMS(sa), \
78
[VR_IA_CORE] = VR_CFG_MOHMS(ia), \
79
[VR_GT_UNSLICED] = VR_CFG_MOHMS(gt_unsl), \
80
[VR_GT_SLICED] = VR_CFG_MOHMS(gt_sl), \
81
}
82
83
void
fill_vr_domain_config
(
void
*
params
,
84
int
domain,
const
struct
vr_config
*cfg);
85
#endif
fill_vr_domain_config
void fill_vr_domain_config(FSP_S_CONFIG *s_cfg, int domain, const struct vr_config *cfg)
Definition:
vr_config.c:113
vr_domain
vr_domain
Definition:
vr_config.h:40
NUM_VR_DOMAINS
@ NUM_VR_DOMAINS
Definition:
vr_config.h:43
params
static struct sdram_info params
Definition:
sdram_configs.c:83
VR_GT_UNSLICED
@ VR_GT_UNSLICED
Definition:
vr_config.h:62
VR_GT_SLICED
@ VR_GT_SLICED
Definition:
vr_config.h:63
VR_IA_CORE
@ VR_IA_CORE
Definition:
vr_config.h:61
VR_SYSTEM_AGENT
@ VR_SYSTEM_AGENT
Definition:
vr_config.h:60
vr_config
Definition:
vr_config.h:10
vr_config::psi2threshold
int psi2threshold
Definition:
vr_config.h:22
vr_config::ac_loadline
int ac_loadline
Definition:
vr_config.h:48
vr_config::vr_config_enable
int vr_config_enable
Definition:
vr_config.h:16
vr_config::imon_slope
int imon_slope
Definition:
vr_config.h:33
vr_config::dc_loadline
int dc_loadline
Definition:
vr_config.h:49
vr_config::psi3threshold
int psi3threshold
Definition:
vr_config.h:23
vr_config::icc_max
int icc_max
Definition:
vr_config.h:42
vr_config::psi3enable
int psi3enable
Definition:
vr_config.h:26
vr_config::imon_offset
int imon_offset
Definition:
vr_config.h:39
vr_config::psi1threshold
int psi1threshold
Definition:
vr_config.h:21
vr_config::voltage_limit
int voltage_limit
Definition:
vr_config.h:45
vr_config::psi4enable
int psi4enable
Definition:
vr_config.h:27
src
soc
intel
skylake
include
soc
vr_config.h
Generated by
1.9.1