Skip to contentSkip to conversation

arm: omap: RX-51: ARM errata 430973 workaround

PATCH Ивайло Димитров 2 participants 2 messages Mar 30, 2013 – Mar 31, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 26 lines

-------- Оригинално писмо --------
От: Pavel Machek
Относно: Re: [PATCH] arm: omap: RX-51: ARM errata 430973 workaround До: Pali Rohár
Изпратено на: Събота, 2013, Март 30 20:36:54 EET

Hi!

Quoted 17 lines
(quoted diff) +17 -0
+u32 rx51_secure_dispatcher(u32 idx, u32 flag, u32 nargs, u32 arg1, u32 arg2,
+			   u32 arg3, u32 arg4)
+{
+	u32 ret;
+	u32 param[5];
+
+	param[0] = nargs+1;
+	param[1] = arg1;
+	param[2] = arg2;
+	param[3] = arg3;
+	param[4] = arg4;
+
+	/*
+	 * Secure API needs physical address
+	 * pointer for the parameters
+	 */
+	flush_cache_all();
Quoted 9 lines

Review

Quoted 5 lines
(quoted diff) +5 -0
+	outer_clean_range(__pa(param), __pa(param + 5));
+	ret = rx51_ppa_smc(idx, flag, __pa(param));
+
+	return ret;
+}

You can do without ret variable... Also more detailed changelog would be nice... like what exact problem this works around.

Sure i can, but I don't see a reason to ignore SM's return value. Changelog of what?

Quoted 9 lines

So... some CPU errata where code sharing virtual addresses could be executed improperly?

Quoted 4 lines
(quoted diff) +0 -0
@@ -103,6 +104,12 @@ static void __init rx51_init(void)
 	rx51_peripherals_init();
 	rx51_camera_init();
 
Quoted 14 lines

Review static void __init rx51_init(void) · line 112

Quoted 6 lines
(quoted diff) +6 -0
+#ifdef CONFIG_ARM_ERRATA_430973
+	printk(KERN_INFO "Enabling ARM errata 430973 workaround.\n");
+	/* set IBE to 1 */
+	rx51_secure_update_aux_cr(1 << 6, 0);
+#endif
+

Thanks,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

I guess if you read the thread over the ML you'll have your questions already answered. Or google for "ARM errata 430973 workaround" :).

Regards,
Ivo

#1 lore raw

Hi!

Quoted 8 lines
Quoted 3 lines

You can do without ret variable... Also more detailed changelog would be nice... like what exact problem this works around.

Sure i can, but I don't see a reason to ignore SM's return value. Changelog of what?

I guess if you read the thread over the ML you'll have your questions already answered. Or google for "ARM errata 430973 workaround" :).

I did my googling. But I should not have had to. Just put the explanatory link in commit log.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html