sandbox: tpm: Split out common nvdata code
authorSimon Glass <sjg@chromium.org>
Sun, 18 Jul 2021 20:17:57 +0000 (14:17 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 1 Aug 2021 15:05:24 +0000 (09:05 -0600)
commit974c98f26c765f323433b0c52e02ea3a777bc80f
tree5a79d08a677dcc98e8b1acd32fbdfc807d3ae3b8
parentc03cb022305b40e3efd7271c055e8bc6aefa7f75
sandbox: tpm: Split out common nvdata code

We want to support nvdata in TPM2 as well. To avoid code duplicating the
associated code, move it into a common file.

Drop the special-case logic for the kernel space. This can be handled by
the higher-level code now, i.e. in vboot itself.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/tpm/Makefile
drivers/tpm/sandbox_common.c [new file with mode: 0644]
drivers/tpm/sandbox_common.h [new file with mode: 0644]
drivers/tpm/tpm_tis_sandbox.c