coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmc.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef _SOC_PMC_H_
4 #define _SOC_PMC_H_
5 
6  /* PCI Configuration Space (D31:F2): PMC */
7 #define ABASE 0x40
8 #define ACTL 0x44
9 #define PMC_ACPI_CNT 0x44
10 #define PWRM_EN (1 << 8)
11 #define ACPI_EN (1 << 7)
12 #define SCI_IRQ_SEL (7 << 0)
13 #define SCI_IRQ_ADJUST 0
14 
15 #define SCIS_IRQ9 0
16 #define SCIS_IRQ10 1
17 #define SCIS_IRQ11 2
18 #define SCIS_IRQ20 4
19 #define SCIS_IRQ21 5
20 #define SCIS_IRQ22 6
21 #define SCIS_IRQ23 7
22 #define PWRMBASE 0x48
23 #define GEN_PMCON_A 0xa0
24 #define DISB (1 << 23)
25 #define MS4V (1 << 18)
26 #define GBL_RST_STS (1 << 16)
27 #define SMI_LOCK (1 << 4)
28 #define GEN_PMCON_B 0xa4
29 #define SLP_STR_POL_LOCK (1 << 18)
30 #define ACPI_BASE_LOCK (1 << 17)
31 #define RTC_BATTERY_DEAD (1 << 2)
32 #define SUS_PWR_FLR (1 << 14)
33 #define HOST_RST_STS (1 << 9)
34 #define PWR_FLR (1 << 1)
35 #define SLEEP_AFTER_POWER_FAIL (1 << 0)
36 
37 /* Memory mapped IO registers in PMC */
38 #define PMSYNC_TPR_CFG 0xc8
39 #define PMSYNC_LOCK (1 << 15)
40 #define PCH_PWRM_ACPI_TMR_CTL 0xfc
41 #define ACPI_TIM_DIS (1 << 1)
42 #define GPIO_GPE_CFG 0x120
43 #define GPE0_DWX_MASK 0xf
44 #define GPE0_DW_SHIFT(x) (4 * (x))
45 #define GBLRST_CAUSE0 0x124
46 #define GBLRST_CAUSE1 0x128
47 #endif