[PATCH 13/22] cros_ec: Support the full-size vboot context

Simon Glass sjg at chromium.org
Tue Jul 6 00:32:51 CEST 2021


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 at chromium.org>
---

 drivers/misc/cros_ec_sandbox.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 35e9f4eff44..6a95a9132a6 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -341,15 +341,13 @@ static int process_cmd(struct ec_state *ec,
 
 		switch (req->op) {
 		case EC_VBNV_CONTEXT_OP_READ:
-			/* TODO(sjg at 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 at 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:
-- 
2.32.0.93.g670b81a890-goog



More information about the U-Boot mailing list