Skip to content

Commit ca64b08

Browse files
philmdstefanberger
authored andcommitted
tpm: Move backend code under the 'backends/' directory
TPM subsytem is split into backends (see commit f4ede81) and frontends (see i.e. 3676bc6). Keep the emulated hardware 'frontends' under hw/tpm/, but move the backends in the backends/tpm/ directory. Suggested-by: Marc-André Lureau <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Berger <[email protected]>
1 parent 0f7d214 commit ca64b08

File tree

16 files changed

+62
-60
lines changed

16 files changed

+62
-60
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ MINIKCONF_ARGS = \
418418
CONFIG_LINUX=$(CONFIG_LINUX) \
419419
CONFIG_PVRDMA=$(CONFIG_PVRDMA)
420420

421-
MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
421+
MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/backends/Kconfig $(SRC_PATH)/hw/Kconfig
422422
MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
423423
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
424424

Makefile.objs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ trace-events-subdirs =
125125
trace-events-subdirs += accel/kvm
126126
trace-events-subdirs += accel/tcg
127127
trace-events-subdirs += backends
128+
trace-events-subdirs += backends/tpm
128129
trace-events-subdirs += crypto
129130
trace-events-subdirs += monitor
130131
ifeq ($(CONFIG_USER_ONLY),y)

backends/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source tpm/Kconfig

backends/tpm/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
config TPM_BACKEND
2+
bool
3+
depends on TPM
4+
5+
config TPM_PASSTHROUGH
6+
bool
7+
default y
8+
# FIXME: should check for x86 host as well
9+
depends on TPM_BACKEND && LINUX
10+
11+
config TPM_EMULATOR
12+
bool
13+
default y
14+
depends on TPM_BACKEND

backends/tpm/Makefile.objs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
common-obj-y += tpm_backend.o
2+
common-obj-y += tpm_util.o
3+
common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
4+
common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
File renamed without changes.

hw/tpm/tpm_int.h renamed to backends/tpm/tpm_int.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* This work is licensed under the terms of the GNU GPL, version 2 or later.
1010
* See the COPYING file in the top-level directory.
1111
*/
12-
#ifndef TPM_TPM_INT_H
13-
#define TPM_TPM_INT_H
12+
#ifndef BACKENDS_TPM_INT_H
13+
#define BACKENDS_TPM_INT_H
1414

1515
#include "qemu/option.h"
1616
#include "sysemu/tpm.h"
@@ -85,4 +85,4 @@ typedef struct TPMSizedBuffer {
8585

8686
void tpm_sized_buffer_reset(TPMSizedBuffer *tsb);
8787

88-
#endif /* TPM_TPM_INT_H */
88+
#endif /* BACKENDS_TPM_INT_H */
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)