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

Commit a4db2dab authored by Eric Holmberg's avatar Eric Holmberg Committed by Stephen Boyd
Browse files

msm: smem: clarify SBL misconfiguration error messages



SMEM must be initialized by the secondary bootloader (SBL) before Linux
is booted and the SMEM driver is initialized.  If it is not initialized,
error messages are printed and SMEM is disabled.  Some of these error
messages can be misinterpreted to be a Linux configuration issue instead
of an SBL issue which delays resolving the misconfiguration.

Add additional code comments and change the error messages to make it
clear that the SBL has not initialized SMEM.

Change-Id: I1d80245337fbfb708a070d56c65c293aed9a2b6b
Signed-off-by: default avatarEric Holmberg <eholmber@codeaurora.org>
parent d068f692
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -923,8 +923,17 @@ bool smem_initialized_check(void)
									true);
	if (version_array == NULL)
		goto failed;
	if (version_array[MODEM_SBL_VERSION_INDEX] != SMEM_VERSION << 16)

	/*
	 * The Modem SBL is now the Master SBL version and is required to
	 * pre-initialize SMEM and fill in any necessary configuration
	 * structures.  Without the extra configuration data, the SMEM driver
	 * cannot be properly initialized.
	 */
	if (version_array[MODEM_SBL_VERSION_INDEX] != SMEM_VERSION << 16) {
		pr_err("%s: SBL version not correct\n", __func__);
		goto failed;
	}

	is_inited = 1;
	checked = 1;
@@ -935,7 +944,8 @@ failed:
	is_inited = 0;
	checked = 1;
	spin_unlock_irqrestore(&smem_init_check_lock, flags);
	LOG_ERR("%s: bootloader failure detected, shared memory not inited\n",
	LOG_ERR(
		"%s: shared memory needs to be initialized by SBL before booting\n",
								__func__);
	return is_inited;
}