diff options
author | myfluxi <linflux@arcor.de> | 2015-11-04 00:46:09 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-04 14:38:45 -0800 |
commit | c12b0cc7fd9ab0521fdf0f355bd28c6f2f7c18a3 (patch) | |
tree | 8d9c132452ef6eeadbfcd42541b0cc6bfd44cec0 /keymaster_qcom.cpp | |
parent | 9093ff000a224fec6258013d1a6de4a1816d1b33 (diff) | |
download | android_hardware_qcom_keymaster-c12b0cc7fd9ab0521fdf0f355bd28c6f2f7c18a3.tar.gz android_hardware_qcom_keymaster-c12b0cc7fd9ab0521fdf0f355bd28c6f2f7c18a3.tar.bz2 android_hardware_qcom_keymaster-c12b0cc7fd9ab0521fdf0f355bd28c6f2f7c18a3.zip |
keymaster: Featureize support for waiting on QSEE to start
New devices need to wait for QSEE to load the Keymaster into TZ.
This is signalled by a property being set by qseecomd. Unfortunately
we don't have a good way to determine if this is the case for
a particular device, so make it opt-in.
Set TARGET_KEYMASTER_WAIT_FOR_QSEE=true for this behavior.
Change-Id: I99839b82fdd8ab6550a95e2676a5da03eccfe288
Diffstat (limited to 'keymaster_qcom.cpp')
-rw-r--r-- | keymaster_qcom.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/keymaster_qcom.cpp b/keymaster_qcom.cpp index 98ca034..5856322 100644 --- a/keymaster_qcom.cpp +++ b/keymaster_qcom.cpp @@ -767,12 +767,16 @@ static int qcom_km_open(const hw_module_t* module, const char* name, dev->context = (void *)km_handle; while (attempt_num < MAX_PROPERTY_GET_ATTEMPTS) { +#ifdef WAIT_FOR_QSEE property_get("sys.keymaster.loaded", property_val, ""); if (strncmp(property_val, "true", sizeof(property_val)) == 0) { +#endif ALOGD("keymaster app is loaded"); break; +#ifdef WAIT_FOR_QSEE } +#endif if (attempt_num == 0) ALOGE("keymaster app is not loaded, attempt number %d", attempt_num); attempt_num++; |