Skip to content

Commit

Permalink
gma: Add procedure to power up legacy VGA block
Browse files Browse the repository at this point in the history
Calling this is necessary for VGA text mode on at least Skylake, where
the legacy VGA registers are inaccessible otherwise.

Change-Id: I48ba1738bcc7babd4e666e5266f775dcd06b2a3f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/21323
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Nico Huber <nico.h@gmx.de>
  • Loading branch information
n-huber authored and i-c-o-n committed Sep 4, 2017
1 parent 3a0e2a0 commit 42fb2d0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions common/hw-gfx-gma.adb
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,23 @@ is

----------------------------------------------------------------------------

procedure Power_Up_VGA
is
Fake_Config : constant Pipe_Configs :=
(Primary =>
(Port => Analog,
Framebuffer => HW.GFX.Default_FB,
Mode => HW.GFX.Invalid_Mode),
others =>
(Port => Disabled,
Framebuffer => HW.GFX.Default_FB,
Mode => HW.GFX.Invalid_Mode));
begin
Power_And_Clocks.Power_Up (Cur_Configs, Fake_Config);
end Power_Up_VGA;

----------------------------------------------------------------------------

function FB_First_Page (FB : Framebuffer_Type) return Natural is
(Natural (FB.Offset / GTT_Page_Size));
function FB_Pages (FB : Framebuffer_Type) return Natural is
Expand Down
6 changes: 6 additions & 0 deletions common/hw-gfx-gma.ads
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ is
Global => (Input => Init_State);
pragma Warnings (GNATprove, On, "unused variable ""Write_Delay""");

pragma Warnings (GNATprove, Off, "subprogram ""Power_Up_VGA"" has no effect",
Reason => "Effect depends on the platform compiled for");
procedure Power_Up_VGA
with
Pre => Is_Initialized;

procedure Update_Outputs (Configs : Pipe_Configs);

pragma Warnings (GNATprove, Off, "subprogram ""Dump_Configs"" has no effect",
Expand Down

0 comments on commit 42fb2d0

Please sign in to comment.