coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pm.h File Reference
#include <acpi/acpi.h>
Include dependency graph for pm.h:

Go to the source code of this file.

Data Structures

struct  chipset_power_state
 

Macros

#define IOCOM1   0x3f8
 
#define PRSTS   0x00
 
#define PMC_WDT_STS   (1 << 15)
 
#define SEC_GBLRST_STS   (1 << 7)
 
#define SEC_WDT_STS   (1 << 6)
 
#define WOL_OVR_WK_STS   (1 << 5)
 
#define PMC_WAKE_STS   (1 << 4)
 
#define PMC_CFG   0x08
 
#define SPS   (1 << 5)
 
#define NO_REBOOT   (1 << 4)
 
#define SX_ENT_TO_EN   (1 << 3)
 
#define TIMING_T581_SHIFT   (0)
 
#define TIMING_T581_MASK   (3 << TIMING_T581_SHIFT)
 
#define TIMING_T581_10uS   (0 << TIMING_T581_SHIFT)
 
#define TIMING_T581_100uS   (1 << TIMING_T581_SHIFT)
 
#define TIMING_T581_1mS   (2 << TIMING_T581_SHIFT)
 
#define TIMING_T581_10mS   (3 << TIMING_T581_SHIFT)
 
#define VLV_PM_STS   0x0c
 
#define PMC_MSG_FULL_STS   (1 << 24)
 
#define PMC_MSG_4_FULL_STS   (1 << 23)
 
#define PMC_MSG_3_FULL_STS   (1 << 22)
 
#define PMC_MSG_2_FULL_STS   (1 << 21)
 
#define PMC_MSG_1_FULL_STS   (1 << 20)
 
#define CODE_REQ   (1 << 8)
 
#define HPR_ENT_TO   (1 << 2)
 
#define SX_ENT_TO   (1 << 1)
 
#define GEN_PMCON1   0x20
 
#define UART_EN   (1 << 24)
 
#define DISB   (1 << 23)
 
#define MEM_SR   (1 << 21)
 
#define SRS   (1 << 20)
 
#define CTS   (1 << 19)
 
#define MS4V   (1 << 18)
 
#define PWR_FLR   (1 << 16)
 
#define PME_B0_S5_DIS   (1 << 15)
 
#define SUS_PWR_FLR   (1 << 14)
 
#define WOL_EN_OVRD   (1 << 13)
 
#define DIS_SLP_X_STRCH_SUS_UP   (1 << 12)
 
#define GEN_RST_STS   (1 << 9)
 
#define RPS   (1 << 2)
 
#define AFTERG3_EN   (1 << 0)
 
#define GEN_PMCON2   0x24
 
#define SLPSX_STR_POL_LOCK   (1 << 18)
 
#define BIOS_PCI_EXP_EN   (1 << 10)
 
#define PWRBTN_LVL   (1 << 9)
 
#define SMI_LOCK   (1 << 4)
 
#define ETR   0x48
 
#define CF9LOCK   (1 << 31)
 
#define LTR_DEF   (1 << 22)
 
#define IGNORE_HPET   (1 << 21)
 
#define CF9GR   (1 << 20)
 
#define CWORWRE   (1 << 18)
 
#define FUNC_DIS   0x34
 
#define SIO_DMA2_DIS   (1 << 0)
 
#define PWM1_DIS   (1 << 1)
 
#define PWM2_DIS   (1 << 2)
 
#define HSUART1_DIS   (1 << 3)
 
#define HSUART2_DIS   (1 << 4)
 
#define SPI_DIS   (1 << 5)
 
#define MMC_DIS   (1 << 8)
 
#define SDIO_DIS   (1 << 9)
 
#define SD_DIS   (1 << 10)
 
#define MMC45_DIS   (1 << 11)
 
#define HDA_DIS   (1 << 12)
 
#define LPE_DIS   (1 << 13)
 
#define OTG_DIS   (1 << 14)
 
#define XHCI_DIS   (1 << 15)
 
#define SATA_DIS   (1 << 17)
 
#define EHCI_DIS   (1 << 18)
 
#define TXE_DIS   (1 << 19)
 
#define PCIE_PORT1_DIS   (1 << 20)
 
#define PCIE_PORT2_DIS   (1 << 21)
 
#define PCIE_PORT3_DIS   (1 << 22)
 
#define PCIE_PORT4_DIS   (1 << 23)
 
#define SIO_DMA1_DIS   (1 << 24)
 
#define I2C1_DIS   (1 << 25)
 
#define I2C2_DIS   (1 << 26)
 
#define I2C3_DIS   (1 << 27)
 
#define I2C4_DIS   (1 << 28)
 
#define I2C5_DIS   (1 << 29)
 
#define I2C6_DIS   (1 << 30)
 
#define I2C7_DIS   (1 << 31)
 
#define FUNC_DIS2   0x38
 
#define USH_SS_PHY_DIS   (1 << 2)
 
#define OTG_SS_PHY_DIS   (1 << 1)
 
#define SMBUS_DIS   (1 << 0)
 
#define GPIO_ROUT   0x58
 
#define ROUTE_MASK   3
 
#define ROUTE_NONE   0
 
#define ROUTE_SMI   1
 
#define ROUTE_SCI   2
 
#define PLT_CLK_CTL_0   0x60
 
#define PLT_CLK_CTL_1   0x64
 
#define PLT_CLK_CTL_2   0x68
 
#define PLT_CLK_CTL_3   0x6c
 
#define PLT_CLK_CTL_4   0x70
 
#define PLT_CLK_CTL_5   0x74
 
#define CLK_FREQ_25MHZ   (0x0 << 2)
 
#define CLK_FREQ_19P2MHZ   (0x1 << 2)
 
#define CLK_CTL_D3_LPE   (0x0 << 0)
 
#define CLK_CTL_ON   (0x1 << 0)
 
#define CLK_CTL_OFF   (0x2 << 0)
 
#define PME_STS   0xc0
 
#define GPE_LEVEL_EDGE   0xc4
 
