summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/gm45/ram_calc.c2
-rw-r--r--src/northbridge/intel/i945/ram_calc.c2
-rw-r--r--src/northbridge/intel/x4x/ram_calc.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/northbridge/intel/gm45/ram_calc.c b/src/northbridge/intel/gm45/ram_calc.c
index c72055fb3a..c1307c48f5 100644
--- a/src/northbridge/intel/gm45/ram_calc.c
+++ b/src/northbridge/intel/gm45/ram_calc.c
@@ -39,7 +39,7 @@ u32 decode_igd_memory_size(const u32 gms)
static const u16 ggc2uma[] = { 0, 1, 4, 8, 16, 32, 48, 64, 128, 256,
96, 160, 224, 352 };
- if (gms > ARRAY_SIZE(ggc2uma))
+ if (gms >= ARRAY_SIZE(ggc2uma))
die("Bad Graphics Mode Select (GMS) setting.\n");
return ggc2uma[gms] << 10;
diff --git a/src/northbridge/intel/i945/ram_calc.c b/src/northbridge/intel/i945/ram_calc.c
index 124a6a8317..752c8f901c 100644
--- a/src/northbridge/intel/i945/ram_calc.c
+++ b/src/northbridge/intel/i945/ram_calc.c
@@ -82,7 +82,7 @@ u32 decode_igd_memory_size(const u32 gms)
static const u16 ggc2uma[] = { 0, 1, 4, 8, 16, 32,
48, 64 };
- if (gms > ARRAY_SIZE(ggc2uma))
+ if (gms >= ARRAY_SIZE(ggc2uma))
die("Bad Graphics Mode Select (GMS) setting.\n");
return ggc2uma[gms] << 10;
diff --git a/src/northbridge/intel/x4x/ram_calc.c b/src/northbridge/intel/x4x/ram_calc.c
index 8f9d739aea..371496985f 100644
--- a/src/northbridge/intel/x4x/ram_calc.c
+++ b/src/northbridge/intel/x4x/ram_calc.c
@@ -36,7 +36,7 @@ u32 decode_igd_memory_size(const u32 gms)
static const u16 ggc2uma[] = { 0, 1, 4, 8, 16,
32, 48, 64, 128, 256, 96, 160, 224, 352 };
- if (gms > ARRAY_SIZE(ggc2uma))
+ if (gms >= ARRAY_SIZE(ggc2uma))
die("Bad Graphics Mode Select (GMS) setting.\n");
return ggc2uma[gms] << 10;
@@ -47,7 +47,7 @@ u32 decode_igd_gtt_size(const u32 gsm)
{
static const u8 ggc2gtt[] = { 0, 1, 0, 2, 0, 0, 0, 0, 0, 2, 3, 4};
- if (gsm > ARRAY_SIZE(ggc2gtt))
+ if (gsm >= ARRAY_SIZE(ggc2gtt))
die("Bad GTT Graphics Memory Size (GGMS) setting.\n");
return ggc2gtt[gsm] << 10;