Erwan Velu
2006-Sep-04 20:34 UTC
[syslinux] [PATCH 1/1] : Adding a new com32 module to handle cpu information
From : Erwan Velu <erwan.velu at 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 at free.fr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuid.patch
Type: text/x-patch
Size: 31210 bytes
Desc: not available
URL:
<http://www.zytor.com/pipermail/syslinux/attachments/20060904/9c1936bd/attachment.bin>
H. Peter Anvin
2006-Sep-05 23:00 UTC
[syslinux] [PATCH 1/1] : Adding a new com32 module to handle cpu information
Erwan Velu wrote:> > Note that SMP is just a manner to know if the bios annonce an MPTABLE. > This code can't detect each processor. >I think you need to at least detect that the MPTABLE contains more than one processor. There are a fair number of uniprocessor machines which have MPTABLEs; especially since before ACPI it was the only way to support APIC. -hpa
Reasonably Related Threads
- [PATCH 1/1]: Ethersel must use the pci com32 module instead of builtin pci detection code
- [PATCH 1/1] : Adding a com32 module to handle DMI
- [PATCH 1/1] : PCI detection code doesn't corrupt memory anymore
- [PATCH 1/1] : PCI detection code doesn't corrupt memory anymore (2nd try)
- [PATCH 1/1] : Adding long mode support to dmi