mfd: cros_ec: Expand hash API
authorGwendal Grignou <gwendal@chromium.org>
Mon, 3 Jun 2019 18:33:44 +0000 (11:33 -0700)
committerLee Jones <lee.jones@linaro.org>
Mon, 10 Jun 2019 08:15:08 +0000 (09:15 +0100)
Improve API to verify EC image signature.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/mfd/cros_ec_commands.h

index 0ff1941288cf4ead3ab611acfd48b7c6136bbf84..76943e64998a9daf7553cdf8abd09fd67c5e3875 100644 (file)
@@ -2018,8 +2018,15 @@ enum ec_vboot_hash_status {
  * If one of these is specified, the EC will automatically update offset and
  * size to the correct values for the specified image (RO or RW).
  */
-#define EC_VBOOT_HASH_OFFSET_RO 0xfffffffe
-#define EC_VBOOT_HASH_OFFSET_RW 0xfffffffd
+#define EC_VBOOT_HASH_OFFSET_RO                0xfffffffe
+#define EC_VBOOT_HASH_OFFSET_ACTIVE    0xfffffffd
+#define EC_VBOOT_HASH_OFFSET_UPDATE    0xfffffffc
+
+/*
+ * 'RW' is vague if there are multiple RW images; we mean the active one,
+ * so the old constant is deprecated.
+ */
+#define EC_VBOOT_HASH_OFFSET_RW EC_VBOOT_HASH_OFFSET_ACTIVE
 
 /*****************************************************************************/
 /*