From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759508AbYESObQ (ORCPT ); Mon, 19 May 2008 10:31:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757918AbYESObD (ORCPT ); Mon, 19 May 2008 10:31:03 -0400 Received: from mail.atlantis.sk ([80.94.52.35]:56788 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757330AbYESObA (ORCPT ); Mon, 19 May 2008 10:31:00 -0400 From: Ondrej Zary To: linux-kernel@vger.kernel.org Subject: unable to access BIOS of Radeon X1650Pro cards (kernel bug?) Date: Mon, 19 May 2008 16:30:53 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805191630.54375.linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I'm debugging a weird problem - it started as inability to use xorg radeon driver on X1650Pro cards. The machine (Asus P5K-V board with latest BIOS and 64-bit, kernel 2.6.25) has 3 VGA cards - one Radeon 7000 PCI card (primary) and two Radeon X1650Pro PCI-E cards. The radeon driver is unable to initialize X1650Pro cards because it's unable to access the BIOS: (II) RADEON(0): initializing int10 (II) Attempted to read BIOS 128KB from /sys/bus/pci/devices/0000:01:00.0/rom: got 0KB Requesting insufficient memory window!: start: 0xfe700000 end: 0xfe7fffff size 0x10000000 (EE) Cannot find empty range to map base to (EE) RADEON(0): Cannot read V_BIOS (3) I tried to read the BIOS using sysfs and it really does not work: # cd /sys/bus/pci/devices/0000:04:00.0 # cat rom # The card seems to be setup correctly: # lspci -vv -s 04:00.0 04:00.0 VGA compatible controller: ATI Technologies Inc Radeon X1650 Pro (rev 9e) Subsystem: PC Partner Limited Device c880 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- #include #include #include #include #include #include int main(void) { int mem_fd; char *mem; FILE *f; /* open /dev/mem */ if ((mem_fd = open("/dev/mem", O_RDWR) ) < 0) { printf("can't open /dev/mem \n"); exit (-1); } /* mmap memory */ mem = mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, 0xfeac0000); if ((long)mem < 0) { printf("mmap error \n"); exit (-1); } f = fopen("dump.bin","w"); fwrite(mem, 1, 131072, f); fclose(f); close(mem_fd); } # cc biosdump.c -o biosdump # ./biosdump # hexdump dump.bin 0000000 aa55 e97e 0277 0000 0000 0000 0000 0000 [...] And now, sysfs magically works! # cd /sys/bus/pci/devices/0000:04:00.0 # hexdump rom 0000000 aa55 e97e 0277 0000 0000 0000 0000 0000 Does anyone know what's going on here? -- Ondrej Zary