diff options
| author | Erwan Velu <erwan@seanodes.com> | 2006-09-04 22:34:55 +0200 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2006-09-05 13:53:38 -0700 |
| commit | 1f675cf4298e2cb5dd5bc3be2c3649ac81d4fac6 (patch) | |
| tree | 81da0ba3df4648fec09696c98096058062607f94 /com32/modules/Makefile | |
| parent | 329e23c16d0f3ecd4062ec715fbe047bf85f8976 (diff) | |
| download | syslinux-3.21-pre1.tar.gz | |
Adding a new com32 module to handle cpu informationsyslinux-3.21-pre1
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>
Diffstat (limited to 'com32/modules/Makefile')
| -rw-r--r-- | com32/modules/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile index fc8c8619..efba4c36 100644 --- a/com32/modules/Makefile +++ b/com32/modules/Makefile @@ -44,7 +44,7 @@ AUXDIR = $(LIBDIR)/syslinux INCDIR = /usr/include COM32DIR = $(AUXDIR)/com32 -MODULES = chain.c32 menu.c32 ethersel.c32 mboot.c32 dmitest.c32 +MODULES = chain.c32 menu.c32 ethersel.c32 mboot.c32 dmitest.c32 cpuidtest.c32 TESTFILES = menu.lnx all: $(MODULES) $(TESTFILES) @@ -76,6 +76,9 @@ all: $(MODULES) $(TESTFILES) %.c32: %.elf $(OBJCOPY) -O binary $< $@ +cpuidtest.elf : cpuidtest.o cpuid.o $(LIBS) + $(LD) $(LDFLAGS) -o $@ $^ + dmitest.elf : dmitest.o dmi_utils.o dmi.o $(LIBS) $(LD) $(LDFLAGS) -o $@ $^ |
