diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-26 01:04:19 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-26 01:04:19 +0000 |
commit | 29fd0a372c6035e04c69cd62a2359e7472c45b8e (patch) | |
tree | 5d62ae08a0f4e8c98ddc81738b00c06321671500 | |
parent | 6340c6a2039a8121c0aff22a931102496b0276b9 (diff) | |
parent | 7ac0566074de2d91dcfa6e859f4a55ac22ed06bd (diff) | |
download | generic-29fd0a372c6035e04c69cd62a2359e7472c45b8e.tar.gz |
Snap for 7398294 from 7ac0566074de2d91dcfa6e859f4a55ac22ed06bd to sc-d1-release
Change-Id: I32c0a88307145347be43c7eea9e3573f4a7e35ac
-rw-r--r-- | nugget/include/app_nugget.h | 54 | ||||
-rw-r--r-- | nugget/proto/nugget/app/keymaster/keymaster_defs.proto | 6 |
2 files changed, 55 insertions, 5 deletions
diff --git a/nugget/include/app_nugget.h b/nugget/include/app_nugget.h index 6a51365..525e774 100644 --- a/nugget/include/app_nugget.h +++ b/nugget/include/app_nugget.h @@ -350,6 +350,26 @@ enum nugget_sjtag_user_consent_cfg { * @errors APP_ERROR_BOGUS_ARGS */ +enum nugget_sjtag_avb_boot_lock_result { + AVB_BOOT_LOCK_DISABLED, + AVB_BOOT_LOCK_ENABLED, + AVB_BOOT_LOCK_ERROR, +}; + +#define NUGGET_PARAM_SJTAG_ALLOW 0x0013 +/* + * Get the SJTAG ALLOW + * + * This always returns the current state of the SJTAG ALLOW feature. + * + * @param args <none> + * @param arg_len 0 + * @param reply 0(DISALLOW) OR 1(ALLOW) + * @param reply_len 1 byte + * + * @errors APP_ERROR_BOGUS_ARGS + */ + /****************************************************************************/ /* Test related commands */ @@ -392,10 +412,11 @@ enum nugget_app_selftest_cmd { /* * This struct is specific to Citadel and Nugget OS, but it's enough for the - * AP-side implementation to translate into the info required for the HAL - * structs. + * AP-side implementation to translate into the info required for the power + * stats service. */ -struct nugget_app_low_power_stats { +#define NUGGET_APP_LOW_POWER_STATS_MAGIC 0xC0DEACE1 +struct nugget_app_low_power_stats { /* version 1 */ /* All times in usecs */ uint64_t hard_reset_count; /* Cleared by power loss */ uint64_t time_since_hard_reset; @@ -408,6 +429,18 @@ struct nugget_app_low_power_stats { uint64_t time_spent_in_deep_sleep; uint64_t time_at_ap_reset; uint64_t time_at_ap_bootloader_done; + /* + * New fields for v1, used by factory tests. The caller can tell whether the + * firmare supports these fields by checking the v1_magic value. + */ + uint32_t v1_magic; /* NUGGET_APP_LOW_POWER_STATS_MAGIC */ + uint32_t temp; + struct { + unsigned int phone_on_l : 1; + unsigned int vol_up_l : 1; + unsigned int vol_dn_l : 1; + unsigned int _padding : 29; /* pad to 32 bits */ + } signals; } __packed; #define NUGGET_PARAM_GET_LOW_POWER_STATS 0x200 @@ -540,6 +573,21 @@ enum nugget_app_sleep_mode { * @param reply_len 0 */ +#define NUGGET_PARAM_TRIGGER_PIN 0xF005 +/** + * Get/Set trigger pin level + * + * This command asks GSC to set the level (0|1) of an otherwise unused GPIO, + * to signal external test equipment. + * + * @param args 0 OR 1 + * @param arg_len 0 OR 1 byte + * @param reply current state (0 or 1) + * @param reply_len 1 byte + * + * @errors APP_ERROR_BOGUS_ARGS + */ + #ifdef __cplusplus } #endif diff --git a/nugget/proto/nugget/app/keymaster/keymaster_defs.proto b/nugget/proto/nugget/app/keymaster/keymaster_defs.proto index 719215e..da597b1 100644 --- a/nugget/proto/nugget/app/keymaster/keymaster_defs.proto +++ b/nugget/proto/nugget/app/keymaster/keymaster_defs.proto @@ -31,7 +31,7 @@ enum TagType { ULONG = 0x50000; /* 5 << 16 */ DATE = 0x60000; /* 6 << 16 */ BOOL = 0x70000; /* 7 << 16 */ - /* BIGNUM = 0x80000; 8 << 16 */ /* Unused. */ + BIGNUM_ = 0x80000; /* 8 << 16 */ BYTES = 0x90000; /* 9 << 16 */ ULONG_REP = 0xA0000; /* 10 << 16 */ }; @@ -104,7 +104,9 @@ enum Tag { /* RESERVED: AUTH_TOKEN = 0x903ea; // (TagType:BYTES | 1002) */ MAC_LENGTH = 0x303eb; // (TagType:UINT | 1003) RESET_SINCE_ID_ROTATION = 0x703ec; // (TagType:BOOL | 1004) - CONFIRMATION_TOKEN = 0x903ed;// (TagType:BYTES | 1005) + CONFIRMATION_TOKEN = 0x903ed; // (TagType:BYTES | 1005) + CERTIFICATE_SERIAL = 0x803ee; // (TagType:BIGNUM | 1006) + CERTIFICATE_SUBJECT = 0x903ef; // (TagType:BYTES | 1007) }; enum Algorithm { |