#define GPE_EDGE   0
 
#define GPE_LEVEL   1
 
#define GPE_POLARITY   0xc8
 
#define GPE_ACTIVE_HIGH   1
 
#define GPE_ACTIVE_LOW   0
 
#define LOCK   0xcc
 
#define PM1_STS   0x00
 
#define WAK_STS   (1 << 15)
 
#define PCIEXPWAK_STS   (1 << 14)
 
#define USB_STS   (1 << 13)
 
#define PRBTNOR_STS   (1 << 11)
 
#define RTC_STS   (1 << 10)
 
#define PWRBTN_STS   (1 << 8)
 
#define GBL_STS   (1 << 5)
 
#define TMROF_STS   (1 << 0)
 
#define PM1_EN   0x02
 
#define PCIEXPWAK_DIS   (1 << 14)
 
#define USB_WAKE_EN   (1 << 13)
 
#define RTC_EN   (1 << 10)
 
#define PWRBTN_EN   (1 << 8)
 
#define GBL_EN   (1 << 5)
 
#define TMROF_EN   (1 << 0)
 
#define PM1_CNT   0x04
 
#define GBL_RLS   (1 << 2)
 
#define BM_RLD   (1 << 1)
 
#define SCI_EN   (1 << 0)
 
#define PM1_TMR   0x08
 
#define GPE0_STS   0x20
 
#define CORE_GPIO_STS7   (1 << 31)
 
#define CORE_GPIO_STS6   (1 << 30)
 
#define CORE_GPIO_STS5   (1 << 29)
 
#define CORE_GPIO_STS4   (1 << 28)
 
#define CORE_GPIO_STS3   (1 << 27)
 
#define CORE_GPIO_STS2   (1 << 26)
 
#define CORE_GPIO_STS1   (1 << 25)
 
#define CORE_GPIO_STS0   (1 << 24)
 
#define SUS_GPIO_STS7   (1 << 23)
 
#define SUS_GPIO_STS6   (1 << 22)
 
#define SUS_GPIO_STS5   (1 << 21)
 
#define SUS_GPIO_STS4   (1 << 20)
 
#define SUS_GPIO_STS3   (1 << 19)
 
#define SUS_GPIO_STS2   (1 << 18)
 
#define SUS_GPIO_STS1   (1 << 17)
 
#define SUS_GPIO_STS0   (1 << 16)
 
#define PME_B0_STS   (1 << 13)
 
#define BATLOW_STS   (1 << 10)
 
#define PCI_EXP_STS   (1 << 9)
 
#define PCIE_WAKE3_STS   (1 << 8)
 
#define PCIE_WAKE2_STS   (1 << 7)
 
#define PCIE_WAKE1_STS   (1 << 6)
 
#define GUNIT_SCI_STS   (1 << 5)
 
#define PUNIT_SCI_STS   (1 << 4)
 
#define PCIE_WAKE0_STS   (1 << 3)
 
#define SWGPE_STS   (1 << 2)
 
#define HOT_PLUG_STS   (1 << 1)
 
#define GPE0_EN   0x28
 
#define CORE_GPIO_EN7   (1 << 31)
 
#define CORE_GPIO_EN6   (1 << 30)
 
#define CORE_GPIO_EN5   (1 << 29)
 
#define CORE_GPIO_EN4   (1 << 28)
 
#define CORE_GPIO_EN3   (1 << 27)
 
#define CORE_GPIO_EN2   (1 << 26)
 
#define CORE_GPIO_EN1   (1 << 25)
 
#define CORE_GPIO_EN0   (1 << 24)
 
#define SUS_GPIO_EN7_BIT   23
 
#define SUS_GPIO_EN7   (1 << SUS_GPIO_EN7_BIT)
 
#define SUS_GPIO_EN6_BIT   22
 
#define SUS_GPIO_EN6   (1 << SUS_GPIO_EN6_BIT)
 
#define SUS_GPIO_EN5_BIT   21
 
#define SUS_GPIO_EN5   (1 << SUS_GPIO_EN5_BIT)
 
#define SUS_GPIO_EN4_BIT   20
 
#define SUS_GPIO_EN4   (1 << SUS_GPIO_EN4_BIT)
 
#define SUS_GPIO_EN3_BIT   19
 
#define SUS_GPIO_EN3   (1 << SUS_GPIO_EN3_BIT)
 
#define SUS_GPIO_EN2_BIT   18
 
#define SUS_GPIO_EN2   (1 << SUS_GPIO_EN2_BIT)
 
#define SUS_GPIO_EN1_BIT   17
 
#define SUS_GPIO_EN1   (1 << SUS_GPIO_EN1_BIT)
 
#define SUS_GPIO_EN0_BIT   16
 
#define SUS_GPIO_EN0   (1 << SUS_GPIO_EN0_BIT)
 
#define PME_B0_EN   (1 << 13)
 
#define BATLOW_EN   (1 << 10)
 
#define PCI_EXP_EN   (1 << 9)
 
#define PCIE_WAKE3_EN   (1 << 8)
 
#define PCIE_WAKE2_EN   (1 << 7)
 
#define PCIE_WAKE1_EN   (1 << 6)
 
#define PCIE_WAKE0_EN   (1 << 3)
 
#define SWGPE_EN   (1 << 2)
 
#define HOT_PLUG_EN   (1 << 1)
 
#define _ACPI_ENABLE_WAKE_SUS_GPIO(x)   SUS_GPIO_EN##x##_BIT
 
#define ACPI_ENABLE_WAKE_SUS_GPIO(x)   _ACPI_ENABLE_WAKE_SUS_GPIO(x)
 
#define SMI_EN   0x30
 
#define INTEL_USB2_EN   (1 << 18) /* Intel-Specific USB2 SMI logic */
 
#define USB_EN   (1 << 17) /* Legacy USB2 SMI logic */
 
#define PERIODIC_EN   (1 << 14) /* SMI on PERIODIC_STS in SMI_STS */
 
#define TCO_EN   (1 << 13) /* Enable TCO Logic (BIOSWE et al) */
 
