<p>Nico Huber <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/20599">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Nico Huber: Verified
Paul Menzel: Looks good to me, but someone else must approve
Arthur Heymans: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gma: Move GTT constants into GMA.Config<br><br>Change-Id: Ie4b017f26b658c1818f90701089ce5d3171e4953<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>Reviewed-on: https://review.coreboot.org/20599<br>Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net><br>Reviewed-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>M common/hw-gfx-gma-config.ads.template<br>M common/hw-gfx-gma-registers.adb<br>M common/hw-gfx-gma-registers.ads<br>3 files changed, 22 insertions(+), 23 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template<br>index f40054c..dea26b8 100644<br>--- a/common/hw-gfx-gma-config.ads.template<br>+++ b/common/hw-gfx-gma-config.ads.template<br>@@ -268,4 +268,20 @@<br> HDMI_Max_Clock_24bpp : constant Frequency_Type :=<br> (if CPU >= Haswell then 300_000_000 else 225_000_000);<br> <br>+ ----------------------------------------------------------------------------<br>+<br>+ GTT_Offset : constant := (case CPU is<br>+ when Ironlake .. Haswell => 16#0020_0000#,<br>+ when Broadwell .. Skylake => 16#0080_0000#);<br>+<br>+ GTT_Size : constant := (case CPU is<br>+ when Ironlake .. Haswell => 16#0020_0000#,<br>+ -- Limit Broadwell to 4MiB to have a stable<br>+ -- interface (i.e. same number of entries):<br>+ when Broadwell .. Skylake => 16#0040_0000#);<br>+<br>+ GTT_PTE_Size : constant := (case CPU is<br>+ when Ironlake .. Haswell => 4,<br>+ when Broadwell .. Skylake => 8);<br>+<br> end HW.GFX.GMA.Config;<br>diff --git a/common/hw-gfx-gma-registers.adb b/common/hw-gfx-gma-registers.adb<br>index 3c4ad57..e240152 100644<br>--- a/common/hw-gfx-gma-registers.adb<br>+++ b/common/hw-gfx-gma-registers.adb<br>@@ -12,16 +12,15 @@<br> -- GNU General Public License for more details.<br> --<br> <br>-with System.Storage_Elements;<br>-<br> with HW.Time;<br> with HW.MMIO_Range;<br> pragma Elaborate_All (HW.MMIO_Range);<br> <br>+with HW.GFX.GMA.Config;<br>+<br> with HW.Debug;<br> with GNAT.Source_Info;<br> <br>-use type System.Address;<br> use type HW.Word64;<br> <br> package body HW.GFX.GMA.Registers<br>@@ -47,28 +46,13 @@<br> <br> ----------------------------------------------------------------------------<br> <br>- GTT_Offset : constant := (case Config.CPU is<br>- when Ironlake .. Haswell => 16#0020_0000#,<br>- when Broadwell .. Skylake => 16#0080_0000#);<br>-<br>- GTT_Size : constant := (case Config.CPU is<br>- when Ironlake .. Haswell => 16#0020_0000#,<br>- -- Limit Broadwell to 4MiB to have a stable<br>- -- interface (i.e. same number of entries):<br>- when Broadwell .. Skylake => 16#0040_0000#);<br>-<br>- GTT_PTE_Size : constant := (case Config.CPU is<br>- when Ironlake .. Haswell => 4,<br>- when Broadwell .. Skylake => 8);<br>-<br>-<br>- type GTT_PTE_Type is mod 2 ** (GTT_PTE_Size * 8);<br>+ type GTT_PTE_Type is mod 2 ** (Config.GTT_PTE_Size * 8);<br> type GTT_Registers_Type is array (GTT_Range) of GTT_PTE_Type<br> with<br> Volatile_Components,<br>- Size => GTT_Size * 8;<br>+ Size => Config.GTT_Size * 8;<br> package GTT is new MMIO_Range<br>- (Base_Addr => Config.Default_MMIO_Base + GTT_Offset,<br>+ (Base_Addr => Config.Default_MMIO_Base + Config.GTT_Offset,<br> Element_T => GTT_PTE_Type,<br> Index_T => GTT_Range,<br> Array_T => GTT_Registers_Type);<br>@@ -310,7 +294,7 @@<br> is<br> begin<br> Regs.Set_Base_Address (Base);<br>- GTT.Set_Base_Address (Base + GTT_Offset);<br>+ GTT.Set_Base_Address (Base + Config.GTT_Offset);<br> end Set_Register_Base;<br> <br> end HW.GFX.GMA.Registers;<br>diff --git a/common/hw-gfx-gma-registers.ads b/common/hw-gfx-gma-registers.ads<br>index f3825ea..e526417 100644<br>--- a/common/hw-gfx-gma-registers.ads<br>+++ b/common/hw-gfx-gma-registers.ads<br>@@ -14,7 +14,6 @@<br> <br> with System;<br> with HW.GFX.GMA;<br>-with HW.GFX.GMA.Config;<br> <br> private package HW.GFX.GMA.Registers<br> with<br></pre><p>To view, visit <a href="https://review.coreboot.org/20599">change 20599</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20599"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: libgfxinit </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ie4b017f26b658c1818f90701089ce5d3171e4953 </div>
<div style="display:none"> Gerrit-Change-Number: 20599 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> </div>
<div style="display:none"> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net> </div>