coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmlib.c File Reference
#include <amdblocks/acpimmio.h>
#include <amdblocks/pmlib.h>
#include <console/console.h>
#include <types.h>
Include dependency graph for pmlib.c:

Go to the source code of this file.

Macros

#define PM_RTC_SHADOW_REG   0x5b
 
#define PWR_PWRSTATE   BIT(2) /* power state bit; needs to be written as 1 */
 
#define PWR_FAIL_OFF   0x0 /* Always power off after power resumes */
 
#define PWR_FAIL_ON   0x1 /* Always power on after power resumes */
 
#define PWR_FAIL_PREV   0x3 /* Use previous setting after power resumes */
 

Functions

void pm_set_power_failure_state (void)
 

Macro Definition Documentation

◆ PM_RTC_SHADOW_REG

#define PM_RTC_SHADOW_REG   0x5b

Definition at line 10 of file pmlib.c.

◆ PWR_FAIL_OFF

#define PWR_FAIL_OFF   0x0 /* Always power off after power resumes */

Definition at line 12 of file pmlib.c.

◆ PWR_FAIL_ON

#define PWR_FAIL_ON   0x1 /* Always power on after power resumes */

Definition at line 13 of file pmlib.c.

◆ PWR_FAIL_PREV

#define PWR_FAIL_PREV   0x3 /* Use previous setting after power resumes */

Definition at line 14 of file pmlib.c.

◆ PWR_PWRSTATE

#define PWR_PWRSTATE   BIT(2) /* power state bit; needs to be written as 1 */

Definition at line 11 of file pmlib.c.

Function Documentation

◆ pm_set_power_failure_state()

void pm_set_power_failure_state ( void  )

Definition at line 16 of file pmlib.c.

References BIOS_INFO, BIOS_WARNING, MAINBOARD_POWER_STATE_OFF, MAINBOARD_POWER_STATE_ON, MAINBOARD_POWER_STATE_PREVIOUS, pm_io_write8(), PM_RTC_SHADOW_REG, printk, PWR_FAIL_OFF, PWR_FAIL_ON, PWR_FAIL_PREV, and PWR_PWRSTATE.

Referenced by bootblock_fch_init(), and fch_early_init().

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