From ada6b987663d2298a88a4751beaa4bef3a6eb9bd Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 20 Apr 2025 17:11:27 -0500 Subject: [PATCH] nb/intel/sandybridge: Add CFR objects for existing options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a header with CFR objects for existing configuration options, so that supported boards can make use of them. Currently only one option for IGD UMA size, but others can be added as needed. Change-Id: I892ffcc74d36a266697cbc7ea3c8880db6b67f44 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/87388 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Jérémy Compostella --- src/northbridge/intel/sandybridge/cfr.h | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/northbridge/intel/sandybridge/cfr.h diff --git a/src/northbridge/intel/sandybridge/cfr.h b/src/northbridge/intel/sandybridge/cfr.h new file mode 100644 index 0000000000..fafc80b809 --- /dev/null +++ b/src/northbridge/intel/sandybridge/cfr.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * CFR enums and structs for nb/sandybridge + */ + +#ifndef NB_SANDYBRIDGE_CFR_H +#define NB_SANDYBRIDGE_CFR_H + +#include + +/* Values must match nb/sandybridge/Kconfig */ +enum { + IGD_UMA_SIZE_32MB, + IGD_UMA_SIZE_64MB, + IGD_UMA_SIZE_96MB, + IGD_UMA_SIZE_128MB, +}; + +/* IGD UMA Size */ +static const struct sm_object gfx_uma_size = SM_DECLARE_ENUM({ + .opt_name = "gfx_uma_size", + .ui_name = "IGD UMA Size", + .ui_helptext = "Size of memory preallocated for internal graphics.", + .default_value = CONFIG_IGD_DEFAULT_UMA_INDEX, + .values = (const struct sm_enum_value[]) { + { " 32MB", IGD_UMA_SIZE_32MB }, + { " 64MB", IGD_UMA_SIZE_64MB }, + { " 96MB", IGD_UMA_SIZE_96MB }, + { "128MB", IGD_UMA_SIZE_128MB }, + SM_ENUM_VALUE_END }, +}); + +#endif /* NB_SANDYBRIDGE_CFR_H */