diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-01-05 13:48:58 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-06 21:56:57 +0000 |
commit | 8c0e2f3c9164c95b9262d558aa6a667d310e3bf9 (patch) | |
tree | 4375ac8cf217855f7ce8921d0d528237744e2115 /include/ec_commands.h | |
parent | 7103bc89ed2a4460a606b62b63df02e7f0ecb3df (diff) | |
download | chrome-ec-8c0e2f3c9164c95b9262d558aa6a667d310e3bf9.tar.gz |
coil: remove fingerprint support
This code uses coil terms we're removing, but we don't use it in
platform/cr50. Remove the code instead of replacing the terms.
BUG=b:175244613
TEST=make buildall -j
Change-Id: I909e21693d839cb3769e680c58d9d34017802aa1
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613136
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 297 |
1 files changed, 0 insertions, 297 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 29278ddebe..64b77d3e3b 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3606,40 +3606,6 @@ struct ec_response_keyboard_factory_test { uint16_t shorted; /* Keyboard pins are shorted */ } __ec_align2; -/* Fingerprint events in 'fp_events' for EC_MKBP_EVENT_FINGERPRINT */ -#define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events) & 0x00FFFFFF) -#define EC_MKBP_FP_ERRCODE(fp_events) ((fp_events) & 0x0000000F) -#define EC_MKBP_FP_ENROLL_PROGRESS_OFFSET 4 -#define EC_MKBP_FP_ENROLL_PROGRESS(fpe) (((fpe) & 0x00000FF0) \ - >> EC_MKBP_FP_ENROLL_PROGRESS_OFFSET) -#define EC_MKBP_FP_MATCH_IDX_OFFSET 12 -#define EC_MKBP_FP_MATCH_IDX_MASK 0x0000F000 -#define EC_MKBP_FP_MATCH_IDX(fpe) (((fpe) & EC_MKBP_FP_MATCH_IDX_MASK) \ - >> EC_MKBP_FP_MATCH_IDX_OFFSET) -#define EC_MKBP_FP_ENROLL BIT(27) -#define EC_MKBP_FP_MATCH BIT(28) -#define EC_MKBP_FP_FINGER_DOWN BIT(29) -#define EC_MKBP_FP_FINGER_UP BIT(30) -#define EC_MKBP_FP_IMAGE_READY BIT(31) -/* code given by EC_MKBP_FP_ERRCODE() when EC_MKBP_FP_ENROLL is set */ -#define EC_MKBP_FP_ERR_ENROLL_OK 0 -#define EC_MKBP_FP_ERR_ENROLL_LOW_QUALITY 1 -#define EC_MKBP_FP_ERR_ENROLL_IMMOBILE 2 -#define EC_MKBP_FP_ERR_ENROLL_LOW_COVERAGE 3 -#define EC_MKBP_FP_ERR_ENROLL_INTERNAL 5 -/* Can be used to detect if image was usable for enrollment or not. */ -#define EC_MKBP_FP_ERR_ENROLL_PROBLEM_MASK 1 -/* code given by EC_MKBP_FP_ERRCODE() when EC_MKBP_FP_MATCH is set */ -#define EC_MKBP_FP_ERR_MATCH_NO 0 -#define EC_MKBP_FP_ERR_MATCH_NO_INTERNAL 6 -#define EC_MKBP_FP_ERR_MATCH_NO_TEMPLATES 7 -#define EC_MKBP_FP_ERR_MATCH_NO_LOW_QUALITY 2 -#define EC_MKBP_FP_ERR_MATCH_NO_LOW_COVERAGE 4 -#define EC_MKBP_FP_ERR_MATCH_YES 1 -#define EC_MKBP_FP_ERR_MATCH_YES_UPDATED 3 -#define EC_MKBP_FP_ERR_MATCH_YES_UPDATE_FAILED 5 - - #define EC_CMD_MKBP_WAKE_MASK 0x0069 enum ec_mkbp_event_mask_action { /* Retrieve the value of a wake mask. */ @@ -5776,269 +5742,6 @@ struct ec_response_locate_chip { /*****************************************************************************/ /* Fingerprint MCU commands: range 0x0400-0x040x */ -/* Fingerprint SPI sensor passthru command: prototyping ONLY */ -#define EC_CMD_FP_PASSTHRU 0x0400 - -#define EC_FP_FLAG_NOT_COMPLETE 0x1 - -struct ec_params_fp_passthru { - uint16_t len; /* Number of bytes to write then read */ - uint16_t flags; /* EC_FP_FLAG_xxx */ - uint8_t data[]; /* Data to send */ -} __ec_align2; - -/* Configure the Fingerprint MCU behavior */ -#define EC_CMD_FP_MODE 0x0402 - -/* Put the sensor in its lowest power mode */ -#define FP_MODE_DEEPSLEEP BIT(0) -/* Wait to see a finger on the sensor */ -#define FP_MODE_FINGER_DOWN BIT(1) -/* Poll until the finger has left the sensor */ -#define FP_MODE_FINGER_UP BIT(2) -/* Capture the current finger image */ -#define FP_MODE_CAPTURE BIT(3) -/* Finger enrollment session on-going */ -#define FP_MODE_ENROLL_SESSION BIT(4) -/* Enroll the current finger image */ -#define FP_MODE_ENROLL_IMAGE BIT(5) -/* Try to match the current finger image */ -#define FP_MODE_MATCH BIT(6) -/* Reset and re-initialize the sensor. */ -#define FP_MODE_RESET_SENSOR BIT(7) -/* special value: don't change anything just read back current mode */ -#define FP_MODE_DONT_CHANGE BIT(31) - -#define FP_VALID_MODES (FP_MODE_DEEPSLEEP | \ - FP_MODE_FINGER_DOWN | \ - FP_MODE_FINGER_UP | \ - FP_MODE_CAPTURE | \ - FP_MODE_ENROLL_SESSION | \ - FP_MODE_ENROLL_IMAGE | \ - FP_MODE_MATCH | \ - FP_MODE_RESET_SENSOR | \ - FP_MODE_DONT_CHANGE) - -/* Capture types defined in bits [30..28] */ -#define FP_MODE_CAPTURE_TYPE_SHIFT 28 -#define FP_MODE_CAPTURE_TYPE_MASK (0x7 << FP_MODE_CAPTURE_TYPE_SHIFT) -/* - * This enum must remain ordered, if you add new values you must ensure that - * FP_CAPTURE_TYPE_MAX is still the last one. - */ -enum fp_capture_type { - /* Full blown vendor-defined capture (produces 'frame_size' bytes) */ - FP_CAPTURE_VENDOR_FORMAT = 0, - /* Simple raw image capture (produces width x height x bpp bits) */ - FP_CAPTURE_SIMPLE_IMAGE = 1, - /* Self test pattern (e.g. checkerboard) */ - FP_CAPTURE_PATTERN0 = 2, - /* Self test pattern (e.g. inverted checkerboard) */ - FP_CAPTURE_PATTERN1 = 3, - /* Capture for Quality test with fixed contrast */ - FP_CAPTURE_QUALITY_TEST = 4, - /* Capture for pixel reset value test */ - FP_CAPTURE_RESET_TEST = 5, - FP_CAPTURE_TYPE_MAX, -}; -/* Extracts the capture type from the sensor 'mode' word */ -#define FP_CAPTURE_TYPE(mode) (((mode) & FP_MODE_CAPTURE_TYPE_MASK) \ - >> FP_MODE_CAPTURE_TYPE_SHIFT) - -struct ec_params_fp_mode { - uint32_t mode; /* as defined by FP_MODE_ constants */ -} __ec_align4; - -struct ec_response_fp_mode { - uint32_t mode; /* as defined by FP_MODE_ constants */ -} __ec_align4; - -/* Retrieve Fingerprint sensor information */ -#define EC_CMD_FP_INFO 0x0403 - -/* Number of dead pixels detected on the last maintenance */ -#define FP_ERROR_DEAD_PIXELS(errors) ((errors) & 0x3FF) -/* Unknown number of dead pixels detected on the last maintenance */ -#define FP_ERROR_DEAD_PIXELS_UNKNOWN (0x3FF) -/* No interrupt from the sensor */ -#define FP_ERROR_NO_IRQ BIT(12) -/* SPI communication error */ -#define FP_ERROR_SPI_COMM BIT(13) -/* Invalid sensor Hardware ID */ -#define FP_ERROR_BAD_HWID BIT(14) -/* Sensor initialization failed */ -#define FP_ERROR_INIT_FAIL BIT(15) - -struct ec_response_fp_info_v0 { - /* Sensor identification */ - uint32_t vendor_id; - uint32_t product_id; - uint32_t model_id; - uint32_t version; - /* Image frame characteristics */ - uint32_t frame_size; - uint32_t pixel_format; /* using V4L2_PIX_FMT_ */ - uint16_t width; - uint16_t height; - uint16_t bpp; - uint16_t errors; /* see FP_ERROR_ flags above */ -} __ec_align4; - -struct ec_response_fp_info { - /* Sensor identification */ - uint32_t vendor_id; - uint32_t product_id; - uint32_t model_id; - uint32_t version; - /* Image frame characteristics */ - uint32_t frame_size; - uint32_t pixel_format; /* using V4L2_PIX_FMT_ */ - uint16_t width; - uint16_t height; - uint16_t bpp; - uint16_t errors; /* see FP_ERROR_ flags above */ - /* Template/finger current information */ - uint32_t template_size; /* max template size in bytes */ - uint16_t template_max; /* maximum number of fingers/templates */ - uint16_t template_valid; /* number of valid fingers/templates */ - uint32_t template_dirty; /* bitmap of templates with MCU side changes */ - uint32_t template_version; /* version of the template format */ -} __ec_align4; - -/* Get the last captured finger frame or a template content */ -#define EC_CMD_FP_FRAME 0x0404 - -/* constants defining the 'offset' field which also contains the frame index */ -#define FP_FRAME_INDEX_SHIFT 28 -/* Frame buffer where the captured image is stored */ -#define FP_FRAME_INDEX_RAW_IMAGE 0 -/* First frame buffer holding a template */ -#define FP_FRAME_INDEX_TEMPLATE 1 -#define FP_FRAME_GET_BUFFER_INDEX(offset) ((offset) >> FP_FRAME_INDEX_SHIFT) -#define FP_FRAME_OFFSET_MASK 0x0FFFFFFF - -/* Version of the format of the encrypted templates. */ -#define FP_TEMPLATE_FORMAT_VERSION 4 - -/* Constants for encryption parameters */ -#define FP_CONTEXT_NONCE_BYTES 12 -#define FP_CONTEXT_USERID_WORDS (32 / sizeof(uint32_t)) -#define FP_CONTEXT_TAG_BYTES 16 -#define FP_CONTEXT_ENCRYPTION_SALT_BYTES 16 -#define FP_CONTEXT_TPM_BYTES 32 - -/* Constants for positive match parameters. */ -#define FP_POSITIVE_MATCH_SALT_BYTES 16 - -struct ec_fp_template_encryption_metadata { - /* - * Version of the structure format (N=3). - */ - uint16_t struct_version; - /* Reserved bytes, set to 0. */ - uint16_t reserved; - /* - * The salt is *only* ever used for key derivation. The nonce is unique, - * a different one is used for every message. - */ - uint8_t nonce[FP_CONTEXT_NONCE_BYTES]; - uint8_t encryption_salt[FP_CONTEXT_ENCRYPTION_SALT_BYTES]; - uint8_t tag[FP_CONTEXT_TAG_BYTES]; -}; - -struct ec_params_fp_frame { - /* - * The offset contains the template index or FP_FRAME_INDEX_RAW_IMAGE - * in the high nibble, and the real offset within the frame in - * FP_FRAME_OFFSET_MASK. - */ - uint32_t offset; - uint32_t size; -} __ec_align4; - -/* Load a template into the MCU */ -#define EC_CMD_FP_TEMPLATE 0x0405 - -/* Flag in the 'size' field indicating that the full template has been sent */ -#define FP_TEMPLATE_COMMIT 0x80000000 - -struct ec_params_fp_template { - uint32_t offset; - uint32_t size; - uint8_t data[]; -} __ec_align4; - -/* Clear the current fingerprint user context and set a new one */ -#define EC_CMD_FP_CONTEXT 0x0406 - -struct ec_params_fp_context { - uint32_t userid[FP_CONTEXT_USERID_WORDS]; -} __ec_align4; - -enum fp_context_action { - FP_CONTEXT_ASYNC = 0, - FP_CONTEXT_GET_RESULT = 1, -}; - -/* Version 1 of the command is "asynchronous". */ -struct ec_params_fp_context_v1 { - uint8_t action; /**< enum fp_context_action */ - uint8_t reserved[3]; /**< padding for alignment */ - uint32_t userid[FP_CONTEXT_USERID_WORDS]; -} __ec_align4; - -#define EC_CMD_FP_STATS 0x0407 - -#define FPSTATS_CAPTURE_INV BIT(0) -#define FPSTATS_MATCHING_INV BIT(1) - -struct ec_response_fp_stats { - uint32_t capture_time_us; - uint32_t matching_time_us; - uint32_t overall_time_us; - struct { - uint32_t lo; - uint32_t hi; - } overall_t0; - uint8_t timestamps_invalid; - int8_t template_matched; -} __ec_align2; - -#define EC_CMD_FP_SEED 0x0408 -struct ec_params_fp_seed { - /* - * Version of the structure format (N=3). - */ - uint16_t struct_version; - /* Reserved bytes, set to 0. */ - uint16_t reserved; - /* Seed from the TPM. */ - uint8_t seed[FP_CONTEXT_TPM_BYTES]; -} __ec_align4; - -#define EC_CMD_FP_ENC_STATUS 0x0409 - -/* FP TPM seed has been set or not */ -#define FP_ENC_STATUS_SEED_SET BIT(0) - -struct ec_response_fp_encryption_status { - /* Used bits in encryption engine status */ - uint32_t valid_flags; - /* Encryption engine status */ - uint32_t status; -} __ec_align4; - -#define EC_CMD_FP_READ_MATCH_SECRET 0x040A -struct ec_params_fp_read_match_secret { - uint16_t fgr; -} __ec_align4; - -/* The positive match secret has the length of the SHA256 digest. */ -#define FP_POSITIVE_MATCH_SECRET_BYTES 32 -struct ec_response_fp_read_match_secret { - uint8_t positive_match_secret[FP_POSITIVE_MATCH_SECRET_BYTES]; -} __ec_align4; - /*****************************************************************************/ /* Touchpad MCU commands: range 0x0500-0x05FF */ |