Skip to contentSkip to conversation

FLT CBFB on B1000 when accessing second graphics card

parisc-linux Thomas Klinger 3 participants 5 messages Nov 30, 2005 – Dec 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to setup Debian 3.1r0a (sarge) on a B1000 with two graphics card. The first one is the original A4977A Visualize EG rev. 03, as more powerful display card for the graphical desktop we installed a Matrox Millenium II with 2MB RAM. We inserted the card at slot number 5, the first 32-bit slot for PCI devices and marked as secondary graphic card slot.

Now, the setup and everything else went through smoothly, even the first setup of the X server using the original display card went pretty fine, but only with 8-bit colors. That's why we built in the Matrox card. It is recognized by the system and displayed using lspci.

What comes now is that if we try to start the X server using the second card the system switches the card and immediatly fails with the error code FLT CBFB (shown in the front LCD display).

I posted the symptom to debian-hppa and was then forwared by Grant Grundler to this mailing list to post my concern.

The goal of the system is to boot the system with the original card (as is does already), but use the secondary card (Matrox in that case) as display for the desktop environment in 16-bit colors, at least.

Here are the required informations like kernel version, used hardware and hex dump of HPMC:

Kernel version: 2.6.8-2-32-smp #1 SMP parisc GNU/Linux (Debian 3.1r0a)
Hardware: HP Visualize 9000/785/B1000
Remote card: no
Graphical console in use
Palo command line: 2/vmlinux root=3D/dev/sda7 initrd=3D2/initrd.img HOME=3D= /
Kernel is 32-bit (according the versioning, not modified or self-compiled)

Register dumps:
PROCESSOR PIM INFORMATION

----------------- Processor 0 HPMC Information -----------------

Timestamp =3D
Mon Nov 28 16:24:09 GMT 2005 (20: 05: 11: 28: 16: 24: 09)

HPMC Chassis Codes =3D 2cbd0 2500b 2cbfb

General Registers 0 - 31
00-03 0000000000000000 0000000000822218 000000000027da2b 000000000085e=
9a8
04-07 0000000000000ff1 0000000040158ff1 0000000000000001 000000000085e=
9a8
08-11 00000000006ed000 000000000085e9a8 0000000000000000 0000000000000=
002
12-15 00000000007c2a18 00000000006e4800 00000000008485f0 00000000bff00=
168
16-19 00000000007c7218 0000000000000005 0000000000000002 0000000049814=
a58
20-23 0000000040158000 0000000000000001 0000000000000005 0000000000000=
001
24-27 0000000000000001 0000000040158ff1 000000000085e9a8 00000000007af=
a18
28-31 000000000085e9a8 0000000000000151 00000000bff10800 000000004079d=
dbf

Control Registers 0 - 31
00-03 0000000000000000 0000000000000000 0000000000000000 0000000000000=
000
04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000=
000
08-11 0000000000001f4c 0000000000000000 00000000000000c0 0000000000000=
01b
12-15 0000000000000000 0000000000000000 0000000000110000 00000000fe000=
000
16-19 0000004a72fabf1c 0000000000000fa6 000000004073fba3 000000000ca01=
014
20-23 00000000a607ffe4 4000000005d58ff1 000000000006000f 0000000080000=
000
24-27 00000000003eb000 000000001c82c000 00000000ffffffff 00000000fffff=
fff
28-31 00000000ffffffff 00000000ffffffff 000000002c5dc000 0000000010468=
000
Space Registers 0 - 7

00-03   00000000          00000fa6          00000000          00000fa6
04-07   00000fa6          00000fa6          00000fa6          00000fa6
IIA Space                    =3D 0x0000000000000fa6
IIA Offset                   =3D 0x000000004073fba7
Check Type                   =3D 0x20000000
CPU State                    =3D 0x9e000004
Cache Check                  =3D 0x00000000
TLB Check                    =3D 0x00000000
Bus Check                    =3D 0x0030103b
Assist Check                 =3D 0x00000000
Assist State                 =3D 0x00000000
Path Info                    =3D 0x00000000
System Responder Address     =3D 0x000000fff9017ff1
System Requestor Address     =3D 0xfffffffffffa0000

