coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <amdblocks/acpi.h>
#include <amdblocks/cpu.h>
#include <amdblocks/acpimmio.h>
#include <amdblocks/ioapic.h>
#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <console/console.h>
#include <cpu/amd/cpuid.h>
#include <cpu/amd/msr.h>
#include <cpu/x86/smm.h>
#include <soc/acpi.h>
#include <soc/iomap.h>
#include <soc/msr.h>
#include <types.h>
#include "chip.h"
Go to the source code of this file.
Functions | |
unsigned long | acpi_fill_madt (unsigned long current) |
void | acpi_fill_fadt (acpi_fadt_t *fadt) |
static uint32_t | get_pstate_core_freq (msr_t pstate_def) |
static uint32_t | get_pstate_core_power (msr_t pstate_def) |
static size_t | get_pstate_info (struct acpi_sw_pstate *pstate_values, struct acpi_xpss_sw_pstate *pstate_xpss_values) |
void | generate_cpu_entries (const struct device *device) |
Generate ACPI entries for Speedstep for each cpu. More... | |
void acpi_fill_fadt | ( | acpi_fadt_t * | fadt | ) |
Definition at line 59 of file acpi.c.
References acpi_gen_regaddr::access_size, ACPI_ACCESS_SIZE_BYTE_ACCESS, ACPI_ACCESS_SIZE_DWORD_ACCESS, ACPI_ACCESS_SIZE_WORD_ACCESS, ACPI_ADDRESS_SPACE_IO, acpi_fadt::acpi_disable, acpi_fadt::acpi_enable, ACPI_FADT_32BIT_TIMER, ACPI_FADT_C1_SUPPORTED, ACPI_FADT_C2_NOT_SUPPORTED, ACPI_FADT_C3_NOT_SUPPORTED, ACPI_FADT_LOW_PWR_IDLE_S0, ACPI_FADT_PCI_EXPRESS_WAKE, ACPI_FADT_PLATFORM_CLOCK, ACPI_FADT_REMOTE_POWER_ON, ACPI_FADT_S4_RTC_VALID, ACPI_FADT_S4_RTC_WAKE, ACPI_FADT_WBINVD, ACPI_GPE0_BLK, ACPI_IO_BASE, ACPI_PM1_CNT_BLK, ACPI_PM_EVT_BLK, ACPI_PM_TMR_BLK, ACPI_SCI_IRQ, acpi_gen_regaddr::addrh, acpi_gen_regaddr::addrl, APM_CNT, APM_CNT_ACPI_DISABLE, APM_CNT_ACPI_ENABLE, BIOS_DEBUG, acpi_gen_regaddr::bit_offset, acpi_gen_regaddr::bit_width, acpi_fadt::century, soc_amd_sabrina_config::common_config, config_of_soc, acpi_fadt::day_alrm, acpi_fadt::duty_offset, acpi_fadt::duty_width, soc_amd_common_config::fadt_boot_arch, soc_amd_common_config::fadt_flags, acpi_fadt::flags, acpi_fadt::gpe0_blk, acpi_fadt::gpe0_blk_len, acpi_fadt::iapc_boot_arch, acpi_fadt::mon_alrm, acpi_fadt::p_lvl2_lat, acpi_fadt::p_lvl3_lat, permanent_smi_handler(), acpi_fadt::pm1_cnt_len, acpi_fadt::pm1_evt_len, acpi_fadt::pm1a_cnt_blk, acpi_fadt::pm1a_evt_blk, acpi_fadt::pm_tmr_blk, acpi_fadt::pm_tmr_len, printk, acpi_fadt::pstate_cnt, RTC_ALT_CENTURY, RTC_DATE_ALARM, soc_amd_sabrina_config::s0ix_enable, acpi_fadt::sci_int, acpi_fadt::smi_cmd, acpi_gen_regaddr::space_id, acpi_fadt::x_gpe0_blk, acpi_fadt::x_pm1a_cnt_blk, acpi_fadt::x_pm1a_evt_blk, and acpi_fadt::x_pm_tmr_blk.
Definition at line 25 of file acpi.c.
References acpi_create_madt_ioapic(), acpi_create_madt_irqoverride(), acpi_create_madt_lapic_nmi(), acpi_create_madt_lapics(), acpi_fill_madt_irqoverride(), ACPI_MADT_LAPIC_NMI_ALL_PROCESSORS, ACPI_SCI_IRQ, FCH_IOAPIC_ID, GNB_IOAPIC_ID, IO_APIC_ADDR, IO_APIC_INTERRUPTS, MP_BUS_ISA, MP_IRQ_POLARITY_DEFAULT, MP_IRQ_POLARITY_HIGH, MP_IRQ_POLARITY_LOW, MP_IRQ_TRIGGER_DEFAULT, MP_IRQ_TRIGGER_EDGE, and MP_IRQ_TRIGGER_LEVEL.
Generate ACPI entries for Speedstep for each cpu.
Definition at line 262 of file acpi.c.
References ACPI_ACCESS_SIZE_BYTE_ACCESS, ACPI_ADDRESS_SPACE_FIXED, ACPI_ADDRESS_SPACE_IO, ACPI_GPE0_BLK, acpigen_pop_len(), acpigen_write_CSD_package(), acpigen_write_CST_package(), acpigen_write_pct_package(), acpigen_write_PPC(), acpigen_write_processor(), acpigen_write_processor_package(), acpigen_write_PSD_package(), acpigen_write_pss_object(), acpigen_write_xpss_object(), ARRAY_SIZE, CONFIG, CSD_HW_ALL, acpi_cstate::ctype, get_cpu_count(), get_pstate_info(), get_threads_per_core(), HW_ALL, msr_struct::lo, MAX_PSTATES, MSR_CSTATE_ADDRESS, MSR_CSTATE_ADDRESS_MASK, PS_CTL_REG, PS_STS_REG, rdmsr(), acpi_gen_regaddr::space_id, and SW_ALL.
Definition at line 135 of file acpi.c.
References BIOS_WARNING, msr_struct::lo, printk, PSTATE_DEF_LO_CORE_FREQ_BASE, PSTATE_DEF_LO_EIGHTH_STEP_MAX, PSTATE_DEF_LO_FREQ_DIV_MASK, PSTATE_DEF_LO_FREQ_DIV_MAX, PSTATE_DEF_LO_FREQ_DIV_MIN, PSTATE_DEF_LO_FREQ_DIV_SHIFT, and PSTATE_DEF_LO_FREQ_MUL_MASK.
Referenced by get_pstate_info().
Definition at line 173 of file acpi.c.
References BIOS_WARNING, msr_struct::lo, printk, PSTATE_DEF_LO_CORE_VID_MASK, PSTATE_DEF_LO_CORE_VID_SHIFT, PSTATE_DEF_LO_CUR_DIV_MASK, PSTATE_DEF_LO_CUR_DIV_SHIFT, PSTATE_DEF_LO_CUR_VAL_MASK, PSTATE_DEF_LO_CUR_VAL_SHIFT, SERIAL_VID_DECODE_MICROVOLTS, and SERIAL_VID_MAX_MICROVOLTS.
Referenced by get_pstate_info().
|
static |
Definition at line 223 of file acpi.c.
References acpi_sw_pstate::bus_master_latency, acpi_xpss_sw_pstate::bus_master_latency, acpi_sw_pstate::control_value, acpi_xpss_sw_pstate::control_value, acpi_sw_pstate::core_freq, acpi_xpss_sw_pstate::core_freq, get_pstate_core_freq(), get_pstate_core_power(), msr_struct::hi, msr_struct::lo, acpi_sw_pstate::power, acpi_xpss_sw_pstate::power, power, PS_LIM_MAX_VAL_MASK, PS_LIM_REG, PS_MAX_VAL_SHFT, PSTATE_0_MSR, PSTATE_DEF_HI_ENABLE_MASK, PSTATE_DEF_HI_ENABLE_SHIFT, rdmsr(), acpi_sw_pstate::status_value, acpi_xpss_sw_pstate::status_value, acpi_sw_pstate::transition_latency, and acpi_xpss_sw_pstate::transition_latency.
Referenced by generate_cpu_entries().