History log of /freebsd/sys/dev/tpm/tpm20.h (Results 1 – 16 of 16)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 10eea8dc 09-May-2024 Justin Hibbits <jhibbits@FreeBSD.org>

tpm20: Support partial reads

Summary:
In some cases the TPM utilities may read only a partial block, instead
of a full block. If a new command starts while in the middle of a read
it may cause the

tpm20: Support partial reads

Summary:
In some cases the TPM utilities may read only a partial block, instead
of a full block. If a new command starts while in the middle of a read
it may cause the TPM to go catatonic and no longer respond to SPI.

Reviewed by: kd
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45140

show more ...


Revision tags: release/13.3.0
# c2e9c5bb 13-Nov-2023 Justin Hibbits <jhibbits@FreeBSD.org>

tpm: Refactor TIS and add a SPI attachment

Summary:
Though mostly used in x86 devices, TPM can be used on others, with a
direct SPI attachment. Refactor the TPM 2.0 driver set to use an
attachment

tpm: Refactor TIS and add a SPI attachment

Summary:
Though mostly used in x86 devices, TPM can be used on others, with a
direct SPI attachment. Refactor the TPM 2.0 driver set to use an
attachment interface, and implement a SPI bus interface.

Test Plan:
Tested on a Raspberry Pi 4, with a GeeekPi TPM2.0 module (SLB9670
TPM) using security/tpm2-tools tpm2_getcaps for very light testing against the
spibus attachment.

Reviewed by: kd
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45069

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0
# e23ad9c4 02-Sep-2022 Kornel Dulęba <kd@FreeBSD.org>

tpm: Fix entropy harvesting logic

Use a taskqueue instead of a callout.
Callout functions mustn't sleep, where as the TPM driver
uses a sx lock in order to serialize accesses to the device.
Since th

tpm: Fix entropy harvesting logic

Use a taskqueue instead of a callout.
Callout functions mustn't sleep, where as the TPM driver
uses a sx lock in order to serialize accesses to the device.
Since the entropy harvesting feature is not enabled by default,
this commit should not bring any functional changes to the GENERIC
kernel.

Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36412

show more ...


Revision tags: release/13.1.0, release/12.3.0
# 59d1661c 16-Aug-2021 Kornel Duleba <mindal@semihalf.com>

tpm_tis: Improve interrupt allocation

Validate the irq received from ACPI. Test if it works by sending a simple command and checking if the interrupt handler was executed.
Internal buffer allocation

tpm_tis: Improve interrupt allocation

Validate the irq received from ACPI. Test if it works by sending a simple command and checking if the interrupt handler was executed.
Internal buffer allocation was moved away from common code to tis and crb parts - in order to test the interrupt we need to have it allocated early.

Obtained from: Semihalf
Differential revision: https://reviews.freebsd.org/D31395

show more ...


Revision tags: release/13.0.0, release/12.2.0
# 0d7f4d16 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

tpm: clean up empty lines in .c and .h files


Revision tags: release/11.4.0, release/12.1.0, release/11.3.0
# 7648bc9f 13-May-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @347527

Sponsored by: The FreeBSD Foundation


# f39ec261 16-Apr-2019 Marcin Wojtas <mw@FreeBSD.org>

Improve tpm20 style

No functional changes to the code are applied.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield


# d68a65ea 16-Apr-2019 Marcin Wojtas <mw@FreeBSD.org>

tpm: Prevent session hijack

Check caller thread id before allowing to read the buffer
to make sure that it can only be accessed by the thread that
did the associated write to the TPM.

Submitted by:

tpm: Prevent session hijack

Check caller thread id before allowing to read the buffer
to make sure that it can only be accessed by the thread that
did the associated write to the TPM.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: delphij
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19713

show more ...


# 415e34c4 29-Mar-2019 Alan Somers <asomers@FreeBSD.org>

MFHead@r345677


# 4ee7d3b0 23-Mar-2019 Marcin Wojtas <mw@FreeBSD.org>

Allow using TPM as entropy source.

TPM has a built-in RNG, with its own entropy source.
The driver was extended to harvest 16 random bytes from TPM every 10 seconds.
A new build option "TPM_HARVEST"

Allow using TPM as entropy source.

TPM has a built-in RNG, with its own entropy source.
The driver was extended to harvest 16 random bytes from TPM every 10 seconds.
A new build option "TPM_HARVEST" was introduced - for now, however, it
is not enabled by default in the GENERIC config.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: markm, delphij
Approved by: secteam
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19620

show more ...


# 7e565c55 30-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343320 through r343570.


# 877fc2e3 25-Jan-2019 Takanori Watanabe <takawata@FreeBSD.org>

Use ACPI TPM2 table to probe tpmtis and tpmcrb device.

Differential Revision: https://reviews.freebsd.org/D18937


# 0c3bbec3 20-Dec-2018 Conrad Meyer <cem@FreeBSD.org>

tpm(4): Fix GCC build after r342084 (TPM 2.0 driver commit)

Move static variable definition (cdevsw) to a more conventional location
(the C file it is used in), rather than a header.

This fixes the

tpm(4): Fix GCC build after r342084 (TPM 2.0 driver commit)

Move static variable definition (cdevsw) to a more conventional location
(the C file it is used in), rather than a header.

This fixes the GCC warning, -Wunused-variable ("defined but not used") when
the tpm20.h header is included in files other than tpm20.c (e.g.,
tpm_tis.c).

X-MFC-with: r342084
Sponsored by: Dell EMC Isilon

show more ...


# efa9b503 20-Dec-2018 Marcin Wojtas <mw@FreeBSD.org>

Fix obtaining RSP address in TPM CRB for non-amd64 platforms

On amd64 the RSP address can be read in single 8-byte transaction,
which is obviously not possible on 32-bit platforms. Fix that
by perfo

Fix obtaining RSP address in TPM CRB for non-amd64 platforms

On amd64 the RSP address can be read in single 8-byte transaction,
which is obviously not possible on 32-bit platforms. Fix that
by performing 2 4-byte read on them.

Obtained from: Semihalf
Sponsored by: Stormshield

show more ...


# a2d5ed94 14-Dec-2018 Marcin Wojtas <mw@FreeBSD.org>

Introduce driver for TPM 2.0 in CRB and FIFO (TIS) modes

It was written basing on:
TCG PC Client Platform TPM Profile (PTP) Specification Version 22, Revision 1.03.
It only supports Locality 0. Inte

Introduce driver for TPM 2.0 in CRB and FIFO (TIS) modes

It was written basing on:
TCG PC Client Platform TPM Profile (PTP) Specification Version 22, Revision 1.03.
It only supports Locality 0. Interrupts are only supported in FIFO mode.

The driver in FIFO mode was tested on x86 with Infineon SLB9665 discrete TPM chip.
Driver in both modes was also tested on qemu with swtpm running on host.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D18048

show more ...