|
CPUs
booting
building
download
example
credits
|
x86test - bootable CPU identification
Savannah project page
x86test is a utility to display information about the processor in an x86/PC
system. It is bootable (doesn't run on an operating system) and is
currently entirely written in assembler. It should be able to identify the
vast majority of x86 CPUs and their current clock speed. For chips that
support CPUID it will print as much useful information as it can, including detailed cache configuration where possible.
x86test is released under the GNU General Public License.
x86test is nowhere near complete, whatever complete may eventually be. I
consider it to still be very much at the alpha stage.
There are several reasons for x86test being bootable:
- Complete OS independance.
- Some tests are unfeasible from a modern OS e.g. resetting the
CPU!
- Complete control of interrupts allows very accurate timings.
- It can safely be run when you are unsure of system stability.
As an example, with complete control of interrupts it is possible to quickly measure the clock speed of a CPU with a TimeStamp Counter to an accuracy
limited only by the uncertainty of the reference clock (a 14.318MHz crystal).
Even without a TSC, loop instruction timing can give similarly small
uncertainties on 486 and later chips -- this would be impossible under a
multi-tasking OS.
Being bootable does introduce complications. x86test quickly enters 32-bit
protected mode and subsequently has very little direct BIOS dependence. there
is a simple (but almost fully functional) AT keyboard driver and a basic text
video driver that should work on most VGA compatible adapters. At the moment it
defaults to the 8×8 BIOS font, which I admit is not very nice to read,
but allows a lot of information to be displayed.
Quick Start
To make a bootable floppy disk from DOS or windows you should get the latest
DOS installer from the download section. Unzip the
whole archive, insert a formatted floppy disk with at least 40KB of free space
in your A: drive, then run install.bat. That's it -- boot up
the box to be tested with the floppy in its drive.
You may also want to try the
Open-Source Diagnostic Disc, which contains x86test as
well as Memtest86+ and
GRUB.
For more information see the booting section below as
well as the README and INSTALL files in the source.
CPU support
x86test has been tested on many CPUs and systems, but most of these have
been pretty standard PCs with common, well documented chips. Here is a quick
summarry of what you might expect to work (or not).
| Intel |
As they are by far the most numerous, support for most intel chips
is reliable and well tested. Currently x86test is useless at
determining different platforms for a given core (i.e.
desktop/mobile/Xeon). This should be completely sorted by using the
platform ID (MSR 0x17 bits 50-52) on P6
and later.
Currently x86test doesn't report the 3-digit model numbers for newer
intel chips. This will be implemented in future. As newer intel chips
are multiplier-locked (for SpeedStep the maximum multiplier is fixed I
believe), the intended clock speed and model number (where
applicable) can be uniquely determined.
Tested on: 386SX, 486SX/DX/DX2, Pentium P54C/P55C,
PentiumII Klamath/Deschutes, PentiumIII/Celeron Coppermine,
Pentium4/Celeron Willamette/Northwood.
|
| AMD |
generally well supported, although I haven't yet run x86test on any K8
chips. As for intel platform determination is not yet properly
implemented, however I don't know of an equivalent to the intel
platform ID. The MP feature flag should be used to determine XP vs.
MP/Sempron. There is currently no model number determination (XP2200+
etc.). Athlon64/Opteron are untested but should work (hopefully even
the new X2).
Am386 may be reported as intel, as they are almost the same! Geode is
really a Cyrix (see below).
Most AMD chips are not multiplier-locked (or can easily be unlocked),
so the intended clock speed and model number cannot be
uniquely determined. The model numbers for AMD chips are intended as an
indication of processor performance -- they don't necessarily bear any
resemblance to what is printed on the chip. In many cases the platform
type (desktop/MP/mobile) can be changed as well!
Tested on: 486DX2-SV8B, 486DX4-SV8T, K5 SSA5, K6-2 Chompers-CXT, Athlon
Thunderbird/Palamino/Thoroughbred.
|
| Cyrix |
Cyrix never manufactured their own chips, they had relations with
several other companies to do that. The other companies were
Texas Instruments, SGS-Thomson (now STMicroelectronics),
IBM (486DX2 and later) and National Semiconductor
(MediaGX/Geode). Most chips were sold under the name Cyrix as well as
the name of the manufacturer(s). In 1997 Cyrix became part of
National Semiconductor, who produced the Geode that is now sold
by AMD. Some remnants of Cyrix were bought by VIA, who
use the Cyrix name on their C3 chips that are really a Centaur design.
As Cyrix no longer exists I've had difficulty getting documentation for
any of their chips, so support is patchy. I don't know any means of
determining the actual manufacturer or vendor, however in many cases
only a small subset of companies made them. There are issues with the
MediaGX / Geode soft-VGA implementation that can cause display problems
and possibly inaccurate clock speed determination.
Tested on: Cyrix & ST 486DX2, Cyrix MediaGXi, Cyrix/IBM 6x86,6x86L
(M1), Cyrix/IBM 6x86MX/MII (M2).
|
| Centaur |
Similar situation to Cyrix, with one company designing chips for
several others including IDT (who originally owned Centaur)
and later VIA. IBM also manufactured Centaur chips for
IDT. There are a few identification and configuration annoyances with
Centaur chips, particularly software can alter the values reported by
CPUID (see the top of cpuid.S).
Tested on: IDT WinChip C6 (IDT 9.5 350nm process).
|
| IBM |
Most chips sold by IBM are Cyrix designs, and should be detected as
such. IBM did design some of their own 486-class chips before they
partnered up with Cyrix, but I have very little information on them
(apparently some have MSRs), so don't expect anything very useful for
them.
|
| NexGen |
Should be detected as NexGen (Nx586), but that's about it! I guess you
could consider the AMD K6 as a NexGen. |
| Rise |
untested, but should work to some extent (the mP6 iDragon). |
| Transmeta |
Currently not supported due to lack of time/effort on my part (TODO).
|
| UMC |
should be reported as UMC U5D/U5S. |
| VIA |
sort-of supported, but I need to spend some time on these. see also
Centaur. |
Booting
x86test is designed to be very simple to load. Any loader that can load the
whole file to anywhere between 0x10000 - 0x90000 (physical) can be used.
- Floppy
The simplest method is probably to copy x86test to a FAT12 formatted
floppy disk and use fatload.
- ElTorito CDROM
Booting from an ElTorito CDROM is straightforward. Just tell whatever
you use to construct your iso9660 filesystem to load the whole x86test file
in no emulation mode to the address specified at the top of
x86test.h (LOAD_ADDR). e.g. for mkisofs you might use:
mkisofs -b x86test -no-emul-boot -boot-load-seg 0x1000 ...
where "..." represents whatever other options you use. x86test will have
to be placed in the target directory, but you can omit joliet entries for
it so that most people won't know it's there with e.g.
-J -hide-joliet x86test -hide-joliet boot.catalog
note: to get the load segment remove the last zero from LOAD_ADDR
- Linux zImage loader
A linux loader such as LILO or GRUB can be used to load x86test from a
large range of media and provide an easy way to choose from a selection of
programs to boot. For this to work a zImage header must be prepended to
x86test. Binaries with this are available form the
download section.
- Ultimate Boot CD
UBCD is a collection of
many bootable programs and bootdisks that load from a single CD. Hopefully
a future version will include x86test, but it is not hard to add it
yourself. Here is an example for UBCD-3.3.
- unpack the UBCD image, e.g. on linux,
mount -t iso9660 -o loop ubcd.iso /mnt/cdrom
cp -a /mnt/cdrom ubcd
umount /mnt/cdrom
- copy the x86test zImage binary to isolinux/, calling it just 'x86test'
chmod 755 ubcd/isolinux
cp x86test_zImage.bin ubcd/isolinux/x86test
- edit isolinux/isolinux.cfg,
adding the following to the end:
LABEL x86test
APPEND -
- add a menu entry by editing e.g.
boot/menus/mboard2.scn, adding
lines in suitable places:
...
print " [x] x86test 0.10a "
...
if ($lastKey == key[x]); then isolinux x86test
...
- build and burn e.g.
mkisofs -J -r -D -o ubcd.iso -b boot/loader.bin -no-emul-boot -boot-load-size 4 -iso-level 2 ubcd
cdrecord dev=1,0,0 speed=16 driveropts=burnfree -v -sao -data ubcd.iso
Building
Unless you want the source or need to use a non-standard configuration you
can just download a pre-made binary. As it is entirely written in assembly
language you should get an identical binary whatever system it is
built on.
Building x86test is pretty straightforward. To use the Makefile you will
have to have GCC installed, but it shouldn't be too difficult to
preprocess, assemble and link it on other systems. Building is currently
only tested with all GNU tools.
Most things you are likely to want to change are at the top of x86test.h
(LOAD_ADDR, font size etc.). In particular make sure that LOAD_ADDR matches
the address your loader will load x86test at. Then just type make.
to add a linux zImage header do make x86test_zImage.
Download
The .bin extensions above are just to stop browsers opening the files as
text.
the .zip package contains current default x86test and fatload binaries with
a small program to install fatload from DOS and a simple install script.
Previous Versions
Example Output
This example is for a 650MHz Mobile Celeron in a micro-PGA2 package (APIC
initially disabled by BIOS).
x86test-0.05a
Basic CPUID info:
~~~~~~~~~~~~~~~~~
Max level: 2
Vendor: GenuineIntel
Type: 0
Family: 06
Model: 08
Stepping: 06
Brand ID: 1
Features: FPU VME DE PSE TSC MSR PAE MCE CX8 SEP MTRR PGE MCA CMOV
PAT PSE-36 MMX FXSR SSE
found local APIC, setting up...
Cache info:
~~~~~~~~~~~
Instruction TLB: 32 entries for 4KB pages, 4-way associative
Instruction TLB: 2 entries for 4MB pages, fully associative
Data TLB: 64 entries for 4KB pages, 4-way associative
L2 cache: 128KB, 4-way associative, 32 bytes/line
L1 Intruction cache: 16KB, 4-way associative, 32 bytes/line
Data TLB: 8 entries for 4MB pages, 4-way associative
L1 Data cache: 16KB, 4-way associative, 32 bytes/line
Intel platform ID: 5
Core clock (CTC + TSC): 645.875 ± 0.033MHz
FSB clock (CTC + APIC): 99.365 ± 0.005MHz
Core/FSB multiplier: 6.5
FSB/14.318MHz ratio: n/a
CPU type: Intel Celeron (Coppermine C0 180nm)
Current clock: 645.88MHz (6.5 x 99.365MHz)
x86test all done!
>
|
Acknowledgements
In making x86test I have used information from an enourmous variety of
sources accross the web. The most useful general site for x86 identification
(particularly older chips) has to be Grzegorz Mazur's at
grafi.ii.pw.edu.pl/gbm/x86/.
For more modern CPUs manufacturer's websites have a lot of useful information.
In particular, AMD and Transmetta produce pdf files specifically on the subject
of recognition and CPUID information. Intel's many CPU specific Specification
Updates are also very useful for getting stepping info for recent chips.
The Linux kernel source is a useful source of inspiration and has great
examples of how to reliably set up and use a lot of hardware.
|