[OSUNIX-dev] Re: [hpcdev-discuss] OpenSolaris open64 port - 1st round patch review

Rayson Ho raysonlogin at gmail.com
Tue Mar 3 02:10:50 GMT 2009


On Mon, Mar 2, 2009 at 7:13 PM, John Martin <John.M.Martin at sun.com> wrote:
>> 1) Best way to replace /proc/cpuinfo for OpenSolaris?
>>
>> opencc -v
>> opencc WARNING: cannot read /proc/cpuinfo, defaulting to basic 32-bit x86.
>
> This code is looking for the plain text processor description, e.g.
> "Intel(R) Core(TM) i7".  On Solaris this can be fetched with smbios.

Another way is to fetch the information from "/dev/cpu/self/cpuid":

http://blogs.sun.com/JoeBonasera/entry/detecting_hardware_virtualization_support_for

I got the program in the blog entry compiled on snv_86 without any
modification. I believe the interface should be stable, as it is
basically returning the information from the CPUID instruction.
However, we can easily change the code to execute CPUID directly using
inline assembly if we want to.

Also, with the information returned from "/dev/cpu/self/cpuid" or
CPUID, we can check for the bits set for any specific hardware
features, eg. AMD or Intel, support level of MMX or SSEx, 32 or
64-bit, etc.

http://en.wikipedia.org/wiki/CPUID


> 2) The patch comments out building ld-new.  This needs to be fixed, but
> what's the best way to do this on OpenSolaris only?

So are we planning to use the native Solaris linker??

Rayson



> I don't know the stability of the interfaces in libsmbios.so.1.  I can
> investigate this later this week.
>
> _______________________________________________
> hpcdev-discuss mailing list
> hpcdev-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/hpcdev-discuss
>



More information about the OSUNIX-dev mailing list