amd64 webpage, 12GB memory? 64-bit or not? SMP or not?

Jeremy C. Reed reed at reedmedia.net
Sat Mar 18 16:34:55 UTC 2006


Thank you, Joseph and Scott. I am replying to both Joseph's and Scott's 
emails below. (Plus I have new questions below :)

On Sat, 18 Mar 2006, Joseph Vella wrote:

> In the upper left part of the website homepage, there's a single paragraph.  
> The last sentence of that paragraph has a direct link to the page you refer.

Thanks. I overlooked that. I was looking in the various lists of 
hyperlinks. Maybe the "amd64" could be hyperlinked above? (But then again 
maybe hyperlinking everything becomes too cluttered.) But I feel it should 
be hyperlinked for sure direct from the "Get FreeBSD" webpage.

> Right after the lines you posted I have "Multiprocessor System Detected: 2 
> CPUs":
...

> I had to recompile my kernel to get that.  I found it pretty easy to do, the 
> Handbook tells you how.  I'm not sure if this was in there but I had to add
> "Options SMP"  to my kernel config file.

That is my point. I do not want to compile and reboot with new kernel 
to know this. I am not asking how to get SMP enabled. I just want to know 
if this system even supports it.

(Thanks for links to kernconfig.html and handbook. I have had the 
opportunity to read most of the handbook -- plus several other BSD books 
in addition to my own *BSD courseware -- already. And I have configured 
and built FreeBSD kernels hundreds of times, including many with SMP 
support.)

I am looking for something like: "This machine appears to have support for 
multiprocessors; enabling 'options SMP' may take advantage of this."

> The 'LM' string in the AMD Features lines tells you that it can go into long
> mode, which means that it can operate in 64 bit mode.

Awesome! That was what I was hoping. It would be great if this was listed 
somewhere, maybe on a FAQ or amd64 or i386 webpage. (If I overlooked this 
I am sorry, but please point me to it.) (I did find brief note of this in 
identcpu.c code, but that seems like the wrong way to find out and is 
not clear.)

> > I understand. I know it is running GENERIC as I mentioned. My question is:
> > How can I tell if it can take advantage of "options SMP" (from looking at
> > 6.0-RELEASE i386 GENERIC output)?
> > 
> 
> How can I tell if my car takes diesel or unleaded?  I'm sorry, but this
> questioning sounds a bit hysterical.  But, if you truly have no other
> way of knowing, compile and run the tool in /usr/src/tools/tools/ncpus.

I don't know why it is funny. (Anyways with most cars, even without access 
to engine, you can look on dash board and on fuel cap and see.)

Imagine someone giving you remote access to a system and you don't know 
what hardware it has (since you can not physically inspect). Rebooting 
with an SMP kernel seems like the slow way to find out. I am just curious 
if there is some way without rebooting, maybe the non-SMP kernel could 
detect and printf at boot time (for dmesg) something like: "It appears 
this system is multiprocessor; using 'options SMP' may be useful."

I have used the ncpu's tool before (ported from FreeBSD to DragonFly). I 
didn't realize that it could tell a non-SMP kernel user about their 
multiprocessors.

I didn't have a chance to run it yet on FreeBSD 6.0-RELEASE, as it does 
not compile:

In file included from biosmptable.c:37:
/usr/include/machine/mptable.h:143: error: syntax error before "pcib"

Maybe because device_t is not defined yet. It is defined in sys/bus.h but 
only if _KERNEL.

I will look at that later.

It would be useful for a user to know if system is multiprocessor without 
building and running an outside tool (in this case not even included with 
FreeBSD 6.0-RELEASE).

> > I have been looking at src/sys/i386/i386/identcpu.c. But I am not sure how
> > an 64-bit Intel Xeon would behave. (I am guessing it would be CPUCLASS_686.)
> 
> CPUCLASS_686 refers to Pentium Pro and above CPUs, and significantly
> predates the 64-bit x86 architecture.  But fwiw, the i386 sources files
> are not a good place to find 64-bit code.

Understood. The system is running FreeBSD-6.0-RELEASE i386 GENERIC.  It 
would be interesting to add to the dmesg output: "Consider using the 
'amd64' kernel" if that is appropriate.

> > I do see that my dmesg output has AMD featuress with "LM" which means 64-bit
> > long mode. But I don't know if that means this is a 64-bit system.
> 
> YES!
...
> > I am hoping the system I am looking at can run the amd64 kernel.
> 
> Yes, it sure can.

That was the answer I am looking for! Thank you!

I will now reboot with an amd64 kernel. (Hopefully with reboot all my 12 
GB of memory will be seen; I do understand there are some issues with big 
memory.)

Can you please point me to the webpage that says it is okay to boot an 
amd64 kernel using a i386 (6.0-RELEASE in this case) userland? (I will 
update userland after reboot.)

Also can you point me to the documentation for cross-compiling amd64 
kernel and userland (on i386 host).

The point of my email: it would be nice if there was some documentation or 
webpage or kernel boot output that can suggest to an i386 user that they 
should consider using an amd64 kernel instead -- and it would be nice if 
there was some documentation or webpage or kernel boot output that can 
suggest to a user that an "options SMP" kernel could be beneficial.

Booting an amd64 kernel on a (possibly) non-amd64 system seems like the 
wrong way to find out.

Booting an "options SMP" kernel to find out if multiprocessor seems like a 
slow way to find out.

I will submit a patch for the amd64 webpage and maybe the FAQ and maybe 
the i386 webpage. Please review the following:
  "If you boot with an i386 kernel and it shows an "AMD Features" line 
  containing an "LM" string, then you are operating in 64-bit long mode 
  and can use an amd64 kernel."

(I don't have text for my SMP question since I still do not know the 
answer.)

Thanks again for the replies.

 Jeremy C. Reed


More information about the freebsd-amd64 mailing list