From: "Stefan Berger" <stefanb@linux.ibm.com>
To: devel@edk2.groups.io, kraxel@redhat.com, marcandre.lureau@redhat.com
Cc: Stefan Berger <stefanb@linux.ibm.com>
Subject: [PATCH v3 0/8] Add support for TPM 1.2 Physical Presence Interface and Menu
Date: Wed, 1 Dec 2021 14:30:22 -0500 [thread overview]
Message-ID: <20211201193030.3932074-1-stefanb@linux.ibm.com> (raw)
This series adds support for the full TPM 1.2 Physical Presence Interface
(PPI) and activates the TPM 1.2 menu at the end. PPI is a prerequisite for
the menu to work.
The modifications to the original code are mostly due to the fact that we
are using a memory region for PPI in QEMU. I tried to keep them at a minimum.
For the PPI Flags I am using a EFI variable just like the original code does.
(SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c)
The PhysicalPresenceFlags variable is write-protected (since v3) by adding
an entry to AuthVariableLib.c. The consequence of locking the variable is
that the processing of the physical presence opcodes, and with that
write-access to that variable, had to be moved to before the end-of-DXE
because afterwards it cannot be changed anymore.
Regards,
Stefan
v3:
- Moved processing of physical presence opcodes to before end-of-DXE
- Write-protected PhysicalPresenceFlags variable by entry in AuthVariableLib.c
v2:
- Added patch that copies sources from SecurityPkg to OvmfPkg before changes
- Use CONSTRUCTOR from DxeTcgPhysicalPresenceLib.inf
- Other nits
Gerd Hoffmann (1):
OvmfPkg: add TPM 1.2 config menu
Stefan Berger (7):
OvmfPkg: Move processing of physical presence opcode before End-of-Dxe
OvmfPkg: Check for TPM 2 early to leave function early
SecurityPkg: Store physical presence code by submitting to PreOS func
SecurityPkg: Declare PhysicalPresenceFlags variable and its properties
OvmfPkg: Copy TPM 1.2 DxeTcgPhysicalPresenceLib.c from SecurityPkg
OvmfPkg: Enable physical presence interface for TPM 1.2
OvmfPkg: Enable TPM 1.2 Physical Presence Opcode processing
OvmfPkg/Bhyve/BhyveX64.dsc | 1 +
.../PlatformBootManagerLib/BdsPlatform.c | 23 +-
.../PlatformBootManagerLib.inf | 1 +
.../PlatformBootManagerLibBhyve/BdsPlatform.c | 20 +-
.../PlatformBootManagerLibGrub/BdsPlatform.c | 20 +-
.../DxeTcg2PhysicalPresenceLib.c | 36 +-
.../DxeTcgPhysicalPresenceLib.c | 22 +
.../DxeTcgPhysicalPresenceLib.inf | 27 +
.../DxeTcgPhysicalPresenceLib.c | 1448 +++++++++++++++++
.../DxeTcgPhysicalPresenceLib.inf | 64 +
.../DxeTcgPhysicalPresenceLib.uni | 22 +
.../PhysicalPresenceStrings.uni | 46 +
OvmfPkg/Microvm/MicrovmX64.dsc | 1 +
OvmfPkg/OvmfTpmComponentsDxe.dsc.inc | 1 +
OvmfPkg/OvmfTpmDxe.fdf.inc | 1 +
OvmfPkg/OvmfTpmLibs.dsc.inc | 4 +
OvmfPkg/OvmfXen.dsc | 1 +
.../Include/Library/TcgPhysicalPresenceLib.h | 39 +
.../AuthVariableLib/AuthServiceInternal.h | 1 +
.../Library/AuthVariableLib/AuthVariableLib.c | 11 +
.../AuthVariableLib/AuthVariableLib.inf | 4 +
.../DxeTcgPhysicalPresenceLib.c | 55 +
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf | 1 +
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c | 41 +-
24 files changed, 1819 insertions(+), 71 deletions(-)
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibNull/DxeTcgPhysicalPresenceLib.c
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibNull/DxeTcgPhysicalPresenceLib.inf
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/DxeTcgPhysicalPresenceLib.c
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/DxeTcgPhysicalPresenceLib.inf
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/DxeTcgPhysicalPresenceLib.uni
create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/PhysicalPresenceStrings.uni
--
2.31.1
next reply other threads:[~2021-12-01 19:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 19:30 Stefan Berger [this message]
2021-12-01 19:30 ` [PATCH v3 1/8] OvmfPkg: Move processing of physical presence opcode before End-of-Dxe Stefan Berger
2021-12-01 19:30 ` [PATCH v3 2/8] OvmfPkg: Check for TPM 2 early to leave function early Stefan Berger
2021-12-01 19:30 ` [PATCH v3 3/8] SecurityPkg: Store physical presence code by submitting to PreOS func Stefan Berger
2021-12-01 19:30 ` [PATCH v3 4/8] SecurityPkg: Declare PhysicalPresenceFlags variable and its properties Stefan Berger
2021-12-01 19:30 ` [PATCH v3 5/8] OvmfPkg: Copy TPM 1.2 DxeTcgPhysicalPresenceLib.c from SecurityPkg Stefan Berger
2021-12-01 19:30 ` [PATCH v3 6/8] OvmfPkg: Enable physical presence interface for TPM 1.2 Stefan Berger
2021-12-01 19:30 ` [PATCH v3 7/8] OvmfPkg: Enable TPM 1.2 Physical Presence Opcode processing Stefan Berger
2021-12-01 19:30 ` [PATCH v3 8/8] OvmfPkg: add TPM 1.2 config menu Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211201193030.3932074-1-stefanb@linux.ibm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox