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_ivrs.h>
#include <acpi/acpigen.h>
#include <arch/hpet.h>
#include <cbfs.h>
#include <cbmem.h>
#include <commonlib/helpers.h>
#include <commonlib/sort.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <device/mmio.h>
#include <device/pci.h>
#include <pc80/mc146818rtc.h>
#include <string.h>
#include <types.h>
#include <version.h>
Include dependency graph for acpi.c:

Go to the source code of this file.

Functions

static acpi_rsdp_tvalid_rsdp (acpi_rsdp_t *rsdp)
 
u8 acpi_checksum (u8 *table, u32 length)
 
void acpi_add_table (acpi_rsdp_t *rsdp, void *table)
 Add an ACPI table to the RSDT (and XSDT) structure, recalculate length and checksum. More...
 
int acpi_create_mcfg_mmconfig (acpi_mcfg_mmconfig_t *mmconfig, u32 base, u16 seg_nr, u8 start, u8 end)
 
int acpi_create_madt_lapic (acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
 
int acpi_create_madt_lx2apic (acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic)
 
unsigned long acpi_create_madt_lapics (unsigned long current)
 
int acpi_create_madt_ioapic (acpi_madt_ioapic_t *ioapic, u8 id, u32 addr, u32 gsi_base)
 
int acpi_create_madt_irqoverride (acpi_madt_irqoverride_t *irqoverride, u8 bus, u8 source, u32 gsirq, u16 flags)
 
int acpi_create_madt_lapic_nmi (acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu, u16 flags, u8 lint)
 
int acpi_create_madt_lx2apic_nmi (acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu, u16 flags, u8 lint)
 
void acpi_create_madt (acpi_madt_t *madt)
 
static unsigned long acpi_fill_mcfg (unsigned long current)
 
void acpi_create_mcfg (acpi_mcfg_t *mcfg)
 
static voidget_tcpa_log (u32 *size)
 
static void acpi_create_tcpa (acpi_tcpa_t *tcpa)
 
static voidget_tpm2_log (u32 *size)
 
static void acpi_create_tpm2 (acpi_tpm2_t *tpm2)
 
static void acpi_ssdt_write_cbtable (void)
 
void acpi_create_ssdt_generator (acpi_header_t *ssdt, const char *oem_table_id)
 
int acpi_create_srat_lapic (acpi_srat_lapic_t *lapic, u8 node, u8 apic)
 
int acpi_create_srat_mem (acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek, u32 flags)
 
int acpi_create_srat_gia_pci (acpi_srat_gia_t *gia, u32 proximity_domain, u16 seg, u8 bus, u8 dev, u8 func, u32 flags)
 
void acpi_create_srat (acpi_srat_t *srat, unsigned long(*acpi_fill_srat)(unsigned long current))
 
int acpi_create_hmat_mpda (acpi_hmat_mpda_t *mpda, u32 initiator, u32 memory)
 
void acpi_create_hmat (acpi_hmat_t *hmat, unsigned long(*acpi_fill_hmat)(unsigned long current))
 
void acpi_create_dmar (acpi_dmar_t *dmar, enum dmar_flags flags, unsigned long(*acpi_fill_dmar)(unsigned long))
 
unsigned long acpi_create_dmar_drhd (unsigned long current, u8 flags, u16 segment, u64 bar)
 
unsigned long acpi_create_dmar_rmrr (unsigned long current, u16 segment, u64 bar, u64 limit)
 
unsigned long acpi_create_dmar_atsr (unsigned long current, u8 flags, u16 segment)
 
unsigned long acpi_create_dmar_rhsa (unsigned long current, u64 base_addr, u32 proximity_domain)
 
unsigned long acpi_create_dmar_andd (unsigned long current, u8 device_number, const char *device_name)
 
unsigned long acpi_create_dmar_satc (unsigned long current, u8 flags, u16 segment)
 
void acpi_dmar_drhd_fixup (unsigned long base, unsigned long current)
 
void acpi_dmar_rmrr_fixup (unsigned long base, unsigned long current)
 
void acpi_dmar_atsr_fixup (unsigned long base, unsigned long current)
 
void acpi_dmar_satc_fixup (unsigned long base, unsigned long current)
 
static unsigned long acpi_create_dmar_ds (unsigned long current, enum dev_scope_type type, u8 enumeration_id, u8 bus, u8 dev, u8 fn)
 
unsigned long acpi_create_dmar_ds_pci_br (unsigned long current, u8 bus, u8 dev, u8 fn)
 
unsigned long acpi_create_dmar_ds_pci (unsigned long current, u8 bus, u8 dev, u8 fn)
 
unsigned long acpi_create_dmar_ds_ioapic (unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn)
 
unsigned long acpi_create_dmar_ds_msi_hpet (unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn)
 
void acpi_create_slit (acpi_slit_t *slit, unsigned long(*acpi_fill_slit)(unsigned long current))
 
void acpi_create_hpet (acpi_hpet_t *hpet)
 
void acpi_create_einj (acpi_einj_t *einj, uintptr_t addr, u8 actions)
 
void acpi_create_vfct (const struct device *device, acpi_vfct_t *vfct, unsigned long(*acpi_fill_vfct)(const struct device *device, acpi_vfct_t *vfct_struct, unsigned long current))
 
void acpi_create_ipmi (const struct device *device, struct acpi_spmi *spmi, const u16 ipmi_revision, const acpi_addr_t *addr, const enum acpi_ipmi_interface_type type, const s8 gpe_interrupt, const u32 apic_interrupt, const u32 uid)
 
void acpi_create_ivrs (acpi_ivrs_t *ivrs, unsigned long(*acpi_fill_ivrs)(acpi_ivrs_t *ivrs_struct, unsigned long current))
 
void acpi_create_crat (struct acpi_crat_header *crat, unsigned long(*acpi_fill_crat)(struct acpi_crat_header *crat_struct, unsigned long current))
 
unsigned long acpi_write_hpet (const struct device *device, unsigned long current, acpi_rsdp_t *rsdp)
 
void acpi_create_dbg2 (acpi_dbg2_header_t *dbg2, int port_type, int port_subtype, acpi_addr_t *address, uint32_t address_size, const char *device_path)
 
unsigned long acpi_write_dbg2_pci_uart (acpi_rsdp_t *rsdp, unsigned long current, const struct device *dev, uint8_t access_size)
 
void acpi_create_facs (acpi_facs_t *facs)
 
static void acpi_write_rsdt (acpi_rsdt_t *rsdt, char *oem_id, char *oem_table_id)
 
static void acpi_write_xsdt (acpi_xsdt_t *xsdt, char *oem_id, char *oem_table_id)
 
static void acpi_write_rsdp (acpi_rsdp_t *rsdp, acpi_rsdt_t *rsdt, acpi_xsdt_t *xsdt, char *oem_id)
 
unsigned long acpi_create_hest_error_source (acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 data_len)
 
void acpi_write_hest (acpi_hest_t *hest, unsigned long(*acpi_fill_hest)(acpi_hest_t *hest))
 
void acpi_write_bert (acpi_bert_t *bert, uintptr_t region, size_t length)
 
__weak void arch_fill_fadt (acpi_fadt_t *fadt)
 
__weak void soc_fill_fadt (acpi_fadt_t *fadt)
 
__weak void mainboard_fill_fadt (acpi_fadt_t *fadt)
 
void acpi_create_fadt (acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
 
void acpi_create_lpit (acpi_lpit_t *lpit)
 
unsigned long acpi_create_lpi_desc_ncst (acpi_lpi_desc_ncst_t *lpi_desc, uint16_t uid)
 
unsigned long __weak fw_cfg_acpi_tables (unsigned long start)
 
void preload_acpi_dsdt (void)
 
uintptr_t get_coreboot_rsdp (void)
 
unsigned long write_acpi_tables (unsigned long start)
 
voidacpi_find_wakeup_vector (void)
 
__weak int acpi_get_gpe (int gpe)
 
u8 get_acpi_fadt_minor_version (void)
 
int get_acpi_table_revision (enum acpi_tables table)
 

Variables

static uintptr_t coreboot_rsdp
 

Function Documentation

◆ acpi_add_table()

◆ acpi_checksum()

◆ acpi_create_crat()

void acpi_create_crat ( struct acpi_crat_header crat,
unsigned long(*)(struct acpi_crat_header *crat_struct, unsigned long current)  acpi_fill_crat 
)

Definition at line 1112 of file acpi.c.

References acpi_checksum(), acpi_fill_crat(), ACPI_TABLE_CREATOR, asl_revision, ASLC, CRAT, get_acpi_table_revision(), header, acpi_crat_header::header, memcpy(), memset(), and OEM_ID.

Referenced by agesa_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dbg2()

void acpi_create_dbg2 ( acpi_dbg2_header_t dbg2,
int  port_type,
int  port_subtype,
acpi_addr_t address,
uint32_t  address_size,
const char *  device_path 
)

Definition at line 1160 of file acpi.c.

References acpi_checksum(), ACPI_TABLE_CREATOR, address, asl_revision, ASLC, DBG2, device, acpi_dbg2_header::devices_count, acpi_dbg2_header::devices_offset, get_acpi_table_revision(), header, acpi_dbg2_header::header, memcpy(), memset(), OEM_ID, strlen(), and strncpy().

Referenced by acpi_write_dbg2_pci_uart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar()

void acpi_create_dmar ( acpi_dmar_t dmar,
enum dmar_flags  flags,
unsigned long(*)(unsigned long)  acpi_fill_dmar 
)

Definition at line 607 of file acpi.c.

References acpi_checksum(), acpi_fill_dmar(), ACPI_TABLE_CREATOR, asl_revision, ASLC, cpu_phys_address_size(), DMAR, get_acpi_table_revision(), header, acpi_dmar::header, memcpy(), memset(), and OEM_ID.

Referenced by northbridge_write_acpi_tables(), sa_write_acpi_tables(), and systemagent_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_andd()

unsigned long acpi_create_dmar_andd ( unsigned long  current,
u8  device_number,
const char *  device_name 
)

Definition at line 692 of file acpi.c.

References dmar_andd_entry::device_name, dmar_andd_entry::device_number, DMAR_ANDD, dmar_andd_entry::length, memcpy(), memset(), strlen(), and dmar_andd_entry::type.

Here is the call graph for this function:

◆ acpi_create_dmar_atsr()

unsigned long acpi_create_dmar_atsr ( unsigned long  current,
u8  flags,
u16  segment 
)

Definition at line 666 of file acpi.c.

References DMAR_ATSR, dmar_atsr_entry::flags, dmar_atsr_entry::length, memset(), dmar_atsr_entry::segment, and dmar_atsr_entry::type.

Referenced by acpi_create_dmar_ds_pci_br_for_port().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_drhd()

unsigned long acpi_create_dmar_drhd ( unsigned long  current,
u8  flags,
u16  segment,
u64  bar 
)

Definition at line 638 of file acpi.c.

References dmar_entry::bar, DMAR_DRHD, dmar_entry::flags, dmar_entry::length, memset(), dmar_entry::segment, and dmar_entry::type.

Referenced by acpi_create_drhd(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_ds()

static unsigned long acpi_create_dmar_ds ( unsigned long  current,
enum dev_scope_type  type,
u8  enumeration_id,
u8  bus,
u8  dev,
u8  fn 
)
static

Definition at line 743 of file acpi.c.

References device::bus, dev_scope::dev, dev_scope::enumeration, dev_scope::fn, dev_scope::length, memset(), dev_scope::path, dev_scope::start_bus, dev_scope::type, and type.

Referenced by acpi_create_dmar_ds_ioapic(), acpi_create_dmar_ds_msi_hpet(), acpi_create_dmar_ds_pci(), and acpi_create_dmar_ds_pci_br().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_ds_ioapic()

unsigned long acpi_create_dmar_ds_ioapic ( unsigned long  current,
u8  enumeration_id,
u8  bus,
u8  dev,
u8  fn 
)

Definition at line 775 of file acpi.c.

References acpi_create_dmar_ds(), and SCOPE_IOAPIC.

Referenced by acpi_create_drhd(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_ds_msi_hpet()

unsigned long acpi_create_dmar_ds_msi_hpet ( unsigned long  current,
u8  enumeration_id,
u8  bus,
u8  dev,
u8  fn 
)

Definition at line 782 of file acpi.c.

References acpi_create_dmar_ds(), and SCOPE_MSI_HPET.

Referenced by acpi_create_drhd(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_ds_pci()

unsigned long acpi_create_dmar_ds_pci ( unsigned long  current,
u8  bus,
u8  dev,
u8  fn 
)

Definition at line 768 of file acpi.c.

References acpi_create_dmar_ds(), and SCOPE_PCI_ENDPOINT.

Referenced by acpi_create_drhd(), acpi_create_rmrr(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_ds_pci_br()

unsigned long acpi_create_dmar_ds_pci_br ( unsigned long  current,
u8  bus,
u8  dev,
u8  fn 
)

Definition at line 761 of file acpi.c.

References acpi_create_dmar_ds(), and SCOPE_PCI_SUB.

Referenced by acpi_create_dmar_ds_pci_br_for_port(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_rhsa()

unsigned long acpi_create_dmar_rhsa ( unsigned long  current,
u64  base_addr,
u32  proximity_domain 
)

Definition at line 679 of file acpi.c.

References dmar_rhsa_entry::base_address, DMAR_RHSA, dmar_rhsa_entry::length, memset(), dmar_rhsa_entry::proximity_domain, and dmar_rhsa_entry::type.

Referenced by acpi_create_rhsa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_rmrr()

unsigned long acpi_create_dmar_rmrr ( unsigned long  current,
u16  segment,
u64  bar,
u64  limit 
)

Definition at line 652 of file acpi.c.

References dmar_rmrr_entry::bar, DMAR_RMRR, dmar_rmrr_entry::length, dmar_rmrr_entry::limit, memset(), dmar_rmrr_entry::segment, and dmar_rmrr_entry::type.

Referenced by acpi_create_igfx_rmrr(), acpi_create_rmrr(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_dmar_satc()

unsigned long acpi_create_dmar_satc ( unsigned long  current,
u8  flags,
u16  segment 
)

Definition at line 706 of file acpi.c.

References DMAR_SATC, dmar_satc_entry::flags, dmar_satc_entry::length, memset(), dmar_satc_entry::segment_number, and dmar_satc_entry::type.

Here is the call graph for this function:

◆ acpi_create_einj()

void acpi_create_einj ( acpi_einj_t einj,
uintptr_t  addr,
u8  actions 
)

Definition at line 863 of file acpi.c.

References acpi_gen_regaddr1::access_size, ACPI_ACCESS_SIZE_QWORD_ACCESS, ACPI_ADDRESS_SPACE_MEMORY, acpi_checksum(), ACPI_EINJ_DEFAULT_CAP, ACPI_TABLE_CREATOR, acpi_einj_action_table::action, ACTION_COUNT, acpi_einj::action_table, addr, acpi_gen_regaddr1::addr, asl_revision, ASLC, BEGIN_INJECT_OP, BIOS_DEBUG, acpi_gen_regaddr1::bit_offset, acpi_gen_regaddr1::bit_width, CHECK_BUSY_STATUS, acpi_einj_smi::cmd_sts, acpi_injection_header::einj_header_size, EINJ_REG_IO, EINJ_REG_MEMORY, END_INJECT_OP, acpi_injection_header::entry_count, acpi_einj_trigger_table::entry_count, acpi_einj_smi::err_inj_cap, acpi_einj_smi::err_inject, EXECUTE_INJECT_OP, FLAG_IGNORE, FLAG_PRESERVE, acpi_einj_action_table::flags, GET_CMD_STATUS, GET_ERROR_TYPE, GET_TRIGGER_ACTION_TABLE, header, acpi_einj::header, acpi_einj_trigger_table::header_size, acpi_einj::inj_header, acpi_einj_action_table::instruction, acpi_einj_action_table::mask, memcpy(), memset(), NO_OP, OEM_ID, acpi_einj_smi::op_state, acpi_einj_smi::op_status, printk, READ_REGISTER, READ_REGISTER_VALUE, acpi_einj_action_table::reg, acpi_einj_trigger_table::revision, SET_ERROR_TYPE, SET_ERROR_TYPE_WITH_ADDRESS, acpi_einj_smi::setaddrtable, acpi_gen_regaddr1::space_id, acpi_einj_trigger_table::table_size, acpi_einj_trigger_table::trigger_action, acpi_einj_smi::trigger_action_table, TRIGGER_ERROR, acpi_einj_action_table::value, WRITE_REGISTER, and WRITE_REGISTER_VALUE.

Here is the call graph for this function:

◆ acpi_create_facs()

◆ acpi_create_fadt()

◆ acpi_create_hest_error_source()

◆ acpi_create_hmat()

void acpi_create_hmat ( acpi_hmat_t hmat,
unsigned long(*)(unsigned long current)  acpi_fill_hmat 
)

Definition at line 579 of file acpi.c.

References acpi_checksum(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_hmat::header, HMAT, memcpy(), memset(), and OEM_ID.

Here is the call graph for this function:

◆ acpi_create_hmat_mpda()

int acpi_create_hmat_mpda ( acpi_hmat_mpda_t mpda,
u32  initiator,
u32  memory 
)

◆ acpi_create_hpet()

void acpi_create_hpet ( acpi_hpet_t hpet)

Definition at line 819 of file acpi.c.

References ACPI_ADDRESS_SPACE_MEMORY, acpi_checksum(), ACPI_TABLE_CREATOR, addr, acpi_hpet::addr, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_hpet::header, HPET, HPET_BASE_ADDRESS, acpi_hpet::id, memcpy(), memset(), acpi_hpet::min_tick, acpi_hpet::number, OEM_ID, and read32p().

Referenced by acpi_write_hpet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_ipmi()

◆ acpi_create_ivrs()

void acpi_create_ivrs ( acpi_ivrs_t ivrs,
unsigned long(*)(acpi_ivrs_t *ivrs_struct, unsigned long current)  acpi_fill_ivrs 
)

Definition at line 1083 of file acpi.c.

References acpi_checksum(), acpi_fill_ivrs(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_ivrs::header, IVRS, memcpy(), memset(), and OEM_ID.

Referenced by agesa_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_lpi_desc_ncst()

unsigned long acpi_create_lpi_desc_ncst ( acpi_lpi_desc_ncst_t lpi_desc,
uint16_t  uid 
)

Definition at line 1559 of file acpi.c.

References ACPI_LPI_DESC_TYPE_NATIVE_CSTATE, acpi_lpi_desc_ncst::header, acpi_lpi_desc_hdr::length, memset(), acpi_lpi_desc_hdr::type, and acpi_lpi_desc_hdr::uid.

Referenced by acpi_fill_lpit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_lpit()

void acpi_create_lpit ( acpi_lpit_t lpit)

Definition at line 1531 of file acpi.c.

References acpi_checksum(), acpi_fill_lpit(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_lpit::header, LPIT, memcpy(), memset(), and OEM_ID.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_madt()

void acpi_create_madt ( acpi_madt_t madt)

Definition at line 227 of file acpi.c.

References acpi_checksum(), acpi_fill_madt(), ACPI_TABLE_CREATOR, asl_revision, ASLC, CONFIG, cpu_get_lapic_addr(), acpi_madt::flags, get_acpi_table_revision(), header, acpi_madt::header, acpi_madt::lapic_addr, MADT, memcpy(), memset(), and OEM_ID.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_madt_ioapic()

int acpi_create_madt_ioapic ( acpi_madt_ioapic_t ioapic,
u8  id,
u32  addr,
u32  gsi_base 
)

◆ acpi_create_madt_irqoverride()

int acpi_create_madt_irqoverride ( acpi_madt_irqoverride_t irqoverride,
u8  bus,
u8  source,
u32  gsirq,
u16  flags 
)

◆ acpi_create_madt_lapic()

int acpi_create_madt_lapic ( acpi_madt_lapic_t lapic,
u8  cpu,
u8  apic 
)

◆ acpi_create_madt_lapic_nmi()

int acpi_create_madt_lapic_nmi ( acpi_madt_lapic_nmi_t lapic_nmi,
u8  cpu,
u16  flags,
u8  lint 
)

◆ acpi_create_madt_lapics()

unsigned long acpi_create_madt_lapics ( unsigned long  current)

Definition at line 144 of file acpi.c.

References acpi_create_madt_lapic(), acpi_create_madt_lx2apic(), all_devices, device_path::apic, apic_path::apic_id, ARRAY_SIZE, bubblesort(), device::bus, bus::dev, DEVICE_PATH_APIC, DEVICE_PATH_CPU_CLUSTER, device::enabled, device::next, NUM_ASCENDING, device::path, and device_path::type.

Referenced by acpi_fill_madt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_madt_lx2apic()

int acpi_create_madt_lx2apic ( acpi_madt_lx2apic_t lapic,
u32  cpu,
u32  apic 
)

◆ acpi_create_madt_lx2apic_nmi()

int acpi_create_madt_lx2apic_nmi ( acpi_madt_lx2apic_nmi_t lapic_nmi,
u32  cpu,
u16  flags,
u8  lint 
)

◆ acpi_create_mcfg()

void acpi_create_mcfg ( acpi_mcfg_t mcfg)

Definition at line 268 of file acpi.c.

References acpi_checksum(), acpi_fill_mcfg(), ACPI_TABLE_CREATOR, asl_revision, ASLC, CONFIG, get_acpi_table_revision(), header, acpi_mcfg::header, MCFG, memcpy(), memset(), and OEM_ID.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_mcfg_mmconfig()

int acpi_create_mcfg_mmconfig ( acpi_mcfg_mmconfig_t mmconfig,
u32  base,
u16  seg_nr,
u8  start,
u8  end 
)

Definition at line 108 of file acpi.c.

References base, acpi_mcfg_mmconfig::base_address, acpi_mcfg_mmconfig::base_reserved, acpi_mcfg_mmconfig::end_bus_number, memset(), acpi_mcfg_mmconfig::pci_segment_group_number, and acpi_mcfg_mmconfig::start_bus_number.

Referenced by acpi_fill_mcfg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_slit()

void acpi_create_slit ( acpi_slit_t slit,
unsigned long(*)(unsigned long current)  acpi_fill_slit 
)

Definition at line 790 of file acpi.c.

References acpi_checksum(), acpi_fill_slit(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_slit::header, memcpy(), memset(), OEM_ID, and SLIT.

Referenced by northbridge_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_srat()

void acpi_create_srat ( acpi_srat_t srat,
unsigned long(*)(unsigned long current)  acpi_fill_srat 
)

Definition at line 532 of file acpi.c.

References acpi_checksum(), acpi_fill_srat(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_srat::header, memcpy(), memset(), OEM_ID, and SRAT.

Referenced by northbridge_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_srat_gia_pci()

int acpi_create_srat_gia_pci ( acpi_srat_gia_t gia,
u32  proximity_domain,
u16  seg,
u8  bus,
u8  dev,
u8  func,
u32  flags 
)

◆ acpi_create_srat_lapic()

int acpi_create_srat_lapic ( acpi_srat_lapic_t lapic,
u8  node,
u8  apic 
)

Definition at line 485 of file acpi.c.

References acpi_srat_lapic::apic_id, acpi_srat_lapic::flags, acpi_srat_lapic::length, memset(), acpi_srat_lapic::proximity_domain_7_0, and acpi_srat_lapic::type.

Referenced by acpi_create_srat_lapics().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_srat_mem()

◆ acpi_create_ssdt_generator()

◆ acpi_create_tcpa()

static void acpi_create_tcpa ( acpi_tcpa_t tcpa)
static

Definition at line 321 of file acpi.c.

References acpi_checksum(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), get_tcpa_log(), header, acpi_tcpa::header, acpi_tcpa::laml, acpi_tcpa::lasa, memcpy(), memset(), OEM_ID, acpi_tcpa::platform_class, and TCPA.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_create_tpm2()

static void acpi_create_tpm2 ( acpi_tpm2_t tpm2)
static

◆ acpi_create_vfct()

void acpi_create_vfct ( const struct device device,
acpi_vfct_t vfct,
unsigned long(*)(const struct device *device, acpi_vfct_t *vfct_struct, unsigned long current)  acpi_fill_vfct 
)

Definition at line 999 of file acpi.c.

References acpi_checksum(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_vfct::header, memcpy(), memset(), OEM_ID, and VFCT.

Here is the call graph for this function:

◆ acpi_dmar_atsr_fixup()

void acpi_dmar_atsr_fixup ( unsigned long  base,
unsigned long  current 
)

Definition at line 731 of file acpi.c.

References base, and dmar_atsr_entry::length.

Referenced by acpi_create_atsr().

Here is the caller graph for this function:

◆ acpi_dmar_drhd_fixup()

void acpi_dmar_drhd_fixup ( unsigned long  base,
unsigned long  current 
)

Definition at line 719 of file acpi.c.

References base, and dmar_entry::length.

Referenced by acpi_create_drhd(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the caller graph for this function:

◆ acpi_dmar_rmrr_fixup()

void acpi_dmar_rmrr_fixup ( unsigned long  base,
unsigned long  current 
)

Definition at line 725 of file acpi.c.

References base, and dmar_rmrr_entry::length.

Referenced by acpi_create_rmrr(), acpi_fill_dmar(), and soc_fill_dmar().

Here is the caller graph for this function:

◆ acpi_dmar_satc_fixup()

void acpi_dmar_satc_fixup ( unsigned long  base,
unsigned long  current 
)

Definition at line 737 of file acpi.c.

References base, and dmar_satc_entry::length.

◆ acpi_fill_mcfg()

static unsigned long acpi_fill_mcfg ( unsigned long  current)
static

Definition at line 259 of file acpi.c.

References acpi_create_mcfg_mmconfig().

Referenced by acpi_create_mcfg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_find_wakeup_vector()

void* acpi_find_wakeup_vector ( void  )

Definition at line 1881 of file acpi.c.

References acpi_is_wakeup_s3(), BIOS_ALERT, BIOS_DEBUG, acpi_rsdt::entry, acpi_fadt::firmware_ctrl, acpi_facs::firmware_waking_vector, acpi_rsdt::header, acpi_table_header::length, NULL, printk, acpi_rsdp::rsdt_address, strncmp(), and valid_rsdp().

Referenced by bs_os_resume_check().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_get_gpe()

__weak int acpi_get_gpe ( int  gpe)

Definition at line 1944 of file acpi.c.

Referenced by tis_plat_irq_status().

Here is the caller graph for this function:

◆ acpi_ssdt_write_cbtable()

◆ acpi_write_bert()

void acpi_write_bert ( acpi_bert_t bert,
uintptr_t  region,
size_t  length 
)

Definition at line 1458 of file acpi.c.

References acpi_checksum(), ACPI_TABLE_CREATOR, asl_revision, ASLC, BERT, acpi_bert::error_region, get_acpi_table_revision(), header, acpi_bert::header, length, memcpy(), memset(), OEM_ID, and acpi_bert::region_length.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_write_dbg2_pci_uart()

◆ acpi_write_hest()

void acpi_write_hest ( acpi_hest_t hest,
unsigned long(*)(acpi_hest_t *hest)  acpi_fill_hest 
)

Definition at line 1433 of file acpi.c.

References acpi_checksum(), acpi_fill_hest(), ACPI_TABLE_CREATOR, asl_revision, ASLC, get_acpi_table_revision(), header, acpi_hest::header, HEST, memcpy(), memset(), and OEM_ID.

Referenced by agesa_write_acpi_tables(), and hest_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_write_hpet()

unsigned long acpi_write_hpet ( const struct device device,
unsigned long  current,
acpi_rsdp_t rsdp 
)

Definition at line 1141 of file acpi.c.

References acpi_add_table(), acpi_create_hpet(), ALIGN_UP, BIOS_DEBUG, and printk.

Referenced by broadwell_write_acpi_tables(), southbridge_write_acpi_tables(), and southcluster_write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_write_rsdp()

static void acpi_write_rsdp ( acpi_rsdp_t rsdp,
acpi_rsdt_t rsdt,
acpi_xsdt_t xsdt,
char *  oem_id 
)
static

Definition at line 1342 of file acpi.c.

References acpi_checksum(), acpi_rsdp::checksum, acpi_rsdp::ext_checksum, get_acpi_table_revision(), acpi_rsdp::length, memcpy(), memset(), NULL, acpi_rsdp::oem_id, acpi_rsdp::revision, RSDP, RSDP_SIG, acpi_rsdp::rsdt_address, acpi_rsdp::signature, and acpi_rsdp::xsdt_address.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_write_rsdt()

static void acpi_write_rsdt ( acpi_rsdt_t rsdt,
char *  oem_id,
char *  oem_table_id 
)
static

Definition at line 1296 of file acpi.c.

References acpi_checksum(), asl_revision, ASLC, get_acpi_table_revision(), header, acpi_rsdt::header, memcpy(), and RSDT.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_write_xsdt()

static void acpi_write_xsdt ( acpi_xsdt_t xsdt,
char *  oem_id,
char *  oem_table_id 
)
static

Definition at line 1319 of file acpi.c.

References acpi_checksum(), asl_revision, ASLC, get_acpi_table_revision(), header, acpi_xsdt::header, memcpy(), and XSDT.

Referenced by write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ arch_fill_fadt()

__weak void arch_fill_fadt ( acpi_fadt_t fadt)

Definition at line 1482 of file acpi.c.

Referenced by acpi_create_fadt().

Here is the caller graph for this function:

◆ fw_cfg_acpi_tables()

unsigned long __weak fw_cfg_acpi_tables ( unsigned long  start)

Definition at line 1569 of file acpi.c.

Referenced by write_acpi_tables().

Here is the caller graph for this function:

◆ get_acpi_fadt_minor_version()

u8 get_acpi_fadt_minor_version ( void  )

Definition at line 1949 of file acpi.c.

References ACPI_FADT_MINOR_VERSION_0.

Referenced by acpi_create_fadt().

Here is the caller graph for this function:

◆ get_acpi_table_revision()

◆ get_coreboot_rsdp()

uintptr_t get_coreboot_rsdp ( void  )

Definition at line 1587 of file acpi.c.

References coreboot_rsdp.

Referenced by lb_add_acpi_rsdp().

Here is the caller graph for this function:

◆ get_tcpa_log()

static void* get_tcpa_log ( u32 size)
static

Definition at line 296 of file acpi.c.

References BIOS_DEBUG, BIOS_ERR, cbmem_add(), cbmem_entry_find(), cbmem_entry_size(), cbmem_entry_start(), CBMEM_ID_TCPA_TCG_LOG, memset(), NULL, and printk.

Referenced by acpi_create_tcpa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_tpm2_log()

static void* get_tpm2_log ( u32 size)
static

Definition at line 354 of file acpi.c.

References BIOS_DEBUG, BIOS_ERR, cbmem_add(), cbmem_entry_find(), cbmem_entry_size(), cbmem_entry_start(), CBMEM_ID_TPM2_TCG_LOG, memset(), NULL, and printk.

Referenced by acpi_create_tpm2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainboard_fill_fadt()

__weak void mainboard_fill_fadt ( acpi_fadt_t fadt)

Definition at line 1484 of file acpi.c.

Referenced by acpi_create_fadt().

Here is the caller graph for this function:

◆ preload_acpi_dsdt()

void preload_acpi_dsdt ( void  )

Definition at line 1574 of file acpi.c.

References BIOS_DEBUG, cbfs_preload(), CONFIG, and printk.

Here is the call graph for this function:

◆ soc_fill_fadt()

__weak void soc_fill_fadt ( acpi_fadt_t fadt)

Definition at line 1483 of file acpi.c.

Referenced by acpi_create_fadt().

Here is the caller graph for this function:

◆ valid_rsdp()

static acpi_rsdp_t * valid_rsdp ( acpi_rsdp_t rsdp)
static

Definition at line 1862 of file acpi.c.

References acpi_checksum(), BIOS_DEBUG, acpi_rsdp::length, NULL, printk, acpi_rsdp::revision, RSDP_SIG, and strncmp().

Referenced by acpi_find_wakeup_vector(), and write_acpi_tables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_acpi_tables()

Variable Documentation

◆ coreboot_rsdp

uintptr_t coreboot_rsdp
static

Definition at line 1585 of file acpi.c.

Referenced by get_coreboot_rsdp(), and write_acpi_tables().