mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
List overview
Download
coreboot-gerrit
December 2017
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
coreboot-gerrit@coreboot.org
1 participants
1557 discussions
Start a n
N
ew thread
Change in coreboot[master]: amd/stoneyridge/southbridge.c: Fix table intr_types[]
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22548
) Change subject: amd/stoneyridge/southbridge.c: Fix table intr_types[] ...................................................................... Patch Set 5: Verified+1 Build Successful
https://qa.coreboot.org/job/coreboot-gerrit/64119/
: SUCCESS
https://qa.coreboot.org/job/coreboot-checkpatch/18950/
: SUCCESS -- To view, visit
https://review.coreboot.org/22548
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f0921e0a540a31b1fb7ec3940006d632cb25f55 Gerrit-Change-Number: 22548 Gerrit-PatchSet: 5 Gerrit-Owner: Richard Spiegel <richard.spiegel(a)silverbackltd.com> Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org> Gerrit-Reviewer: Martin Roth <martinroth(a)google.com> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Richard Spiegel <richard.spiegel(a)silverbackltd.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 20:05:45 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/tpm: Implement hashing function in TSS
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22735
) Change subject: security/tpm: Implement hashing function in TSS ...................................................................... Patch Set 2: Verified-1 Build Unstable
https://qa.coreboot.org/job/coreboot-gerrit/64118/
: UNSTABLE
https://qa.coreboot.org/job/coreboot-checkpatch/18949/
: SUCCESS -- To view, visit
https://review.coreboot.org/22735
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84513e8cbfe1ef11f495b873de0331178915c59 Gerrit-Change-Number: 22735 Gerrit-PatchSet: 2 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 20:05:45 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: cbfstool: Add '-p' option for padding
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22239
) Change subject: cbfstool: Add '-p' option for padding ...................................................................... Patch Set 2: Build Failed
https://qa.coreboot.org/job/coreboot-checkpatch/18891/
: FAILURE
https://qa.coreboot.org/job/coreboot-gerrit/64120/
: SUCCESS -- To view, visit
https://review.coreboot.org/22239
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I64bc54fd10a453b4da467bc69d9590e61b0f7ead Gerrit-Change-Number: 22239 Gerrit-PatchSet: 2 Gerrit-Owner: Daisuke Nojiri <dnojiri(a)chromium.org> Gerrit-Reviewer: Daisuke Nojiri <dnojiri(a)chromium.org> Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org> Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 20:00:32 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: cr50: Make EC clear AP_OFF before hibnernate
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22657
) Change subject: cr50: Make EC clear AP_OFF before hibnernate ...................................................................... Patch Set 5: Verified+1 Build Failed
https://qa.coreboot.org/job/coreboot-checkpatch/18951/
: SUCCESS -- To view, visit
https://review.coreboot.org/22657
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5f590286393ac21382cab64afdccae92d3fc14ba Gerrit-Change-Number: 22657 Gerrit-PatchSet: 5 Gerrit-Owner: Daisuke Nojiri <dnojiri(a)chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org> Gerrit-Reviewer: Daisuke Nojiri <dnojiri(a)chromium.org> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 19:56:15 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/tpm: Fix coding style and uninitialized variable
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22734
) Change subject: security/tpm: Fix coding style and uninitialized variable ...................................................................... Patch Set 2: Verified+1 Build Successful
https://qa.coreboot.org/job/coreboot-gerrit/64117/
: SUCCESS
https://qa.coreboot.org/job/coreboot-checkpatch/18948/
: SUCCESS -- To view, visit
https://review.coreboot.org/22734
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifa93c91aab97c663df66dfdc4d1afb3a43736adb Gerrit-Change-Number: 22734 Gerrit-PatchSet: 2 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 19:56:04 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/vboot: Remove unused include of vboot_nvstorage.h
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22733
) Change subject: security/vboot: Remove unused include of vboot_nvstorage.h ...................................................................... Patch Set 1: Verified+1 Build Successful
https://qa.coreboot.org/job/coreboot-gerrit/64114/
: SUCCESS
https://qa.coreboot.org/job/coreboot-checkpatch/18945/
: SUCCESS -- To view, visit
https://review.coreboot.org/22733
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie0b37ae3d2f979f79060a15ca3f7157f49c89785 Gerrit-Change-Number: 22733 Gerrit-PatchSet: 1 Gerrit-Owner: Randall Spangler <randall(a)spanglers.com> Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org> Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 19:47:27 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/tpm: Implement hashing function in TSS
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22735
) Change subject: security/tpm: Implement hashing function in TSS ...................................................................... Patch Set 1: Verified-1 Build Failed
https://qa.coreboot.org/job/coreboot-gerrit/64116/
: ABORTED
https://qa.coreboot.org/job/coreboot-checkpatch/18947/
: SUCCESS -- To view, visit
https://review.coreboot.org/22735
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84513e8cbfe1ef11f495b873de0331178915c59 Gerrit-Change-Number: 22735 Gerrit-PatchSet: 1 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 19:22:24 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/tpm: Fix coding style and uninitialized variable
by build bot (Jenkins) (Code Review)
05 Dec '17
05 Dec '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/22734
) Change subject: security/tpm: Fix coding style and uninitialized variable ...................................................................... Patch Set 1: Verified-1 Build Failed
https://qa.coreboot.org/job/coreboot-gerrit/64115/
: ABORTED
https://qa.coreboot.org/job/coreboot-checkpatch/18946/
: SUCCESS -- To view, visit
https://review.coreboot.org/22734
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifa93c91aab97c663df66dfdc4d1afb3a43736adb Gerrit-Change-Number: 22734 Gerrit-PatchSet: 1 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Tue, 05 Dec 2017 19:22:06 +0000 Gerrit-HasComments: No
1
0
0
0
Change in coreboot[master]: security/tpm: Implement hashing function in TSS
by Philipp Deppenwiese (Code Review)
05 Dec '17
05 Dec '17
Philipp Deppenwiese has uploaded this change for review. (
https://review.coreboot.org/22735
Change subject: security/tpm: Implement hashing function in TSS ...................................................................... security/tpm: Implement hashing function in TSS * Implement hash_start, hash_update and hash_complete functionality of the TPM into the TSS. * TPM 1.2 and 2.0 support Change-Id: Ib84513e8cbfe1ef11f495b873de0331178915c59 Signed-off-by: Philipp Deppenwiese <zaolin(a)das-labor.org> --- M src/security/tpm/tss.h M src/security/tpm/tss/tcg-1.2/tss.c M src/security/tpm/tss/tcg-1.2/tss_commands.h M src/security/tpm/tss/tcg-2.0/tss.c 4 files changed, 118 insertions(+), 2 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/22735/1 diff --git a/src/security/tpm/tss.h b/src/security/tpm/tss.h index c680a33..3cc50ef 100644 --- a/src/security/tpm/tss.h +++ b/src/security/tpm/tss.h @@ -161,6 +161,22 @@ uint32_t tlcl_disable_platform_hierarchy(void); /** + * + */ +uint32_t tlcl_hash_start(uint32_t *data_length); + +/** + * + */ +uint32_t tlcl_hash_update(const void *message, uint32_t message_length); + +/** + * + */ +uint32_t tlcl_hash_complete(const void *message, uint32_t message_length, + uint8_t **digest); + +/** * CR50 specific tpm command to enable nvmem commits before internal timeout * expires. */ diff --git a/src/security/tpm/tss/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c index 1602ba1..086c080 100644 --- a/src/security/tpm/tss/tcg-1.2/tss.c +++ b/src/security/tpm/tss/tcg-1.2/tss.c @@ -347,3 +347,67 @@ kPcrDigestLength); return result; } + +uint32_t tlcl_hash_start(uint32_t *data_length) +{ + struct s_tpm_sha1_start_cmd cmd; + uint8_t response[kTpmResponseHeaderLength + sizeof(uint32_t)]; + uint32_t result; + + memcpy(&cmd, &tpm_sha1_start_cmd, sizeof(cmd)); + + result = tlcl_send_receive(cmd.buffer, response, sizeof(response)); + if (result != TPM_SUCCESS) + return result; + + if (data_length) + from_tpm_uint32(response + kTpmResponseHeaderLength, + data_length); + + return result; +} + +uint32_t tlcl_hash_update(const void *message, uint32_t message_length) +{ + struct s_tpm_sha1_update_cmd cmd; + uint8_t response[TPM_MAX_COMMAND_SIZE]; + int total_length; + + total_length = + kTpmRequestHeaderLength + sizeof(uint32_t) + message_length; + memcpy(&cmd, &tpm_sha1_update_cmd, sizeof(cmd)); + assert(total_length <= TPM_MAX_COMMAND_SIZE); + set_tpm_command_size(cmd.buffer, total_length); + + to_tpm_uint32(cmd.buffer + tpm_sha1_update_cmd.length, message_length); + memcpy(cmd.buffer + tpm_sha1_update_cmd.data, message, message_length); + + return tlcl_send_receive(cmd.buffer, response, sizeof(response)); +} + +uint32_t tlcl_hash_complete(const void *message, uint32_t message_length, + uint8_t **digest) +{ + struct s_tpm_sha1_complete_cmd cmd; + uint8_t response[TPM_MAX_COMMAND_SIZE]; + int total_length; + uint32_t result; + + total_length = + kTpmRequestHeaderLength + sizeof(uint32_t) + message_length; + memcpy(&cmd, &tpm_sha1_complete_cmd, sizeof(cmd)); + assert(total_length <= TPM_MAX_COMMAND_SIZE); + set_tpm_command_size(cmd.buffer, total_length); + + to_tpm_uint32(cmd.buffer + tpm_sha1_complete_cmd.length, + message_length); + memcpy(cmd.buffer + tpm_sha1_complete_cmd.data, message, + message_length); + + result = tlcl_send_receive(cmd.buffer, response, sizeof(response)); + if (result == TPM_SUCCESS) + memcpy(*digest, response + kTpmResponseHeaderLength, + kPcrDigestLength); + + return result; +} diff --git a/src/security/tpm/tss/tcg-1.2/tss_commands.h b/src/security/tpm/tss/tcg-1.2/tss_commands.h index 880864e..71f6c16 100644 --- a/src/security/tpm/tss/tcg-1.2/tss_commands.h +++ b/src/security/tpm/tss/tcg-1.2/tss_commands.h @@ -1,5 +1,3 @@ -/* This file is automatically generated */ - const struct s_tpm_extend_cmd{ uint8_t buffer[34]; uint16_t pcrNum; @@ -160,5 +158,27 @@ 12, 70, 77, }; +const struct s_tpm_sha1_start_cmd{ + uint8_t buffer[10]; +} tpm_sha1_start_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa0, }, +}; + +const struct s_tpm_sha1_update_cmd{ + uint8_t buffer[4096]; + uint16_t length; + uint16_t data; +} tpm_sha1_update_cmd = { + {0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0xa1, }, + 10, 14, }; + +const struct s_tpm_sha1_complete_cmd{ + uint8_t buffer[4096]; + uint16_t length; + uint16_t data; +} tpm_sha1_complete_cmd = { + {0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0xa2, }, + 10, 14, }; + + const int kWriteInfoLength = 12; const int kNvDataPublicPermissionsOffset = 60; diff --git a/src/security/tpm/tss/tcg-2.0/tss.c b/src/security/tpm/tss/tcg-2.0/tss.c index 670d748..0dbf8c8 100644 --- a/src/security/tpm/tss/tcg-2.0/tss.c +++ b/src/security/tpm/tss/tcg-2.0/tss.c @@ -400,3 +400,19 @@ return TPM_SUCCESS; } + +uint32_t tlcl_hash_start(uint32_t *data_length) +{ + return TPM_SUCCESS; +} + +uint32_t tlcl_hash_update(const void *message, uint32_t message_length) +{ + return TPM_SUCCESS; +} + +uint32_t tlcl_hash_complete(const void *message, uint32_t message_length, + uint8_t **digest) +{ + return TPM_SUCCESS; +} -- To view, visit
https://review.coreboot.org/22735
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib84513e8cbfe1ef11f495b873de0331178915c59 Gerrit-Change-Number: 22735 Gerrit-PatchSet: 1 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
1
0
0
0
Change in coreboot[master]: security/tpm: Fix coding style and uninitialized variable
by Philipp Deppenwiese (Code Review)
05 Dec '17
05 Dec '17
Philipp Deppenwiese has uploaded this change for review. (
https://review.coreboot.org/22734
Change subject: security/tpm: Fix coding style and uninitialized variable ...................................................................... security/tpm: Fix coding style and uninitialized variable Change-Id: Ifa93c91aab97c663df66dfdc4d1afb3a43736adb Signed-off-by: Philipp Deppenwiese <zaolin(a)das-labor.org> --- M src/security/tpm/tss/tcg-1.2/tss.c 1 file changed, 23 insertions(+), 28 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/22734/1 diff --git a/src/security/tpm/tss/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c index b6a61c1..1602ba1 100644 --- a/src/security/tpm/tss/tcg-1.2/tss.c +++ b/src/security/tpm/tss/tcg-1.2/tss.c @@ -16,26 +16,24 @@ #include <arch/early_variables.h> #include <assert.h> -#include <string.h> #include <security/tpm/tis.h> -#include <vb2_api.h> #include <security/tpm/tss.h> +#include <string.h> +#include <vb2_api.h> -#include "tss_internal.h" #include "tss_commands.h" +#include "tss_internal.h" #ifdef FOR_TEST #include <stdio.h> -#define VBDEBUG(format, args...) printf(format, ## args) +#define VBDEBUG(format, args...) printf(format, ##args) #else #include <console/console.h> -#define VBDEBUG(format, args...) printk(BIOS_DEBUG, format, ## args) +#define VBDEBUG(format, args...) printk(BIOS_DEBUG, format, ##args) #endif -static int tpm_send_receive(const uint8_t *request, - uint32_t request_length, - uint8_t *response, - uint32_t *response_length) +static int tpm_send_receive(const uint8_t *request, uint32_t request_length, + uint8_t *response, uint32_t *response_length) { size_t len = *response_length; if (tis_sendrecv(request, request_length, response, &len)) @@ -54,12 +52,12 @@ } /* Gets the size field of a TPM command. */ -__attribute__((unused)) -static inline int tpm_command_size(const uint8_t *buffer) +__attribute__((unused)) static inline int +tpm_command_size(const uint8_t *buffer) { uint32_t size; from_tpm_uint32(buffer + sizeof(uint16_t), &size); - return (int) size; + return (int)size; } /* Gets the code field of a TPM command. */ @@ -85,8 +83,8 @@ uint32_t response_length = max_length; uint32_t result; - result = tpm_send_receive(request, tpm_command_size(request), - response, &response_length); + result = tpm_send_receive(request, tpm_command_size(request), response, + &response_length); if (result != 0) { /* Communication with TPM failed, so response is garbage */ VBDEBUG("TPM: command 0x%x send/receive failed: 0x%x\n", @@ -100,20 +98,19 @@ * (and possibly expected length from the response header). See *
crosbug.com/17017
*/ - VBDEBUG("TPM: command 0x%x returned 0x%x\n", - tpm_command_code(request), result); + VBDEBUG("TPM: command 0x%x returned 0x%x\n", tpm_command_code(request), + result); -return result; + return result; } - /* Sends a TPM command and gets a response. Returns 0 if success or the TPM * error code if error. Waits for the self test to complete if needed. */ uint32_t tlcl_send_receive(const uint8_t *request, uint8_t *response, int max_length) { - uint32_t result = tlcl_send_receive_no_retry(request, response, - max_length); + uint32_t result = + tlcl_send_receive_no_retry(request, response, max_length); /* If the command fails because the self test has not completed, try it * again after attempting to ensure that the self test has completed. */ if (result == TPM_E_NEEDS_SELFTEST || result == TPM_E_DOING_SELFTEST) { @@ -122,8 +119,8 @@ return result; #if defined(TPM_BLOCKING_CONTINUESELFTEST) || defined(VB_RECOVERY_MODE) /* Retry only once */ - result = tlcl_send_receive_no_retry(request, response, - max_length); + result = + tlcl_send_receive_no_retry(request, response, max_length); #else /* This needs serious testing. The TPM specification says: "iii. * The caller MUST wait for the actions of TPM_ContinueSelfTest @@ -209,7 +206,7 @@ struct s_tpm_nv_write_cmd cmd; uint8_t response[TPM_LARGE_ENOUGH_COMMAND_SIZE]; const int total_length = - kTpmRequestHeaderLength + kWriteInfoLength + length; + kTpmRequestHeaderLength + kWriteInfoLength + length; VBDEBUG("TPM: tlcl_write(0x%x, %d)\n", index, length); memcpy(&cmd, &tpm_nv_write_cmd, sizeof(cmd)); @@ -245,7 +242,6 @@ return result; } - uint32_t tlcl_assert_physical_presence(void) { @@ -327,13 +323,12 @@ uint32_t tlcl_set_global_lock(void) { - uint32_t x; + uint32_t x = 0; VBDEBUG("TPM: Set global lock\n"); - return tlcl_write(TPM_NV_INDEX0, (uint8_t *) &x, 0); + return tlcl_write(TPM_NV_INDEX0, (uint8_t *)&x, 0); } -uint32_t tlcl_extend(int pcr_num, const uint8_t *in_digest, - uint8_t *out_digest) +uint32_t tlcl_extend(int pcr_num, const uint8_t *in_digest, uint8_t *out_digest) { struct s_tpm_extend_cmd cmd; uint8_t response[kTpmResponseHeaderLength + kPcrDigestLength]; -- To view, visit
https://review.coreboot.org/22734
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa93c91aab97c663df66dfdc4d1afb3a43736adb Gerrit-Change-Number: 22734 Gerrit-PatchSet: 1 Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
1
0
0
0
← Newer
1
...
132
133
134
135
136
137
138
...
156
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Results per page:
10
25
50
100
200