firmware: qcom: scm: Introduce pas_metadata context
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 28 Jan 2022 02:55:01 +0000 (18:55 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 3 Feb 2022 21:32:29 +0000 (15:32 -0600)
commit3a99f121fe0bfa4b65ff74d9e980018caf54c2d4
tree4dd7057af0ef5b5b23e2a0c31a6d3361d2d6eefc
parent8030cb9a55688c1339edd284d9d6ce5f9fc75160
firmware: qcom: scm: Introduce pas_metadata context

Starting with Qualcomm SM8450, some new security enhancements has been
done in the secure world, which results in the requirement to keep the
metadata segment accessible by the secure world from init_image() until
auth_and_reset().

Introduce a "PAS metadata context" object that can be passed to
init_image() for tracking the mapped memory and a related release
function for client drivers to release the mapping once either
auth_and_reset() has been invoked or in error handling paths on the way
there.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220128025513.97188-2-bjorn.andersson@linaro.org
drivers/firmware/qcom_scm.c
drivers/soc/qcom/mdt_loader.c
include/linux/qcom_scm.h