On 11/22/2015 08:26 PM, Kevin O'Connor wrote:
On Sun, Nov 22, 2015 at 06:54:47PM -0500, Stefan Berger wrote:
On 11/22/2015 12:20 PM, Kevin O'Connor wrote:
Hi Stefan,
As part of trying to better understand the TPM code, I found some
changes to tcgbios.c were helpful. It's mostly code movement.
On 11/22/2015 08:52 PM, Kevin O'Connor wrote:
On Sun, Nov 22, 2015 at 08:31:43PM -0500, Stefan Berger wrote:
On 11/22/2015 08:02 PM, Kevin O'Connor wrote:
Instead of passing in the event data to tpm_extend_acpi_log() via
parameters, use the event[] field in the pcpes. Update those callers
that
On Sun, Nov 22, 2015 at 08:31:43PM -0500, Stefan Berger wrote:
> On 11/22/2015 08:02 PM, Kevin O'Connor wrote:
> >Instead of passing in the event data to tpm_extend_acpi_log() via
> >parameters, use the event[] field in the pcpes. Update those callers
> >that don't populate the pcpes->event to do
On 11/22/2015 08:02 PM, Kevin O'Connor wrote:
Instead of passing in the event data to tpm_extend_acpi_log() via
parameters, use the event[] field in the pcpes. Update those callers
that don't populate the pcpes->event to do so prior to calling
tpm_extend_acpi_log().
Signed-off-by: Kevin O'Conno
On Sun, Nov 22, 2015 at 06:54:47PM -0500, Stefan Berger wrote:
> On 11/22/2015 12:20 PM, Kevin O'Connor wrote:
> >Hi Stefan,
> >
> >As part of trying to better understand the TPM code, I found some
> >changes to tcgbios.c were helpful. It's mostly code movement. I've
> >only compile tested these
Now that entry_count is in a global variable there is no need to pass
it around as function parameters.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 34 +++---
1 file changed, 11 insertions(+), 23 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index c67
Instead of passing in the event data to tpm_extend_acpi_log() via
parameters, use the event[] field in the pcpes. Update those callers
that don't populate the pcpes->event to do so prior to calling
tpm_extend_acpi_log().
Signed-off-by: Kevin O'Connor
---
src/std/tcg.h | 2 +-
src/tcgbios.c | 7
There are no longer any callers to transmit() that use multiple
buffers. Simplify transmit() so that it takes a single request
buffer.
The pass_through_to_tpm() wrapper around transmit() is no longer
needed. Remove the function and have all callers use transmit()
directly.
Now that tpm_extend()
Merge tpm_extend_acpi_log() and tpm_log_event(). Move error checking
and handling to callers. Don't shutdown the TPM on a failure from the
16bit BIOS interface.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff
Setup the tpm hardware request in a linear area of memory.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 37 +
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index e7adf3f..d4f6288 100644
--- a/src/tcgbios.c
+
Instead of calculating the hash in hash_log_event(), create a new
function (tpm_fill_hash) that will create the hash, and update all
callers to use tpm_fill_hash() before calling hash_log_event(). This
reduce the number of parameters to hash_log_event().
Rename hash_log_event() and hash_log_exten
Merge tpm_extend() into tpm_log_extend_event(). Also, the spec states
that a log entry should only be added if the extend succeeds, so
attempt the extend prior to adding to the log.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 33 +
1 file changed, 13 insert
The pcrindex is already in pcpes->pcrindex, so no need to pass it as a
parameter.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index 5461a54..1fb8e5c 100644
--- a/src/tcgbios.c
+++
This series implements some further cleanups I saw while reviewing the
TPM code. Some of the TPM functions take several parameters and this
series attempts to simplify that.
I've only compile tested this.
The series is also available at:
https://github.com/KevinOConnor/seabios/tree/testing
-
On 11/22/2015 12:20 PM, Kevin O'Connor wrote:
Hi Stefan,
As part of trying to better understand the TPM code, I found some
changes to tcgbios.c were helpful. It's mostly code movement. I've
only compile tested these changes, but I think they are safe.
I don't want to conflict with any changes
On Sun, Nov 22, 2015 at 08:11:56PM +0100, Peter Stuge wrote:
> Nice series!
>
> Kevin O'Connor wrote:
> > The only three three callers
>
> Typo ^
Thanks. I fixed locally and on github.
-Kevin
___
SeaBIOS mailing list
SeaBIOS@seabios.org
Nice series!
Kevin O'Connor wrote:
> The only three three callers
Typo ^
//Peter
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios
The switch statement in tpm_add_bootdevice() corresponds with its call
sites - just perform the appropriate action in each caller.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 51 +++
1 file changed, 7 insertions(+), 44 deletions(-)
diff --gi
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 31 ++-
1 file changed, 2 insertions(+), 29 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index d415714..c6782ee 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -601,18 +601,6 @@ tpm_add_action(u32 pcrIndex
Move like functions near each other. Reduce forward function
declarations. This is only code movement - no code changes.
This groups the code into six sections: TPM state tracking, TPM
hardware interface, ACPI TCPA table interface, Helper functions, Setup
and Measurements, BIOS interface.
Signe
Move tpm state checking and error handling from tpm_extend_acpi_log()
to its only caller hash_log_event(). This makes tpm_extend_acpi_log()
specific to just ACPI table handling.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 22 --
1 file changed, 8 insertions(+), 14 dele
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index 5229b4e..341ab9d 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -1136,7 +1136,7 @@ tpm_calling_int19h(void)
/*
* Add event separators
The only three three callers of tpm_ipl() exactly correlate with the
three switch branches in tpm_ipl(), so just move the appropriate code
into the callers.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 80 ++-
1 file changed, 24 insert
Make the only caller of tpm_add_measurement() with EV_SEPARATOR
directly call tpm_add_measurement_to_log(). Rename to
tpm_add_action() and change all callers with EV_ACTION to use this
function.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 55 +--
Hi Stefan,
As part of trying to better understand the TPM code, I found some
changes to tcgbios.c were helpful. It's mostly code movement. I've
only compile tested these changes, but I think they are safe.
I don't want to conflict with any changes you may have pending. So,
let me know if this
25 matches
Mail list logo