coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
dptf.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <bootstate.h>
4 #include <console/console.h>
5 #include <reg_script.h>
6 #include <soc/iosf.h>
7 
8 static const struct reg_script dptf_init_settings[] = {
9  /* SocThermInit */
10  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PTMC, 0x00030708),
11  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_GFXT, 0x0000C000),
12  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_VEDT, 0x00000004),
13  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_ISPT, 0x00000004),
14  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PTPS, 0x00000000),
15  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TE_AUX3, 0x00061029),
16  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TTE_VRIccMax, 0x00061029),
17  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TTE_VRHot, 0x00061029),
18  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TTE_XXPROCHOT, 0x00061029),
19  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TTE_SLM0, 0x00001029),
20  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_TTE_SLM1, 0x00001029),
21  /* ratio 11 = 1466mhz for mid and entry celeron */
22  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_SOC_POWER_BUDGET, 0x00000B00),
23  REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_SOC_ENERGY_CREDIT, 0x00000002),
25 };
26 
27 static void dptf_init(void *unused)
28 {
29  printk(BIOS_DEBUG, "Applying SOC Thermal settings for DPTF.\n");
31 }
32 
#define PUNIT_ISPT
Definition: iosf.h:245
#define PUNIT_PTPS
Definition: iosf.h:246
#define PUNIT_TE_AUX3
Definition: iosf.h:250
#define PUNIT_TTE_VRIccMax
Definition: iosf.h:251
#define IOSF_PORT_PMC
Definition: iosf.h:93
#define PUNIT_TTE_SLM1
Definition: iosf.h:255
#define PUNIT_SOC_ENERGY_CREDIT
Definition: iosf.h:241
#define PUNIT_TTE_SLM0
Definition: iosf.h:254
#define PUNIT_SOC_POWER_BUDGET
Definition: iosf.h:240
#define PUNIT_PTMC
Definition: iosf.h:242
#define PUNIT_GFXT
Definition: iosf.h:243
#define PUNIT_VEDT
Definition: iosf.h:244
#define PUNIT_TTE_VRHot
Definition: iosf.h:252
#define PUNIT_TTE_XXPROCHOT
Definition: iosf.h:253
@ BS_DEV_INIT
Definition: bootstate.h:83
@ BS_ON_ENTRY
Definition: bootstate.h:95
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
void reg_script_run(const struct reg_script *script)
Definition: reg_script.c:700
#define REG_SCRIPT_END
Definition: reg_script.h:427
static const struct reg_script dptf_init_settings[]
Definition: dptf.c:8
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, dptf_init, NULL)
static void dptf_init(void *unused)
Definition: dptf.c:27
#define NULL
Definition: stddef.h:19