[coreboot-gerrit] Change in libgfxinit[master]: gma config: Limit types of CPU and CPU_Var

Nico Huber (Code Review) gerrit at coreboot.org
Wed Jun 13 01:27:40 CEST 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/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 at gmx.de>
---
M common/hw-gfx-gma-config.ads.template
1 file changed, 23 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/61/27061/1

diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index 659832f..5715e3b 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>>;
 

-- 
To view, visit https://review.coreboot.org/27061
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeca7d0fb5cbc617a0819448e78d406793c6f866
Gerrit-Change-Number: 27061
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180612/1ff9a9e9/attachment-0001.html>


More information about the coreboot-gerrit mailing list