Skip to contentSkip to conversation

Nokia RX-51: Do not call secure PPA routine on non secure devices

PATCH In review Pali Rohár 4 participants 5 messages Jan 8, 2015 – Jan 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Nokia RX-51: Do not call secure PPA routine on non secure devices

Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu.

This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again.

---
 board/nokia/rx51/rx51.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
board/nokia/rx51/rx51.c +5 -1
index b6b8ad6..08fcaf2 100644
@@ -422,8 +422,12 @@ int misc_init_r(void)
 	/*
 	 * Cortex-A8(r1p0..r1p2) errata 430973 workaround
 	 * Set IBE bit in Auxiliary Control Register
+	 *
+	 * Call this routine only on real secure device
+	 * Qemu does not implement secure PPA and crash
 	 */
-	omap3_update_aux_cr_secure_rx51(1 << 6, 0);
+	if (get_device_type() == HS_DEVICE)
+		omap3_update_aux_cr_secure_rx51(1 << 6, 0);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Nokia RX-51: Do not call secure PPA routine on non secure devices

Quoted 9 lines · Pali Roh?r

Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu.

This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again.

Quoted 22 lines
---
 board/nokia/rx51/rx51.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
board/nokia/rx51/rx51.c +5 -1
index b6b8ad6..08fcaf2 100644
@@ -422,8 +422,12 @@ int misc_init_r(void)
 	/*
 	 * Cortex-A8(r1p0..r1p2) errata 430973 workaround
 	 * Set IBE bit in Auxiliary Control Register
+	 *
+	 * Call this routine only on real secure device
+	 * Qemu does not implement secure PPA and crash
 	 */
-	omap3_update_aux_cr_secure_rx51(1 << 6, 0);
+	if (get_device_type() == HS_DEVICE)
+		omap3_update_aux_cr_secure_rx51(1 << 6, 0);
 
 	return 0;
 }
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw

PATCH 1/1 Nokia RX-51: Do not call secure PPA routine on non secure devices

In reply to Pali Rohár

Hi Pali Roh?r,

Have you tested this patch on a secure device (as the nokia n900)?

Regards,

Georges

Le 08/01/2015 10:11, Pali Roh?r a ?crit :

Quoted 31 lines

Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu.

This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again.

---
  board/nokia/rx51/rx51.c |    6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
board/nokia/rx51/rx51.c +5 -1
index b6b8ad6..08fcaf2 100644
@@ -422,8 +422,12 @@ int misc_init_r(void)
  	/*
  	 * Cortex-A8(r1p0..r1p2) errata 430973 workaround
  	 * Set IBE bit in Auxiliary Control Register
+	 *
+	 * Call this routine only on real secure device
+	 * Qemu does not implement secure PPA and crash
  	 */
-	omap3_update_aux_cr_secure_rx51(1 << 6, 0);
+	if (get_device_type() == HS_DEVICE)
+		omap3_update_aux_cr_secure_rx51(1 << 6, 0);
 
  	return 0;
  }
#3 lore raw

PATCH 1/1 Nokia RX-51: Do not call secure PPA routine on non secure devices

Yes, and it is working (linux kernel was booted without problem).

Quoted 50 lines · On Thursday 08 January 2015 22:53:18 Georges Savoundararadj wrote:

Hi Pali Roh?r,

Have you tested this patch on a secure device (as the nokia n900)?

Regards,

Georges

Le 08/01/2015 10:11, Pali Roh?r a ?crit :

Quoted 40 lines

Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu.

This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again.

---

  board/nokia/rx51/rx51.c |    6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/board/nokia/rx51/rx51.c index b6b8ad6..08fcaf2 100644

board/nokia/rx51/rx51.c +5 -1
@@ -422,8 +422,12 @@ int misc_init_r(void)
 
  	/*
 
  	 * Cortex-A8(r1p0..r1p2) errata 430973 workaround
  	 * Set IBE bit in Auxiliary Control Register
 
+	 *
+	 * Call this routine only on real secure device
+	 * Qemu does not implement secure PPA and crash
 
  	 */
 
-	omap3_update_aux_cr_secure_rx51(1 << 6, 0);
+	if (get_device_type() == HS_DEVICE)
+		omap3_update_aux_cr_secure_rx51(1 << 6, 0);
 
  	return 0;
 
  }
Signature · 9 lines
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150115/48392550/attachment.pgp>
#4 lore raw
In reply to Pali Rohár
Quoted 10 lines · Pali Roh?r

Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu.

This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150112/85cdc482/attachment.pgp>