]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Facp/Facp.aslc
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / Facp / Facp.aslc
1 /*++
2
3 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
8
9 Module Name:
10
11 Facp.c
12
13
14 Abstract: The fixed ACPI description Table (FADT) Structure
15
16
17 --*/
18 #ifdef ECP_FLAG
19 #include "EDKIIGlueDxe.h"
20 #else
21 #include <PiDxe.h>
22 #endif
23 #include <IndustryStandard/Acpi50.h>
24 #include "AcpiTablePlatform.h"
25
26 EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE FACP = {
27 {
28 EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
29 sizeof (EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE),
30 EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
31 0, // to make sum of entire table == 0
32 EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field
33 EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
34 EFI_ACPI_OEM_REVISION, // OEM revision number
35 EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
36 EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
37 },
38 0, // Physical addesss of FACS
39 0, // Physical address of DSDT
40 INT_MODEL, // System Interrupt Model (ignored in 2k and later, must be 0 for 98)
41 PM_PROFILE, // Preferred PM Profile
42 SCI_INT_VECTOR, // System vector of SCI interrupt
43 SMI_CMD_IO_PORT, // Port address of SMI command port
44 ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
45 ACPI_DISABLE, // value to write to port smi_cmd to disable ACPI
46 S4BIOS_REQ, // Value to write to SMI CMD port to enter the S4BIOS state
47 PSTATE_CNT, // PState control
48 PM1a_EVT_BLK, // Port address of Power Mgt 1a Event Reg Blk
49 PM1b_EVT_BLK, // Port address of Power Mgt 1b Event Reg Blk
50 PM1a_CNT_BLK, // Port address of Power Mgt 1a Ctrl Reg Blk
51 PM1b_CNT_BLK, // Port address of Power Mgt 1b Ctrl Reg Blk
52 PM2_CNT_BLK, // Port address of Power Mgt 2 Ctrl Reg Blk
53 PM_TMR_BLK, // Port address of Power Mgt Timer Ctrl Reg Blk
54 GPE0_BLK, // Port addr of General Purpose Event 0 Reg Blk
55 GPE1_BLK, // Port addr of General Purpose Event 1 Reg Blk
56 PM1_EVT_LEN, // Byte Length of ports at pm1X_evt_blk
57 PM1_CNT_LEN, // Byte Length of ports at pm1X_cnt_blk
58 PM2_CNT_LEN, // Byte Length of ports at pm2_cnt_blk
59 PM_TM_LEN, // Byte Length of ports at pm_tm_blk
60 GPE0_BLK_LEN, // Byte Length of ports at gpe0_blk
61 GPE1_BLK_LEN, // Byte Length of ports at gpe1_blk
62 GPE1_BASE, // offset in gpe model where gpe1 events start
63 CST_CNT, // _CST support
64 P_LVL2_LAT, // worst case HW latency to enter/exit C2 state
65 P_LVL3_LAT, // worst case HW latency to enter/exit C3 state
66 FLUSH_SIZE, // Size of area read to flush caches
67 FLUSH_STRIDE, // Stride used in flushing caches
68 DUTY_OFFSET, // bit location of duty cycle field in p_cnt reg
69 DUTY_WIDTH, // bit width of duty cycle field in p_cnt reg
70 DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
71 MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
72 CENTURY, // index to century in RTC CMOS RAM
73 IAPC_BOOT_ARCH, // IA-PCI Boot Architecture Flag
74 RESERVED, // reserved
75 FLAG,
76 {
77 EFI_ACPI_5_0_SYSTEM_IO,
78 8,
79 0,
80 0,
81 0xCF9
82 },
83 0x0E, // Hardware reset value
84 0, 0, 0, // Reserved
85 0, // XFirmwareCtrl
86 0, // XDsdt
87 //
88 // X_PM1a Event Register Block
89 //
90 EFI_ACPI_5_0_SYSTEM_IO,
91 0x20,
92 0x00,
93 EFI_ACPI_3_0_DWORD,
94 PM1a_EVT_BLK,
95
96 //
97 // X_PM1b Event Register Block
98 //
99 EFI_ACPI_5_0_SYSTEM_IO,
100 0x00,
101 0x00,
102 EFI_ACPI_RESERVED_BYTE,
103 PM1b_EVT_BLK,
104
105 //
106 // X_PM1a Control Register Block
107 //
108 EFI_ACPI_5_0_SYSTEM_IO,
109 0x10,
110 0x00,
111 EFI_ACPI_3_0_WORD,
112 PM1a_CNT_BLK,
113
114 //
115 // X_PM1b Control Register Block
116 //
117 EFI_ACPI_5_0_SYSTEM_IO,
118 0x00,
119 0x00,
120 EFI_ACPI_RESERVED_BYTE,
121 PM1b_CNT_BLK,
122
123 //
124 // X_PM2 Control Register Block
125 //
126 EFI_ACPI_5_0_SYSTEM_IO,
127 0x08,
128 0x00,
129 EFI_ACPI_3_0_BYTE,
130 PM2_CNT_BLK,
131
132 //
133 // X_PM Timer Control Register Block
134 //
135 EFI_ACPI_5_0_SYSTEM_IO,
136 0x20,
137 0x00,
138 EFI_ACPI_3_0_DWORD,
139 PM_TMR_BLK,
140
141 //
142 // X_General Purpose Event 0 Register Block
143 //
144 EFI_ACPI_5_0_SYSTEM_IO,
145 0x80,
146 0x00,
147 EFI_ACPI_RESERVED_BYTE,
148 GPE0_BLK,
149
150 //
151 // X_General Purpose Event 1 Register Block
152 //
153 EFI_ACPI_5_0_SYSTEM_IO,
154 0x00,
155 0x00,
156 EFI_ACPI_RESERVED_BYTE,
157 GPE1_BLK,
158
159 //
160 // Sleep Control Register Block
161 //
162 EFI_ACPI_5_0_SYSTEM_IO,
163 0x08,
164 0x00,
165 EFI_ACPI_RESERVED_BYTE,
166 0,
167
168 //
169 // Sleep Status Register Block
170 //
171 EFI_ACPI_5_0_SYSTEM_IO,
172 0x08,
173 0x00,
174 EFI_ACPI_RESERVED_BYTE,
175 0,
176 };
177
178 VOID*
179 ReferenceAcpiTable (
180 VOID
181 )
182 {
183 //
184 // Reference the table being generated to prevent the optimizer from
185 // removing the data structure from the executable
186 //
187 return (VOID*)&FACP;
188 }