Skip to content

Commit 8d17004

Browse files
committed
ARM: shmobile: r8a7779: Reserve boot area when SMP is enabled
CPU core bringup on R-Car H1 uses the ARM Reset Vector Address Register (AVECR) to specify the base address and size of the boot area of the System CPU. With this enabled, when the System CPU accesses a physical address in the range from zero up to the configured size, the top address bits are replaced by those specified in the AVECR register. Hence any device residing in this low part of physical address space cannot be accessed, Prevent conflicts by reserving this memory region using request_mem_region(). Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/924961188abdf2adb52167edb7ed848a6efcca39.1693409184.git.geert+renesas@glider.be
1 parent 9797e35 commit 8d17004

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

arch/arm/mach-shmobile/smp-r8a7779.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
3838

3939
static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
4040
{
41-
void __iomem *base = ioremap(HPBREG_BASE, 0x1000);
41+
void __iomem *base;
42+
43+
if (!request_mem_region(0, SZ_4K, "Boot Area")) {
44+
pr_err("Failed to request boot area\n");
45+
return;
46+
}
47+
48+
base = ioremap(HPBREG_BASE, 0x1000);
4249

4350
/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
4451
writel(__pa(shmobile_boot_vector), base + AVECR);

0 commit comments

Comments
 (0)