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_pm.h>
#include <amdblocks/acpimmio.h>
#include <amdblocks/acpi.h>
#include <bootmode.h>
#include <console/console.h>
#include <halt.h>
#include <security/vboot/vboot_common.h>
#include <soc/southbridge.h>
Include dependency graph for acpi.c:

Go to the source code of this file.

Functions

void poweroff (void)
 
static void print_num_status_bits (int num_bits, uint32_t status, const char *const bit_names[])
 
static uint16_t print_pm1_status (uint16_t pm1_sts)
 
void acpi_fill_pm_gpe_state (struct acpi_pm_gpe_state *state)
 
void acpi_pm_gpe_add_events_print_events (void)
 
void acpi_clear_pm_gpe_status (void)
 
int acpi_get_sleep_type (void)
 
int platform_is_resuming (void)
 
void set_pm1cnt_s5 (void)
 
void vboot_platform_prepare_reboot (void)
 
void acpi_enable_sci (void)
 
void acpi_disable_sci (void)
 

Function Documentation

◆ acpi_clear_pm_gpe_status()

void acpi_clear_pm_gpe_status ( void  )

Definition at line 90 of file acpi.c.

References acpi_read16(), acpi_read32(), acpi_write16(), acpi_write32(), MMIO_ACPI_GPE0_STS, and MMIO_ACPI_PM1_STS.

Referenced by fch_apmc_smi_handler(), and soc_finalize().

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

◆ acpi_disable_sci()

void acpi_disable_sci ( void  )

Definition at line 135 of file acpi.c.

References ACPI_PM1_CNT_SCIEN, acpi_read32(), acpi_write32(), and MMIO_ACPI_PM1_CNT_BLK.

Referenced by fch_apmc_smi_handler(), and soc_finalize().

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

◆ acpi_enable_sci()

void acpi_enable_sci ( void  )

Definition at line 126 of file acpi.c.

References ACPI_PM1_CNT_SCIEN, acpi_read32(), acpi_write32(), and MMIO_ACPI_PM1_CNT_BLK.

Referenced by fch_apmc_smi_handler(), and soc_finalize().

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

◆ acpi_fill_pm_gpe_state()

void acpi_fill_pm_gpe_state ( struct acpi_pm_gpe_state state)

Definition at line 67 of file acpi.c.

References acpi_get_sleep_type(), acpi_read16(), acpi_read32(), MMIO_ACPI_GPE0_EN, MMIO_ACPI_GPE0_STS, MMIO_ACPI_PM1_EN, and MMIO_ACPI_PM1_STS.

Referenced by fill_chipset_state(), and migrate_power_state().

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

◆ acpi_get_sleep_type()

int acpi_get_sleep_type ( void  )

Definition at line 96 of file acpi.c.

Referenced by acpi_fill_pm_gpe_state(), and platform_is_resuming().

Here is the caller graph for this function:

◆ acpi_pm_gpe_add_events_print_events()

void acpi_pm_gpe_add_events_print_events ( void  )

Definition at line 77 of file acpi.c.

References acpi_log_events(), acpi_pm_state_for_elog(), chipset_power_state::gpe_state, and print_pm1_status().

Referenced by fch_init(), and migrate_power_state().

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

◆ platform_is_resuming()

int platform_is_resuming ( void  )

Definition at line 101 of file acpi.c.

◆ poweroff()

void poweroff ( void  )

Definition at line 13 of file acpi.c.

◆ print_num_status_bits()

static void print_num_status_bits ( int  num_bits,
uint32_t  status,
const char *const  bit_names[] 
)
static

Definition at line 27 of file acpi.c.

References BIOS_DEBUG, and printk.

Referenced by print_pm1_status().

Here is the caller graph for this function:

◆ print_pm1_status()

static uint16_t print_pm1_status ( uint16_t  pm1_sts)
static

Definition at line 45 of file acpi.c.

References ARRAY_SIZE, BIOS_DEBUG, print_num_status_bits(), and printk.

Referenced by acpi_pm_gpe_add_events_print_events().

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

◆ set_pm1cnt_s5()

void set_pm1cnt_s5 ( void  )

Definition at line 111 of file acpi.c.

References acpi_read16(), acpi_write16(), MMIO_ACPI_PM1_CNT_BLK, SLP_TYP, SLP_TYP_S5, and SLP_TYP_SHIFT.

Referenced by reboot_from_resume(), and vboot_platform_prepare_reboot().

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

◆ vboot_platform_prepare_reboot()

void vboot_platform_prepare_reboot ( void  )

Definition at line 121 of file acpi.c.

References set_pm1cnt_s5().

Here is the call graph for this function: