coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi.c File Reference
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <acpi/acpi_pm.h>
#include <acpi/acpigen.h>
#include <arch/cpu.h>
#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <console/console.h>
#include <cpu/intel/common/common.h>
#include <intelblocks/acpi.h>
#include <intelblocks/acpi_wake_source.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/pmclib.h>
#include <soc/cpu.h>
#include <soc/msr.h>
#include <soc/pm.h>
#include <soc/ramstage.h>
#include <soc/systemagent.h>
#include <string.h>
#include <types.h>
#include "chip.h"
Include dependency graph for acpi.c:

Go to the source code of this file.

Macros

#define MWAIT_RES(state, sub_state)
 

Enumerations

enum  {
  C_STATE_C0 , C_STATE_C1 , C_STATE_C1E , C_STATE_C3 ,
  C_STATE_C6_SHORT_LAT , C_STATE_C6_LONG_LAT , C_STATE_C7_SHORT_LAT , C_STATE_C7_LONG_LAT ,
  C_STATE_C7S_SHORT_LAT , C_STATE_C7S_LONG_LAT , C_STATE_C8 , C_STATE_C9 ,
  C_STATE_C10 , NUM_C_STATES
}
 

Functions

const acpi_cstate_tsoc_get_cstate_map (size_t *entries)
 
void soc_power_states_generation (int core_id, int cores_per_package)
 
uint32_t soc_read_sci_irq_select (void)
 
void soc_fill_gnvs (struct global_nvs *gnvs)
 
static unsigned long soc_fill_dmar (unsigned long current)
 
unsigned long sa_write_acpi_tables (const struct device *const dev, unsigned long current, struct acpi_rsdp *const rsdp)
 
int soc_madt_sci_irq_polarity (int sci)
 
void acpi_fill_soc_wake (uint32_t *pm1_en, uint32_t *gpe0_en, const struct chipset_power_state *ps)
 

Variables

static acpi_cstate_t cstate_map [NUM_C_STATES]
 
static int cstate_set_s0ix []
 
static int cstate_set_non_s0ix []
 

Macro Definition Documentation

◆ MWAIT_RES

#define MWAIT_RES (   state,
  sub_state 
)
Value:
{ \
.addrl = (((state) << 4) | (sub_state)), \
.space_id = ACPI_ADDRESS_SPACE_FIXED, \
.bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT, \
.access_size = ACPI_FFIXEDHW_FLAG_HW_COORD, \
}
#define ACPI_FFIXEDHW_FLAG_HW_COORD
Definition: acpi.h:120
#define ACPI_FFIXEDHW_VENDOR_INTEL
Definition: acpi.h:116
#define ACPI_FFIXEDHW_CLASS_MWAIT
Definition: acpi.h:119
#define ACPI_ADDRESS_SPACE_FIXED
Definition: acpi.h:115
state
Definition: raminit.c:1787

Definition at line 45 of file acpi.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
C_STATE_C0 
C_STATE_C1 
C_STATE_C1E 
C_STATE_C3 
C_STATE_C6_SHORT_LAT 
C_STATE_C6_LONG_LAT 
C_STATE_C7_SHORT_LAT 
C_STATE_C7_LONG_LAT 
C_STATE_C7S_SHORT_LAT 
C_STATE_C7S_LONG_LAT 
C_STATE_C8 
C_STATE_C9 
C_STATE_C10 
NUM_C_STATES 

Definition at line 29 of file acpi.c.

Function Documentation

◆ acpi_fill_soc_wake()

void acpi_fill_soc_wake ( uint32_t pm1_en,
uint32_t gpe0_en,
const struct chipset_power_state ps 
)

Definition at line 264 of file acpi.c.

References ACPI_S3, config, config_of_soc, deep_s3_enabled(), DSX_EN_LAN_WAKE_PIN, DSX_EN_WAKE_PIN, GPE_STD, LAN_WAK_EN, PCIEXPWAK_STS, and chipset_power_state::prev_sleep_state.

Here is the call graph for this function:

◆ sa_write_acpi_tables()

unsigned long sa_write_acpi_tables ( const struct device *const  dev,
unsigned long  current,
struct acpi_rsdp *const  rsdp 
)

◆ soc_fill_dmar()

◆ soc_fill_gnvs()

void soc_fill_gnvs ( struct global_nvs gnvs)

Definition at line 170 of file acpi.c.

References config, config_of_soc, global_nvs::dpte, gnvs, sa_fill_gnvs(), global_nvs::u2we, and global_nvs::u3we.

Here is the call graph for this function:

◆ soc_get_cstate_map()

const acpi_cstate_t* soc_get_cstate_map ( size_t entries)

Definition at line 130 of file acpi.c.

References ARRAY_SIZE, config, config_of_soc, cstate_map, cstate_set_non_s0ix, cstate_set_s0ix, acpi_cstate::ctype, MAX, and memcpy().

Here is the call graph for this function:

◆ soc_madt_sci_irq_polarity()

int soc_madt_sci_irq_polarity ( int  sci)

Definition at line 256 of file acpi.c.

References MP_IRQ_POLARITY_HIGH, and MP_IRQ_POLARITY_LOW.

◆ soc_power_states_generation()

void soc_power_states_generation ( int  core_id,
int  cores_per_package 
)

Definition at line 156 of file acpi.c.

References config, config_of_soc, and generate_p_state_entries().

Here is the call graph for this function:

◆ soc_read_sci_irq_select()

uint32_t soc_read_sci_irq_select ( void  )

Definition at line 165 of file acpi.c.

References IRQ_REG, read32p(), and soc_read_pmc_base().

Here is the call graph for this function:

Variable Documentation

◆ cstate_map

acpi_cstate_t cstate_map[NUM_C_STATES]
static

Definition at line 54 of file acpi.c.

Referenced by soc_get_cstate_map().

◆ cstate_set_non_s0ix

int cstate_set_non_s0ix[]
static
Initial value:
= {
}
@ C_STATE_C7S_LONG_LAT
Definition: acpi.c:35
@ C_STATE_C1E
Definition: acpi.c:29
@ C_STATE_C3
Definition: acpi.c:33

Definition at line 124 of file acpi.c.

Referenced by soc_get_cstate_map().

◆ cstate_set_s0ix

int cstate_set_s0ix[]
static
Initial value:

Definition at line 118 of file acpi.c.

Referenced by soc_get_cstate_map().