]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cros_ec: Support the full-size vboot context
authorSimon Glass <sjg@chromium.org>
Mon, 5 Jul 2021 22:32:51 +0000 (16:32 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Jul 2021 16:27:34 +0000 (10:27 -0600)
The v2 format is 64-bytes in size. Support this and drop v1 since it is
not used anymore.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/misc/cros_ec_sandbox.c

index ab91f3fa67a1eacb5d347462d4fa6ffc4758721b..12cc11efbd01028fd856001213c70c301c80f461 100644 (file)
@@ -343,15 +343,13 @@ static int process_cmd(struct ec_state *ec,
 
                switch (req->op) {
                case EC_VBNV_CONTEXT_OP_READ:
-                       /* TODO(sjg@chromium.org): Support full-size context */
                        memcpy(resp->block, ec->vbnv_context,
-                              EC_VBNV_BLOCK_SIZE);
-                       len = 16;
+                              EC_VBNV_BLOCK_SIZE_V2);
+                       len = EC_VBNV_BLOCK_SIZE_V2;
                        break;
                case EC_VBNV_CONTEXT_OP_WRITE:
-                       /* TODO(sjg@chromium.org): Support full-size context */
                        memcpy(ec->vbnv_context, req->block,
-                              EC_VBNV_BLOCK_SIZE);
+                              EC_VBNV_BLOCK_SIZE_V2);
                        len = 0;
                        break;
                default: