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

Commit 17e57f8b authored by Archit Saxena's avatar Archit Saxena Committed by Gerrit - the friendly Code Review server
Browse files

soc: mem_dump: Enable MSM_DEBUG_LAR_UNLOCK for MSM8937



Enable MSM_DEBUG_LAR_UNLOCK for MSM8937. This allows unlocking
Core Debug lock to allow capture of upper 32 bits of program
counter at the time of system dump.

Change-Id: Idb1e8550f63763960d9ac0fdde41a09fbed4e513
Signed-off-by: default avatarArchit Saxena <archsaxe@codeaurora.org>
Signed-off-by: default avatarShilpa Suresh <sbsure@codeaurora.org>
parent 15adff88
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -315,6 +315,15 @@ config QCOM_MEMORY_DUMP_V2
	  of deadlocks or cpu hangs these dump regions are captured to
	  give a snapshot of the system at the time of the crash.

config MSM_DEBUG_LAR_UNLOCK
	bool "MSM Debug LAR Unlock Support"
	depends on QCOM_MEMORY_DUMP_V2
	help
	  This allows unlocking Core Debug lock to allow capture
	  of upper 32 bits of program counter at the time of
	  system crash. This is useful in getting correct crash
	  location.

config QCOM_SMEM_STATE
	bool

+2 −7
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014-2017, 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2017, 2019-2021, The Linux Foundation. All rights reserved.
 */

#include <asm/cacheflush.h>
@@ -755,13 +755,8 @@ static int init_memory_dump(void *dump_vaddr, phys_addr_t phys_addr,
static int __init init_debug_lar_unlock(void)
{
	int ret;
	uint32_t argument = 0;
	struct scm_desc desc = {0};

	if (!is_scm_armv8())
		ret = scm_call(SCM_SVC_TZ, SCM_CMD_DEBUG_LAR_UNLOCK, &argument,
			       sizeof(argument), NULL, 0);
	else
	ret = scm_call2(SCM_SIP_FNID(SCM_SVC_TZ,
				SCM_CMD_DEBUG_LAR_UNLOCK), &desc);
	if (ret)