#define BIOS_RLS   (1 << 7) /* asserts SCI on bit set */
 
#define SWSMI_TMR_EN   (1 << 6) /* start software smi timer on bit set */
 
#define APMC_EN   (1 << 5) /* Writes to APM_CNT cause SMI# */
 
#define SLP_SMI_EN   (1 << 4) /* Write to SLP_EN in PM1_CNT asserts SMI# */
 
#define BIOS_EN   (1 << 2) /* Assert SMI# on setting GBL_RLS bit */
 
#define EOS   (1 << 1) /* End of SMI (deassert SMI#) */
 
#define GBL_SMI_EN   (1 << 0) /* SMI# generation at all? */
 
#define SMI_STS   0x34
 
#define ALT_GPIO_SMI   0x38
 
#define UPRWC   0x3c
 
#define UPRWC_WR_EN   (1 << 1) /* USB Per-Port Registers Write Enable */
 
#define GPE_CTRL   0x40
 
#define PM2A_CNT_BLK   0x50
 
#define TCO_RLD   0x60
 
#define TCO_STS   0x64
 
#define SECOND_TO_STS   (1 << 17)
 
#define TCO_TIMEOUT   (1 << 3)
 
#define TCO1_CNT   0x68
 
#define TCO_LOCK   (1 << 12)
 
#define TCO_TMR_HALT   (1 << 11)
 
#define TCO_TMR   0x70
 
#define RST_CNT   0xcf9
 
#define FULL_RST   (1 << 3)
 
#define RST_CPU   (1 << 2)
 
#define SYS_RST   (1 << 1)
 

Functions

uint16_t get_pmbase (void)
 
uint32_t clear_smi_status (void)
 
uint16_t clear_pm1_status (void)
 
uint32_t clear_tco_status (void)
 
uint32_t clear_gpe_status (void)
 
uint32_t clear_alt_status (void)
 
void clear_pmc_status (void)
 
void enable_smi (uint32_t mask)
 
void disable_smi (uint32_t mask)
 
void enable_pm1 (uint16_t events)
 
void enable_pm1_control (uint32_t mask)
 
void disable_pm1_control (uint32_t mask)
 
void enable_gpe (uint32_t mask)
 
void disable_gpe (uint32_t mask)
 
void disable_all_gpe (void)
 
void southcluster_log_state (void)
 
int rtc_failure (void)
 

Variables

struct chipset_power_state __packed
 

Macro Definition Documentation

◆ _ACPI_ENABLE_WAKE_SUS_GPIO

#define _ACPI_ENABLE_WAKE_SUS_GPIO (   x)    SUS_GPIO_EN##x##_BIT

Definition at line 205 of file pm.h.

◆ ACPI_ENABLE_WAKE_SUS_GPIO

#define ACPI_ENABLE_WAKE_SUS_GPIO (   x)    _ACPI_ENABLE_WAKE_SUS_GPIO(x)

Definition at line 206 of file pm.h.

◆ AFTERG3_EN

#define AFTERG3_EN   (1 << 0)

Definition at line 50 of file pm.h.

◆ ALT_GPIO_SMI

#define ALT_GPIO_SMI   0x38

Definition at line 220 of file pm.h.

◆ APMC_EN

#define APMC_EN   (1 << 5) /* Writes to APM_CNT cause SMI# */

Definition at line 214 of file pm.h.

◆ BATLOW_EN

#define BATLOW_EN   (1 << 10)

Definition at line 197 of file pm.h.

◆ BATLOW_STS

#define BATLOW_STS   (1 << 10)

Definition at line 161 of file pm.h.

◆ BIOS_EN

#define BIOS_EN   (1 << 2) /* Assert SMI# on setting GBL_RLS bit */

Definition at line 216 of file pm.h.

◆ BIOS_PCI_EXP_EN

#define BIOS_PCI_EXP_EN   (1 << 10)

Definition at line 53 of file pm.h.

◆ BIOS_RLS

#define BIOS_RLS   (1 << 7) /* asserts SCI on bit set */

Definition at line 212 of file pm.h.

◆ BM_RLD

#define BM_RLD   (1 << 1)

Definition at line 140 of file pm.h.

◆ CF9GR

#define CF9GR   (1 << 20)

Definition at line 60 of file pm.h.

◆ CF9LOCK

#define CF9LOCK   (1 << 31)

Definition at line 57 of file pm.h.

◆ CLK_CTL_D3_LPE

#define CLK_CTL_D3_LPE   (0x0 << 0)

Definition at line 109 of file pm.h.

◆ CLK_CTL_OFF

#define CLK_CTL_OFF   (0x2 << 0)

Definition at line 111 of file pm.h.

◆ CLK_CTL_ON

#define CLK_CTL_ON   (0x1 << 0)

Definition at line 110 of file pm.h.

◆ CLK_FREQ_19P2MHZ

#define CLK_FREQ_19P2MHZ   (0x1 << 2)

Definition at line 108 of file pm.h.

◆ CLK_FREQ_25MHZ

#define CLK_FREQ_25MHZ   (0x0 << 2)

Definition at line 107 of file pm.h.

◆ CODE_REQ

#define CODE_REQ   (1 << 8)

Definition at line 33 of file pm.h.

◆ CORE_GPIO_EN0

#define CORE_GPIO_EN0   (1 << 24)

Definition at line 179 of file pm.h.

◆ CORE_GPIO_EN1

#define CORE_GPIO_EN1   (1 << 25)

Definition at line 178 of file pm.h.

◆ CORE_GPIO_EN2

#define CORE_GPIO_EN2   (1 << 26)

Definition at line 177 of file pm.h.

◆ CORE_GPIO_EN3

#define CORE_GPIO_EN3   (1 << 27)

Definition at line 176 of file pm.h.

◆ CORE_GPIO_EN4

#define CORE_GPIO_EN4   (1 << 28)

Definition at line 175 of file pm.h.

◆ CORE_GPIO_EN5

#define CORE_GPIO_EN5   (1 << 29)

Definition at line 174 of file pm.h.

◆ CORE_GPIO_EN6

#define CORE_GPIO_EN6   (1 << 30)

Definition at line 173 of file pm.h.

◆ CORE_GPIO_EN7

#define CORE_GPIO_EN7   (1 << 31)

Definition at line 172 of file pm.h.

◆ CORE_GPIO_STS0

#define CORE_GPIO_STS0   (1 << 24)

Definition at line 151 of file pm.h.

◆ CORE_GPIO_STS1

#define CORE_GPIO_STS1   (1 << 25)

Definition at line 150 of file pm.h.

◆ CORE_GPIO_STS2

#define CORE_GPIO_STS2   (1 << 26)

Definition at line 149 of file pm.h.

◆ CORE_GPIO_STS3

#define CORE_GPIO_STS3   (1 << 27)

Definition at line 148 of file pm.h.

◆ CORE_GPIO_STS4

#define CORE_GPIO_STS4   (1 << 28)

Definition at line 147 of file pm.h.

◆ CORE_GPIO_STS5

#define CORE_GPIO_STS5   (1 << 29)

Definition at line 146 of file pm.h.

◆ CORE_GPIO_STS6

#define CORE_GPIO_STS6   (1 << 30)

Definition at line 145 of file pm.h.

◆ CORE_GPIO_STS7

#define CORE_GPIO_STS7   (1 << 31)

Definition at line 144 of file pm.h.

◆ CTS

#define CTS   (1 << 19)

Definition at line 41 of file pm.h.

◆ CWORWRE

#define CWORWRE   (1 << 18)

Definition at line 61 of file pm.h.

◆ DIS_SLP_X_STRCH_SUS_UP

#define DIS_SLP_X_STRCH_SUS_UP   (1 << 12)

Definition at line 47 of file pm.h.

◆ DISB

#define DISB   (1 << 23)

Definition at line 38 of file pm.h.

◆ EHCI_DIS

#define EHCI_DIS   (1 << 18)

Definition at line 78 of file pm.h.

◆ EOS

#define EOS   (1 << 1) /* End of SMI (deassert SMI#) */

Definition at line 217 of file pm.h.

◆ ETR

#define ETR   0x48

Definition at line 56 of file pm.h.

◆ FULL_RST

#define FULL_RST   (1 << 3)

Definition at line 236 of file pm.h.

◆ FUNC_DIS

#define FUNC_DIS   0x34

Definition at line 62 of file pm.h.

◆ FUNC_DIS2

#define FUNC_DIS2   0x38

Definition at line 92 of file pm.h.

◆ GBL_EN

#define GBL_EN   (1 << 5)

Definition at line 136 of file pm.h.

◆ GBL_RLS

#define GBL_RLS   (1 << 2)

Definition at line 139 of file pm.h.

◆ GBL_SMI_EN

#define GBL_SMI_EN   (1 << 0) /* SMI# generation at all? */

Definition at line 218 of file pm.h.

◆ GBL_STS

#define GBL_STS   (1 << 5)

Definition at line 129 of file pm.h.

◆ GEN_PMCON1

#define GEN_PMCON1   0x20

Definition at line 36 of file pm.h.

◆ GEN_PMCON2

#define GEN_PMCON2   0x24

Definition at line 51 of file pm.h.

◆ GEN_RST_STS

#define GEN_RST_STS   (1 << 9)

Definition at line 48 of file pm.h.

◆ GPE0_EN

#define GPE0_EN   0x28

Definition at line 171 of file pm.h.

◆ GPE0_STS

#define GPE0_STS   0x20

Definition at line 143 of file pm.h.

◆ GPE_ACTIVE_HIGH

#define GPE_ACTIVE_HIGH   1

Definition at line 117 of file pm.h.

◆ GPE_ACTIVE_LOW

#define GPE_ACTIVE_LOW   0

Definition at line 118 of file pm.h.

◆ GPE_CTRL

#define GPE_CTRL   0x40

Definition at line 223 of file pm.h.

◆ GPE_EDGE

#define GPE_EDGE   0

Definition at line 114 of file pm.h.

◆ GPE_LEVEL

#define GPE_LEVEL   1

Definition at line 115 of file pm.h.

◆ GPE_LEVEL_EDGE

#define GPE_LEVEL_EDGE   0xc4

Definition at line 113 of file pm.h.

◆ GPE_POLARITY

#define GPE_POLARITY   0xc8

Definition at line 116 of file pm.h.

◆ GPIO_ROUT

#define GPIO_ROUT   0x58

Definition at line 96 of file pm.h.

◆ GUNIT_SCI_STS

#define GUNIT_SCI_STS   (1 << 5)

Definition at line 166 of file pm.h.

◆ HDA_DIS

#define HDA_DIS   (1 << 12)

Definition at line 73 of file pm.h.

◆ HOT_PLUG_EN

#define HOT_PLUG_EN   (1 << 1)

Definition at line 204 of file pm.h.

◆ HOT_PLUG_STS

#define HOT_PLUG_STS   (1 << 1)

Definition at line 170 of file pm.h.

◆ HPR_ENT_TO

#define HPR_ENT_TO   (1 << 2)

Definition at line 34 of file pm.h.

◆ HSUART1_DIS

#define HSUART1_DIS   (1 << 3)

Definition at line 66 of file pm.h.

◆ HSUART2_DIS

#define HSUART2_DIS   (1 << 4)

Definition at line 67 of file pm.h.

◆ I2C1_DIS

#define I2C1_DIS   (1 << 25)

Definition at line 85 of file pm.h.

◆ I2C2_DIS

#define I2C2_DIS   (1 << 26)

Definition at line 86 of file pm.h.

◆ I2C3_DIS

#define I2C3_DIS   (1 << 27)

Definition at line 87 of file pm.h.

◆ I2C4_DIS

#define I2C4_DIS   (1 << 28)

Definition at line 88 of file pm.h.

◆ I2C5_DIS

#define I2C5_DIS   (1 << 29)

