Introduce generic TPM support in u-boot
PATCH v6 1/2 Introduce generic TPM support in u-boot
TPM (Trusted Platform Module) is an integrated circuit and software platform that provides computer manufacturers with the core components of a subsystem used to assure authenticity, integrity and confidentiality.
This driver supports version 1.2 of the TCG (Trusted Computing Group) specifications.
The TCG specification defines several so called localities in a TPM chip, to be controlled by different software layers. When used on a typical x86 platform during the firmware phase, only locality 0 can be accessed by the CPU, so this driver even while supporting the locality concept presumes that only locality zero is used.
This implementation is loosely based on the article "Writing a TPM Device Driver" published on http://ptgmedia.pearsoncmg.com
Compiling this driver with DEBUG defined will generate trace of all accesses to TMP registers.
This driver has been tested and is being used in three different functional ChromeOS machines (Pinetrail and Sandy Bridge Intel chipsets) all using the same Infineon SLB 9635 TT 1.2 device.
A u-boot cli command allowing access to the TPM was also implemented and is being submitted as a second patch.
---
v5 with A function comment header correction.
Makefile | 3 + README | 10 + drivers/tpm/Makefile | 43 ++++ drivers/tpm/generic_lpc_tpm.c | 495 +++++++++++++++++++++++++++++++++++++++++ include/tpm.h | 71 ++++++ 5 files changed, 622 insertions(+), 0 deletions(-) create mode 100644 drivers/tpm/Makefile create mode 100644 drivers/tpm/generic_lpc_tpm.c create mode 100644 include/tpm.h
Makefile +3 -0
@@ -268,6 +268,9 @@ LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS += drivers/rtc/librtc.o LIBS += drivers/serial/libserial.o +ifeq ($(CONFIG_GENERIC_LPC_TPM),y) +LIBS += drivers/tpm/libtpm.o +endif LIBS += drivers/twserial/libtws.o LIBS += drivers/usb/eth/libusb_eth.o LIBS += drivers/usb/gadget/libusb_gadget.o
README +10 -0
@@ -1018,6 +1018,16 @@ The following options need to be configured: CONFIG_SH_ETHER_CACHE_WRITEBACK If this option is set, the driver enables cache flush. +- TPM Support: + CONFIG_GENERIC_LPC_TPM + Support for generic parallel port TPM devices. Only one device + per system is supported at this time. + + CONFIG_TPM_TIS_BASE_ADDRESS + Base address where the generic TPM device is mapped + to. Contemporary x86 systems usually map it at + 0xfed40000. + - USB Support: At the moment only the UHCI host controller is supported (PIP405, MIP405, MPC5200); define
drivers/tpm/Makefile new file +43 -0
43 lines not on this page · raw message
drivers/tpm/generic_lpc_tpm.c new file +495 -0
495 lines not on this page · raw message
include/tpm.h new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.3.1
PATCH v6 1/2 Introduce generic TPM support in u-boot
Hi Wolfgang,
Quoted 40 lines · Vadim Bendebury
TPM (Trusted Platform Module) is an integrated circuit and software platform that provides computer manufacturers with the core components of a subsystem used to assure authenticity, integrity and confidentiality.
This driver supports version 1.2 of the TCG (Trusted Computing Group) specifications.
The TCG specification defines several so called localities in a TPM chip, to be controlled by different software layers. When used on a typical x86 platform during the firmware phase, only locality 0 can be accessed by the CPU, so this driver even while supporting the locality concept presumes that only locality zero is used.
This implementation is loosely based on the article "Writing a TPM Device Driver" published on http://ptgmedia.pearsoncmg.com
Compiling this driver with DEBUG defined will generate trace of all accesses to TMP registers.
This driver has been tested and is being used in three different functional ChromeOS machines (Pinetrail and Sandy Bridge Intel chipsets) all using the same Infineon SLB 9635 TT 1.2 device.
A u-boot cli command allowing access to the TPM was also implemented and is being submitted as a second patch.
Change-Id I22a33c3e5b2e20eec9557a7621bd463b30389d73Signed-off-by Vadim Bendebury <[email protected]>CC Wolfgang Denk <[email protected]>---
v5 with A function comment header correction.
?Makefile ? ? ? ? ? ? ? ? ? ? ?| ? ?3 + ?README ? ? ? ? ? ? ? ? ? ? ? ?| ? 10 + ?drivers/tpm/Makefile ? ? ? ? ?| ? 43 ++++ ?drivers/tpm/generic_lpc_tpm.c | ?495 +++++++++++++++++++++++++++++++++++++++++ ?include/tpm.h ? ? ? ? ? ? ? ? | ? 71 ++++++
Quoted 4 lines
?5 files changed, 622 insertions(+), 0 deletions(-) ?create mode 100644
drivers/tpm/Makefile?create mode 100644drivers/tpm/generic_lpc_tpm.c?create mode 100644include/tpm.h
Regarding this patch, the second in the series has been applied. Are you planning on picking this one up also?
Regards,
Simon
Wolfgang Denk
AppliedPATCH v6 1/2 Introduce generic TPM support in u-boot
In reply to Vadim BendeburyDear Vadim Bendebury,
Quoted 35 lines · In message <[email protected]> you wrote:
TPM (Trusted Platform Module) is an integrated circuit and software platform that provides computer manufacturers with the core components of a subsystem used to assure authenticity, integrity and confidentiality.
This driver supports version 1.2 of the TCG (Trusted Computing Group) specifications.
The TCG specification defines several so called localities in a TPM chip, to be controlled by different software layers. When used on a typical x86 platform during the firmware phase, only locality 0 can be accessed by the CPU, so this driver even while supporting the locality concept presumes that only locality zero is used.
This implementation is loosely based on the article "Writing a TPM Device Driver" published on http://ptgmedia.pearsoncmg.com
Compiling this driver with DEBUG defined will generate trace of all accesses to TMP registers.
This driver has been tested and is being used in three different functional ChromeOS machines (Pinetrail and Sandy Bridge Intel chipsets) all using the same Infineon SLB 9635 TT 1.2 device.
A u-boot cli command allowing access to the TPM was also implemented and is being submitted as a second patch.
Change-Id I22a33c3e5b2e20eec9557a7621bd463b30389d73Signed-off-by Vadim Bendebury <[email protected]>CC Wolfgang Denk <[email protected]>---
v5 with A function comment header correction.
Quoted 9 lines
Makefile | 3 + README | 10 + drivers/tpm/Makefile | 43 ++++ drivers/tpm/generic_lpc_tpm.c | 495 +++++++++++++++++++++++++++++++++++++++++ include/tpm.h | 71 ++++++ 5 files changed, 622 insertions(+), 0 deletions(-) create mode 100644 drivers/tpm/Makefile create mode 100644 drivers/tpm/generic_lpc_tpm.c create mode 100644 include/tpm.h
Applied, thanks.
But _please_ get used to providing full change logs to your patches. This is patch v6, so I would like to see a history for v2, v3, v4, v5 and v6 - but all you have is a totally useless (as incomprehensible) comment for v5.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anyone who doesn't believe in miracles is not a realist.
- David Ben GurionPATCH v6 1/2 Introduce generic TPM support in u-boot
Dear Wolfgang Denk,
Quoted 2 lines · Wolfgang Denk
Dear Vadim Bendebury,
[..]
Quoted 3 lines
Applied, thanks.
Thank you!
Quoted 6 lines
But _please_ get used to providing full change logs to your patches. This is patch v6, so I would like to see a history for v2, v3, v4, v5 and v6 - but all you have is a totally useless (as incomprehensible) comment for v5.
Do you mean all newer patch versions are supposed to include logs of all previous patch versions?
I can do that, somehow nobody mentioned this omission while reviewing previous patches (up to version 5).
Cheers,
/vb
Quoted 10 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Anyone who doesn't believe in miracles is not a realist.
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - David Ben Gurion
PATCH v6 1/2 Introduce generic TPM support in u-boot
Dear Vadim Bendebury,
Quoted 3 lines · In message <CAC3GErGZSBQXC=gJGVcwdavZKKrDAsvHrVxgkt9tLsVybtxevQ@mail.gmail.com>…
Do you mean all newer patch versions are supposed to include logs of all previous patch versions?
Yes, as documented - see
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
bullet # 2 and example.
Quoted 2 lines
I can do that, somehow nobody mentioned this omission while reviewing previous patches (up to version 5).
Well, some things slip through... And initially the need was not that big.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In C we had to code our own bugs, in C++ we can inherit them.