Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 27 Mar 2002 14:18:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 27 Mar 2002 14:17:55 -0500 Received: from ucs.co.za ([196.23.43.2]:19979 "EHLO ucs.co.za") by vger.kernel.org with ESMTP id ; Wed, 27 Mar 2002 14:17:39 -0500 Subject: VIA text console corruption and fix. From: Berend De Schouwer To: linux-kernel@vger.kernel.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 27 Mar 2002 21:17:30 +0200 Message-Id: <1017256651.18224.40.camel@bds.ucs.co.za> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org The VIA bug-fix that got added in 2.4.18 still has issues. I've included as good a bug report as I can, and a patch that "works for me". [1.] One line summary of the problem: The text console gets corrupted on some VIA motherboards in 2.4.18 [2.] Full description of the problem/report: When booting kernel 2.4.18, before /sbin/init is run, the text console becomes corrupted and unreadable. Vertical lines appear on the screen in a multitude of colours. The X server will still start, and run as normal. You can login over ssh. [3.] Keywords (i.e., modules, networking, kernel): kernel, console, VIA [4.] Kernel version (from /proc/version): 2.4.18-pre1 and later. Absent in 2.4.17 and earlier. [5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt) N/A [6.] A small shell script or example program which triggers the problem (if possible) Just boot. [7.] Environment I have 3000+ identical VIA KT133/Duron 750MHz machines. In 20% of these the bug is visible, in the others, it isn't. The machines run in an LTSP-ish configuration. The machines are supposed to be identical (they were bought together), but have different revisions of BIOS versions, etc. They have on-board S3 Savage cards that steal RAM from the main RAM. [7.1.] Software (add the output of the ver_linux script here) Linux version 2.4.18 (root@ucs.co.za) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)) #12 Wed Mar 27 22:34:33 SAST 2002 Gnu C 2.96 Gnu make 3.79.1 binutils 2.10.91.0.2 util-linux 2.11f mount 2.11b modutils 2.4.2 e2fsprogs 1.19 reiserfsprogs 3.x.0f pcmcia-cs 3.1.22 PPP 2.4.0 isdn4k-utils 3.1pre1 Linux C Library 2.2.2 Dynamic linker (ldd) 2.2.2 Procps 2.0.7 Net-tools 1.57 Console-tools 0.3.3 Sh-utils 2.0 Modules Loaded 8139too [7.2.] Processor information (from /proc/cpuinfo): processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 3 model name : AMD Duron(tm) Processor stepping : 1 cpu MHz : 756.765 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow bogomips : 1510.60 [7.3.] Module information (from /proc/modules): parport_pc 21952 1 (autoclean) lp 6048 0 (autoclean) parport 24512 1 (autoclean) [parport_pc lp] 8139too 13168 2 (autoclean) mii 1072 0 (autoclean) [8139too] [7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem) /proc/ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 01f0-01f7 : ide0 02f8-02ff : serial(auto) 0378-037a : parport0 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 a000-a0ff : Realtek Semiconductor Co., Ltd. RTL-8139 (#2) a000-a0ff : 8139too a400-a4ff : Realtek Semiconductor Co., Ltd. RTL-8139 a400-a4ff : 8139too b000-b003 : VIA Technologies, Inc. AC97 Audio Controller b400-b403 : VIA Technologies, Inc. AC97 Audio Controller b800-b8ff : VIA Technologies, Inc. AC97 Audio Controller d000-d01f : VIA Technologies, Inc. UHCI USB (#2) d400-d41f : VIA Technologies, Inc. UHCI USB d800-d80f : VIA Technologies, Inc. Bus Master IDE d800-d807 : ide0 d808-d80f : ide1 e200-e27f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] e800-e80f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] /proc/iomem 00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-077fbfff : System RAM 00100000-0023ca1c : Kernel code 0023ca1d-002952d7 : Kernel data 077fc000-077fefff : ACPI Tables 077ff000-077fffff : ACPI Non-volatile Storage d6000000-d60000ff : Realtek Semiconductor Co., Ltd. RTL-8139 (#2) d6000000-d60000ff : 8139too d6800000-d68000ff : Realtek Semiconductor Co., Ltd. RTL-8139 d6800000-d68000ff : 8139too d7000000-d7dfffff : PCI Bus #01 d7000000-d707ffff : S3 Inc. ProSavage KM133 d7f00000-dfffffff : PCI Bus #01 d8000000-dfffffff : S3 Inc. ProSavage KM133 e0000000-efffffff : VIA Technologies, Inc. VT8363/8365 [KT133/KM133] ffff0000-ffffffff : reserved [7.5.] PCI information ('lspci -vvv' as root) 00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 81) Subsystem: Asustek Computer, Inc.: Unknown device 8041 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Capabilities: [c0] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP] (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B- Capabilities: [80] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40) Subsystem: Asustek Computer, Inc.: Unknown device 80e7 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=64K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:0e.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev 10) Subsystem: Realtek Semiconductor Co., Ltd. RT8139 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- [disabled] [size=64K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 01:00.0 VGA compatible controller: S3 Inc.: Unknown device 8a26 (prog-if 00 [VGA]) Subsystem: Asustek Computer, Inc.: Unknown device 8041 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- [7.6.] SCSI information (from /proc/scsi/scsi) N/A [7.7.] Other information that might be relevant to the problem (please look in /proc and include all information that you think to be relevant): At the end, I've included /proc/cpuinfo, /proc/ioports, /proc/iomem, and lspci from a machine that is supposedly identical, but doesn't have the bug. I've been playing with BIOS settings (enabling/disabling USB, Audio, etc.), but I think I have them similar again. There are some differences: different IRQs. [X.] Other notes, patches, fixes, workarounds: The following patch fixes it for me: --- arch/i386/kernel/pci-pc.c.orig Wed Mar 27 21:09:26 2002 +++ arch/i386/kernel/pci-pc.c Wed Mar 27 22:34:24 2002 @@ -1114,6 +1114,7 @@ * * VIA 8363,8622,8361 Northbridges: * - bits 5, 6, 7 at offset 0x55 need to be turned off + * BUG?: Turning bit 5 off breaks some motherboards. * VIA 8367 (KT266x) Northbridges: * - bits 5, 6, 7 at offset 0x95 need to be turned off */ @@ -1129,8 +1130,8 @@ pci_read_config_byte(d, where, &v); if (v & 0xe0) { - printk("Disabling VIA memory write queue: [%02x] %02x->%02x\n", where, v, v & 0x1f); - v &= 0x1f; /* clear bits 5, 6, 7 */ + printk("Disabling VIA memory write queue: [%02x] %02x->%02x\n", where, v, v & 0x3f); + v &= 0x3f; /* clear bits 6,7 */ pci_write_config_byte(d, where, v); } } So here is the /proc info from a working machine: /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 3 model name : AMD Duron(tm) Processor stepping : 1 cpu MHz : 756.763 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow bogomips : 1510.60 /proc/ioports: 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 01f0-01f7 : ide0 02f8-02ff : serial(auto) 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 a800-a8ff : Realtek Semiconductor Co., Ltd. RTL-8139 (#2) a800-a8ff : 8139too b000-b0ff : Realtek Semiconductor Co., Ltd. RTL-8139 b000-b0ff : 8139too b400-b43f : Ensoniq 5880 AudioPCI d000-d01f : VIA Technologies, Inc. UHCI USB (#2) d400-d41f : VIA Technologies, Inc. UHCI USB d800-d80f : VIA Technologies, Inc. Bus Master IDE d800-d807 : ide0 d808-d80f : ide1 e200-e27f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] e800-e80f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] /proc/iomem: 00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-077fbfff : System RAM 00100000-0023ca1c : Kernel code 0023ca1d-002952d7 : Kernel data 077fc000-077fefff : ACPI Tables 077ff000-077fffff : ACPI Non-volatile Storage ee000000-ee0000ff : Realtek Semiconductor Co., Ltd. RTL-8139 (#2) ee000000-ee0000ff : 8139too ee800000-ee8000ff : Realtek Semiconductor Co., Ltd. RTL-8139 ee800000-ee8000ff : 8139too ef000000-efdfffff : PCI Bus #01 ef000000-ef07ffff : S3 Inc. ProSavage KM133 eff00000-f7ffffff : PCI Bus #01 f0000000-f7ffffff : S3 Inc. ProSavage KM133 f8000000-fbffffff : VIA Technologies, Inc. VT8363/8365 [KT133/KM133] ffff0000-ffffffff : reserved lspci -vvv: 00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 81) Subsystem: Asustek Computer, Inc.: Unknown device 8041 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Capabilities: [c0] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP] (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B- Capabilities: [80] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40) Subsystem: Asustek Computer, Inc.: Unknown device 80e7 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=64K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:0f.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev 10) Subsystem: Realtek Semiconductor Co., Ltd. RT8139 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- [disabled] [size=64K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 01:00.0 VGA compatible controller: S3 Inc.: Unknown device 8a26 (prog-if 00 [VGA]) Subsystem: Asustek Computer, Inc.: Unknown device 8041 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- -- Berend De Schouwer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/