Definition at line 89 of file pm.h.

◆ I2C6_DIS

#define I2C6_DIS   (1 << 30)

Definition at line 90 of file pm.h.

◆ I2C7_DIS

#define I2C7_DIS   (1 << 31)

Definition at line 91 of file pm.h.

◆ IGNORE_HPET

#define IGNORE_HPET   (1 << 21)

Definition at line 59 of file pm.h.

◆ INTEL_USB2_EN

#define INTEL_USB2_EN   (1 << 18) /* Intel-Specific USB2 SMI logic */

Definition at line 208 of file pm.h.

◆ IOCOM1

#define IOCOM1   0x3f8

Definition at line 8 of file pm.h.

◆ LOCK

#define LOCK   0xcc

Definition at line 119 of file pm.h.

◆ LPE_DIS

#define LPE_DIS   (1 << 13)

Definition at line 74 of file pm.h.

◆ LTR_DEF

#define LTR_DEF   (1 << 22)

Definition at line 58 of file pm.h.

◆ MEM_SR

#define MEM_SR   (1 << 21)

Definition at line 39 of file pm.h.

◆ MMC45_DIS

#define MMC45_DIS   (1 << 11)

Definition at line 72 of file pm.h.

◆ MMC_DIS

#define MMC_DIS   (1 << 8)

Definition at line 69 of file pm.h.

◆ MS4V

#define MS4V   (1 << 18)

Definition at line 42 of file pm.h.

◆ NO_REBOOT

#define NO_REBOOT   (1 << 4)

Definition at line 19 of file pm.h.

◆ OTG_DIS

#define OTG_DIS   (1 << 14)

Definition at line 75 of file pm.h.

◆ OTG_SS_PHY_DIS

#define OTG_SS_PHY_DIS   (1 << 1)

Definition at line 94 of file pm.h.

◆ PCI_EXP_EN

#define PCI_EXP_EN   (1 << 9)

Definition at line 198 of file pm.h.

◆ PCI_EXP_STS

#define PCI_EXP_STS   (1 << 9)

Definition at line 162 of file pm.h.

◆ PCIE_PORT1_DIS

#define PCIE_PORT1_DIS   (1 << 20)

Definition at line 80 of file pm.h.

◆ PCIE_PORT2_DIS

#define PCIE_PORT2_DIS   (1 << 21)

Definition at line 81 of file pm.h.

◆ PCIE_PORT3_DIS

#define PCIE_PORT3_DIS   (1 << 22)

Definition at line 82 of file pm.h.

◆ PCIE_PORT4_DIS

#define PCIE_PORT4_DIS   (1 << 23)

Definition at line 83 of file pm.h.

◆ PCIE_WAKE0_EN

#define PCIE_WAKE0_EN   (1 << 3)

Definition at line 202 of file pm.h.

◆ PCIE_WAKE0_STS

#define PCIE_WAKE0_STS   (1 << 3)

Definition at line 168 of file pm.h.

◆ PCIE_WAKE1_EN

#define PCIE_WAKE1_EN   (1 << 6)

Definition at line 201 of file pm.h.

◆ PCIE_WAKE1_STS

#define PCIE_WAKE1_STS   (1 << 6)

Definition at line 165 of file pm.h.

◆ PCIE_WAKE2_EN

#define PCIE_WAKE2_EN   (1 << 7)

Definition at line 200 of file pm.h.

◆ PCIE_WAKE2_STS

#define PCIE_WAKE2_STS   (1 << 7)

Definition at line 164 of file pm.h.

◆ PCIE_WAKE3_EN

#define PCIE_WAKE3_EN   (1 << 8)

Definition at line 199 of file pm.h.

◆ PCIE_WAKE3_STS

#define PCIE_WAKE3_STS   (1 << 8)

Definition at line 163 of file pm.h.

◆ PCIEXPWAK_DIS

#define PCIEXPWAK_DIS   (1 << 14)

Definition at line 132 of file pm.h.

◆ PCIEXPWAK_STS

#define PCIEXPWAK_STS   (1 << 14)

Definition at line 124 of file pm.h.

◆ PERIODIC_EN

#define PERIODIC_EN   (1 << 14) /* SMI on PERIODIC_STS in SMI_STS */

Definition at line 210 of file pm.h.

◆ PLT_CLK_CTL_0

#define PLT_CLK_CTL_0   0x60

Definition at line 101 of file pm.h.

◆ PLT_CLK_CTL_1

#define PLT_CLK_CTL_1   0x64

Definition at line 102 of file pm.h.

◆ PLT_CLK_CTL_2

#define PLT_CLK_CTL_2   0x68

Definition at line 103 of file pm.h.

◆ PLT_CLK_CTL_3

#define PLT_CLK_CTL_3   0x6c

Definition at line 104 of file pm.h.

◆ PLT_CLK_CTL_4

#define PLT_CLK_CTL_4   0x70

Definition at line 105 of file pm.h.

◆ PLT_CLK_CTL_5

#define PLT_CLK_CTL_5   0x74

Definition at line 106 of file pm.h.

◆ PM1_CNT

#define PM1_CNT   0x04

Definition at line 138 of file pm.h.

◆ PM1_EN

#define PM1_EN   0x02

Definition at line 131 of file pm.h.

◆ PM1_STS

#define PM1_STS   0x00

Definition at line 122 of file pm.h.

◆ PM1_TMR

#define PM1_TMR   0x08

Definition at line 142 of file pm.h.

◆ PM2A_CNT_BLK

#define PM2A_CNT_BLK   0x50

Definition at line 224 of file pm.h.

◆ PMC_CFG

#define PMC_CFG   0x08

Definition at line 17 of file pm.h.

◆ PMC_MSG_1_FULL_STS

#define PMC_MSG_1_FULL_STS   (1 << 20)

Definition at line 32 of file pm.h.

◆ PMC_MSG_2_FULL_STS

#define PMC_MSG_2_FULL_STS   (1 << 21)

Definition at line 31 of file pm.h.

◆ PMC_MSG_3_FULL_STS

