[coreboot-gerrit] Change in libgfxinit[master]: gma config: Initialize stateful configs late
Nico Huber (Code Review)
gerrit at coreboot.org
Wed Jun 13 01:27:43 CEST 2018
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/27066
Change subject: gma config: Initialize stateful configs late
......................................................................
gma config: Initialize stateful configs late
Defer initialization of config variables until GMA.Initialize().
Change-Id: I9192c9a7c4d67e4af7f3e26659489f58998ae832
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M common/hw-gfx-gma-config.ads.template
M common/hw-gfx-gma.adb
M common/hw-gfx-gma.ads
3 files changed, 12 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/66/27066/1
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index a35c81e..50e7e7c 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -13,8 +13,6 @@
--
private package HW.GFX.GMA.Config
-with
- Initializes => Settings
is
Gen : constant Generation := <<GEN>>;
@@ -63,12 +61,11 @@
Valid_Port : Valid_Port_Array;
Raw_Clock : Frequency_Type;
end record;
-
- Settings : Settings_T :=
+ Initial_Settings : constant Settings_T :=
(Valid_Port => (others => False),
- Raw_Clock => Frequency_Type'First)
- with
- Part_Of => GMA.Config_State;
+ Raw_Clock => Frequency_Type'First);
+
+ Settings : Settings_T with Part_Of => GMA.Config_State;
Valid_Port : Valid_Port_Array renames Settings.Valid_Port;
Raw_Clock : Frequency_Type renames Settings.Raw_Clock;
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index cba75d6..0f94010 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -370,13 +370,11 @@
Success : out Boolean)
with
Refined_Global =>
- (In_Out =>
- (Config.Settings, Dev.PCI_State,
- Registers.Register_State, Port_IO.State),
- Input =>
- (Time.State),
+ (Input => (Time.State),
+ In_Out => (Dev.PCI_State, Registers.Register_State, Port_IO.State),
Output =>
- (Dev.Address_State,
+ (Config.Settings,
+ Dev.Address_State,
Registers.Address_State,
PLLs.State, Panel.Panel_State,
Cur_Configs, Allocated_PLLs,
@@ -444,6 +442,7 @@
Framebuffer => HW.GFX.Default_FB,
Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
+ Config.Settings := Config.Initial_Settings;
PLLs.Initialize;
Dev.Initialize (Success);
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index db7f2bf..7c40dd9 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -25,9 +25,7 @@
Init_State,
Config_State,
(Device_State with External)),
- Initializes =>
- (Init_State,
- Config_State)
+ Initializes => Init_State
is
GTT_Page_Size : constant := 4096;
@@ -101,8 +99,8 @@
Success : out Boolean)
with
Global =>
- (In_Out => (Config_State, Device_State, Port_IO.State),
- Output => (State, Init_State),
+ (In_Out => (Device_State, Port_IO.State),
+ Output => (State, Init_State, Config_State),
Input => (Time.State)),
Post => Success = Is_Initialized;
function Is_Initialized return Boolean
--
To view, visit https://review.coreboot.org/27066
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: I9192c9a7c4d67e4af7f3e26659489f58998ae832
Gerrit-Change-Number: 27066
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/6c9ca0b1/attachment-0001.html>
More information about the coreboot-gerrit
mailing list