summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/via/vx900/northbridge.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/northbridge/via/vx900/northbridge.c b/src/northbridge/via/vx900/northbridge.c
index d865f388cd..260bd3de05 100644
--- a/src/northbridge/via/vx900/northbridge.c
+++ b/src/northbridge/via/vx900/northbridge.c
@@ -266,8 +266,15 @@ static void vx900_set_resources(struct device *dev)
* to be always mapped to the top of 1M, but this can be overcome with
* some smart positive/subtractive resource decoding */
ram_resource(dev, idx++, 768, (tolmk - 768));
- uma_memory_size = fbufk << 10;
- uma_memory_base = tolmk << 10;
+
+ uma_memory_size = (uint64_t)fbufk << 10;
+ uma_memory_base = (uint64_t)tolmk << 10;
+
+ if (uma_memory_size > UINT32_MAX)
+ die("uma_memory_size %llu exceeds 32-bit address range\n", uma_memory_size);
+
+ if (uma_memory_base > UINT32_MAX)
+ die("uma_memory_base %llu exceeds 32-bit address range\n", uma_memory_base);
//uma_resource(dev, idx++, uma_memory_base>>10, uma_memory_size>>10);