coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
perf_power.c File Reference
#include <bootstate.h>
#include <console/console.h>
#include <reg_script.h>
#include <soc/iosf.h>
Include dependency graph for perf_power.c:

Go to the source code of this file.

Macros

#define MAKE_MASK_INCLUSIVE(msb)    ((1ULL << (1 + (msb))) - 1)
 
#define MAKE_MASK(msb)    ((1ULL << (msb)) - 1)
 
#define MASK_VAL(msb, lsb, val)    ~(MAKE_MASK_INCLUSIVE(msb) & ~MAKE_MASK(lsb)), (val) << (lsb)
 
#define E(arg1, arg2, args)    REG_IOSF_RMW(IOSF_PORT_##arg1, arg2, args)
 

Functions

static void perf_power (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_OS_RESUME, BS_ON_ENTRY, perf_power, NULL)
 
 BOOT_STATE_INIT_ENTRY (BS_PAYLOAD_LOAD, BS_ON_EXIT, perf_power, NULL)
 

Variables

static const struct reg_script perf_power_settings []
 

Macro Definition Documentation

◆ E

#define E (   arg1,
  arg2,
  args 
)     REG_IOSF_RMW(IOSF_PORT_##arg1, arg2, args)

Definition at line 15 of file perf_power.c.

◆ MAKE_MASK

#define MAKE_MASK (   msb)     ((1ULL << (msb)) - 1)

Definition at line 10 of file perf_power.c.

◆ MAKE_MASK_INCLUSIVE

#define MAKE_MASK_INCLUSIVE (   msb)     ((1ULL << (1 + (msb))) - 1)

Definition at line 8 of file perf_power.c.

◆ MASK_VAL

#define MASK_VAL (   msb,
  lsb,
  val 
)     ~(MAKE_MASK_INCLUSIVE(msb) & ~MAKE_MASK(lsb)), (val) << (lsb)

Definition at line 12 of file perf_power.c.

Function Documentation

◆ BOOT_STATE_INIT_ENTRY() [1/2]

BOOT_STATE_INIT_ENTRY ( BS_OS_RESUME  ,
BS_ON_ENTRY  ,
perf_power  ,
NULL   
)

◆ BOOT_STATE_INIT_ENTRY() [2/2]

BOOT_STATE_INIT_ENTRY ( BS_PAYLOAD_LOAD  ,
BS_ON_EXIT  ,
perf_power  ,
NULL   
)

◆ perf_power()

static void perf_power ( void unused)
static

Definition at line 265 of file perf_power.c.

References BIOS_DEBUG, perf_power_settings, printk, and reg_script_run().

Here is the call graph for this function:

Variable Documentation

◆ perf_power_settings

const struct reg_script perf_power_settings[]
static

Definition at line 1 of file perf_power.c.

Referenced by perf_power().