public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Reading OMAP3 CONTROL_RAND_KEY_0 register hangs
@ 2009-01-15 16:23 Dirk Behme
  2009-01-15 19:43 ` Woodruff, Richard
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2009-01-15 16:23 UTC (permalink / raw)
  To: linux-omap


With OMAP3530 on BeagleBoard we like to read OMAP3's 
CONTROL_RAND_KEY_0 (0x4800 2318) register with something like

printf ("attempting cpu_uid read\n");
u32 cpu_uid = *((u32 *) 0x48002318);
/* u32 cpu_uid = readl(&ctrl_base->randkey_0); */
printf ("cpu_uid read done\n");

This does hang after first printf, second printf is never printed. 
Both, the direct register access and the readl style doesn't work. 
Access to other system control module register in the same address 
range works fine, though.

Any idea or hint?

For details see spruf98b.pdf page 960 and

http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=blobdiff;f=cpu/arm_cortexa8/omap3/sys_info.c;h=347e8ba24b03d5a4c3a37878cf6fc9f6868066c7;hp=67955531f3f0782b2f3f7e587472e0bef08c921c;hb=292a36ca0271c4a93196f4efd118640b11a65482;hpb=0b043b4ac2144a517d2a5d24ffff7c957b9178f7

Yes, this isn't Linux, but for U-Boot. But as a lot OMAP experts are 
here and same might happen if reading this registers from Linux, we'd 
like to ask here.

Thanks

Dirk







^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Reading OMAP3 CONTROL_RAND_KEY_0 register hangs
  2009-01-15 16:23 Reading OMAP3 CONTROL_RAND_KEY_0 register hangs Dirk Behme
@ 2009-01-15 19:43 ` Woodruff, Richard
  2009-01-16 16:11   ` Dirk Behme
  0 siblings, 1 reply; 4+ messages in thread
From: Woodruff, Richard @ 2009-01-15 19:43 UTC (permalink / raw)
  To: Dirk Behme, linux-omap@vger.kernel.org

> With OMAP3530 on BeagleBoard we like to read OMAP3's
> CONTROL_RAND_KEY_0 (0x4800 2318) register with something like
>
> printf ("attempting cpu_uid read\n");
> u32 cpu_uid = *((u32 *) 0x48002318);
> /* u32 cpu_uid = readl(&ctrl_base->randkey_0); */
> printf ("cpu_uid read done\n");

This address is not accessible out side of secure mode along with some other qualifiers.

Trying to access is futile and will result in an abort.  The control register range is full of readable and aborting addresses.

Regards,
Richard W.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reading OMAP3 CONTROL_RAND_KEY_0 register hangs
  2009-01-15 19:43 ` Woodruff, Richard
@ 2009-01-16 16:11   ` Dirk Behme
  2009-01-17  0:14     ` Woodruff, Richard
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2009-01-16 16:11 UTC (permalink / raw)
  To: Woodruff, Richard; +Cc: linux-omap@vger.kernel.org

Woodruff, Richard wrote:
>> With OMAP3530 on BeagleBoard we like to read OMAP3's
>> CONTROL_RAND_KEY_0 (0x4800 2318) register with something like
>>
>> printf ("attempting cpu_uid read\n");
>> u32 cpu_uid = *((u32 *) 0x48002318);
>> /* u32 cpu_uid = readl(&ctrl_base->randkey_0); */
>> printf ("cpu_uid read done\n");
> 
> This address is not accessible out side of secure mode along with some other qualifiers.
> 
> Trying to access is futile and will result in an abort.  The control register range is full of readable and aborting addresses.

Is there any hint in TRM (spruf98b.pdf) identifying/marking which 
registers are readable in normal and which are only accessible in 
secure mode?

Thanks

Dirk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Reading OMAP3 CONTROL_RAND_KEY_0 register hangs
  2009-01-16 16:11   ` Dirk Behme
@ 2009-01-17  0:14     ` Woodruff, Richard
  0 siblings, 0 replies; 4+ messages in thread
From: Woodruff, Richard @ 2009-01-17  0:14 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap@vger.kernel.org

> > This address is not accessible out side of secure mode along with some other
> qualifiers.
> >
> > Trying to access is futile and will result in an abort.  The control
> register range is full of readable and aborting addresses.
>
> Is there any hint in TRM (spruf98b.pdf) identifying/marking which
> registers are readable in normal and which are only accessible in
> secure mode?

Hints, in that TRM, I'd not looked in that one before, but yes.  Actually, it seems all those registers have sufficient information for you to know if they are good to access or not.

In each register description the 'type' field instead of having 'r/w/..' has 'refer to table-xyz'.  The table is right after the register.  That table gives accessibility for NSP and SP modes (non-secure and secure).

For CONTROL_RAND_KEY_0 in Table 7-144 is shows 'Not Accessible' in NSP mode.

You can also look at CONTROL_SEC_CTRL register which sets the behavior of some of these register groups.  Secure code at boot would have set the defaults.

Regards,
Richard W.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-17  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 16:23 Reading OMAP3 CONTROL_RAND_KEY_0 register hangs Dirk Behme
2009-01-15 19:43 ` Woodruff, Richard
2009-01-16 16:11   ` Dirk Behme
2009-01-17  0:14     ` Woodruff, Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox