VTPM mini-os: TPM device drivers for mini-os
cover VTPM mini-os: TPM device drivers for mini-os
This patch adds 3 new drivers to mini-os
tpmfront: Paravirtualized tpm driver that can speak to mini-os tpmback and linux tpmbk
tpmback: Paravirtualized tpm backend driver that can speak to mini-os tpmfront and linux tpm_xenutpm_tis: Hardware tpm driver. Should work with any TPM device compliant with the 1.2 spec. Requires io memory passthrough.
Signed off by: Matthew Fioravante <[email protected]>
extras/mini-os/include/lib.h +13 -0
@@ -146,6 +146,8 @@FTYPE_FB ,FTYPE_MEM ,FTYPE_SAVEFILE , +FTYPE_TPMFRONT , + FTYPE_TPM_TIS, };#define MAX_EVTCHN_PORTS 16
@@ -177,6 +179,7 @@ } tap;struct {struct blkfront_dev *dev; +off_t offset; } blk;struct {struct kbdfront_dev *dev;
@@ -187,6 +190,16 @@struct {struct consfront_dev *dev; } cons; +struct { +struct tpmfront_dev *dev; +int respgot; +off_t offset; + } tpmfront; +struct { +struct tpm_chip *dev; +int respgot; +off_t offset; + } tpm_tis;struct {/* To each xenbus FD is associated a queue of watch events for this * FD. */
extras/mini-os/include/tpmback.h +109 -0
109 lines not on this page · raw message
extras/mini-os/include/tpmfront.h +107 -0
107 lines not on this page · raw message
extras/mini-os/include/tpm_tis.h +75 -0
75 lines not on this page · raw message
extras/mini-os/Makefile +28 -5
@@ -79,13 +79,36 @@ OBJS := $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(OBJS)) ifeq ($(libc),y) -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(XEN_TARGET_ARCH) -whole-archive -lxenguest -lxenctrl -no-whole-archive -APP_LDLIBS += -lpci -APP_LDLIBS += -lz -APP_LDLIBS += -lm -LDLIBS += -lc + APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(XEN_TARGET_ARCH) -whole-archive -lxenguest -lxenctrl -no-whole-archive + APP_LDLIBS += -lpci + APP_LDLIBS += -lz + APP_LDLIBS += -lm + LDLIBS += -lc endif +ifeq ($(vtpm),y) + APP_LDLIBS := $(filter-out -lpci, $(APP_LDLIBS)) + APP_LDLIBS += -lgmp + #FIXME: Need to remove unneeded drivers from vtpm + #OBJS := $(filter-out $(OBJ_DIR)/fs-front.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/daytime.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/pcifront.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/netfront.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/fbfront.o, $(OBJS)) +endif + +ifeq ($(vtpmmgr),y) + APP_LDLIBS := $(filter-out -lpci, $(APP_LDLIBS)) + APP_LDLIBS := -lvtsp -ltcpaCrypto -lTCS -lTCGUtils -lcrypto $(APP_LDLIBS) + #FIXME: Need to remove unneeded drivers from vtpmmgr + #OBJS := $(filter-out $(OBJ_DIR)/fs-front.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/daytime.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/pcifront.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/fbfront.o, $(OBJS)) + #OBJS := $(filter-out $(OBJ_DIR)/netfront.o, $(OBJS)) +endif + + ifneq ($(APP_OBJS)-$(lwip),-y) OBJS := $(filter-out $(OBJ_DIR)/daytime.o, $(OBJS)) endif
extras/mini-os/tpmback.c +1128 -0
1,128 lines not on this page · raw message
extras/mini-os/tpmfront.c +619 -0
619 lines not on this page · raw message
extras/mini-os/tpm_tis.c +1368 -0
890 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Part of the diff is not shown here. View the raw message.
Quoted 10 lines · Matthew Fioravante, le Fri 11 Mar 2011 17:50:43 -0500, a écrit :
This patch adds 3 new drivers to mini-os
tpmfront: Paravirtualized tpm driver that can speak to mini-os tpmback and linux tpmbk
tpmback: Paravirtualized tpm backend driver that can speak to mini-os tpmfront and linuxtpm_xenutpm_tis: Hardware tpm driver. Should work with any TPM device compliant with the 1.2 spec. Requires io memory passthrough.Signed off by: Matthew Fioravante <[email protected]>
I don't have the time to review the driver code in details, but the overall shape and interaction with the rest of mini-os looks good to me.
extras/mini-os/include/lib.h line 185
Quoted 8 lines
extras/mini-os/include/lib.h +1
-0@@ -177,6 +179,7 @@ } tap;struct {struct blkfront_dev *dev; +off_t offset; } blk;struct {struct kbdfront_dev *dev;
This seems like an unrelated change, right?
Samuel
Yeah that looks like that part should have been included in the blkfront patch
Quoted 24 lines · Samuel Thibault
Quoted 10 lines · Matthew Fioravante, le Fri 11 Mar 2011 17:50:43 -0500, a écrit :
This patch adds 3 new drivers to mini-os
tpmfront: Paravirtualized tpm driver that can speak to mini-os tpmback and linux tpmbk
tpmback: Paravirtualized tpm backend driver that can speak to mini-os tpmfront and linuxtpm_xenutpm_tis: Hardware tpm driver. Should work with any TPM device compliant with the 1.2 spec. Requires io memory passthrough.Signed off by: Matthew Fioravante<[email protected]>
I don't have the time to review the driver code in details, but the overall shape and interaction with the rest of mini-os looks good to me.
extras/mini-os/include/lib.h line 185
Quoted 8 lines
extras/mini-os/include/lib.h +1
-0@@ -177,6 +179,7 @@ } tap;struct {struct blkfront_dev *dev; +off_t offset; } blk;struct {struct kbdfront_dev *dev;This seems like an unrelated change, right?
Quoted 1 line
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel