Adding a new com32 module to handle cpu information syslinux-3.21-pre1
authorErwan Velu <erwan@seanodes.com>
Mon, 4 Sep 2006 20:34:55 +0000 (22:34 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 5 Sep 2006 20:53:38 +0000 (13:53 -0700)
commit1f675cf4298e2cb5dd5bc3be2c3649ac81d4fac6
tree81da0ba3df4648fec09696c98096058062607f94
parent329e23c16d0f3ecd4062ec715fbe047bf85f8976
Adding a new com32 module to handle cpu information

 From : Erwan Velu <erwan.velu@free.fr>
This patch a new com32 module to handle cpu information.
A new "cpu" structure can be filled by calling "detect_cpu(&cpu)".

It provides :
- Vendor name as string
- Model as string
- Vendor as integer
- Model as integer
- Family as integer
- Stepping as Integer
- Flags as boolean
- SMP as boolean

Note that SMP is just a manner to know if the bios annonce an MPTABLE.
This code can't detect each processor.

I've been adding a demo program called cpuidtest to show how it works.

if (cpu.flags.lm == true) printf("This system is x86_64 compatible\n");
This example shows how to test if a system is X86_64 compatible.
I hope it's simple enough ;)

This code is mainly taken from the Linux Kernel.
Greetings for all the guys who wrote it.

Testing and feedback are welcome.

Signed-off-by:Erwan Velu <erwan.velu@free.fr>
com32/include/cpufeature.h [new file with mode: 0644]
com32/include/cpuid.h [new file with mode: 0644]
com32/modules/Makefile
com32/modules/cpuid.c [new file with mode: 0644]
com32/modules/cpuidtest.c [new file with mode: 0644]