coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cpu.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _SOC_ICELAKE_CPU_H_
4 #define _SOC_ICELAKE_CPU_H_
5 
6 #include <intelblocks/msr.h>
7 
8 /* Latency times in units of 32768ns */
9 #define C_STATE_LATENCY_CONTROL_0_LIMIT 0x9d
10 #define C_STATE_LATENCY_CONTROL_1_LIMIT 0x9d
11 #define C_STATE_LATENCY_CONTROL_2_LIMIT 0x9d
12 #define C_STATE_LATENCY_CONTROL_3_LIMIT 0x9d
13 #define C_STATE_LATENCY_CONTROL_4_LIMIT 0x9d
14 #define C_STATE_LATENCY_CONTROL_5_LIMIT 0x9d
15 
16 /* Power in units of mW */
17 #define C1_POWER 0x3e8
18 #define C6_POWER 0x15e
19 #define C7_POWER 0xc8
20 #define C8_POWER 0xc8
21 #define C9_POWER 0xc8
22 #define C10_POWER 0xc8
23 
24 #define C_STATE_LATENCY_MICRO_SECONDS(limit, base) \
25  (((1 << ((base)*5)) * (limit)) / 1000)
26 #define C_STATE_LATENCY_FROM_LAT_REG(reg) \
27  C_STATE_LATENCY_MICRO_SECONDS(C_STATE_LATENCY_CONTROL_ ##reg## _LIMIT, \
28  (IRTL_1024_NS >> 10))
29 
30 #endif