From owner-freebsd-smp Thu Feb 25 10:37:39 1999 Delivered-To: freebsd-smp@freebsd.org Received: from fleming.cs.strath.ac.uk (fleming.cs.strath.ac.uk [130.159.196.126]) by hub.freebsd.org (Postfix) with ESMTP id 5DCCF14E0A for ; Thu, 25 Feb 1999 10:34:57 -0800 (PST) (envelope-from roger@cs.strath.ac.uk) Received: from muir-10 (roger@muir-10.cs.strath.ac.uk [130.159.148.10]) by fleming.cs.strath.ac.uk (8.8.8/8.8.8) with SMTP id SAA01923 Thu, 25 Feb 1999 18:34:40 GMT Message-ID: <36D597C2.446B@cs.strath.ac.uk> Date: Thu, 25 Feb 1999 18:34:42 +0000 From: Roger Hardiman Organization: University of Strathclyde X-Mailer: Mozilla 3.04Gold (X11; I; OSF1 V4.0 alpha) MIME-Version: 1.0 To: smp@freebsd.org Subject: Run time detection of APIC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I'm reworking the pccard / pcmcia adapter code to work with SMP kernels. It currently causes a Panic. The fix is simple, the current code tries to allocate IRQs but does not know about APIC. I can change the driver to be of the form #ifdef APIC_IO .. do apic specific stuff #else .. do original code #endif But if you make a KLD module on a uni-processor kernel and then make a MSP kernel but load the uni-processor PCCARD module, the module will cause a panic as it does not contain the APIC specific code. Can the module detect if we are in APIC mode at run time. I want something like #ifdef APIC_IO .. do apic code #else .. if runtime says we are in APIC mode, panic this code has been compiled for .. a uni-processor kernel. .. else do original code #endif Thanks Roger Hardiman roger@cs.strath.ac.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message