summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-10-08 21:22:24 +0800
committerJi Luo <ji.luo@nxp.com>2020-05-15 17:34:35 +0800
commitc4624a094f314ce1bc58e5c45cba13e282d8ca93 (patch)
tree50f385865e433a7bd70d35718c5569780be6afe5 /lib
parent123c4738ec8b8282efdd4b5c9d131a686f460c00 (diff)
MA-15575-3 Add support for oemlock 1.0 hal
Add commands to read oem device unlock state from trusty avb app. Use the oem device unlock state to determine if the device can be unlocked instead of the state in persistdata part. Test: Read oem device unlock state from avb app. Change-Id: Ifccaa788ba0f681c2b3a47151c8474e8da5a2559 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit c6eaf8e32987f120c0c5441ea39aa0f39a65b50d)
Diffstat (limited to 'lib')
-rw-r--r--lib/trusty/ql-tipc/avb.c7
1 files changed, 7 insertions, 0 deletions
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);
+}