Re: Cool OBP puzzle: Getting CPU manufacture info

From: Josh McCormick (c-josh.mccormick@wcom.com)
Date: Wed Sep 18 2002 - 12:18:24 EDT


All -

I am much closer to an answer, and I have additional information which
may help anyone who was looking into this. (Topic reminder: discovering
the unique ID on each UltraSPARC CPU that also gives manufacture
information.) No documentation appears to be published on this, so this
is a first.

>From the OBP, enter the "dev" command. Then do the "ls" command. You
will see the entry for your system's CPUs. For example...

ok dev
ok ls

SUNW,UltraSPARC2a,0
SUNW,UltraSPARC28,0

As you can probably see, that lists CPUs 40 and 42 (decimal). This
machine is an E10k that I'm working off of, which explains the high CPU
numbers.

Now, switch to the CPU you want to query. You do this by putting the
hexidecimal number of the CPU on the stack, and then executing the
switch-cpu command. (This step can be skipped on uniprocessor boxes.)

ok 2a
ok switch-cpu

To get the information for the selected processor, type ".sfid".
Example...

ok .sfid
Y:6 X:a W:16 L:3196b R:0

Use the steps above to switch to another CPU. Lather, rinse, repeat.

This appears to contain, someone coded, the information of the position
of the CPU on the wafer, where it was manufactured, and the lot number.
The exact meaning and ranges of these aren't known to me at this time.
The meaning of the R variable is also unknown. But would seem to be the
unique CPU identifiers that were discussed.

If you are good with assembly (and a little good at forth), you can use
the "see", "dis", and "+dis" commands to figure out what is going on.
Some recommended commands...

see .sfid
see sfid@

When you see a big hexadecimal number in paranthesis, like (f102571c),
that is a call to an assembly language routine. An assembly language
SPARC programmer could figure out what exactly is going on. Who knows?
Maybe even create a program that would run under Solaris and do the same
thing.

This was a great exercise for me, since I haven't dabbled in the Forth
language (used by the OBP) since I was a child. Anyone have something
they can add?

Josh McCormick wrote:
>
> I read this article at The Register:
> URL: http://www.theregus.com/content/3/26331.html
>
> Towards the end, the Sun guy bragged about how Sun marks each and every
> CPU with when and where it was manufacturered, even including its
> position on the wafer. Real cool. He claimed that there was "no userland
> interface for this information" and that it was "only readably by the
> knerl, with no OS call available to obtain that code".
>
> Of course, if it is readable by the kernel, and you can read the
> kernel...
>
> Well, I did some searching. The only relevant thing I could find is THIS
> bugid in SunSolve:
> 4327284 - Current SFID program cannot effectively detect the wafer
> number and lot number
>
> Basically, it talks about a problem reading the wafer number and the lot
> number of a CPU through *the OBP*. They were needing an OBP Engineer to
> modify the "SFID@ .x program" to correctly read the correct register
> bits.
>
> I should be far more skilled in the OBP than I am. Unfortunately, this
> doesn't make sense to me. But to someone who is a little more of an OBP
> guru, do you think you can use this information to come up with the
> proper syntax to pull that information up from the OBP?
>
> Example output, I know it'll at least display the Lot Number in a
> strange way, like...
> Lot Number 37:14 24 0-16777215
>
> This would be a cool toy to have if an expert can change this into a
> usable syntax. Obviously, you can type "sfid@" at the OBP. But "see
> sfid@" doesn't give me anything I would call useful. Any gurus out
> there?
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:59 EDT