coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cstates.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpigen.h>
5 
6 static const acpi_cstate_t cst_entries[] = {
7  {
8  /* ACPI C1 / CPU C1 */
9  1, 0x01, 1000,
10  { ACPI_ADDRESS_SPACE_FIXED, 1, 2, 1, 0, 0 }
11  },
12  {
13  /* ACPI C2 / CPU C2 */
14  2, 0x01, 500,
15  { ACPI_ADDRESS_SPACE_IO, 8, 0, 0, DEFAULT_PMBASE + LV2, 0 }
16  },
17  {
18  /* ACPI C3 / CPU C2 */
19  2, 0x11, 250,
20  { ACPI_ADDRESS_SPACE_IO, 8, 0, 0, DEFAULT_PMBASE + LV3, 0 }
21  },
22 };
23 
24 int get_cst_entries(const acpi_cstate_t **entries)
25 {
26  *entries = cst_entries;
27  return ARRAY_SIZE(cst_entries);
28 }
int get_cst_entries(const acpi_cstate_t **entries)
Definition: cstates.c:5
#define ARRAY_SIZE(a)
Definition: helpers.h:12
static const acpi_cstate_t cst_entries[]
Definition: cstates.c:6
#define ACPI_ADDRESS_SPACE_IO
Definition: acpi.h:105
#define ACPI_ADDRESS_SPACE_FIXED
Definition: acpi.h:115
#define DEFAULT_PMBASE
Definition: iomap.h:14
#define LV3
Definition: pch.h:429
#define LV2
Definition: pch.h:428