From daa32be457c4825a608d535355e64a8a8648fcb8 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 18 Feb 2026 21:25:10 +0100 Subject: [PATCH] soc/intel/apollolake: Replace CFR enums with booleans Boolean options are intended to represent generic "Enable"/"Disable" options, but without enum options' extra bloat in the CFR structures. Change-Id: I009413db0873c42a98cfc8bddb8613c66d496947 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/91349 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/include/soc/cfr.h | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/soc/intel/apollolake/include/soc/cfr.h b/src/soc/intel/apollolake/include/soc/cfr.h index df4a9200cc..7cef8127dc 100644 --- a/src/soc/intel/apollolake/include/soc/cfr.h +++ b/src/soc/intel/apollolake/include/soc/cfr.h @@ -11,39 +11,27 @@ #include /* Legacy 8254 Timer */ -static const struct sm_object legacy_8254_timer = SM_DECLARE_ENUM({ +static const struct sm_object legacy_8254_timer = SM_DECLARE_BOOL({ .opt_name = "legacy_8254_timer", .ui_name = "Legacy 8254 Timer", .ui_helptext = "Enable the legacy 8254 timer by disabling clock gating.", - .default_value = 0, - .values = (const struct sm_enum_value[]) { - { "Disabled", 0 }, - { "Enabled", 1 }, - SM_ENUM_VALUE_END }, + .default_value = false, }); /* S0ix Enable */ -static const struct sm_object s0ix_enable = SM_DECLARE_ENUM({ +static const struct sm_object s0ix_enable = SM_DECLARE_BOOL({ .opt_name = "s0ix_enable", .ui_name = "Modern Standby (S0ix)", .ui_helptext = "Enabled: use Modern Standby / S0ix. Disabled: use APCI S3 sleep", - .default_value = 1, - .values = (const struct sm_enum_value[]) { - { "Disabled", 0 }, - { "Enabled", 1 }, - SM_ENUM_VALUE_END }, + .default_value = true, }); /* VT-d */ -static const struct sm_object vtd = SM_DECLARE_ENUM({ +static const struct sm_object vtd = SM_DECLARE_BOOL({ .opt_name = "vtd", .ui_name = "VT-d", .ui_helptext = "Enable or disable Intel VT-d (virtualization)", - .default_value = 1, - .values = (const struct sm_enum_value[]) { - { "Disabled", 0 }, - { "Enabled", 1 }, - SM_ENUM_VALUE_END }, + .default_value = true, }); #endif /* _APOLLOLAKE_CFR_H_ */