Hello Angel Pons, Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/35999
to review the following change.
Change subject: gma: Fix GTT size reading for Gen8+ ......................................................................
gma: Fix GTT size reading for Gen8+
It seems the GTT size is not given in MiB any more but as a power of 2 of MiB.
Change-Id: I13e40ad1d389d389c6fab6b2b42895179649f6da Signed-off-by: Nico Huber nico.h@gmx.de --- M common/hw-gfx-gma.adb 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/99/35999/1
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb index 3221e3e..0d4cf15 100644 --- a/common/hw-gfx-gma.adb +++ b/common/hw-gfx-gma.adb @@ -690,8 +690,10 @@ function Stolen_Size_Gen6 (GGC : Word16) return Stolen_Size_Range is (Stolen_Size_Range (Shift_Right (GGC, 3) and 16#1f#) * 32 * 2 ** 20);
+ function GGMS_Gen8 (GGC : Word16) return Natural is + (Natural (Shift_Right (GGC, 6) and 16#03#)); function GTT_Size_Gen8 (GGC : Word16) return Natural is - (Natural (Shift_Right (GGC, 6) and 16#03#) * 2 ** 20); + (if GGMS_Gen8 (GGC) /= 0 then 2 ** (20 + GGMS_Gen8 (GGC)) else 0);
function GMS_Gen8 (GGC : Word16) return Stolen_Size_Range is (Stolen_Size_Range (Shift_Right (GGC, 8) and 16#ff#));