radeon lockup

Erwin Rol mailinglists at erwinrol.com
Tue Jun 27 15:02:43 PDT 2006


Looking at the error messages i noticed the following line;

(II) Attempted to read BIOS 128KB from /sys/bus/pci/devices/0000:02:05.0/rom: got 2KB

An ls -l of the file shows a 128kb file length, and the BAR for that
region is also 128kb, but it seems that reading the file only returns
2kb. I don't know the reason but it seems some sort of error. When i now
look at the code that does the reading it returns 0 when it can't open
the rom file or it returns the number of bytes read. 

the code that calls the function does the following;

1304 static int
1305 HandlePciBios(PCITAG Tag, int basereg, unsigned char * buf, int
len)
1306 {
1307 int n, num;
1308 CARD32 Acc1, Acc2;
1309 PCITAG *pTag;
1310 int i;
1311 
1312 /* fall back to the old code if the OS code fails */
1313 if (pciOSHandleBIOS) {
1314 n = pciOSHandleBIOS(Tag, basereg, buf, len);
1315 if (n)
1316 return n;
1317 }
1318 
1319 n = handlePciBIOS( Tag, basereg, buf, len );
1320 if (n)
1321 return n;
1322 
1323 num = pciTestMultiDeviceCard(PCI_BUS_FROM_TAG(Tag),
1324 PCI_DEV_FROM_TAG(Tag),
1325 PCI_FUNC_FROM_TAG(Tag),&pTag);
1326 
1327 if (!num) return 0;
1328 
1329 #define PCI_ENA (PCI_CMD_MEM_ENABLE | PCI_CMD_IO_ENABLE)
1330 Acc1 = pciReadLong(Tag, PCI_CMD_STAT_REG);
1331 pciWriteLong(Tag, PCI_CMD_STAT_REG, (Acc1 & ~PCI_ENA));
1332 
1333 for (i = 0; i < num; i++) {
1334 Acc2 = pciReadLong(pTag[i], PCI_CMD_STAT_REG);
1335 pciWriteLong(pTag[i], PCI_CMD_STAT_REG, (Acc2 | PCI_ENA));
1336 
1337 n = handlePciBIOS( pTag[i], 0, buf, len );
1338 
1339 pciWriteLong(pTag[i], PCI_CMD_STAT_REG, Acc2);
1340 if (n)
1341 break;
1342 }
1343 pciWriteLong(Tag, PCI_CMD_STAT_REG, Acc1);
1344 return n;
1345 }


At line 1315 the return value is not 0, so it returns with the 2k read,
and skips the rest of the function. Could it be that the old (now
skipped) code managed to initialize the card correctly ?

I am updating my old test system to the latest fedora rawhide with the
7.1 Xorg + 6.6.1 radeon driver, and will report later if it hangs this
machine too after the update.

- Erwin






More information about the xorg mailing list