Skip to contentSkip to conversation

OMAP3 ROM Random Number Generator support

PATCH Ивайло Димитров 2 participants 2 messages Apr 1, 2013 – Apr 2, 2013

lore
Share & tools
lore
#0 lore raw

It could be that I am misreading something, but RX51 is OMAP3.

Regards,
Ivo

Quoted 40 lines

-------- Оригинално писмо --------
От: Tony Lindgren
Относно: Re: [PATCH] OMAP3 ROM Random Number Generator support До: Ивайло Димитров
Изпратено на: Понеделник, 2013, Април 1 19:59:50 EEST

Quoted 26 lines · Ивайло Димитров

Hi Pali,

Yep, the code looks almost identical, I guess with some tweaks all SMC code from that patch could be removed and instead used the one from SMC PPA API.

What I don't get, is why one needs to disable/enable fiqs/irqs:

(quoted diff) +18 -0
+static int call_sec_rom(u32 appl_id, u32 proc_id, u32 flag, ...)
+{
+	va_list ap;
+	u32 ret;
+	u32 val;
+
+	va_start(ap, flag);
+	val = *(u32 *) ≈
+	local_irq_disable();
+	local_fiq_disable();
+	ret = omap3_rom_rng_call(appl_id, proc_id, flag,
+				 (u32) virt_to_phys((void *) val));
+	local_fiq_enable();
+	local_irq_enable();
+	va_end(ap);
+
+	return ret;
+}
Quoted 1 line

Do you have any idea why is that needed? Any other code I've ever seen to call SM, does not disable fiqs/irqs, is RNG SMC somehow special? I know this is Nokia's code, but still, if we can get some understanding...

Sounds like the fiq handling can be dropped based on what the TI guys posted recently about FIQs only be available in the secure mode starting with omap2.

Quoted 4 lines

Regards,

Tony

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 1 line · Ивайло Димитров

It could be that I am misreading something, but RX51 is OMAP3.

Yes the FIQs are only accessible in the secure mode starting with omap2. So that also means omap3, 4, 5.

Regards,

Tony