[coreboot] gfx_uma_size on GM45
Arthur Heymans
arthur at aheymans.xyz
Thu May 19 12:15:46 CEST 2016
Hi
On gm45 targets there are some option to set different vram option using
the cmos parameter gfx_uma_size. The northbridge code however allows many
more option, ranging for 1M to 352M.
So I tried making them an on option by modifying cmos.default and the
northbridge code that uses those cmos bits.
Now the size of this cmos parameter has to be increased for 3 to 4 bits
to be able to hold all those options.
My problem is that only the 3 smallest bits from the cmos parameter are
used.
The problem is truly there because hardcoding the vram size instead
works fine.
these are the changes I tried (at 256M it forgets highest bit and is
read as 0 in cmos and 1M is used):
--- a/src/mainboard/lenovo/x200/cmos.layout
+++ b/src/mainboard/lenovo/x200/cmos.layout
@@ -77,9 +77,9 @@ entries
940 1 e 1 uwb
# coreboot config options: northbridge
-941 3 e 11 gfx_uma_size
+941 4 e 11 gfx_uma_size
-944 8 h 0 volume
+945 8 h 0 volume
# coreboot config options: check sums
984 16 h 0 check_sum
@@ -125,12 +125,19 @@ enumerations
9 1 Primary
10 0 AHCI
10 1 Compatible
-11 0 32M
-11 1 48M
-11 2 64M
-11 3 128M
-11 5 96M
-11 6 160M
+11 0 1M
+11 1 4M
+11 2 8M
+11 3 16M
+11 4 32M
+11 5 48M
+11 6 64M
+11 7 128M
+11 8 256M
+11 9 96M
+11 10 160M
+11 11 224M
+11 12 352M
--- a/src/northbridge/intel/gm45/igd.c
+++ b/src/northbridge/intel/gm45/igd.c
@@ -153,10 +153,10 @@ void igd_compute_ggc(sysinfo_t *const sysinfo)
/* Graphics Stolen Memory: 2MB GTT (0x0300) when VT-d disabled,
2MB GTT + 2MB shadow GTT (0x0b00) else. */
if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
- /* 0 for 32MB */
- gfxsize = 0;
+ /* 4 for 32MB, default if not set in cmos */
+ gfxsize = 4;
}
- sysinfo->ggc = 0x0300 | ((gfxsize + 5) << 4);
+ sysinfo->ggc = 0x0300 | ((gfxsize + 1) << 4);
if (!(capid & (1 << (48 - 32))))
sysinfo->ggc |= 0x0800;
}
Kind regards
--
Arthur Heymans
More information about the coreboot
mailing list