summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig5
-rw-r--r--lib/trusty/ql-tipc/avb.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 792a2cbfa9..19db47fe99 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -405,6 +405,11 @@ config AT_AUTHENTICATE_UNLOCK
config SECURE_UNLOCK
bool "Enable secure unlock for Android devices, it can only be enabled on HAB closed board"
+
+config TRUSTY_UNLOCK_PERMISSION
+ bool "Support unlock permission protection in trusty"
+ depends on IMX_TRUSTY_OS
+
endmenu
menu "Hashing Support"
diff --git a/lib/trusty/ql-tipc/avb.c b/lib/trusty/ql-tipc/avb.c
index 95b26fd2f8..937cafc910 100644
--- a/lib/trusty/ql-tipc/avb.c
+++ b/lib/trusty/ql-tipc/avb.c
@@ -260,3 +260,10 @@ int trusty_lock_boot_state(void)
{
return avb_do_tipc(LOCK_BOOT_STATE, NULL, 0, NULL, NULL);
}
+
+int trusty_read_oem_unlock_device_permission(uint8_t *oem_device_unlock)
+{
+ uint32_t resp_size = sizeof(*oem_device_unlock);
+ return avb_do_tipc(READ_OEM_UNLOCK_DEVICE_PERMISSION, NULL, 0, oem_device_unlock,
+ &resp_size);
+}