Attached is the possible initialization we lack for r3xx chipset, might also
be usefull for r4xx. I am still not 100% confident that this solve lockup but
i have been able to run things a lot longuer than before without lockup.
Thus i want other people to test this and report if this solve any lockup
they might experience with r3xx/r4xx and DRI.
To use this change the #define ADDR to your card ADDR (use lspci -v)
then gcc r300init.c -o initr300 quit any X, go the console run sync, launch
the program (as root) rerun X and test with app which used to lockup.
You will have to press several time a key to go over initialization
step in the program if it lockup your computer please report last
things you see printed.
Report your status.
PS: Sorry for cross posting but i wanted to have as many tester as possible.
best,
Jerome Glisse
To get the ADDR use lspci -v then this is second Memory at line of your
graphic card for example:
0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV350 NJ
[Radeon 98 00 XT] (prog-if 00 [VGA])
Subsystem: Micro-Star International Co., Ltd.: Unknown device 9560
Flags: bus master, stepping, 66MHz, medium devsel, latency 64, IRQ 177
Memory at f0000000 (32-bit, prefetchable) [size=128M]
I/O ports at c000 [size=256]
Memory at fe9f0000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at fe9c0000 [disabled] [size=128K]
Capabilities: <available only to root>
#define ADDR 0xfe9f0000
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
/**
* MMIO address
*/
#define ADDR 0xfe9e0000
#define SIZE (64 * 1024)
#define READ(A,V) \
read = ptr[A>>2]; \
if (read != V) { \
printf("RD error 0x%08X get 0x%08X\n", V, read); \
getchar(); \
}
/* Read PLL register */
#define RADEON_CLOCK_CNTL_INDEX 0x00000008
#define RADEON_CLOCK_CNTL_DATA 0x0000000C
unsigned long RADEONINPLL(unsigned long *ptr, unsigned long addr)
{
unsigned long read, save;
/* A few dummy reads of CRTC_GEN_CNTL and CLOCK_CNTL_DATA
* are used as workarounds for buggy rv200 & similar chips
* before and after accesses to CLOCK_CNTL_INDEX
*/
save = ptr[RADEON_CLOCK_CNTL_INDEX>>2];
ptr[RADEON_CLOCK_CNTL_INDEX>>2] = addr;
read = ptr[RADEON_CLOCK_CNTL_DATA>>2];
ptr[RADEON_CLOCK_CNTL_INDEX>>2] = save;
return read;
}
void RADEONOUTPLL(unsigned long *ptr, unsigned long addr, unsigned long value)
{
unsigned long save;
/* A few dummy reads of CRTC_GEN_CNTL and CLOCK_CNTL_DATA
* are used as workarounds for buggy rv200 & similar chips
* before and after accesses to CLOCK_CNTL_INDEX
*/
save = ptr[RADEON_CLOCK_CNTL_INDEX>>2];
ptr[RADEON_CLOCK_CNTL_INDEX>>2] = addr;
ptr[RADEON_CLOCK_CNTL_DATA>>2] = value;
ptr[RADEON_CLOCK_CNTL_INDEX>>2] = save;
}
int main(int argc, char *argv[])
{
int mem;
unsigned long *ptr = NULL;
unsigned long write, read;
/* initialize */
sleep(1);
if((mem = open("/dev/mem", O_RDWR)) == -1){
printf("open failed\n");
return -1;
}
ptr = mmap(NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, mem, ADDR);
if (ptr == NULL) {
perror("map");
}
printf("MAPPING OK...\n");
sleep(1);
#if 0
0x00000010 -> 0x00000004
0x00000B00 -> 0x00000000
0x00000010 -> 0x00000004
0x0000023C -> 0x00000000
0x00000010 -> 0x00000004
0x0000033C -> 0x00000000
0x00000010 -> 0x00000004
0x0000007C -> 0x00000000
0x00000010 -> 0x00000004
0x000003F8 -> 0x04000000
0x00000010 -> 0x00000004
0x00000D64 -> 0x30000008
0x00000010 -> 0x00000004
0x00000010 -> 0x00000004
0x00000010 -> 0x00000004
0x00000020 -> 0x02000002
0x00000010 -> 0x00000004
0x00000024 -> 0x02000002
0x00000010 -> 0x00000004
0x00000028 -> 0x00010000
0x00000010 -> 0x00000004
0x00000148 -> 0x1FFF0000
0x00000010 -> 0x00000004
0x0000014C -> 0x27FF2000
0x000000E0 -> 0x00020100
0x000000A0 <- 0x00000000
0x000000A4 <- 0xFFFFFFFF
0x000000A4 -> 0x00000000
0x000000E8 -> 0x00000000
0x00000198 -> 0x00000101
0x00000198 <- 0x00000101
0x000001A0 -> 0x00000001
0x000001A0 <- 0x00000001
0x00000288 -> 0x01000008
0x00000288 <- 0x01000008
0x000001A4 -> 0x0003385D
0x00000288 <- 0x01000008
0x00000174 -> 0x00000000
0x000000E4 -> 0x309900A0
0x00000020 -> 0x02000002
0x00000024 -> 0x02000002
0x00000050 -> 0x02000200
0x00000200 -> 0x004F005F
0x00000008 -> 0x00000388
0x00000008 <- 0x00000302
0x0000000C -> 0x0000BF00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030C
0x0000000C -> 0x0400BC30
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030E
0x0000000C -> 0x0400BC00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030B
0x0000000C -> 0x48001600
0x00000008 <- 0x00000388
0x00000030 <- 0x5133A2A0
0x00000030 -> 0x5133A2A0
0x00000030 <- 0x5133A2A0
0x000000EC <- 0x0000444F
0x00000050 <- 0x04000000
0x000003F8 <- 0x04000000
0x00000050 -> 0x04000000
0x00000050 <- 0x04000000
0x000003F8 -> 0x04000000
0x000003F8 <- 0x04000000
0x00000058 <- 0xFF000002
0x00000280 <- 0x00000000
0x0000007C <- 0x00000000
0x00000888 <- 0x00000000
0x00000058 -> 0xFF000002
0x00000058 <- 0xFF000002
0x00000168 -> 0x0F071112
0x00000168 <- 0x0F071112
0x00000188 -> 0x00923DEF
0x00000188 <- 0x00923DEF
0x00000178 <- 0x00004029
0x0000017C <- 0x0BBC0BBC
0x000001F8 <- 0x00000124
0x000001FC <- 0x0BBC0BBC
0x000001F8 <- 0x00000118
0x000001FC <- 0x04F460D6
0x000001F8 <- 0x00000119
0x000001FC <- 0xC88A8441
0x000001F8 <- 0x0000011B
0x000001FC <- 0xC88A8441
0x000001F8 <- 0x0000011D
0x000001FC <- 0xC88A8441
0x000001F8 <- 0x0000011F
0x000001FC <- 0xC88A8441
0x000001F8 <- 0x00000121
0x000001FC <- 0x00009249
0x000001F8 <- 0x0000011A
0x000001FC <- 0x141557FF
0x000001F8 <- 0x0000011C
0x000001FC <- 0x141557FF
0x000001F8 <- 0x0000011E
0x000001FC <- 0x141557FF
0x000001F8 <- 0x00000120
0x000001FC <- 0x141557FF
0x000001F8 <- 0x00000126
0x000001FC <- 0x40001B03
0x000001F8 <- 0x0000012F
0x000001FC <- 0x00492492
0x000001F8 <- 0x00000125
0x000001FC <- 0x2222FFFF
0x000001F8 <- 0x00000000
0x00000D00 -> 0x5B300600
0x00000D00 <- 0x5B300600
0x00000AA0 <- 0x6000037D
0x00000118 <- 0x0008BBBB
0x000001C0 -> 0x0BFF0080
0x000001C0 <- 0x0BFF0080
0x00000024 <- 0x02000002
0x00000008 -> 0x00000388
0x00000008 <- 0x00000381
0x0000000C <- 0x00008001
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038D
0x0000000C <- 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x000003B5
0x0000000C <- 0x00000707
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000392
0x0000000C <- 0xAA3F0000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000388
0x0000000C <- 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x000003AD
0x0000000C <- 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000039F
0x0000000C <- 0x00003000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000383
0x0000000C <- 0x0000000C
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038A
0x0000000C <- 0x01383204
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x000003A4
0x0000000C <- 0x00000001
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x000003A5
0x0000000C <- 0x00000042
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038E
0x0000000C <- 0x0400BC02
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038E
0x0000000C <- 0x0400BC03
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038C
0x0000000C <- 0x0400BC33
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000382
0x0000000C <- 0x0000BF00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000390
0x0000000C <- 0x000000FF
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030E
0x0000000C -> 0x0400BC03
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038E
0x0000000C <- 0x0400BC01
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030E
0x0000000C -> 0x0400BC01
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038E
0x0000000C <- 0x0400BC00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000392
0x0000000C <- 0xAA3F1212
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030C
0x0000000C -> 0x0400BC33
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038C
0x0000000C <- 0x0400BC32
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000030C
0x0000000C -> 0x0400BC32
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038C
0x0000000C <- 0x0400BC30
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000395
0x0000000C <- 0xC0000007
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000038D
0x0000000C <- 0x00000002
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000308
0x0000000C -> 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000388
0x0000000C <- 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000302
0x0000000C -> 0x0000BF00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000382
0x0000000C <- 0x0000BF03
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000384
0x0000000C <- 0x0003005A
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000385
0x0000000C <- 0x00030065
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000386
0x0000000C <- 0x00030065
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000387
0x0000000C <- 0x00030065
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000302
0x0000000C -> 0x0000BF03
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000382
0x0000000C <- 0x0000BF01
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000302
0x0000000C -> 0x0000BF01
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000382
0x0000000C <- 0x0000BF00
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000308
0x0000000C -> 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000388
0x0000000C <- 0x00000003
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x0000032D
0x0000000C -> 0x00000000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x000003AD
0x0000000C <- 0x00040000
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000301
0x0000000C -> 0x00008001
0x00000008 <- 0x00000388
0x00000008 -> 0x00000388
0x00000008 <- 0x00000381
0x0000000C <- 0x00008011
0x00000008 <- 0x00000388
0x00000140 <- 0x00000022
0x00000184 <- 0x01E3C78F
0x000001F8 <- 0x00000122
0x000001FC <- 0x0000554F
0x0000014C <- 0x27FF2000
0x00000148 <- 0x1FFF0000
0x00000180 <- 0x0F000000
0x00000154 <- 0xF0000000
0x0000018C <- 0x4F304F30
0x000001F8 <- 0x00000123
0x000001FC <- 0x4F304F30
0x00000144 <- 0x1A29A222
0x00000188 <- 0x00923DEF
0x00000188 -> 0x00923DEF
0x00000188 <- 0x00923DEF
0x00000158 <- 0x30420042
0x00000910 <- 0x00000004
0x000003E8 <- 0x000F5474
0x00000010 -> 0x00000004
0x00000010 <- 0x00000004
0x00000D64 -> 0x30000008
0x00000D64 <- 0x30000008
0x000002A4 <- 0x10000040
0x000002A8 <- 0x000B01CB
0x00000D64 -> 0x30000008
0x00000D64 <- 0x3000000A
0x00000D64 -> 0x3000000A
0x00000D64 <- 0x3000000A
0x00000800 -> 0x400A0653
0x00000800 <- 0x400A0653
0x00000D10 -> 0x01000000
0x00000D10 <- 0x11000000
0x000004DC -> 0x00000108
0x000004DC <- 0x00000108
0x0000088C -> 0x07760142
0x0000088C <- 0x07760142
0x00000D04 -> 0x00000706
0x00000D04 <- 0x00000706
0x000002F0 <- 0x20204F4F
0x000003F0 <- 0x20204F4F
0x000001A0 -> 0x00000001
0x000001A0 <- 0x00000001
0x00000198 -> 0x00000101
0x00000198 <- 0x00000101
0x0000019C -> 0x00000001
0x0000019C <- 0x00000001
#endif
printf("S 01\n"); getchar();
READ(0x00000150, 0x0000001F);
ptr[0x000001F8>>2] = 0x0000011A;
ptr[0x000001FC>>2] = 0x151557FF;
ptr[0x000001F8>>2] = 0x0000011C;
ptr[0x000001FC>>2] = 0x151557FF;
ptr[0x000001F8>>2] = 0x0000011E;
ptr[0x000001FC>>2] = 0x151557FF;
ptr[0x000001F8>>2] = 0x00000120;
ptr[0x000001FC>>2] = 0x151557FF;
ptr[0x000001F8>>2] = 0x0000011A;
READ(0x000001FC, 0x151557FF);
read = read & 0xFEFFFFFF; /* 0x141557FF */
ptr[0x000001FC>>2] = read;
ptr[0x000001F8>>2] = 0x0000011C;
READ(0x000001FC, 0x151557FF);
read = read & 0xFEFFFFFF; /* 0x141557FF */
ptr[0x000001FC>>2] = read;
ptr[0x000001F8>>2] = 0x0000011E;
READ(0x000001FC, 0x151557FF);
read = read & 0xFEFFFFFF; /* 0x141557FF */
ptr[0x000001FC>>2] = read;
ptr[0x000001F8>>2] = 0x00000120;
READ(0x000001FC, 0x151557FF);
read = read & 0xFEFFFFFF; /* 0x141557FF */
ptr[0x000001FC>>2] = read;
printf("S 02\n"); getchar();
/**
READ(0x00000050, 0x04000000);
ptr[0x00000050>>2] = 0x04000000;
READ(0x000003F8, 0x04000000);
ptr[0x000003F8>>2] = 0x04000000;
/**/
ptr[0x00000140>>2] = 0x00000022;
#if 0
printf("S 02 00\n"); getchar();
READ(0x00000158, 0x30420042);
printf("READ 0x%08X\n", read);
read = read & 0xEFFFFF0F | 0x1000; /* 0x20421002 */
printf("GWRI 0x%08X\n", read); getchar();
ptr[0x00000158>>2] = read;
printf("S 02 01\n"); getchar();
READ(0x00000158, 0x20421002);
read = read & 0xEFFFFFFF | 0x80000000; /* 0xA0421002 */
ptr[0x00000158>>2] = read;
READ(0x00000150, 0x0000001F);
READ(0x00000150, 0x0000001F);
printf("S 02 02\n"); getchar();
READ(0x00000158, 0xA0421002);
read = read & 0x2FFF0FFF | 0x140; /* 0x20420142 */
ptr[0x00000158>>2] = read;
printf("S 02 03\n"); getchar();
READ(0x00000158, 0x20420142);
read = read & 0xEFFF0FFF | 0xA0000000; /* 0xA0420142 */
ptr[0x00000158>>2] = read;
printf("S 03\n"); getchar();
READ(0x00000150, 0x0000001F);
READ(0x00000150, 0x0000001F);
READ(0x00000158, 0xA0420142);
read = read & 0x2FFFF0FF; /* 0x20420042 */
ptr[0x00000158>>2] = read;
READ(0x00000158, 0x20420042);
read = read & 0xEFFFF0FF | 0xA0000000; /* 0xA0420042 */
ptr[0x00000158>>2] = read;
READ(0x00000150, 0x0000001F);
READ(0x00000150, 0x0000001F);
READ(0x00000158, 0xA0420042);
read = read & 0xA0FF00FF | 0xA0000000; /* 0xA0420042 */
ptr[0x00000158>>2] = read;
READ(0x00000158, 0x30420042);
read = read & 0x20FF00A7 | 0x000000A7; /* 0x204200A7 */
ptr[0x00000158>>2] = read;
READ(0x00000158, 0x204200A7);
read = read & 0x20FF00A7 | 0xA00000A7; /* 0xA04200A7 */
ptr[0x00000158>>2] = read;
READ(0x00000150, 0x0000001F);
READ(0x00000158, 0xA04200A7);
read = read & 0x30FF0042 | 0x30000042; /* 0x30420042 */
ptr[0x00000158>>2] = read;
#endif
printf("S 04\n"); getchar();
READ(0x00000140, 0x00000022);
ptr[0x00000140>>2] = 0x00000022;
/*
READ(0x0000023C, 0x00000000);
READ(0x00000140, 0x00000022);
READ(0x000000F8, 0x08000000);
ptr[0x000000F8>>2] = 0x08000000;
ptr[0x00000148>>2] = 0xFFFF0000;
ptr[0x0000023C>>2] = 0xF0000000;
ptr[0x0000033C>>2] = 0xF0000000;
ptr[0x00000148>>2] = 0xF7FFF000;
ptr[0x00000050>>2] = 0x04000000;
ptr[0x000003F8>>2] = 0x04000000;
/**/
ptr[0x00000000>>2] = 0x80000000;
ptr[0x00000004>>2] = 0x00000720;
ptr[0x00000000>>2] = 0x80000080;
ptr[0x00000004>>2] = 0x00000720;
/*
READ(0x00000050, 0x04000000);
ptr[0x00000050>>2] = 0x00000000;
/**/
ptr[0x00000030>>2] = 0x5133A3A0;
printf("S 05\n"); getchar();
/* 0xA0011100 */
read = RADEONINPLL(ptr, 0x00000314);
/* 0xA0011500 */
read = read | 0x00000500;
RADEONOUTPLL(ptr, 0x00000394, read);
/* 0xC0000007 */
read = RADEONINPLL(ptr, 0x00000315);
/* 0xC0000007 */
read = read;
RADEONOUTPLL(ptr, 0x00000395, read);
printf("S 06\n"); getchar();
/* 0xAA3F1212 */
read = RADEONINPLL(ptr, 0x00000312);
/* 0xAA031212 */
read = read & 0xFF03FFFF;
RADEONOUTPLL(ptr, 0x00000392, read);
ptr[0x00000118>>2] = 0x0008BBBB;
/* 0x00000002 */
read = RADEONINPLL(ptr, 0x0000030D);
/* 0x00810002 */
read = read | 0x00810000;
RADEONOUTPLL(ptr, 0x0000038D, read);
READ(0x00003428, 0x00020100);
/* 0x00020100 */
ptr[0x00003428>>2] = read;
/* cleanup */
if(munmap(ptr, SIZE) == -1) {
perror("munmap");
}
close(mem);
return 0;
}
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel