From c2c95fbd241c45a5d3dbdfb72a710909fbae0687 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 20 Apr 2025 17:19:38 -0500 Subject: [PATCH] sb/intel/lynxpoint: Add CFR objects for existing options Add a header with CFR objects for existing configuration options, so that supported boards can make use of them without duplication. TEST=build/boot google/panther with CFR options enabled. Change-Id: I5067e7a69f1f53f0f93d337198d3c349facec086 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/87385 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Maximilian Brune Reviewed-by: Paul Menzel --- src/southbridge/intel/lynxpoint/cfr.h | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/southbridge/intel/lynxpoint/cfr.h diff --git a/src/southbridge/intel/lynxpoint/cfr.h b/src/southbridge/intel/lynxpoint/cfr.h new file mode 100644 index 0000000000..4d56b5c421 --- /dev/null +++ b/src/southbridge/intel/lynxpoint/cfr.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * CFR enums and structs for sb/lynxpoint + */ + +#ifndef _LYNXPOINT_CFR_H_ +#define _LYNXPOINT_CFR_H_ + +#include +#include "pch.h" + +/* Power state after power loss */ +static const struct sm_object power_on_after_fail = SM_DECLARE_ENUM({ + .opt_name = "power_on_after_fail", + .ui_name = "Restore AC Power Loss", + .ui_helptext = "Specify what to do when power is re-applied after a power loss.", + .default_value = CONFIG_MAINBOARD_POWER_FAILURE_STATE, + .values = (const struct sm_enum_value[]) { + { "Power off (S5)", MAINBOARD_POWER_OFF }, + { "Power on (S0)", MAINBOARD_POWER_ON }, + { "Previous state", MAINBOARD_POWER_KEEP }, + SM_ENUM_VALUE_END }, +}); + +/* Intel ME State */ +static const struct sm_object me_disable = SM_DECLARE_ENUM({ + .opt_name = "me_disable", + .ui_name = "Intel Management Engine", + .ui_helptext = "Enable or disable the PCI/HECI interface of the Intel Management Engine", + .default_value = 0, + .values = (const struct sm_enum_value[]) { + { "Disabled", 1 }, + { "Enabled", 0 }, + SM_ENUM_VALUE_END }, +}); + +enum { + NMI_OFF = 0, + NMI_ON, +}; + +/* Non-maskable interrupts */ +static const struct sm_object nmi = SM_DECLARE_ENUM({ + .opt_name = "nmi", + .ui_name = "Non-maskable Interrupts", + .ui_helptext = "Enable or disable non-maskable interrupts", + .default_value = NMI_OFF, + .values = (const struct sm_enum_value[]) { + { "Disabled", NMI_OFF }, + { "Enabled", NMI_ON }, + SM_ENUM_VALUE_END }, +}); + +#endif /* _LYNXPOINT_CFR_H_ */