Bug 16035 - X1650Pro not working as secondary card (atombios problem)
Summary: X1650Pro not working as secondary card (atombios problem)
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-20 06:54 UTC by Ondrej Zary
Modified: 2010-10-22 00:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
log from failed second X start (39.20 KB, text/plain)
2008-05-28 04:46 UTC, Ondrej Zary
no flags Details
X1650Pro as secondary - 1st correct start (305.45 KB, text/plain)
2008-05-29 01:00 UTC, Ondrej Zary
no flags Details
X1650Pro as secondary - 2nd correct start (310.87 KB, text/plain)
2008-05-29 01:00 UTC, Ondrej Zary
no flags Details
X1650Pro as secondary - 3rd correct start (275.39 KB, text/plain)
2008-05-29 01:01 UTC, Ondrej Zary
no flags Details
X1650Pro as primary - 1st correct start (465.07 KB, text/plain)
2008-05-29 01:08 UTC, Ondrej Zary
no flags Details
X1650Pro as primary - 2nd correct start (387.32 KB, text/x-java)
2008-05-29 01:08 UTC, Ondrej Zary
no flags Details
X1650Pro as primary - 3rd failed start (280.02 KB, text/plain)
2008-05-29 01:09 UTC, Ondrej Zary
no flags Details

Description Ondrej Zary 2008-05-20 06:54:56 UTC
rhdAtomInit() function fails if the card is not primary as it assumes that BIOS is mapped to 0xC0000, which is not true.
Comment 1 Ondrej Zary 2008-05-21 01:56:54 UTC
After looking more into this problem, 0xC00000 is probably OK (don't know details about POSTing non-primary VGA cards but looks like VGA is enabled so this can work).

The problem is that after POSTing, the ATOM signature disappears from the BIOS! I've dumper the BIOS from the rhdAtomGetDataTable() function using this code:

    if (atom_romhdr_off + sizeof(ATOM_ROM_HEADER) > BIOSImageSize) {
        xf86DrvMsg(scrnIndex,X_ERROR,
                   "%s: AtomROM header extends beyond BIOS image\n",__func__);
        return FALSE;
    }

+    FILE *f = fopen("/opt/rom.bin","w");
+    fwrite(base, 1, BIOSImageSize,f);
+    fclose(f);

    if (memcmp("ATOM",&atom_rom_hdr->uaFirmWareSignature,4)) {

When the card is primary, the file is 64512 bytes, contains ATOM signature and works. When the card is secondary, the file is only 49152 bytes and the ATOM signature is missing (see attachment).

Log says:
(II) RADEON(0): initializing int10
(II) Attempted to read BIOS 128KB from /sys/bus/pci/devices/0000:01:00.0/rom: got 63KB
(--) RADEON(0): Chipset: "ATI Radeon X1650" (ChipID = 0x71c1)
(WW) RADEON(0): R500 support is under development. Please report any issues to xorg-driver-ati@lists.x.org
(--) RADEON(0): Linear framebuffer at 0x00000000c0000000
(--) RADEON(0): BIOS at 0xfe7c0000
(II) RADEON(0): PCIE card detected
(II) RADEON(0): ATOM BIOS detected
(II) RADEON(0): Getting BIOS copy from legacy VBIOS location
(EE) RADEON(0): rhdAtomGetDataTable: No AtomBios signature found
(II) RADEON(0): Query for AtomBIOS Init: failed
(II) RADEON(0): Query for AtomBIOS Set FB Space: failed
Comment 2 Ondrej Zary 2008-05-21 02:00:27 UTC
(In reply to comment #1)
> After looking more into this problem, 0xC00000 is probably OK (don't know
> details about POSTing non-primary VGA cards but looks like VGA is enabled so
> this can work).

Sorry, my bad. It's not OK. The file is 49152 because it's ROM of the primary card. No wonder there's no ATOM signature there.
Comment 3 Alex Deucher 2008-05-21 06:20:12 UTC
There's special trickery needed for reading the rom on secondary cards.  I should have a patch committed soon.
Comment 4 Alex Deucher 2008-05-27 14:11:34 UTC
this should be fixed in 965a5dbcd9dc4bf1cdd7f2bbdec15e9733b2e090 at least with libpciaccess.
Comment 5 Ondrej Zary 2008-05-28 04:40:25 UTC
Thank you, I confirm that the bug is now fixed. The radeon driver can now initialize two non-primary X1650Pro cards. Tested without libpciaccess.
Comment 6 Ondrej Zary 2008-05-28 04:45:06 UTC
But shutting down the X server and trying to start it again, it does not work - it's again not able to load the BIOS (see the attached log).
Comment 7 Ondrej Zary 2008-05-28 04:46:01 UTC
Created attachment 16786 [details]
log from failed second X start
Comment 8 Alex Deucher 2008-05-28 06:07:05 UTC
Can you try again with my latest commit?  Also, you may have better luck with a libpciaccess enabled xserver.
Comment 9 Ondrej Zary 2008-05-29 00:59:03 UTC
Testing version with last commit "RADEON: don't enable legacy bios table based init yet", now with only 2 cards in the machine: X1650Pro and R7000. R7000 is not configured at all in X, only primary card option is changed in BIOS SETUP.

X1650Pro as secondary card: I can shut down and start X server and it works.

X1650Pro as primary card: only 2 cycles work, X hangs when starting for the 3rd time
Comment 10 Ondrej Zary 2008-05-29 01:00:13 UTC
Created attachment 16800 [details]
X1650Pro as secondary - 1st correct start
Comment 11 Ondrej Zary 2008-05-29 01:00:44 UTC
Created attachment 16801 [details]
X1650Pro as secondary - 2nd correct start
Comment 12 Ondrej Zary 2008-05-29 01:01:15 UTC
Created attachment 16802 [details]
X1650Pro as secondary - 3rd correct start
Comment 13 Ondrej Zary 2008-05-29 01:08:06 UTC
Created attachment 16803 [details]
X1650Pro as primary - 1st correct start
Comment 14 Ondrej Zary 2008-05-29 01:08:34 UTC
Created attachment 16804 [details]
X1650Pro as primary - 2nd correct start
Comment 15 Ondrej Zary 2008-05-29 01:09:04 UTC
Created attachment 16805 [details]
X1650Pro as primary - 3rd failed start
Comment 16 Alex Deucher 2010-10-19 16:25:58 UTC
Is this still an issue with KMS?
Comment 17 Ondrej Zary 2010-10-22 00:22:08 UTC
I cannot test this anymore.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.