geoff wrote:
> Question: Why is a single processor Mainboard being detected
> as multi-processor?
Here is the detection code used by the RedHat anaconda installer:
...
/* MP Floating Pointer Structure */
typedef struct MPFPS {
char signature[ 4 ];
void* pap;
u_char length;
u_char spec_rev;
u_char checksum;
u_char mpfb1;
u_char mpfb2;
u_char mpfb3;
u_char mpfb4;
u_char mpfb5;
} mpfps_t;
...
static int intelDetectSMP(void)
{
vm_offset_t paddr;
int where;
mpfps_t mpfps;
int rc = 0;
int ncpus = 0;
/* open physical memory for access to MP structures */
if ( (pfd = open( "/dev/mem", O_RDONLY )) < 0 ) {
return 0;
}
/* probe for MP structures */
apic_probe( &paddr, &where );
if ( where <= 0 )
return 0;
if (seekEntry( paddr ))
return 0;
readEntry( &mpfps, sizeof( mpfps_t ) );
if (mpfps.mpfb1)
/* old style */
rc = 1;
else {
/* go to the config table */
mpcth_t cth;
int count, i;
paddr = (vm_offset_t) mpfps.pap;
if (seekEntry( paddr ))
return 0;
readEntry( &cth, sizeof( cth ) );
/* if we don't have any entries, the kernel sure
won't be able to set up mp. Needs at least one entry
for smp kernel */
if (cth.entry_count <= 1) {
close (pfd);
return 0;
}
count = cth.entry_count;
for (i = 0; i < count; i++) {
if ( readType() == 0 ) {
ProcEntry entry;
readEntry( &entry, sizeof( entry ) );
if (entry.cpuFlags & PROCENTRY_FLAG_EN)
ncpus++;
}
}
if (ncpus > 1)
rc = 1;
}
close (pfd);
return rc;
}
This says that you get an SMP kernel if you have more than one CPU, or you have a motherboard with a valid MultiProcessor Floating point structure, with non-zero mpfb1 element.
Charlie