#define PMC_MSG_3_FULL_STS   (1 << 22)

Definition at line 30 of file pm.h.

◆ PMC_MSG_4_FULL_STS

#define PMC_MSG_4_FULL_STS   (1 << 23)

Definition at line 29 of file pm.h.

◆ PMC_MSG_FULL_STS

#define PMC_MSG_FULL_STS   (1 << 24)

Definition at line 28 of file pm.h.

◆ PMC_WAKE_STS

#define PMC_WAKE_STS   (1 << 4)

Definition at line 16 of file pm.h.

◆ PMC_WDT_STS

#define PMC_WDT_STS   (1 << 15)

Definition at line 12 of file pm.h.

◆ PME_B0_EN

#define PME_B0_EN   (1 << 13)

Definition at line 196 of file pm.h.

◆ PME_B0_S5_DIS

#define PME_B0_S5_DIS   (1 << 15)

Definition at line 44 of file pm.h.

◆ PME_B0_STS

#define PME_B0_STS   (1 << 13)

Definition at line 160 of file pm.h.

◆ PME_STS

#define PME_STS   0xc0

Definition at line 112 of file pm.h.

◆ PRBTNOR_STS

#define PRBTNOR_STS   (1 << 11)

Definition at line 126 of file pm.h.

◆ PRSTS

#define PRSTS   0x00

Definition at line 11 of file pm.h.

◆ PUNIT_SCI_STS

#define PUNIT_SCI_STS   (1 << 4)

Definition at line 167 of file pm.h.

◆ PWM1_DIS

#define PWM1_DIS   (1 << 1)

Definition at line 64 of file pm.h.

◆ PWM2_DIS

#define PWM2_DIS   (1 << 2)

Definition at line 65 of file pm.h.

◆ PWR_FLR

#define PWR_FLR   (1 << 16)

Definition at line 43 of file pm.h.

◆ PWRBTN_EN

#define PWRBTN_EN   (1 << 8)

Definition at line 135 of file pm.h.

◆ PWRBTN_LVL

#define PWRBTN_LVL   (1 << 9)

Definition at line 54 of file pm.h.

◆ PWRBTN_STS

#define PWRBTN_STS   (1 << 8)

Definition at line 128 of file pm.h.

◆ ROUTE_MASK

#define ROUTE_MASK   3

Definition at line 97 of file pm.h.

◆ ROUTE_NONE

#define ROUTE_NONE   0

Definition at line 98 of file pm.h.

◆ ROUTE_SCI

#define ROUTE_SCI   2

Definition at line 100 of file pm.h.

◆ ROUTE_SMI

#define ROUTE_SMI   1

Definition at line 99 of file pm.h.

◆ RPS

#define RPS   (1 << 2)

Definition at line 49 of file pm.h.

◆ RST_CNT

#define RST_CNT   0xcf9

Definition at line 235 of file pm.h.

◆ RST_CPU

#define RST_CPU   (1 << 2)

Definition at line 237 of file pm.h.

◆ RTC_EN

#define RTC_EN   (1 << 10)

Definition at line 134 of file pm.h.

◆ RTC_STS

#define RTC_STS   (1 << 10)

Definition at line 127 of file pm.h.

◆ SATA_DIS

#define SATA_DIS   (1 << 17)

Definition at line 77 of file pm.h.

◆ SCI_EN

#define SCI_EN   (1 << 0)

Definition at line 141 of file pm.h.

◆ SD_DIS

#define SD_DIS   (1 << 10)

Definition at line 71 of file pm.h.

◆ SDIO_DIS

#define SDIO_DIS   (1 << 9)

Definition at line 70 of file pm.h.

◆ SEC_GBLRST_STS

#define SEC_GBLRST_STS   (1 << 7)

Definition at line 13 of file pm.h.

◆ SEC_WDT_STS

#define SEC_WDT_STS   (1 << 6)

Definition at line 14 of file pm.h.

◆ SECOND_TO_STS

#define SECOND_TO_STS   (1 << 17)

Definition at line 227 of file pm.h.

◆ SIO_DMA1_DIS

#define SIO_DMA1_DIS   (1 << 24)

Definition at line 84 of file pm.h.

◆ SIO_DMA2_DIS

#define SIO_DMA2_DIS   (1 << 0)

Definition at line 63 of file pm.h.

◆ SLP_SMI_EN

#define SLP_SMI_EN   (1 << 4) /* Write to SLP_EN in PM1_CNT asserts SMI# */

Definition at line 215 of file pm.h.

◆ SLPSX_STR_POL_LOCK

#define SLPSX_STR_POL_LOCK   (1 << 18)

Definition at line 52 of file pm.h.

◆ SMBUS_DIS

#define SMBUS_DIS   (1 << 0)

Definition at line 95 of file pm.h.

◆ SMI_EN

#define SMI_EN   0x30

Definition at line 207 of file pm.h.

◆ SMI_LOCK

#define SMI_LOCK   (1 << 4)

Definition at line 55 of file pm.h.

◆ SMI_STS

#define SMI_STS   0x34

Definition at line 219 of file pm.h.

◆ SPI_DIS

#define SPI_DIS   (1 << 5)

Definition at line 68 of file pm.h.

◆ SPS

#define SPS   (1 << 5)

Definition at line 18 of file pm.h.

◆ SRS

#define SRS   (1 << 20)

Definition at line 40 of file pm.h.

◆ SUS_GPIO_EN0

#define SUS_GPIO_EN0   (1 << SUS_GPIO_EN0_BIT)

Definition at line 195 of file pm.h.

◆ SUS_GPIO_EN0_BIT

#define SUS_GPIO_EN0_BIT   16

Definition at line 194 of file pm.h.

◆ SUS_GPIO_EN1

#define SUS_GPIO_EN1   (1 << SUS_GPIO_EN1_BIT)

Definition at line 193 of file pm.h.

◆ SUS_GPIO_EN1_BIT

#define SUS_GPIO_EN1_BIT   17

Definition at line 192 of file pm.h.

