summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2010-03-05 14:27:31 -0800
committerAaron Plattner <aplattner@nvidia.com>2010-03-05 14:27:31 -0800
commite34a53167d6a142949b3e0258dc336dc297368aa (patch)
tree2659423a68ff0a9f15b136d66c9ce8a5c86b7a07 /src
parent9378ecd34ad71083602232b56e8810d6cd39b518 (diff)
G80: Cast register reads before shifting them to avoid truncation to 32 bits.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'src')
-rw-r--r--src/g80_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 324e180..abdb37e 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -615,8 +615,8 @@ G80InitHW(ScrnInfoPtr pScrn)
pNv->reg[0x00706460/4] = 0x0000502d;
pNv->reg[0x00706474/4] = 0x00010000;
if(pNv->architecture == 0xaa || pNv->architecture == 0xac) {
- uint64_t base = pNv->reg[0x00100E10/4] << 12;
- size_t size = pNv->reg[0x00100E14/4] << 12;
+ uint64_t base = (uint64_t)pNv->reg[0x00100E10/4] << 12;
+ size_t size = (uint64_t)pNv->reg[0x00100E14/4] << 12;
uint64_t limit = base + size - G80_RESERVED_VIDMEM;
pNv->reg[0x00706480/4] = 0x1a003d;