libpayload: configs: Add new config.featuretest to broaden CI
[coreboot.git] / src / mainboard / lenovo / x60 / cstates.c
blob840c8a0d76a5811da4b57bdd21ba935f4a142792
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpigen.h>
4 #include <southbridge/intel/i82801gx/i82801gx.h>
6 #define MWAIT_RES(state, sub_state) \
7 { \
8 .space_id = ACPI_ADDRESS_SPACE_FIXED, \
9 .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL, \
10 .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT, \
11 .access_size = ACPI_ACCESS_SIZE_UNDEFINED, \
12 .addrl = (((state) << 4) | (sub_state)), \
13 .addrh = 0, \
16 static const acpi_cstate_t cst_entries[] = {
18 .ctype = 1,
19 .latency = 1,
20 .power = 1000,
21 .resource = MWAIT_RES(0, 0),
24 .ctype = 2,
25 .latency = 1,
26 .power = 500,
27 .resource = MWAIT_RES(1, 0),
30 .ctype = 3,
31 .latency = 17,
32 .power = 250,
33 .resource = MWAIT_RES(2, 0),
37 int get_cst_entries(const acpi_cstate_t **entries)
39 *entries = cst_entries;
40 return ARRAY_SIZE(cst_entries);