Mouse | 9 Apr 2012 18:57

64-bit-ness?

I'd like to switch one of my NetBSD/i386 machines to amd64.  There's
one that's known to run amd64, but it's not really very switchable at
present, so I was looking for another one.  I tried the most available
one and it simply reset as soon as the bootloader had loaded the kernel
off the install CD, so I assume that hardware is not recent enough to
run 64bit.

Is there an easy way to tell, given a root shell on a NetBSD/i386
machine, whether the hardware is NetBSD/amd64-compatible (or at least
64-bit compatible - I recognize there may be differences in supported
hardware and the like in corner cases)?  Looking at the list of
features reported for the CPUs on the one known-to-run-amd64 machine
and the one that isn't, I didn't see anything in the differences that
screamed "I'm 64-bit-ready!" to me.  My Web-fu is weak at best, but I
did some poking around, and my best guess is that features2 including
SSE3 is a pretty good correlate.  Might this be correct?  Or is there a
better test?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Dave Huang | 9 Apr 2012 19:07
Gravatar

Re: 64-bit-ness?


On Apr 9, 2012, at 11:57 AM, Mouse wrote:
> Is there an easy way to tell, given a root shell on a NetBSD/i386
> machine, whether the hardware is NetBSD/amd64-compatible (or at least
> 64-bit compatible - I recognize there may be differences in supported
> hardware and the like in corner cases)? 

I think you can look in features3 for "EM64T" on an Intel CPU, or  "LONG" on an AMD.
--

-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym <at> azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++

Mouse | 9 Apr 2012 19:27

Re: 64-bit-ness?

>> Is there an easy way to tell, given a root shell on a NetBSD/i386
>> machine, whether the hardware is NetBSD/amd64-compatible (or at
>> least 64-bit compatible - I recognize there may be differences in
>> supported hardware and the like in corner cases)?
> I think you can look in features3 for "EM64T" on an Intel CPU, or
> "LONG" on an AMD.

That's about what I would have expected...except that that one machine
I mentioned that's known to run NetBSD/amd64 shows neither:

cpu0: Intel Core 2 (Merom) (686-class), 1795.58 MHz, id 0x6fd
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 e3bd<SSE3,MONITOR,DS-CPL,VMX,EST,TM2,xTPR>
cpu0: "Intel(R) Core(TM)2 Duo CPU     T7100   <at>  1.80GHz"
cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu0: L2 cache 2 MB 64B/line 8-way

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Dave Huang | 9 Apr 2012 20:08
Gravatar

Re: 64-bit-ness?


On Apr 9, 2012, at 12:27 PM, Mouse wrote:
>> I think you can look in features3 for "EM64T" on an Intel CPU, or
>> "LONG" on an AMD.
> 
> That's about what I would have expected...except that that one machine
> I mentioned that's known to run NetBSD/amd64 shows neither:

Interesting/strange :( Intel's specification page for that processor,
http://ark.intel.com/products/29759/Intel-Core2-Duo-Processor-T7100-%282M-Cache-1_80-GHz-800-MHz-FSB%29
does say "Intel 64: Yes". I don't know why that's not reflected in the 
cpuctl identify output; it seems like it should be...

While it seems like there should be a way to tell from the cpuctl 
output, I guess you could look up the specs for the other processor and
see whether it supports Intel 64/AMD64.
--

-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym <at> azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++

Mouse | 9 Apr 2012 21:36

Re: 64-bit-ness?

>>> I think you can look in features3 for "EM64T" on an Intel CPU, or
>>> "LONG" on an AMD.
>> That's about what I would have expected...except that that one
>> machine I mentioned that's known to run NetBSD/amd64 shows neither:
> Interesting/strange :(  Intel's specification page for that processor
> [] does say "Intel 64: Yes".

Which matches my experience that it does indeed run NetBSD/amd64.

> I don't know why that's not reflected in the cpuctl identify output;
> it seems like it should be...

That wasn't cpuctl identify output; that machine is at 4.0.1, which
doesn't have cpuctl and which prints that stuff at boot time.  I just
looked at the code, in case maybe the bit is set and it just isn't
getting printed, and it looks to me as though it should be printed if
it's set (i386/i386/identcpu.c does have a clause that uses
CPUID_FLAGS4 if any of the feature3 bits are set).

> While it seems like there should be a way to tell from the cpuctl
> output, I guess you could look up the specs for the other processor
> and see whether it supports Intel 64/AMD64.

I could, perhaps.  For most of my machines, though, it's easier and
quicker to just try booting the amd64 installer.  I was hoping to avoid
bringing certain of my machines down on speculation; I suppose I'll
leave them to last....

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
(Continue reading)

Mouse | 10 Apr 2012 00:13

Re: 64-bit-ness?

>> I don't know why [a particular CPU's support for Intel64 is] not
>> reflected in the cpuctl identify output; it seems like it should
>> be...
> I just looked at the code, in case maybe the bit is set and it just
> isn't getting printed, and it looks to me as though it should be
> printed if it's set (i386/i386/identcpu.c does have a clause that
> uses CPUID_FLAGS4 if any of the feature3 bits are set).

I just found another machine which _does_ advertise it, and yes, the
code is capable of reporting EM64T:

cpu0: Intel (686-class), 2800.34 MHz, id 0xf64
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 e49d<SSE3,MONITOR,DS-CPL,EST,CID,xTPR>
cpu0: features3 20100000<XD,EM64T>
cpu0: "Intel(R) Pentium(R) D CPU 2.80GHz"

That's the same OS rev as the one I quoted before which didn't print
it.  Also, I got a chance to test another machine today.  It advertises
SSE3 but does not boot the amd64 installer CD and thus presumably does
not actually support 64-bit:

cpu0: Intel (686-class), 3215.68 MHz, id 0xf34
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 441d<SSE3,MONITOR,DS-CPL,CID,xTPR>
cpu0: "Intel(R) Pentium(R) 4 CPU 3.20GHz"
(Continue reading)

David Laight | 10 Apr 2012 10:20
Picon

Re: 64-bit-ness?

On Mon, Apr 09, 2012 at 06:13:58PM -0400, Mouse wrote:
> 
> So I guess it's generally EM64T, but with some, presumably only a few,
> processors not reporting themselves as EM64T-capable even though they
> actually are.

I've not 100% followed what you have checked, but it might just
be that the old kernel doesn't know about the bit?

	David

--

-- 
David Laight: david <at> l8s.co.uk

Mouse | 10 Apr 2012 16:24

Re: 64-bit-ness?

>> So I guess it's generally EM64T, but with some, presumably only a
>> few, processors not reporting themselves as EM64T-capable even
>> though they actually are.
> I've not 100% followed what you have checked, but it might just be
> that the old kernel doesn't know about the bit?

All of these have been with basically the same kernel code, certainly
the same when it comes to i386/i386/identcpu.c and
x86/include/specialreg.h.  It's been the hardware that's different.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Gmane