summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2007-03-18 16:38:26 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-03-21 20:18:52 +0200
commitdfd07b6e99020d1db43d7ce0cae4423d8c6b1f05 (patch)
tree6fc7b3f66593a27d6d35423c213f051204d1cb4d
parente674338a98c50800637b8ebc01adf3aec2a3eb38 (diff)
[mach64] Drop checking that BAR base + size fits in 32 bit.
I can't see how these tests could fail on 32-bit. OTOH they are potentially problematic with 64-bit PCI addresses.
-rw-r--r--src/atipreinit.c5
-rw-r--r--src/atiprobe.c6
2 files changed, 3 insertions, 8 deletions
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 62bd926..f5cf6b3 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -434,10 +434,7 @@ ATIPreInit
/* Set MMIO address from PCI configuration space, if available */
if ((pATI->Block0Base = pVideo->memBase[2]))
{
- if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
- pATI->Block0Base = 0;
- else
- pATI->Block0Base += 0x0400U;
+ pATI->Block0Base += 0x0400U;
}
Block0Base = pATI->Block0Base; /* save */
diff --git a/src/atiprobe.c b/src/atiprobe.c
index 36df11d..13cb2e8 100644
--- a/src/atiprobe.c
+++ b/src/atiprobe.c
@@ -225,8 +225,7 @@ ATIMach64Probe
* further.
*/
if ((pVideo->size[2] >= 12) &&
- (pATI->Block0Base = pVideo->memBase[2]) &&
- (pATI->Block0Base < (CARD32)(-1 << pVideo->size[2])))
+ (pATI->Block0Base = pVideo->memBase[2]))
{
pATI->Block0Base += 0x00000400U;
if (ATIMach64Detect(pATI, ChipType, Chip))
@@ -277,8 +276,7 @@ ATIMach64Probe
CARD16 ChipType = pVideo->chipType;
if ((pATI->CPIODecoding == BLOCK_IO) &&
- ((pVideo->size[1] < 8) ||
- (pATI->CPIOBase >= (CARD32)(-1 << pVideo->size[1]))))
+ (pVideo->size[1] < 8))
return NULL;
if (!ATIMach64Detect(pATI, ChipType, Chip))