aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@google.com>2021-05-18 20:47:42 -0500
committerBill Richardson <wfrichar@google.com>2021-05-18 22:05:57 -0500
commit7ac0566074de2d91dcfa6e859f4a55ac22ed06bd (patch)
tree5d62ae08a0f4e8c98ddc81738b00c06321671500
parent717b7356710e188ddaed9aa2838a51d7dc1a5a96 (diff)
parentb798c457bcff18bc273f7d09cbfdbe7223b583f1 (diff)
downloadgeneric-7ac0566074de2d91dcfa6e859f4a55ac22ed06bd.tar.gz
Merge remote-tracking branch 'goog/upstream-master' into D2-SC-022
Release notes: keymint: introduce TagType::BIGNUM Add NUGGET_PARAM_TRIGGER_PIN for test purposes Add new fields to the stats command Backport license stuff in Android.bp files sjtag: Add a new command to get SJTAG_ALLOW Bug: 188590600 Test: release tests, QMC Signed-off-by: Bill Richardson <wfrichar@google.com> Change-Id: I102b17d55facf8aa060b86078d33d2e2fb9f7e1d
-rw-r--r--nugget/include/app_nugget.h54
-rw-r--r--nugget/proto/nugget/app/keymaster/keymaster_defs.proto6
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 {