Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Feb 1999 18:34:42 +0000
From:      Roger Hardiman <roger@cs.strath.ac.uk>
To:        smp@freebsd.org
Subject:   Run time detection of APIC
Message-ID:  <36D597C2.446B@cs.strath.ac.uk>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36D597C2.446B>