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

Commit a0bf3669 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

soc: qcom: pil: Extend minidump ToC logs for auxiliary entries



Currently, only the main subsystem ToC is printed during
SSR minidump collection, but the ToC for the auxiliary
entries are not, which makes it difficult to debug issues
with the ToC for the auxiliary entries.

Add logging to print out the minidump ToC for a subsystem's
auxiliary entries.

Change-Id: Ia9eb05f8eb3b33f856f3fc999eda3697f371c456
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent a74cb474
Loading
Loading
Loading
Loading
+31 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -405,6 +405,33 @@ static int pil_do_minidump(struct pil_desc *desc, void *ramdump_dev)
	return ret;
}

/**
 * print_aux_minidump_tocs() - Print the ToC for an auxiliary minidump entry
 * @desc: PIL descriptor for the subsystem for which minidump is collected
 *
 * Prints out the table of contents(ToC) for all of the auxiliary
 * minidump entries for a subsystem.
 */
static void print_aux_minidump_tocs(struct pil_desc *desc)
{
	int i;
	struct md_ss_toc *toc;

	for (i = 0; i < desc->num_aux_minidump_ids; i++) {
		toc = desc->aux_minidump[i];
		pr_debug("Minidump : md_aux_toc->toc_init 0x%x\n",
			 (unsigned int)toc->md_ss_toc_init);
		pr_debug("Minidump : md_aux_toc->enable_status 0x%x\n",
			 (unsigned int)toc->md_ss_enable_status);
		pr_debug("Minidump : md_aux_toc->encryption_status 0x%x\n",
			 (unsigned int)toc->encryption_status);
		pr_debug("Minidump : md_aux_toc->ss_region_count 0x%x\n",
			 (unsigned int)toc->ss_region_count);
		pr_debug("Minidump : md_aux_toc->smem_regions_baseptr 0x%x\n",
			 (unsigned int)toc->md_ss_smem_regions_baseptr);
	}
}

/**
 * pil_do_ramdump() - Ramdump an image
 * @desc: descriptor from pil_desc_init()
@@ -433,6 +460,9 @@ int pil_do_ramdump(struct pil_desc *desc,
		pr_debug("Minidump : md_ss_toc->md_ss_smem_regions_baseptr is 0x%x\n",
			(unsigned int)
			desc->minidump_ss->md_ss_smem_regions_baseptr);

		print_aux_minidump_tocs(desc);

		/**
		 * Collect minidump if SS ToC is valid and segment table
		 * is initialized in memory and encryption status is set.