Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2006 14:20:40 -0800
From:      Sam Leffler <sam@errno.com>
To:        freebsd-current@freebsd.org
Subject:   Re: CFT: src/tools/tools/npcus
Message-ID:  <43FF86B8.1070607@errno.com>
In-Reply-To: <43FF79A0.8040809@errno.com>
References:  <43FF79A0.8040809@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sam Leffler wrote:
> I need folks to test some code committed recently for identifying the 
> number of cpu's on a machine.  The plan is to use this code to choose an 
> SMP or UP kernel during an install.
> 
> cd /usr/src/tools/tools/ncpus
> make
> su
> ./ncpus
> 
> You should get output like this:
> 
> trouble# ./ncpus
> acpi0_check: nexus0 attached
> acpi0_check: legacy0 not-present
> acpi0_check: npx0 attached
> acpi0_check: acpi0 attached
> ncpus: MADT: Found CPU APIC ID 1 enabled
> ncpus: MADT: Found CPU APIC ID 2 disabled
> acpi: 1
> ncpus: MPTable: Found CPU APIC ID 0 enabled
> mptable: 1
> 
> acpi: 1 means checking ACPI configuration info we found 1 cpu.  mptable: 
> 1 means MPTable indicated there was 1 cpu.  The rest of the stuff 
> printed out is for debugging.
> 
> If you run this test and DON'T see the correct number of cpus for your 
> machine please mail me (directly) with the output and dmesg output from 
> booting your kernel.  FWIW acpi info is considered more definitive than 
> MPTable so if acpi gives you the right answer but MPTable does not 
> that's ok.

If you get a compile error like this:

amper% # make
Warning: Object directory not changed from original 
/usr/src/tools/tools/ncpus
cc -O2 -fno-strict-aliasing -pipe -fomit-frame-pointer   -c ncpus.c
cc -O2 -fno-strict-aliasing -pipe -fomit-frame-pointer   -c acpi.c
cc -O2 -fno-strict-aliasing -pipe -fomit-frame-pointer   -c biosmptable.c
In file included from biosmptable.c:41:
/usr/include/machine/mptable.h:143: error: syntax error before "pcib"

then /usr/include/machine/mptable.h is not up to date wrt /usr/src. 
Sorry for not mentioning that detail.

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43FF86B8.1070607>