Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/965493/?format=api
{ "id": 965493, "url": "http://patchwork.ozlabs.org/api/patches/965493/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180903144711.31585-16-jens.wiklander@linaro.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180903144711.31585-16-jens.wiklander@linaro.org>", "list_archive_url": null, "date": "2018-09-03T14:47:06", "name": "[U-Boot,v3,15/20] tee: add sandbox driver", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "51d90531d3cd73053c20bc0a56d6db41dc347a07", "submitter": { "id": 66201, "url": "http://patchwork.ozlabs.org/api/people/66201/?format=api", "name": "Jens Wiklander", "email": "jens.wiklander@linaro.org" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180903144711.31585-16-jens.wiklander@linaro.org/mbox/", "series": [ { "id": 63875, "url": "http://patchwork.ozlabs.org/api/series/63875/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=63875", "date": "2018-09-03T14:46:51", "name": "AVB using OP-TEE", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/63875/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/965493/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/965493/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=linaro.org", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"SyAgUHk6\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 423tRK1LJLz9s55\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 4 Sep 2018 00:59:40 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 70E61C21EBF; Mon, 3 Sep 2018 14:55:22 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 5A491C21F2F;\n\tMon, 3 Sep 2018 14:48:05 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid CBD7EC21F27; Mon, 3 Sep 2018 14:47:48 +0000 (UTC)", "from mail-lj1-f194.google.com (mail-lj1-f194.google.com\n\t[209.85.208.194])\n\tby lists.denx.de (Postfix) with ESMTPS id 3F3C4C21EBD\n\tfor <u-boot@lists.denx.de>; Mon, 3 Sep 2018 14:47:42 +0000 (UTC)", "by mail-lj1-f194.google.com with SMTP id v26-v6so686604ljj.3\n\tfor <u-boot@lists.denx.de>; Mon, 03 Sep 2018 07:47:42 -0700 (PDT)", "from jax.ideon.se ([85.235.10.227])\n\tby smtp.gmail.com with ESMTPSA id\n\tw18-v6sm3343431ljd.73.2018.09.03.07.47.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 03 Sep 2018 07:47:40 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=DE5UbGuAWy9+9xJuZejUYyn0HTlzAq9WbDrzOK2AI20=;\n\tb=SyAgUHk6PKJs/wJ1SInHXsvsaY4iUfNtfYvirWf3YMsdbQnM9yf04f62yW3Q94qUMa\n\t95SEezeNVoZbOX6Tia08ot6pCyZLAAfNnZfkzLKqCMZdA2jOCSIvDNc/B9DKh6CvUcRa\n\tBjKMrW6mWopq/vOzq57H77uhNErGYCdtUj5mU=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=DE5UbGuAWy9+9xJuZejUYyn0HTlzAq9WbDrzOK2AI20=;\n\tb=YY+f08UhBDkBC0ZxdWAjKLe5Lm/eaKL/L2oc25pXTObAITYGVgTQfYQE5xX2FSsE7b\n\tFo2PB6ZA6u6NNzwUMunI6Wz4usZNkXvYKKI6bJkKZJq3dJMa6nTTDVutv4LQ90sknbrc\n\tgzKjry1f++3s4jgwCKdV9ZPBU1x0S7fu1OOXxJEMjV1fKdUK3RQvIjmDDSa1aAVXXjiK\n\t8k5chdKzFybyPjseC1AGKcKghXURzYIbJHg0pi2RB4TAJ7tRKvaQzzBoaUblOM/HSKHC\n\taTwaLaulsH8dmjUK6G+2cgpuzmPlnbay1Ma2ihHqA1G1DkwJ5vw5HZo6kD/XZRK64RjR\n\tCmtw==", "X-Gm-Message-State": "APzg51AKHQNERaaavHTZsH5Hl0Wbm9knwCz66x6qEeFqWWakitOcMtSe\n\tPs3eZLoAlwgF0lNRBr2V2NjhoO26/4M=", "X-Google-Smtp-Source": "ANB0VdYhLl7R/c5w/lKfJaMOmv0Mv80QrV2a7ld/+mC6Sw007M2BDXA3xnQCnlHVSfa2bkyeRLM5vw==", "X-Received": "by 2002:a2e:80d3:: with SMTP id\n\tr19-v6mr926241ljg.85.1535986061300; \n\tMon, 03 Sep 2018 07:47:41 -0700 (PDT)", "From": "Jens Wiklander <jens.wiklander@linaro.org>", "To": "u-boot@lists.denx.de", "Date": "Mon, 3 Sep 2018 16:47:06 +0200", "Message-Id": "<20180903144711.31585-16-jens.wiklander@linaro.org>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180903144711.31585-1-jens.wiklander@linaro.org>", "References": "<20180903144711.31585-1-jens.wiklander@linaro.org>", "Cc": "Tom Rini <trini@konsulko.com>, Pierre Aubert <p.aubert@staubli.com>", "Subject": "[U-Boot] [PATCH v3 15/20] tee: add sandbox driver", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Adds a sandboxtee driver which emulates a generic TEE with the OP-TEE\nAVB TA.\n\nSigned-off-by: Jens Wiklander <jens.wiklander@linaro.org>\n---\n drivers/tee/Kconfig | 12 +-\n drivers/tee/Makefile | 1 +\n drivers/tee/optee/Kconfig | 2 +-\n drivers/tee/sandbox.c | 299 ++++++++++++++++++++++++++++++++++++++\n include/sandboxtee.h | 15 ++\n 5 files changed, 326 insertions(+), 3 deletions(-)\n create mode 100644 drivers/tee/sandbox.c\n create mode 100644 include/sandboxtee.h", "diff": "diff --git a/drivers/tee/Kconfig b/drivers/tee/Kconfig\nindex 835c256e9239..4697b80913d6 100644\n--- a/drivers/tee/Kconfig\n+++ b/drivers/tee/Kconfig\n@@ -1,8 +1,8 @@\n # Generic Trusted Execution Environment Configuration\n config TEE\n \tbool \"Trusted Execution Environment support\"\n-\tdepends on ARM && (ARM64 || CPU_V7A)\n-\tselect ARM_SMCCC\n+\tdepends on (ARM && (ARM64 || CPU_V7A)) || SANDBOX\n+\tselect ARM_SMCCC if ARM\n \thelp\n \t This implements a generic interface towards a Trusted Execution\n \t Environment (TEE). A TEE is a trusted OS running in some secure\n@@ -14,6 +14,14 @@ if TEE\n \n menu \"TEE drivers\"\n \n+config SANDBOX_TEE\n+\tbool \"Sandbox TEE emulator\"\n+\tdepends on SANDBOX\n+\tdefault y\n+\thelp\n+\t This emulates a generic TEE needed for testing including the AVB\n+\t TA.\n+\n source \"drivers/tee/optee/Kconfig\"\n \n endmenu\ndiff --git a/drivers/tee/Makefile b/drivers/tee/Makefile\nindex 19633b60f235..f72c68c09f33 100644\n--- a/drivers/tee/Makefile\n+++ b/drivers/tee/Makefile\n@@ -1,4 +1,5 @@\n # SPDX-License-Identifier: GPL-2.0+\n \n obj-y += tee-uclass.o\n+obj-$(CONFIG_SANDBOX) += sandbox.o\n obj-$(CONFIG_OPTEE) += optee/\ndiff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig\nindex dbfa7846a30f..d489834df926 100644\n--- a/drivers/tee/optee/Kconfig\n+++ b/drivers/tee/optee/Kconfig\n@@ -10,7 +10,7 @@ config OPTEE\n \t handle Remote Procedure Calls (RPC) from OP-TEE needed to\n \t execute a service. For more information see: https://www.op-tee.org\n \n-if OPTEE\n+if OPTEE || SANDBOX\n \n menu \"OP-TEE options\"\n \ndiff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c\nnew file mode 100644\nindex 000000000000..cd073497615f\n--- /dev/null\n+++ b/drivers/tee/sandbox.c\n@@ -0,0 +1,299 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (C) 2018 Linaro Limited\n+ */\n+#include <common.h>\n+#include <dm.h>\n+#include <sandboxtee.h>\n+#include <tee.h>\n+#include <tee/optee_ta_avb.h>\n+\n+/*\n+ * The sandbox tee driver tries to emulate a generic TEE with the TA\n+ * OPTEE_TA_AVB available.\n+ */\n+\n+struct ta_entry {\n+\tstruct tee_optee_ta_uuid uuid;\n+\tu32 (*open_session)(uint num_params, struct tee_param *params);\n+\tu32 (*invoke_func)(u32 func, uint num_params, struct tee_param *params);\n+};\n+\n+#ifdef CONFIG_OPTEE_TA_AVB\n+static u32 get_attr(uint n, uint num_params, struct tee_param *params)\n+{\n+\tif (n >= num_params)\n+\t\treturn TEE_PARAM_ATTR_TYPE_NONE;\n+\n+\treturn params[n].attr;\n+}\n+\n+static u32 check_params(u8 p0, u8 p1, u8 p2, u8 p3, uint num_params,\n+\t\t\tstruct tee_param *params)\n+{\n+\tu8 p[] = { p0, p1, p2, p3};\n+\tuint n;\n+\n+\tfor (n = 0; n < ARRAY_SIZE(p); n++)\n+\t\tif (p[n] != get_attr(n, num_params, params))\n+\t\t\tgoto bad_params;\n+\n+\tfor (; n < num_params; n++)\n+\t\tif (get_attr(n, num_params, params))\n+\t\t\tgoto bad_params;\n+\n+\treturn TEE_SUCCESS;\n+\n+bad_params:\n+\tprintf(\"Bad param attrs\\n\");\n+\n+\treturn TEE_ERROR_BAD_PARAMETERS;\n+}\n+\n+static u64 ta_avb_rollback_indexes[TA_AVB_MAX_ROLLBACK_LOCATIONS];\n+static u32 ta_avb_lock_state;\n+\n+static u32 ta_avb_open_session(uint num_params, struct tee_param *params)\n+{\n+\t/*\n+\t * We don't expect additional parameters when opening a session to\n+\t * this TA.\n+\t */\n+\treturn check_params(TEE_PARAM_ATTR_TYPE_NONE, TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t TEE_PARAM_ATTR_TYPE_NONE, TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t num_params, params);\n+}\n+\n+static u32 ta_avb_invoke_func(u32 func, uint num_params,\n+\t\t\t struct tee_param *params)\n+{\n+\tu32 res;\n+\tuint slot;\n+\tu64 val;\n+\n+\tswitch (func) {\n+\tcase TA_AVB_CMD_READ_ROLLBACK_INDEX:\n+\t\tres = check_params(TEE_PARAM_ATTR_TYPE_VALUE_INPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_VALUE_OUTPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t num_params, params);\n+\t\tif (res)\n+\t\t\treturn res;\n+\n+\t\tslot = params[0].u.value.a;\n+\t\tif (slot >= ARRAY_SIZE(ta_avb_rollback_indexes)) {\n+\t\t\tprintf(\"Rollback index slot out of bounds %lu\\n\", slot);\n+\t\t\treturn TEE_ERROR_BAD_PARAMETERS;\n+\t\t}\n+\n+\t\tval = ta_avb_rollback_indexes[slot];\n+\t\tparams[1].u.value.a = val >> 32;\n+\t\tparams[1].u.value.b = val;\n+\t\treturn TEE_SUCCESS;\n+\n+\tcase TA_AVB_CMD_WRITE_ROLLBACK_INDEX:\n+\t\tres = check_params(TEE_PARAM_ATTR_TYPE_VALUE_INPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_VALUE_INPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t num_params, params);\n+\t\tif (res)\n+\t\t\treturn res;\n+\n+\t\tslot = params[0].u.value.a;\n+\t\tif (slot >= ARRAY_SIZE(ta_avb_rollback_indexes)) {\n+\t\t\tprintf(\"Rollback index slot out of bounds %lu\\n\", slot);\n+\t\t\treturn TEE_ERROR_BAD_PARAMETERS;\n+\t\t}\n+\n+\t\tval = (u64)params[1].u.value.a << 32 | params[1].u.value.b;\n+\t\tif (val < ta_avb_rollback_indexes[slot])\n+\t\t\treturn TEE_ERROR_SECURITY;\n+\n+\t\tta_avb_rollback_indexes[slot] = val;\n+\t\treturn TEE_SUCCESS;\n+\n+\tcase TA_AVB_CMD_READ_LOCK_STATE:\n+\t\tres = check_params(TEE_PARAM_ATTR_TYPE_VALUE_OUTPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t num_params, params);\n+\t\tif (res)\n+\t\t\treturn res;\n+\n+\t\tparams[0].u.value.a = ta_avb_lock_state;\n+\t\treturn TEE_SUCCESS;\n+\n+\tcase TA_AVB_CMD_WRITE_LOCK_STATE:\n+\t\tres = check_params(TEE_PARAM_ATTR_TYPE_VALUE_INPUT,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t TEE_PARAM_ATTR_TYPE_NONE,\n+\t\t\t\t num_params, params);\n+\t\tif (res)\n+\t\t\treturn res;\n+\n+\t\tif (ta_avb_lock_state != params[0].u.value.a) {\n+\t\t\tta_avb_lock_state = params[0].u.value.a;\n+\t\t\tmemset(ta_avb_rollback_indexes, 0,\n+\t\t\t sizeof(ta_avb_rollback_indexes));\n+\t\t}\n+\n+\t\treturn TEE_SUCCESS;\n+\n+\tdefault:\n+\t\treturn TEE_ERROR_NOT_SUPPORTED;\n+\t}\n+}\n+#endif /*OPTEE_TA_AVB*/\n+\n+static const struct ta_entry ta_entries[] = {\n+#ifdef CONFIG_OPTEE_TA_AVB\n+\t{ .uuid = TA_AVB_UUID,\n+\t .open_session = ta_avb_open_session,\n+\t .invoke_func = ta_avb_invoke_func,\n+\t},\n+#endif\n+};\n+\n+static void sandbox_tee_get_version(struct udevice *dev,\n+\t\t\t\t struct tee_version_data *vers)\n+{\n+\tstruct tee_version_data v = {\n+\t\t.gen_caps = TEE_GEN_CAP_GP | TEE_GEN_CAP_REG_MEM,\n+\t};\n+\n+\t*vers = v;\n+}\n+\n+static int sandbox_tee_close_session(struct udevice *dev, u32 session)\n+{\n+\tstruct sandbox_tee_state *state = dev_get_priv(dev);\n+\n+\tif (!state->ta || state->session != session)\n+\t\treturn -EINVAL;\n+\n+\tstate->session = 0;\n+\tstate->ta = NULL;\n+\n+\treturn 0;\n+}\n+\n+static const struct ta_entry *find_ta_entry(u8 uuid[TEE_UUID_LEN])\n+{\n+\tstruct tee_optee_ta_uuid u;\n+\tuint n;\n+\n+\ttee_optee_ta_uuid_from_octets(&u, uuid);\n+\n+\tfor (n = 0; n < ARRAY_SIZE(ta_entries); n++)\n+\t\tif (!memcmp(&u, &ta_entries[n].uuid, sizeof(u)))\n+\t\t\treturn ta_entries + n;\n+\n+\treturn NULL;\n+}\n+\n+static int sandbox_tee_open_session(struct udevice *dev,\n+\t\t\t\t struct tee_open_session_arg *arg,\n+\t\t\t\t uint num_params, struct tee_param *params)\n+{\n+\tstruct sandbox_tee_state *state = dev_get_priv(dev);\n+\tconst struct ta_entry *ta;\n+\n+\tif (state->ta) {\n+\t\tprintf(\"A session is already open\\n\");\n+\t\treturn -EBUSY;\n+\t}\n+\n+\tta = find_ta_entry(arg->uuid);\n+\tif (!ta) {\n+\t\tprintf(\"Cannot find TA\\n\");\n+\t\targ->ret = TEE_ERROR_ITEM_NOT_FOUND;\n+\t\targ->ret_origin = TEE_ORIGIN_TEE;\n+\n+\t\treturn 0;\n+\t}\n+\n+\targ->ret = ta->open_session(num_params, params);\n+\targ->ret_origin = TEE_ORIGIN_TRUSTED_APP;\n+\n+\tif (!arg->ret) {\n+\t\tstate->ta = (void *)ta;\n+\t\tstate->session = 1;\n+\t\targ->session = state->session;\n+\t} else {\n+\t\tprintf(\"Cannot open session, TA returns error\\n\");\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int sandbox_tee_invoke_func(struct udevice *dev,\n+\t\t\t\t struct tee_invoke_arg *arg,\n+\t\t\t\t uint num_params, struct tee_param *params)\n+{\n+\tstruct sandbox_tee_state *state = dev_get_priv(dev);\n+\tstruct ta_entry *ta = state->ta;\n+\n+\tif (!arg->session) {\n+\t\tprintf(\"Missing session\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!ta) {\n+\t\tprintf(\"TA session not available\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (arg->session != state->session) {\n+\t\tprintf(\"Session mismatch\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\targ->ret = ta->invoke_func(arg->func, num_params, params);\n+\targ->ret_origin = TEE_ORIGIN_TRUSTED_APP;\n+\n+\treturn 0;\n+}\n+\n+static int sandbox_tee_shm_register(struct udevice *dev, struct tee_shm *shm)\n+{\n+\tstruct sandbox_tee_state *state = dev_get_priv(dev);\n+\n+\tstate->num_shms++;\n+\n+\treturn 0;\n+}\n+\n+static int sandbox_tee_shm_unregister(struct udevice *dev, struct tee_shm *shm)\n+{\n+\tstruct sandbox_tee_state *state = dev_get_priv(dev);\n+\n+\tstate->num_shms--;\n+\n+\treturn 0;\n+}\n+\n+static const struct tee_driver_ops sandbox_tee_ops = {\n+\t.get_version = sandbox_tee_get_version,\n+\t.open_session = sandbox_tee_open_session,\n+\t.close_session = sandbox_tee_close_session,\n+\t.invoke_func = sandbox_tee_invoke_func,\n+\t.shm_register = sandbox_tee_shm_register,\n+\t.shm_unregister = sandbox_tee_shm_unregister,\n+};\n+\n+static const struct udevice_id sandbox_tee_match[] = {\n+\t{ .compatible = \"sandbox,tee\" },\n+\t{},\n+};\n+\n+U_BOOT_DRIVER(sandbox_tee) = {\n+\t.name = \"sandbox_tee\",\n+\t.id = UCLASS_TEE,\n+\t.of_match = sandbox_tee_match,\n+\t.ops = &sandbox_tee_ops,\n+\t.priv_auto_alloc_size = sizeof(struct sandbox_tee_state),\n+};\ndiff --git a/include/sandboxtee.h b/include/sandboxtee.h\nnew file mode 100644\nindex 000000000000..59cbb621820b\n--- /dev/null\n+++ b/include/sandboxtee.h\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Copyright (C) 2018 Linaro Limited\n+ */\n+\n+#ifndef __SANDBOXTEE_H\n+#define __SANDBOXTEE_H\n+\n+struct sandbox_tee_state {\n+\tu32 session;\n+\tint num_shms;\n+\tvoid *ta;\n+};\n+\n+#endif /*__SANDBOXTEE_H*/\n", "prefixes": [ "U-Boot", "v3", "15/20" ] }