◆ SUS_GPIO_EN2

#define SUS_GPIO_EN2   (1 << SUS_GPIO_EN2_BIT)

Definition at line 191 of file pm.h.

◆ SUS_GPIO_EN2_BIT

#define SUS_GPIO_EN2_BIT   18

Definition at line 190 of file pm.h.

◆ SUS_GPIO_EN3

#define SUS_GPIO_EN3   (1 << SUS_GPIO_EN3_BIT)

Definition at line 189 of file pm.h.

◆ SUS_GPIO_EN3_BIT

#define SUS_GPIO_EN3_BIT   19

Definition at line 188 of file pm.h.

◆ SUS_GPIO_EN4

#define SUS_GPIO_EN4   (1 << SUS_GPIO_EN4_BIT)

Definition at line 187 of file pm.h.

◆ SUS_GPIO_EN4_BIT

#define SUS_GPIO_EN4_BIT   20

Definition at line 186 of file pm.h.

◆ SUS_GPIO_EN5

#define SUS_GPIO_EN5   (1 << SUS_GPIO_EN5_BIT)

Definition at line 185 of file pm.h.

◆ SUS_GPIO_EN5_BIT

#define SUS_GPIO_EN5_BIT   21

Definition at line 184 of file pm.h.

◆ SUS_GPIO_EN6

#define SUS_GPIO_EN6   (1 << SUS_GPIO_EN6_BIT)

Definition at line 183 of file pm.h.

◆ SUS_GPIO_EN6_BIT

#define SUS_GPIO_EN6_BIT   22

Definition at line 182 of file pm.h.

◆ SUS_GPIO_EN7

#define SUS_GPIO_EN7   (1 << SUS_GPIO_EN7_BIT)

Definition at line 181 of file pm.h.

◆ SUS_GPIO_EN7_BIT

#define SUS_GPIO_EN7_BIT   23

Definition at line 180 of file pm.h.

◆ SUS_GPIO_STS0

#define SUS_GPIO_STS0   (1 << 16)

Definition at line 159 of file pm.h.

◆ SUS_GPIO_STS1

#define SUS_GPIO_STS1   (1 << 17)

Definition at line 158 of file pm.h.

◆ SUS_GPIO_STS2

#define SUS_GPIO_STS2   (1 << 18)

Definition at line 157 of file pm.h.

◆ SUS_GPIO_STS3

#define SUS_GPIO_STS3   (1 << 19)

Definition at line 156 of file pm.h.

◆ SUS_GPIO_STS4

#define SUS_GPIO_STS4   (1 << 20)

Definition at line 155 of file pm.h.

◆ SUS_GPIO_STS5

#define SUS_GPIO_STS5   (1 << 21)

Definition at line 154 of file pm.h.

◆ SUS_GPIO_STS6

#define SUS_GPIO_STS6   (1 << 22)

Definition at line 153 of file pm.h.

◆ SUS_GPIO_STS7

#define SUS_GPIO_STS7   (1 << 23)

Definition at line 152 of file pm.h.

◆ SUS_PWR_FLR

#define SUS_PWR_FLR   (1 << 14)

Definition at line 45 of file pm.h.

◆ SWGPE_EN

#define SWGPE_EN   (1 << 2)

Definition at line 203 of file pm.h.

◆ SWGPE_STS

#define SWGPE_STS   (1 << 2)

Definition at line 169 of file pm.h.

◆ SWSMI_TMR_EN

#define SWSMI_TMR_EN   (1 << 6) /* start software smi timer on bit set */

Definition at line 213 of file pm.h.

◆ SX_ENT_TO

#define SX_ENT_TO   (1 << 1)

Definition at line 35 of file pm.h.

◆ SX_ENT_TO_EN

#define SX_ENT_TO_EN   (1 << 3)

Definition at line 20 of file pm.h.

◆ SYS_RST

#define SYS_RST   (1 << 1)

Definition at line 238 of file pm.h.

◆ TCO1_CNT

#define TCO1_CNT   0x68

Definition at line 229 of file pm.h.

◆ TCO_EN

#define TCO_EN   (1 << 13) /* Enable TCO Logic (BIOSWE et al) */

Definition at line 211 of file pm.h.

◆ TCO_LOCK

#define TCO_LOCK   (1 << 12)

Definition at line 230 of file pm.h.

◆ TCO_RLD

#define TCO_RLD   0x60

Definition at line 225 of file pm.h.

◆ TCO_STS

#define TCO_STS   0x64

Definition at line 226 of file pm.h.

◆ TCO_TIMEOUT

#define TCO_TIMEOUT   (1 << 3)

Definition at line 228 of file pm.h.

◆ TCO_TMR

#define TCO_TMR   0x70

Definition at line 232 of file pm.h.

◆ TCO_TMR_HALT

#define TCO_TMR_HALT   (1 << 11)

Definition at line 231 of file pm.h.

◆ TIMING_T581_100uS

#define TIMING_T581_100uS   (1 << TIMING_T581_SHIFT)

Definition at line 24 of file pm.h.

◆ TIMING_T581_10mS

#define TIMING_T581_10mS   (3 << TIMING_T581_SHIFT)

Definition at line 26 of file pm.h.

◆ TIMING_T581_10uS

#define TIMING_T581_10uS   (0 << TIMING_T581_SHIFT)

Definition at line 23 of file pm.h.

◆ TIMING_T581_1mS

#define TIMING_T581_1mS   (2 << TIMING_T581_SHIFT)

Definition at line 25 of file pm.h.

◆ TIMING_T581_MASK

#define TIMING_T581_MASK   (3 << TIMING_T581_SHIFT)

Definition at line 22 of file pm.h.

◆ TIMING_T581_SHIFT

#define TIMING_T581_SHIFT   (0)

Definition at line 21 of file pm.h.

◆ TMROF_EN

#define TMROF_EN   (1 << 0)

Definition at line 137 of file pm.h.

◆ TMROF_STS

#define TMROF_STS   (1 << 0)

Definition at line 130 of file pm.h.

