Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d11003c authored by Murali Nalajala's avatar Murali Nalajala
Browse files

msm: pm-boot: flush msm_pm_boot_vector to main memory



msm_pm_boot_vector array stores cores warmboot entry before
cores enter into LPM mode. These warm boot entries must be
visible to core when it comes out of LPM mode. To ensure
this variable to appear in main memory use flush APIs to
flush out of caches. Use a different API to do this on
latest ARM based targets.

Change-Id: I870b68e4f6f6b116e93deffe59edff9094db0fa8
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent ded38ca3
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <soc/qcom/scm-boot.h>
#include <asm/cacheflush.h>
#include "idle.h"
#include "pm-boot.h"

@@ -39,9 +40,10 @@ static int msm_pm_tz_boot_init(void)
static void msm_pm_write_boot_vector(unsigned int cpu, unsigned long address)
{
	msm_pm_boot_vector[cpu] = address;
	clean_caches((unsigned long)&msm_pm_boot_vector[cpu],
		     sizeof(msm_pm_boot_vector[cpu]),
		     virt_to_phys(&msm_pm_boot_vector[cpu]));

	dmac_clean_range((void *)&msm_pm_boot_vector[cpu],
			(void *)(&msm_pm_boot_vector[cpu] +
				sizeof(msm_pm_boot_vector[cpu])));
}

static void msm_pm_config_tz_before_pc(unsigned int cpu,