From 86391f16054ff1aa8af75b552204d24f3c00d50e Mon Sep 17 00:00:00 2001 From: Philipp Deppenwiese Date: Wed, 18 Oct 2017 21:54:24 +0200 Subject: [PATCH] security/tpm: Move TSS stacks into sub-directory Change-Id: I5e20d98665c17d39f3f69772093a062bb905f6f9 Signed-off-by: Philipp Deppenwiese Reviewed-on: https://review.coreboot.org/22105 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/security/tpm/Makefile.inc | 18 ++++++++++-------- src/security/tpm/{ => tss}/tcg-1.2/tss.c | 2 +- .../tpm/{ => tss}/tcg-1.2/tss_internal.h | 0 .../tpm/{ => tss}/tcg-1.2/tss_structures.h | 0 src/security/tpm/{ => tss}/tcg-2.0/tss.c | 4 ++-- .../tpm/{ => tss}/tcg-2.0/tss_marshaling.c | 0 .../tpm/{ => tss}/tcg-2.0/tss_marshaling.h | 0 .../tpm/{ => tss}/tcg-2.0/tss_structures.h | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) rename src/security/tpm/{ => tss}/tcg-1.2/tss.c (99%) rename src/security/tpm/{ => tss}/tcg-1.2/tss_internal.h (100%) rename src/security/tpm/{ => tss}/tcg-1.2/tss_structures.h (100%) rename src/security/tpm/{ => tss}/tcg-2.0/tss.c (99%) rename src/security/tpm/{ => tss}/tcg-2.0/tss_marshaling.c (100%) rename src/security/tpm/{ => tss}/tcg-2.0/tss_marshaling.h (100%) rename src/security/tpm/{ => tss}/tcg-2.0/tss_structures.h (99%) diff --git a/src/security/tpm/Makefile.inc b/src/security/tpm/Makefile.inc index cfd93c3a76..2385635f32 100644 --- a/src/security/tpm/Makefile.inc +++ b/src/security/tpm/Makefile.inc @@ -1,12 +1,14 @@ -verstage-$(CONFIG_TPM) += tcg-1.2/tss.c -verstage-$(CONFIG_TPM2) += tcg-2.0/tss_marshaling.c -verstage-$(CONFIG_TPM2) += tcg-2.0/tss.c +## TSS + +verstage-$(CONFIG_TPM) += tss/tcg-1.2/tss.c +verstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss_marshaling.c +verstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss.c ifeq ($(CONFIG_VBOOT_SEPARATE_VERSTAGE),y) -romstage-$(CONFIG_TPM) += tcg-1.2/tss.c -romstage-$(CONFIG_TPM2) += tcg-2.0/tss_marshaling.c -romstage-$(CONFIG_TPM2) += tcg-2.0/tss.c +romstage-$(CONFIG_TPM) += tss/tcg-1.2/tss.c +romstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss_marshaling.c +romstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss.c endif # CONFIG_VBOOT_SEPARATE_VERSTAGE -ramstage-$(CONFIG_TPM2) += tcg-2.0/tss_marshaling.c -ramstage-$(CONFIG_TPM2) += tcg-2.0/tss.c +ramstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss_marshaling.c +ramstage-$(CONFIG_TPM2) += tss/tcg-2.0/tss.c diff --git a/src/security/tpm/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c similarity index 99% rename from src/security/tpm/tcg-1.2/tss.c rename to src/security/tpm/tss/tcg-1.2/tss.c index e0ffdea433..b7b2d94930 100644 --- a/src/security/tpm/tcg-1.2/tss.c +++ b/src/security/tpm/tss/tcg-1.2/tss.c @@ -19,9 +19,9 @@ #include #include #include +#include #include "tss_internal.h" #include "tss_structures.h" -#include "../tss.h" #ifdef FOR_TEST #include diff --git a/src/security/tpm/tcg-1.2/tss_internal.h b/src/security/tpm/tss/tcg-1.2/tss_internal.h similarity index 100% rename from src/security/tpm/tcg-1.2/tss_internal.h rename to src/security/tpm/tss/tcg-1.2/tss_internal.h diff --git a/src/security/tpm/tcg-1.2/tss_structures.h b/src/security/tpm/tss/tcg-1.2/tss_structures.h similarity index 100% rename from src/security/tpm/tcg-1.2/tss_structures.h rename to src/security/tpm/tss/tcg-1.2/tss_structures.h diff --git a/src/security/tpm/tcg-2.0/tss.c b/src/security/tpm/tss/tcg-2.0/tss.c similarity index 99% rename from src/security/tpm/tcg-2.0/tss.c rename to src/security/tpm/tss/tcg-2.0/tss.c index ae8625c0b2..cde9ea2946 100644 --- a/src/security/tpm/tcg-2.0/tss.c +++ b/src/security/tpm/tss/tcg-2.0/tss.c @@ -9,11 +9,11 @@ #include #include #include +#include +#include #include "tss_structures.h" #include "tss_marshaling.h" -#include "../tis.h" -#include "../antirollback.h" /* * This file provides interface between firmware and TPM2 device. The TPM1.2 diff --git a/src/security/tpm/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c similarity index 100% rename from src/security/tpm/tcg-2.0/tss_marshaling.c rename to src/security/tpm/tss/tcg-2.0/tss_marshaling.c diff --git a/src/security/tpm/tcg-2.0/tss_marshaling.h b/src/security/tpm/tss/tcg-2.0/tss_marshaling.h similarity index 100% rename from src/security/tpm/tcg-2.0/tss_marshaling.h rename to src/security/tpm/tss/tcg-2.0/tss_marshaling.h diff --git a/src/security/tpm/tcg-2.0/tss_structures.h b/src/security/tpm/tss/tcg-2.0/tss_structures.h similarity index 99% rename from src/security/tpm/tcg-2.0/tss_structures.h rename to src/security/tpm/tss/tcg-2.0/tss_structures.h index 389f15df4b..962e20ca8f 100644 --- a/src/security/tpm/tcg-2.0/tss_structures.h +++ b/src/security/tpm/tss/tcg-2.0/tss_structures.h @@ -15,7 +15,7 @@ #include #include -#include "../tss.h" +#include /* This should be plenty for what firmware needs. */ #define TPM_BUFFER_SIZE 256