[coreboot-gerrit] Change in libgfxinit[master]: hw-gfx-gma.adb: Fix decoding Stolen Memory on Gen4
Arthur Heymans (Code Review)
gerrit at coreboot.org
Tue Sep 12 12:47:34 CEST 2017
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/21514
Change subject: hw-gfx-gma.adb: Fix decoding Stolen Memory on Gen4
......................................................................
hw-gfx-gma.adb: Fix decoding Stolen Memory on Gen4
Stolen memory needs to be decoded in MB.
Change-Id: I1ceb9ffd85d6ebb54a0e099e200a5068c34a6251
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M common/hw-gfx-gma.adb
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/14/21514/1
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index b188f31..9dba073 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -507,7 +507,7 @@
(1, 4, 8, 16, 32, 48, 64, 128, 256, 96, 160, 224, 352);
function Stolen_Size_Gen4 (GGC : Word16) return Stolen_Size_Range is
(if GMS_Gen4 (GGC) in Valid_Stolen_Size_Gen4'Range then
- Valid_Stolen_Size_Gen4 (GMS_Gen4 (GGC)) else 0);
+ Valid_Stolen_Size_Gen4 (GMS_Gen4 (GGC)) * 2 ** 20 else 0);
function GTT_Size_Gen6 (GGC : Word16) return Natural is
(Natural (Shift_Right (GGC, 8) and 16#03#) * 2 ** 20);
@@ -537,7 +537,7 @@
is
GGC_Reg : constant :=
(case Config.CPU is
- when G45 | Ironlake => 16#52#,
+ when G45 | Ironlake => 16#52#,
when Sandybridge .. Skylake => 16#50#);
GGC : Word16;
begin
@@ -575,7 +575,7 @@
Valid :=
FB_Last_Page (FB) < GTT_Size / Config.GTT_PTE_Size and
FB_Last_Page (FB) < Natural (Stolen_Size / GTT_Page_Size) and
- FB_Last_Page (FB) < Aperture_Size / GTT_Page_Size;
+ FB_Last_Page (FB) < Aperture_Size / GTT_Page_Size;
pragma Debug (not Valid, Debug.Put
("Stolen memory too small to hold framebuffer."));
end if;
--
To view, visit https://review.coreboot.org/21514
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ceb9ffd85d6ebb54a0e099e200a5068c34a6251
Gerrit-Change-Number: 21514
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170912/49d067e5/attachment.html>
More information about the coreboot-gerrit
mailing list