Floating-Point Registers 0 - 31
00-03 0000001f00000000 0000000000000000 0000000000000000 0000000000000=
000
04-07 4084d00000000000 101313a4101ad880 2fad014b00000001 0000000000000=
000
08-11 2faede4000000002 2faea00000000002 00000000103f11d0 10934058103f1=
000
12-15 2faeeab800000002 2faea00000000002 0000000010468000 0000000010109=
448
16-19 0000000f103f22e0 0000000f103f22e0 0000000000000000 0000000100000=
01f
20-23 f0000174f000017c 1046f8101018d340 0000000000000013 0000001300000=
000
24-27 0000000100000000 3fe0000000000000 412e848000000000 000000002edd3=
57c
28-31 2f4eea202fae9bc0 00000000101a8ccc 000000001048b810 109340673b9ac=
a00

=B49000/785 B,C,J Workstation Unarchitected (per-CPU)=B4, rev 1, 140 bytes:

Check Summary                =3D 0xcb81041008000000
Available Memory             =3D 0x0000000020000000
CPU Diagnose Register 2      =3D 0x0201000000000004
CPU Status Register 0        =3D 0x2420c20000000000
CPU Status Register 1        =3D 0x8002000000000000
SADD LOG                     =3D 0x00c0000000000000
Read Short LOG               =3D 0xc18400fff9017ff1
ERROR_STATUS                 =3D 0x0000000000100010
MEM_ADDR                     =3D 0x000001ff3fffffff
MEM_SYND                     =3D 0x0000000000000000
MEM_ADDR_CORR                =3D 0x000001ff3fffffff
MEM_SYND_CORR                =3D 0x0000000000000000
RUN_DATA_HIGH                =3D 0xc1bff0fffed08040
RUN_DATA_LOW                 =3D 0xc1bff0fffed08040
RUN_CTRL                     =3D 0x0000021c00001418
RUN_ADDR                     =3D 0xc1bff0fffed08040
System Responder Path        =3D 0x00ffffffffffffff

HPMC PIM Analysis Information:

Timestamp =3D
Mon Nov 28 16:24:09 GMT 2005 (20:05:11:28:16:24:09)

=B49000/785 B,C,J Workstation HPMC PIM Analysis (per-CPU)=B4, rev 0, 1304 b= ytes:

A Data I/O Fetch Timeout occured while CPU 0 was requesting information from a device with the address 0xfff9017ff1.

Memory/IO Controller Error Analysis Information:

The Memory/IO Controller only observerd the Broadcast Error. It did not lo= g
any additional information about the HPMC.

