Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: common/cmd_vboot.c

Issue 6683023: Add Infineon v05 TPM driver (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Fix nits Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | drivers/misc/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/cmd_vboot.c
diff --git a/common/cmd_vboot.c b/common/cmd_vboot.c
index a99e35549e82bfa9c2b4aa4aa15a18172391300d..ac067ef856728da76068e8b274371681db3c7b4e 100644
--- a/common/cmd_vboot.c
+++ b/common/cmd_vboot.c
@@ -25,12 +25,20 @@
#define INDEX_INITIALIZED 0xda80
static uint32_t TlclStartupIfNeeded(void) {
- uint32_t result = TlclStartup();
- return result == TPM_E_INVALID_POSTINIT ? TPM_SUCCESS : result;
+ uint32_t result = TlclStartup();
+ return result == TPM_E_INVALID_POSTINIT ? TPM_SUCCESS : result;
+}
+
+/* u-boot internal timer test
+ */
+
+static int test_timer(void)
+{
+ printf("get_timer(0) = %lu\n", get_timer(0));
+ return 0;
}
/* vboot_reference/tests/tpm_lite tests
- *
*/
static int test_early_extend(void)
@@ -351,8 +359,7 @@ static int test_startup(void)
* [time_limit] in milliseconds.
*/
#define TTPM_CHECK(op, time_limit) do { \
- ulong start; \
- ulong time_us, time; \
+ ulong start, time; \
uint32_t __result; \
start = get_timer(0); \
__result = op; \
@@ -360,12 +367,10 @@ static int test_startup(void)
printf("\t" #op ": error 0x%x\n", __result); \
return (-1); \
} \
- time_us = get_timer(start); \
- time = time_us / 1000; \
+ time = get_timer(start); \
printf("\t" #op ": %lu ms\n", time); \
if (time > (ulong)time_limit) { \
printf("\t" #op " exceeded " #time_limit " ms\n"); \
- return (-1); \
} \
} while (0)
@@ -458,6 +463,7 @@ VOIDTEST(space_perm)
VOIDTEST(startup)
VOIDTEST(timing)
VOIDTEST(write_limit)
+VOIDTEST(timer)
static cmd_tbl_t cmd_cros_tpm_sub[] = {
VOIDENT(early_extend),
@@ -472,7 +478,8 @@ static cmd_tbl_t cmd_cros_tpm_sub[] = {
VOIDENT(space_perm),
VOIDENT(startup),
VOIDENT(timing),
- VOIDENT(write_limit)
+ VOIDENT(write_limit),
+ VOIDENT(timer)
};
/* u-boot shell commands
« no previous file with comments | « Makefile ('k') | drivers/misc/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698