From owner-freebsd-current Wed May 17 14:17:14 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA14846 for current-outgoing; Wed, 17 May 1995 14:17:14 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id OAA14839 for ; Wed, 17 May 1995 14:17:07 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id HAA29877; Thu, 18 May 1995 07:12:33 +1000 Date: Thu, 18 May 1995 07:12:33 +1000 From: Bruce Evans Message-Id: <199505172112.HAA29877@godzilla.zeta.org.au> To: esser@ZPR.Uni-Koeln.DE, rgrimes@gndrsh.aac.dev.com Subject: Re: Enthusiasm boost: make world works on 386SX16 4Mb Cc: current@FreeBSD.org Sender: current-owner@FreeBSD.org Precedence: bulk >The problem is, that the current interrupt statistics scheme is >tightly bound to ISA. >The register_intr() function gets a device_id, which is used to >initialise the intr_countp[] and intrnames[] arrays. Urk. You currently use device_id 0, so all pci interrupts get counted as clock interrupts. >Since device_id is an index into an ISA specific data structure >(which doesn't make much sense for a PCI device), there is no >valid device_id for any PCI device. It's actually only an index into intr_countp[] and intrnames[]. Config is supposed to fill in all device tables with suitable indexes and build a string table to match. You can fake this now using dummy isa devices: device PCI0 at isa? ... device PCI15 at isa? Use a trivial failing probe routine to copy the ids to a pci-specific place. >The easy solution to this problem would be to make register_intr() >less specific to ISA by passing an &intrcnt and an intrname >parameter instead of the ISA device id. >This would require (very simple) changes to: >/sys/i386/isa/isa_device.h (prototype) >/sys/i386/isa/isa.c (definition + a few calls) >/sys/i386/isa/clock.c (2 calls) >/sys/i386/isa/pcibus.c (1 call) >/sys/i386/eisa/eisaconf.c (1 call) It would also require changing intrnames[] from a string table to an array and changing systat etc. to expect an array. This should be done someday. Bruce