[syslinux] Extending dmitest to check for Long Mode (aka 64 versus 32 bit)

Doug Scoular dscoular at gmail.com
Mon Aug 28 15:19:14 PDT 2006


Hi Erwan,

First off, many thanks for your wonderful addition to syslinux:
dmitest.c32 and another thankyou to hpa for it's inclusion.

I need to ask if you are missing a couple of definitions in
dmi_processor.h, specifically, the "long mode" flag. I
need to use this flag to determine whether a machine is
64-bit capable or not.

There is a great web page explaining the "long mode" flag
at:

http://www.mega-tokyo.com/osfaq/Tell%20me%20about%20x86%2064%20bits%20CPU%20...

>From the web site I see the following:

"How do I detect if the CPU is 64 bits ? You can find that out by
checking CPUID. All AMD64 compliant processors have the
longmode-capable-bit turned on in the extended feature flags (bit 29)
in EDX, after calling CPUID with EAX=0x80000001. "

Unfortunately, my understanding of what EDX and EAX means is zero... but
looking through your code I suspect that this may be the missing entry from
the cpu_flags_strings table in dmi_processor.h:

NULL, /* 30 */

In the Linux kernel I see that /proc/cpuinfo is determined through the
/usr/include/asm/cpufeature.h include as:

#define X86_FEATURE_LM          (1*32+29) /* Long Mode (x86-64) */

Would I simply need to Change the NULL entry to a string in
cpu_flags_strings table, add a bool in s_cpu_flags and then
dmi.c would automagically set the boolean correctly ?

I could then modify dmitest to check for Long Mode and achieve
my goal.

Any help hugely appreciated!

Cheers,

Doug


-- 

The big print giveth and the small print taketh away.




More information about the Syslinux mailing list