firmware: qcom: scm: Expose download-mode control
authorBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 14 Aug 2017 22:46:18 +0000 (15:46 -0700)
committerAndy Gross <andy.gross@linaro.org>
Thu, 12 Oct 2017 04:48:27 +0000 (23:48 -0500)
commit8c1b7dc9ba2294c6dbd1870a3d2e534bfda3047a
tree8d9823b880adb03cdf422d6773c720b79c6233e5
parent4e659dbe2d02a56ca0df25c77e099760252a329c
firmware: qcom: scm: Expose download-mode control

In order to aid post-mortem debugging the Qualcomm platforms provide a
"memory download mode", where the boot loader will provide an interface
for custom tools to "download" the content of RAM to a host machine.

The mode is triggered by writing a magic value somewhere in RAM, that is
read in the boot code path after a warm-restart. Two mechanism for
setting this magic value are supported in modern platforms; a direct SCM
call to enable the mode or through a secure io write of a magic value.

In order for a normal reboot not to trigger "download mode" the magic
must be cleared during a clean reboot.

Download mode has to be enabled by including qcom_scm.download_mode=1 on
the command line.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Documentation/devicetree/bindings/firmware/qcom,scm.txt
drivers/firmware/Kconfig
drivers/firmware/qcom_scm-32.c
drivers/firmware/qcom_scm-64.c
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h