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>