Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/c/libgfxinit/+/27061 )
Change subject: gma config: Limit types of CPU and CPU_Var ......................................................................
gma config: Limit types of CPU and CPU_Var
Limit the range of values for `CPU` and `CPU_Var` based on the generation.
Change-Id: Ibeca7d0fb5cbc617a0819448e78d406793c6f866 Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/27061 Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M common/hw-gfx-gma-config.ads.template 1 file changed, 23 insertions(+), 2 deletions(-)
Approvals: Nico Huber: Verified Arthur Heymans: Looks good to me, approved
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template index 8f231e0..6033dc0 100644 --- a/common/hw-gfx-gma-config.ads.template +++ b/common/hw-gfx-gma-config.ads.template @@ -19,9 +19,30 @@
Gen : constant Generation := <<GEN>>;
- CPU : constant CPU_Type := <<CPU>>; + CPU_First : constant CPU_Type := + (case Gen is + when G45 => G45, + when Ironlake => Ironlake, + when Haswell => Haswell, + when Broxton => Broxton, + when Skylake => Skylake); + CPU_Last : constant CPU_Type := + (case Gen is + when G45 => G45, + when Ironlake => Ivybridge, + when Haswell => Broadwell, + when Broxton => Broxton, + when Skylake => Skylake); + CPU_Var_Last : constant CPU_Variant := + (case Gen is + when Haswell | Skylake => ULT, + when others => Normal); + subtype Gen_CPU_Type is CPU_Type range CPU_First .. CPU_Last; + subtype Gen_CPU_Variant is CPU_Variant range Normal .. CPU_Var_Last;
- CPU_Var : constant CPU_Variant := <<CPU_VARIANT>>; + CPU : constant Gen_CPU_Type := <<CPU>>; + + CPU_Var : constant Gen_CPU_Variant := <<CPU_VARIANT>>;
Internal_Display : constant Internal_Type := <<INTERNAL_PORT>>;