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

Erwan Velu erwan at seanodes.com
Tue Aug 29 00:34:59 PDT 2006


Doug Scoular wrote:
> Hi Erwan,
>
> First off, many thanks for your wonderful addition to syslinux:
> dmitest.c32 and another thankyou to hpa for it's inclusion.
You're welcome ;)
>
> 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.
Yes, this code is based on the implementation that comes from dmidecode.
DMI doesn't handle the processor information but dmidecode did it, and
this is nice because it give us some nice feature.
So, as you noticed, this is not complete.
> Unfortunately, my understanding of what EDX and EAX means is zero... 
EDX & EAX are some registers of the processor.
> 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 don't think so ;)
I didn't look precisely but you must "mask" some parts of the register
of the processor to check it the LM is set or not.
I'm adding this to my todo list.





More information about the Syslinux mailing list