◆ TXE_DIS

#define TXE_DIS   (1 << 19)

Definition at line 79 of file pm.h.

◆ UART_EN

#define UART_EN   (1 << 24)

Definition at line 37 of file pm.h.

◆ UPRWC

#define UPRWC   0x3c

Definition at line 221 of file pm.h.

◆ UPRWC_WR_EN

#define UPRWC_WR_EN   (1 << 1) /* USB Per-Port Registers Write Enable */

Definition at line 222 of file pm.h.

◆ USB_EN

#define USB_EN   (1 << 17) /* Legacy USB2 SMI logic */

Definition at line 209 of file pm.h.

◆ USB_STS

#define USB_STS   (1 << 13)

Definition at line 125 of file pm.h.

◆ USB_WAKE_EN

#define USB_WAKE_EN   (1 << 13)

Definition at line 133 of file pm.h.

◆ USH_SS_PHY_DIS

#define USH_SS_PHY_DIS   (1 << 2)

Definition at line 93 of file pm.h.

◆ VLV_PM_STS

#define VLV_PM_STS   0x0c

Definition at line 27 of file pm.h.

◆ WAK_STS

#define WAK_STS   (1 << 15)

Definition at line 123 of file pm.h.

◆ WOL_EN_OVRD

#define WOL_EN_OVRD   (1 << 13)

Definition at line 46 of file pm.h.

◆ WOL_OVR_WK_STS

#define WOL_OVR_WK_STS   (1 << 5)

Definition at line 15 of file pm.h.

◆ XHCI_DIS

#define XHCI_DIS   (1 << 15)

Definition at line 76 of file pm.h.

Function Documentation

◆ clear_alt_status()

uint32_t clear_alt_status ( void  )

Definition at line 312 of file pmutil.c.

References print_alt_sts(), and reset_alt_status().

Referenced by smm_southbridge_clear_state(), and southbridge_smi_handler().

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

◆ clear_gpe_status()

uint32_t clear_gpe_status ( void  )

Definition at line 265 of file pmutil.c.

References print_gpe_sts(), and reset_gpe_status().

Referenced by smm_southbridge_clear_state(), southbridge_smi_gpe0(), and southbridge_smi_sleep().

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

◆ clear_pm1_status()

uint16_t clear_pm1_status ( void  )

Definition at line 152 of file pmutil.c.

References print_pm1_status(), and reset_pm1_status().

Referenced by smm_southbridge_clear_state(), and southbridge_smi_pm1().

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

◆ clear_pmc_status()

void clear_pmc_status ( void  )

Definition at line 317 of file pmutil.c.

References GEN_PMCON1, PMC_BASE_ADDRESS, PRSTS, read32(), RPS, and write32().

Referenced by smm_southbridge_clear_state().

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

◆ clear_smi_status()

uint32_t clear_smi_status ( void  )

Definition at line 84 of file pmutil.c.

References print_smi_status(), and reset_smi_status().

Referenced by smm_southbridge_clear_state(), and southbridge_smi_handler().

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

◆ clear_tco_status()

uint32_t clear_tco_status ( void  )

Definition at line 189 of file pmutil.c.

References print_tco_status(), and reset_tco_status().

Referenced by smm_southbridge_clear_state(), and southbridge_smi_tco().

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

◆ disable_all_gpe()

void disable_all_gpe ( void  )

Definition at line 210 of file pmutil.c.

References disable_gpe().

Referenced by southbridge_smi_sleep().

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

◆ disable_gpe()

void disable_gpe ( uint32_t  mask)

Definition at line 202 of file pmutil.c.

References get_pmbase(), GPE0_EN, inl(), mask, outl(), and pmbase.

Referenced by smm_southbridge_enable().

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

◆ disable_pm1_control()

void disable_pm1_control ( uint32_t  mask)

Definition at line 113 of file pmutil.c.

References get_pmbase(), inl(), mask, outl(), PM1_CNT, and pmbase.

Referenced by southbridge_smi_apmc(), southbridge_smi_pm1(), and southbridge_smi_sleep().

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

◆ disable_smi()

void disable_smi ( uint32_t  mask)

Definition at line 97 of file pmutil.c.

References get_pmbase(), inl(), mask, outl(), pmbase, and SMI_EN.

Referenced by southbridge_smi_sleep().

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

◆ enable_gpe()

void enable_gpe ( uint32_t  mask)

Definition at line 194 of file pmutil.c.

References get_pmbase(), GPE0_EN, inl(), mask, outl(), and pmbase.

Referenced by mainboard_smi_sleep().

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

◆ enable_pm1()

void enable_pm1 ( uint16_t  events)

Definition at line 157 of file pmutil.c.

References get_pmbase(), outw(), and PM1_EN.

Referenced by smm_southbridge_enable().

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

◆ enable_pm1_control()

void enable_pm1_control ( uint32_t  mask)

Definition at line 105 of file pmutil.c.

References get_pmbase(), inl(), mask, outl(), PM1_CNT, and pmbase.

Referenced by southbridge_smi_apmc(), southbridge_smi_pm1(), and southbridge_smi_sleep().

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

◆ enable_smi()

void enable_smi ( uint32_t  mask)

Definition at line 89 of file pmutil.c.

References get_pmbase(), inl(), mask, outl(), pmbase, and SMI_EN.

Referenced by smm_southbridge_enable(), and southbridge_smi_set_eos().

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

◆ get_pmbase()

uint16_t get_pmbase ( void  )

Definition at line 254 of file pmutil.c.

◆ rtc_failure()

int rtc_failure ( void  )

Definition at line 330 of file pmutil.c.

References acpi_get_pm_state(), BIOS_DEBUG, GEN_PMCON1, chipset_power_state::gen_pmcon1, NULL, PMC_BASE_ADDRESS, printk, read32(), and RPS.

Referenced by sc_init(), and soc_rtc_init().

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

◆ southcluster_log_state()

void southcluster_log_state ( void  )

Definition at line 76 of file elog.c.

Variable Documentation

◆ __packed