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/acpigen.h>
#include <arch/smp/mpspec.h>
#include <cpu/cpu.h>
#include <cpu/x86/smm.h>
#include <string.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <cbmem.h>
#include <console/console.h>
#include <intelblocks/acpi.h>
#include <soc/acpi.h>
#include <soc/cpu.h>
#include <soc/nvs.h>
#include <soc/soc_util.h>
#include <soc/pmc.h>
#include <soc/systemagent.h>
#include <soc/pci_devs.h>
Include dependency graph for acpi.c:

Go to the source code of this file.

Macros

#define CSTATE_RES(address_space, width, offset, address)
 

Functions

void soc_fill_gnvs (struct global_nvs *gnvs)
 
uint32_t soc_read_sci_irq_select (void)
 
const acpi_cstate_tsoc_get_cstate_map (size_t *entries)
 
void soc_fill_fadt (acpi_fadt_t *fadt)
 
acpi_tstate_tsoc_get_tss_table (int *entries)
 
void soc_power_states_generation (int core_id, int cores_per_package)
 
int soc_madt_sci_irq_polarity (int sci)
 
unsigned long southcluster_write_acpi_tables (const struct device *device, unsigned long current, struct acpi_rsdp *rsdp)
 
__weak void acpi_create_serialio_ssdt (acpi_header_t *ssdt)
 
static unsigned long acpi_fill_dmar (unsigned long current)
 
unsigned long systemagent_write_acpi_tables (const struct device *dev, unsigned long current, struct acpi_rsdp *const rsdp)
 

Variables

static const acpi_cstate_t cstate_map []
 
static acpi_tstate_t denverton_tss_table []
 

Macro Definition Documentation

◆ CSTATE_RES

#define CSTATE_RES (   address_space,
  width,
  offset,
  address 
)
Value:
{ \
.space_id = address_space, \
.bit_width = width, \
.bit_offset = offset, \
.addrl = address, \
}
static int width
Definition: bochs.c:42
static size_t offset
Definition: flashconsole.c:16
uint64_t address
Definition: fw_cfg_if.h:0

Definition at line 23 of file acpi.c.

Function Documentation

◆ acpi_create_serialio_ssdt()

__weak void acpi_create_serialio_ssdt ( acpi_header_t ssdt)

Definition at line 176 of file acpi.c.

◆ acpi_fill_dmar()

◆ soc_fill_fadt()

◆ soc_fill_gnvs()

◆ soc_get_cstate_map()

const acpi_cstate_t* soc_get_cstate_map ( size_t entries)

Definition at line 79 of file acpi.c.

References ARRAY_SIZE, and cstate_map.

◆ soc_get_tss_table()

acpi_tstate_t* soc_get_tss_table ( int *  entries)

Definition at line 127 of file acpi.c.

References ARRAY_SIZE, and denverton_tss_table.

◆ soc_madt_sci_irq_polarity()

int soc_madt_sci_irq_polarity ( int  sci)

Definition at line 140 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 133 of file acpi.c.

References generate_p_state_entries(), and generate_t_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 69 of file acpi.c.

References get_pmc_dev(), pci_read_config32(), and PMC_ACPI_CNT.

Here is the call graph for this function:

◆ southcluster_write_acpi_tables()

unsigned long southcluster_write_acpi_tables ( const struct device device,
unsigned long  current,
struct acpi_rsdp rsdp 
)

Definition at line 148 of file acpi.c.

References acpi_add_table(), acpi_create_serialio_ssdt(), acpi_write_hpet(), ALIGN, BIOS_DEBUG, acpi_table_header::length, memset(), NULL, and printk.

Here is the call graph for this function:

◆ systemagent_write_acpi_tables()

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

Variable Documentation

◆ cstate_map

const acpi_cstate_t cstate_map[]
static
Initial value:
= {
{
.ctype = 1,
.latency = 2,
.power = 1000,
.resource = MWAIT_RES(0, 0),
},
{
.ctype = 2,
.latency = 10,
.power = 10,
.resource = CSTATE_RES(ACPI_ADDRESS_SPACE_IO, 8, 0,
},
{
.ctype = 3,
.latency = 50,
.power = 10,
.resource = CSTATE_RES(ACPI_ADDRESS_SPACE_IO, 8, 0,
}
}
#define MWAIT_RES(state, sub_state)
Definition: acpi.c:17
#define ACPI_ADDRESS_SPACE_IO
Definition: acpi.h:105
#define ACPI_BASE_ADDRESS
Definition: iomap.h:99
#define CSTATE_RES(address_space, width, offset, address)
Definition: acpi.c:23

Definition at line 31 of file acpi.c.

Referenced by soc_get_cstate_map().

◆ denverton_tss_table

acpi_tstate_t denverton_tss_table[]
static
Initial value:
= {
{ 100, 1000, 0, 0x00, 0 },
{ 88, 875, 0, 0x1e, 0 },
{ 75, 750, 0, 0x1c, 0 },
{ 63, 625, 0, 0x1a, 0 },
{ 50, 500, 0, 0x18, 0 },
{ 38, 375, 0, 0x16, 0 },
{ 25, 250, 0, 0x14, 0 },
{ 13, 125, 0, 0x12, 0 },
}

Definition at line 116 of file acpi.c.

Referenced by soc_get_tss_table().