Handle error return value from copy_to_user() in ioctls to avoid
following compilation failure.
"error: ignoring return value of function declared with 'warn_unused_result'
attribute".
Change-Id: I92944ade7fb88e0543ca4254fab226da5777def7
Signed-off-by: Jeevan Shriram <quic_jshriram@quicinc.com>
The spss-util driver provides utilities required for the Secure
Processor Subsystem (SPSS). It provides the fuse state for key
selection and the SPSS HW version.
Legacy spss not support load spss by UEFI and also not support
CMAC/IAR feature.
Change-Id: Iea0d66ed66a2817850f99f74bf716d33db956812
Signed-off-by: Santosh Dronamraju <sdronamr@codeaurora.org>
Fix buffer overflow on memcpy().
memcpy size of u32 on bool variable.
memcpy() to "is_ssr_disabled" overwrites "is_iar_active" to zero.
Change-Id: If7b9ca9149feb54a37fbb0eef7300fa8021d4e54
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Read calculated cmacs on SUBSYS_AFTER_POWERUP event.
Allow user space to get the calc cmac regardless of ioctl.
Change-Id: I91d87c657a2217f467d3630e0dce41c98497d8bd
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Set saved cmac on ioctl from user space.
Write saved cmac to shared memory on SSR.
Read calculated cmac from shared memory.
Provide calculated cmac to user space via sysfs.
Cleanup unused IAR-STATE fuses.
Cleanup unused IAR-FEATURE-ENABLED fuse.
Read actual PIL area size from register.
pbl_cmac_show() returns binary rather than string.
Change IOCTL to use variable-size-array.
Change-Id: Ic4ea38685f6b9d1100a28bd958e44f513373fea9
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
During SPSS firmware update by fota, SPSS SSR causes cryptographic erase
of Secure Processor user data. To mitigate this, instead of related
SSR, platform reboot requested during fota update. In the end of fota
update, SPSS SSR re-enabled.
This change adds ioctl() to update internal driver configuration
(functionally disable or enable SSR).
Change-Id: I1d8362b4691e1a335f7f1f29bc2358d3f9b1cb21
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Nurit Lichtenstein <nuritl@codeaurora.org>
.remove need to remove apps_cmac attribute.
Change-Id: Ic636ee707e831d67059841f1d59cc00e9149ce8c
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
avoid event signaled twice.
add ioctl to check if event was signaled.
Change-Id: Ie75b9db86f2badddc08d65eee30ecd6a15795256
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
scheme for cmac_mem
IAR maps cmac_mem once and assumes it is mapped
from this moment onward. Therefore, move the
the call to iounmap(cmac_mem) to the remove() function.
Change-Id: I5afa3de900e4766520c106882e2485d6c335c54d
Signed-off-by: Nurit Lichtenstein <nuritl@codeaurora.org>
Integrate IAR spss_utils code to Lahaina. this is a manual
integration of 06ef7b7b.
Change-Id: Ib3e6665de625e696643b055cfcde022e65b5cee7
Signed-off-by: Nurit Lichtenstein <nuritl@codeaurora.org>
The spss_utils driver has a functional dependence on subsys-pil-tz module.
When subsys-pil-tz module not yet registered into PIL framework, need to
defer spss_utils probe.
Also redundant input parameters sanity checks are removed.
Change-Id: I48a934b0477d5d781c041243cc8b28dacd343375
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This change updates bits for testing on emulation platform.
Also, the change fixes spss_utils probe dependency on subsys-pil-tz.
Change-Id: I6924f73b3b69d3d4d57c989a1f8fd2217a2553ef
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
The spss-util driver provides utilities required for the Secure
Processor Subsystem (SPSS). It provides the fuse state for key selection
and the SPSS HW version.
Add snapshot for spss-util driver from msm-4.19 commit a7793b40172f
("soc: qcom: spss_utils: fix spss SSR when IAR not active").
Change-Id: I6531cae56cec9d062fa03c573bcd70207d10f1a2
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>