(LPMC Information: everything's 0)

Memory Error Log Information:

No memory errors logged

I/O Module Error Log Information:

Timestamp =3D
Mon Nov 28 16:24:09 GMT 2005 (20:05:11:28:16:24:09)

=B49000/785 B,C,J Workstation HPMC PIM Analysis (per-CPU)=B4, rev 0, 228 by= tes:

Rope Word1 Word2 Word3
------ ------------ ------------

   0    0x00000000   0x0e0cc009   0x00000000fed30048
   1    0x0003e000   0x1e0cc009   0x00000000f9017ff0
   2    ----------   0x2e0cc009   ------------------
   3    ----------   0x3e0cc009   ------------------
   4    0x00000000   0x3e0cc009   0x00000000fed38048
   5    ----------   0x5e0cc009   ------------------
   6    0x00000000   0x6e0cc009   0x00000000fed3c048
   7    ----------   0x7e0cc009   ------------------

System.map: http://www.badongo.com/file.php?file=3DSystem.map+B1000__2005-1=
1-30_System.map.bz2

I hope the information I provided is quite near what you expected to get reported.

Regards, Thomas
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#1 lore raw
Quoted 8 lines · Thomas Klinger

I'm trying to setup Debian 3.1r0a (sarge) on a B1000 with two graphics card. The first one is the original A4977A Visualize EG rev. 03, as more powerful display card for the graphical desktop we installed a Matrox Millenium II with 2MB RAM. ...

What comes now is that if we try to start the X server using the second card the system switches the card and immediatly fails with the error code FLT CBFB (shown in the front LCD display).

I don't follow parisc development enough to know whether this scenario is supposed to work. Based on what I do know about HP chipsets and the ia64 kernel, I expect this to fail for the following reason:

In general, X is not smart enough to completely initialize video cards, because the necessary documentation is usually not public. So the usual strategy is to execute the option ROM on the card. For the primary card, system firmware usually runs the ROM (or is smart enough to initialize the card directly) before booting the OS.

But secondary cards are usually not initialized by system firmware, so X has to run the option ROM before it can use the card. The code in the option ROM assumes there is only one video card in the system, and that it has MMIO from 0xA0000-0xBFFFF and IO ports from 0x3B0-0x3DF.

When you have two video cards in the system, HP chipsets route those ranges to one card or the other, not both. So my guess is that X is either trying to use the second card uninitialized, or it is trying to emulate the option ROM on the second card, and the MMIO or IO port accesses done by the option ROM code are being routed to the primary card.

Bad things will happen in either case.

I have code for ia64 that makes this work, and it should be fairly easy to port to parisc. It works by reprogramming the chipset to route the VGA MMIO and IO port resource to the appropriate card. There are a few related X server changes, too.

This is a bit of a work-in-progress, but I'll attach the current ia64 kernel patch so you can get an idea of what I'm doing.

Bjorn

[PATCH] ia64: support HP chipset VGA routing

Called via pci_mmap_legacy_mem() and pci_{read,write}_legacy_io().

I'm working on support for multiple VGA devices. Sysfs-pci exports access to the legacy I/O port and MMIO resources required. And HP chipsets have programmable routing for those resources (actually just the VGA-specific 0xA0000-0xBFFFF MMIO and 0x3B0-0x3DF I/O port ranges).

But since the chipset only routes to one VGA device at a time, we need some arbitration to coordinate user accesses and the chipset routing. The attached file is a start, but I'm a complete VM neophyte, so I'd appreciate any guidance.

There are no struct pages for the VGA MMIO region, so I couldn't use a nopage() vm_op directly. I used populate() instead, which seems a bit hacky. It sounds like a nopfn() or similar is coming, and I might be able to use that.

===== arch/ia64/hp/common/Makefile 1.8 vs edited =====

arch/ia64/hp/common/Makefile +3 -6
Index: work4/arch/ia64/hp/common/Makefile
===================================================================
@@ -1,10 +1,7 @@
-#
-# ia64/platform/hp/common/Makefile
-#
-# Copyright (C) 2002 Hewlett Packard
+# (c) Copyright 2002, 2005 Hewlett-Packard Development Company, L.P.
 # Copyright (C) Alex Williamson ([email protected])
-#
+# 	Bjorn Helgaas <[email protected]>
 
-obj-y := sba_iommu.o
+obj-y := cc.o sba.o lba.o sba_iommu.o vga.o
 obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += hwsw_iommu.o
 obj-$(CONFIG_IA64_GENERIC) += hwsw_iommu.o
arch/ia64/hp/common/sba_iommu.c +22 -40

99 lines not on this page · raw message

arch/ia64/hp/common/vga.c new file +354 -0

354 lines not on this page · raw message

arch/ia64/hp/common/sba.c new file +312 -0

312 lines not on this page · raw message

arch/ia64/hp/common/lba.c new file +182 -0

182 lines not on this page · raw message

arch/ia64/hp/common/cec.h new file +39 -0
Index: work4/arch/ia64/hp/common/cec.h
===================================================================
@@ -0,0 +1,39 @@
+/*
+ * HP chipset support
+ *
+ * (c) Copyright 2005 Hewlett-Packard Development Company, L.P.
+ *	Bjorn Helgaas <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/types.h>
+#include <linux/acpi.h>
+#include <asm/acpi-ext.h>
+#include <acpi/actypes.h>
+#include <acpi/acpi_drivers.h>
+
+struct hp_lba_data {
+	acpi_handle		handle;
+	volatile void __iomem	*addr;
+	struct hp_sba_data	*sba;
+	unsigned int		cell;
+	unsigned int		rope;
+	char			name[40];
+};
+
+struct hp_sba_data;
+
+void hp_lba_vga_enable(struct hp_lba_data *lba);
+void hp_sba_vga_enable(struct hp_sba_data *sba, unsigned int rope);
+void hp_pin_vga_enable(unsigned int cell);
+
+struct hp_sba_data *hp_sba_find(acpi_handle handle);
+unsigned int hp_sba_cell(struct hp_sba_data *sba);
+unsigned int hp_sba_lba_to_rope(struct hp_sba_data *sba, u64 addr);
+
+extern int ps202_workaround;
+
+int ioc_add(acpi_handle handle, u64 hpa, u64 length, unsigned int page_shift);
arch/ia64/hp/common/cc.c new file +133 -0

133 lines not on this page · raw message

include/asm-ia64/machvec_hpzx1.h +6 -0
Index: work4/include/asm-ia64/machvec_hpzx1.h
===================================================================
@@ -11,6 +11,9 @@
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
 extern ia64_mv_dma_mapping_error	sba_dma_mapping_error;
+extern ia64_mv_pci_mmap_legacy_page_range_t	hp_pci_mmap_legacy_page_range;
+extern ia64_mv_pci_legacy_read_t	hp_pci_legacy_read;
+extern ia64_mv_pci_legacy_write_t	hp_pci_legacy_write;
 
 /*
  * This stuff has dual use!
@@ -34,5 +37,8 @@
 #define platform_dma_sync_sg_for_device		machvec_dma_sync_sg
 #define platform_dma_supported			sba_dma_supported
 #define platform_dma_mapping_error		sba_dma_mapping_error
+#define platform_pci_mmap_legacy_page_range	hp_pci_mmap_legacy_page_range
+#define platform_pci_legacy_read		hp_pci_legacy_read
+#define platform_pci_legacy_write		hp_pci_legacy_write
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#2 lore raw
Quoted 5 lines · Bjorn Helgaas

I don't follow parisc development enough to know whether this scenario is supposed to work. Based on what I do know about HP chipsets and the ia64 kernel, I expect this to fail for the following reason:

[Executive summary: No, using X to do any hardware programming is
definitely going to fail spectacularly]

Iirc when I brought up doing this a few months ago, Grant mentioned that this feature of the chipset (I don't recall whether it was Astro or Elroy offhand) was broken/untested for the parisc based revisions of the chip until some later version.

Quoted 7 lines

When you have two video cards in the system, HP chipsets route those ranges to one card or the other, not both. So my guess is that X is either trying to use the second card uninitialized, or it is trying to emulate the option ROM on the second card, and the MMIO or IO port accesses done by the option ROM code are being routed to the primary card.

At the moment, there's absolutely no support for legacy VGA registers. Legacy IO port accesses will likely timeout doing an access to the PCI bus behind rope0. Legacy VGA mmio will, uh, do something funny.

Firmware probably (I say probably instead of 'definitely' because I'm in no position to know for certain) doesn't do anything at all with a VGA card, as none of the supported graphics cards do legacy VGA.

The best thing to do is to not use an X driver, and hope the framebuffer driver can initialize the card without legacy VGA accesses. Browsing random popular PC graphics cards framebuffer drivers, I would speculate that an nVidia PCI card would work, as they appear to do all programming via proper mmio. Whether the nvidiafb driver supports a card that has not been initialized by firmware is anyone's guess, I don't have one to test with. (And I'm more interested in making the Visualize FX series work).

Quoted 11 lines

Bad things will happen in either case.

I have code for ia64 that makes this work, and it should be fairly easy to port to parisc. It works by reprogramming the chipset to route the VGA MMIO and IO port resource to the appropriate card. There are a few related X server changes, too.

This is a bit of a work-in-progress, but I'll attach the current ia64 kernel patch so you can get an idea of what I'm doing.

Thanks! If I can scrounge some time over holidays I'll investigate if there's a possibility of this working on parisc.

Quoted 2 lines

Bjorn

Cheers,
Kyle
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#4 lore raw
In reply to Thomas Klinger
Quoted 10 lines · Thomas Klinger

Now, the setup and everything else went through smoothly, even the first setup of the X server using the original display card went pretty fine, but only with 8-bit colors. That's why we built in the Matrox card. It is recognized by the system and displayed using lspci.

What comes now is that if we try to start the X server using the second card the system switches the card and immediatly fails with the error code FLT CBFB (shown in the front LCD display).

You need to post your Xorg.conf or whatever it's called nowadays.

Quoted 7 lines

I posted the symptom to debian-hppa and was then forwared by Grant Grundler to this mailing list to post my concern.

The goal of the system is to boot the system with the original card (as is does already), but use the secondary card (Matrox in that case) as display for the desktop environment in 16-bit colors, at least.

This will probably work provided you use the matroxfb framebuffer, with the "fbdev" driver of X. Anything else is almost guaranteed to fail with an HPMC. Specifics are explained in the graphics FAQ.

Quoted 3 lines

A Data I/O Fetch Timeout occured while CPU 0 was requesting information from a device with the address 0xfff9017ff1.

Somebody did something it shouldn't've.

Cheers,
Kyle
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#3 lore raw
In reply to Kyle McMartin
Quoted 4 lines · Kyle McMartin

At the moment, there's absolutely no support for legacy VGA registers. Legacy IO port accesses will likely timeout doing an access to the PCI bus behind rope0. Legacy VGA mmio will, uh, do something funny.

Oh, yes, I vaguely remember that :-)

IIRC, there was a back-door approach that Grant thought might work. My patch provides the hooks you'd need for that. Instead of reprogramming the chipset VGA routing and doing inb/outb, you'd just do the LBA magic for I/O port accesses.

I don't know how MMIO would be handled (or even what chipset is in the box in question). But my guess is that it's similar to how the current chipsets work.
_______________________________________________
parisc-linux mailing list [email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux