BeagleBoard Unique ID?

961 views
Skip to first unread message

Richard

unread,
Jan 19, 2009, 5:49:12 AM1/19/09
to Beagle Board
Hi all,
I'm trying to work out if the BeagleBoard has some form of unique (and
ideally, secure) id?

This thread suggests that something is available in a particular
register:
http://groups.google.com/group/beagleboard/browse_frm/thread/7d1719a7866a6bc8/d45669c9e98eecb8?lnk=gst&q=secure+mode#d45669c9e98eecb8
But is not really accessible.

Is there anything else available?

Thanks!

-Richard

Krishna Nagarajan

unread,
Jan 19, 2009, 9:24:36 AM1/19/09
to beagl...@googlegroups.com
Hello,
 
I am trying to invalidate the I-cache using the following in my code:
 

asm(" MCR p15, 0, r0, c7, c5, 0");

 

I am able to compile successfully. However, when I try to execute the code, I get an "Illegal Instruction" output.

 

Does this mean that the kernel I am using is not supporting the MCR instruction? If yes, what should be the selection in menuconfig?

 

Thanks in advance,

Krishna


Laurent Desnogues

unread,
Jan 19, 2009, 9:47:59 AM1/19/09
to beagl...@googlegroups.com

This means this instruction is privileged and can only be run by the kernel.
This behaviour is documented here:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344b/Babhejba.html

ARM Linux kernel has a syscall to flush caches. I don't know how to
invoke it, but google should be your friend :-) Look for arm and
cacheflush.


Laurent

Søren Steen Christensen

unread,
Jan 19, 2009, 12:34:22 PM1/19/09
to beagl...@googlegroups.com
Hi Richard,

You can use the DIE_ID-register which will be unique for each OMAP-chip:
CONTROL.CONTROL_DIE_ID[127:0] 0x4830A218

The register is build internally at TI during production, and contains
unique info for each device... Unfortunately I haven't found the format
officially available to TI externals, which is the reason I don't disclose
more information here - But trust me it's unique... :-)

The officially released info can be found at page 195 in the TRM :-)

Best regards - Good luck
Søren

PS: What do you mean with "secure" on a GP device?
The DIE_IUD is fused into the chip, and can't be changed - Is this what you
meant?

Richard

unread,
Jan 19, 2009, 12:38:13 PM1/19/09
to Beagle Board
Hi Soeren,
that sounds like exactly what I need; an id that's unique to the
device and can't be (easily) changed or 'spoofed'.

Shame there's no way of getting to it...
What is the TRM document that you referred to?

Thanks!
-Richard

On Jan 19, 5:34 pm, Søren Steen Christensen

Gerald Coley

unread,
Jan 19, 2009, 12:41:15 PM1/19/09
to beagl...@googlegroups.com
That is the Tecnical Reference Manual. It is the bible for the OMAP3530. You can find it at http://focus.ti.com/docs/prod/folders/print/omap3530.html 
 
Gerald

Søren Steen Christensen

unread,
Jan 19, 2009, 1:06:57 PM1/19/09
to beagl...@googlegroups.com
Hi Richard,

The document is called spruf98b.pdf - See as well the link just send by
Gerald...

> that sounds like exactly what I need; an id that's unique to the
> device and can't be (easily) changed or 'spoofed'.
Agree - Both properties are valid for DIE_ID...

> Shame there's no way of getting to it...
No way of getting to it? Do you mean you have problems reading it in SW?
Or the fact, that the information isn't fully public?
Søren


On Jan 19, 5:34 pm, Søren Steen Christensen
<sorenschristen...@stofanet.dk> wrote:
> Hi Richard,
>
> You can use the DIE_ID-register which will be unique for each OMAP-chip:
>    CONTROL.CONTROL_DIE_ID[127:0] 0x4830A218
>
> The register is build internally at TI during production, and contains
> unique info for each device... Unfortunately I haven't found the format
> officially available to TI externals, which is the reason I don't disclose
> more information here - But trust me it's unique... :-)
>
> The officially released info can be found at page 195 in the TRM :-)
>
> Best regards - Good luck
>   Søren
>
> PS: What do you mean with "secure" on a GP device?
> The DIE_IUD is fused into the chip, and can't be changed - Is this what
you
> meant?
>
> > Hi all,
> > I'm trying to work out if the BeagleBoard has some form of unique (and
> > ideally, secure) id?


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.9/1900 - Release Date: 19-01-2009
09:37

Steve Sakoman

unread,
Jan 19, 2009, 11:31:02 PM1/19/09
to beagl...@googlegroups.com
On Mon, Jan 19, 2009 at 9:34 AM, Søren Steen Christensen
<sorensch...@stofanet.dk> wrote:
>
> Hi Richard,
>
> You can use the DIE_ID-register which will be unique for each OMAP-chip:
> CONTROL.CONTROL_DIE_ID[127:0] 0x4830A218

Have you been successful in reading this register?

My experience is that this register cannot be accessed unless you are
running in secure mode.

If you have found a way, please share!

Steve

Søren Steen Christensen

unread,
Jan 20, 2009, 12:57:39 AM1/20/09
to beagl...@googlegroups.com

This register as well? In given case, I find it strange - Normally the
DIE_ID is fine accessible in a GP-device, but to be honest I haven't checked
it on the OMAP3530 - At least not for a while - I can't remember if ever? I
however checked it on an OMAPv1035 GP-device not that long ago - Here it's
working. :-)

I will give it at try ASAP - Probably sometime tonight EU time?
Søren


Søren Steen Christensen

unread,
Jan 20, 2009, 1:29:11 AM1/20/09
to beagl...@googlegroups.com

I just gave it a quick try in u-boot with the md (memory display) command,
which worked fine...
- At least the board didn't crash and AFAIR the value looks OK as well.

OMAP3 beagleboard.org # md 0x4830a218 1
4830a218: 0a018019 ....
OMAP3 beagleboard.org #

Best regards
Søren

Richard

unread,
Jan 20, 2009, 3:49:37 AM1/20/09
to Beagle Board
Thanks Soeren,
that looks good.

I'm going to save time and admit my ignorance; how would I go about
accessing this register in my C code running on the board? I.e. do
you have a little code snippet you could share?

Thanks very much in advance,

-Richard

On Jan 20, 6:29 am, Søren Steen Christensen

Strontium

unread,
Jan 20, 2009, 4:20:36 AM1/20/09
to beagl...@googlegroups.com
I cant give you a code snippet, but the register lies at a physical
address, and your application runs in the virtual address space. The
standard way to cross the barrier is with a kernel driver. Look for
information about kernel drivers on the net you will see examples of the
sort of code you need.

Strontium

Richard

unread,
Jan 20, 2009, 9:45:16 AM1/20/09
to Beagle Board
OK, so I'm replying to my own message... :-)

Many thanks to 'mru' for a great example on how to achieve this:
http://thrashbarg.mansr.com/~mru/memdump.c

The key point is to use mmap to read the appropriate bytes from /dev/
mem

-Richard

Gregoire Gentil

unread,
Jan 20, 2009, 1:41:08 PM1/20/09
to beagl...@googlegroups.com, Koen Kooi

> == 4 of 5 ==
> Date: Tues, Jan 20 2009 12:49 am
> From: Richard
>
>
> Thanks Soeren,
> that looks good.
>
> I'm going to save time and admit my ignorance; how would I go about
> accessing this register in my C code running on the board? I.e. do
> you have a little code snippet you could share?
>
> Thanks very much in advance,
>
> -Richard
Here is a recipe,

Grégoire


uniqueid.zip

Richard

unread,
Jan 21, 2009, 3:41:14 AM1/21/09
to Beagle Board
Thanks Gregoire.

When you say "recipe", is this something for BitBake to use?

-R
>  uniqueid.zip
> 3KViewDownload

G2

unread,
Jan 21, 2009, 3:47:27 PM1/21/09
to Beagle Board
Correct: "bitbake uniqueid". When I compare to the u-boot patch sent
by Dirk, and according to Mru's comment in the lounge, I think that
the serial number is longer than I extract it. You need to edit the
script file,

Grégoire

Richard

unread,
Jan 21, 2009, 5:20:16 PM1/21/09
to Beagle Board
Thanks.

And yes, you're right. DIE ID is 128 bits long (16 bytes).

-Richard
Reply all
Reply to author
Forward
0 new messages