Thread (17 messages) 17 messages, 4 authors, 2012-12-26
STALE4909d
Revisions (11)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v2 [diff vs current]
  6. v1 [diff vs current]
  7. v3 [diff vs current]
  8. v3 [diff vs current]
  9. v3 current
  10. v4 [diff vs current]
  11. v3 [diff vs current]

[PATCH v3 4/6] ARM: EXYNOS: Add support for Exynos secure firmware

From: Tomasz Figa <hidden>
Date: 2012-11-12 10:09:59
Also in: linux-samsung-soc

Hi Russel,

On Monday 12 of November 2012 09:51:14 Russell King - ARM Linux wrote:
quoted
+
+static int exynos_cpu_boot(int cpu)
+{
+	exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0);
+	return 0;
+}
Same for this (though, what _exactly_ is 'cpu', is it the physical CPU
number or the logical CPU number?)
Yes, it's the physical CPU number.
quoted
+
+static int exynos_cpu_boot_reg(int cpu, void __iomem **ptr)
+{
+	*ptr = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu;
+	return 0;
+}
This is really bad.  What's it trying to do?  What is the significance
of the 'ptr' returned?  What if a platform doesn't have a boot register?
It returns a pointer to the area where boot code (secondary startup) 
address must be stored.

This callback (just as all the firmware callbacks) is optional, if it is 
not appropriate for given platform, it will not use it.

However, now when I think of it, it may be better to just add a callback 
like set_boot_addr(cpu, addr), which would set boot address of given CPU 
without exporting address of its boot register outside firmware code. Are 
you OK with this kind of approach?


Best regards,
-- 
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Linux Platform
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help