From owner-freebsd-hackers Wed Dec 20 21:48:16 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 20 21:48:14 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by hub.freebsd.org (Postfix) with ESMTP id 7E89D37B404 for ; Wed, 20 Dec 2000 21:48:12 -0800 (PST) Received: from guild.plethora.net (root@guild.plethora.net [205.166.146.8]) by herd.plethora.net (8.9.0/8.9.0) with ESMTP id XAA24786 for ; Wed, 20 Dec 2000 23:48:11 -0600 (CST) Received: from guild.plethora.net (seebs@localhost.plethora.net [127.0.0.1]) by guild.plethora.net (8.9.3/8.9.0) with ESMTP id XAA23830 for ; Wed, 20 Dec 2000 23:48:10 -0600 (CST) Message-Id: <200012210548.XAA23830@guild.plethora.net> From: seebs@plethora.net (Peter Seebach) To: freebsd-hackers@freebsd.org Reply-To: seebs@plethora.net (Peter Seebach) Subject: Supporting VirtualPC... Date: Wed, 20 Dec 2000 23:48:10 -0600 Sender: seebs@plethora.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Quick summary: VirtualPC has a PCI configuration quirk. Specifically, in isa/pcibus.c, after mode1res = inl(CONF1_ADDR_PORT); we have if (mode1res) { if (pci_cfgcheck(32)) return (cfgmech); } If I change this to "if (1)", VirtualPC works. Otherwise, the PCI bus is never found. There's also a quirk in the DEC 21041 emulation. I am wondering what would be considered a "good" way to encode the knowledge that machines with "ConnectixCPU" in the mode string need specific special treatment in two widely disparate places. In NetBSD, I just added a variable "cpu_is_vpc", which is declared only if you have options VPC_CPU, and then I test for it only in the modules that need to know. (There are more of them, since I also did support for VPC 3.) I am too lazy to duplicate all of the VPC 3 workarounds, so I really only need to check this in two places. Is there an easy way to check the CPU mode string later on in the life of the kernel? Ideally, it would be cheap, and I'd also want to #ifdef it with an option specific to VirtualPC, so people don't have to waste cycles on the test. (The if_de quirk, BTW, is that they always send the abnormal interrupt for "transmit process stopped" after a transmit completes normally. Oops!) -s To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message