summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-10-14 23:14:59 +0800
committerCommit Bot <commit-bot@chromium.org>2019-10-23 16:28:14 +0000
commit77dff643fc445f5faba647fddd4a7b17bb193f26 (patch)
tree782847a89bb41f99f39f6bbd3b918df80c2ed652
parent3c477458fa7f1506e722ede38636eaced8810687 (diff)
downloadvboot-77dff643fc445f5faba647fddd4a7b17bb193f26.tar.gz
vboot: remove timers from VbSelectAndLoadKernel and crossystem
These timers have not been used in eons, and an alternative already exists (coreboot's tstamp_table). BUG=b:124141368, chromium:1014102 TEST=make clean && make runtests BRANCH=none Change-Id: Ic0d3e14028315d6f343388c7c1c9d105b7bd58a2 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1860254 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--firmware/include/vboot_struct.h6
-rw-r--r--firmware/lib/vboot_api_kernel.c10
-rw-r--r--host/lib/crossystem.c17
-rw-r--r--utility/crossystem.c1
4 files changed, 4 insertions, 30 deletions
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index 1451a1cf..33a24885 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -402,9 +402,9 @@ typedef struct VbSharedDataHeader {
uint64_t kernel_subkey_data_size;
/*
- * Timer values from VbExGetTimer(). Unused values are set to 0. Note
- * that these are now the enter/exit times for the wrapper API entry
- * points; see crosbug.com/17018. */
+ * These timer values are all deprecated. coreboot tstamp_table should
+ * be used instead. See crosbug.com/1014102.
+ */
/* VbInit() enter/exit */
uint64_t timer_vb_init_enter;
uint64_t timer_vb_init_exit;
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index f46c9544..7108e903 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -240,9 +240,6 @@ static vb2_error_t vb2_kernel_setup(struct vb2_context *ctx,
return VBERROR_INIT_SHARED_DATA;
}
- /* Start timer */
- shared->timer_vb_select_and_load_kernel_enter = VbExGetTimer();
-
/* Translate vboot1 flags back to vboot2 */
if (shared->recovery_reason)
ctx->flags |= VB2_CONTEXT_RECOVERY_MODE;
@@ -365,13 +362,6 @@ static vb2_error_t vb2_kernel_phase4(struct vb2_context *ctx,
static void vb2_kernel_cleanup(struct vb2_context *ctx)
{
vb2_nv_commit(ctx);
-
- /* vb2_shared_data may not have been initialized, and we may not have a
- proper vbsd value. */
- struct vb2_shared_data *sd = vb2_get_sd(ctx);
- if (sd->vbsd)
- /* Stop timer */
- sd->vbsd->timer_vb_select_and_load_kernel_exit = VbExGetTimer();
}
vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 41274508..3a418939 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -35,7 +35,7 @@
/* Fields that GetVdatString() can get */
typedef enum VdatStringField {
- VDAT_STRING_TIMERS = 0, /* Timer values */
+ VDAT_STRING_DEPRECATED_TIMERS = 0, /* Timer values */
VDAT_STRING_LOAD_FIRMWARE_DEBUG, /* LoadFirmware() debug information */
VDAT_STRING_LOAD_KERNEL_DEBUG, /* LoadKernel() debug information */
VDAT_STRING_MAINFW_ACT /* Active main firmware */
@@ -346,19 +346,6 @@ static char *GetVdatString(char *dest, int size, VdatStringField field)
return NULL;
switch (field) {
- case VDAT_STRING_TIMERS:
- snprintf(dest, size,
- "LFS=%" PRIu64 ",%" PRIu64
- " LF=%" PRIu64 ",%" PRIu64
- " LK=%" PRIu64 ",%" PRIu64,
- sh->timer_vb_init_enter,
- sh->timer_vb_init_exit,
- sh->timer_vb_select_firmware_enter,
- sh->timer_vb_select_firmware_exit,
- sh->timer_vb_select_and_load_kernel_enter,
- sh->timer_vb_select_and_load_kernel_exit);
- break;
-
case VDAT_STRING_LOAD_FIRMWARE_DEBUG:
value = GetVdatLoadFirmwareDebug(dest, size, sh);
break;
@@ -604,8 +591,6 @@ const char *VbGetSystemPropertyString(const char *name, char *dest,
}
} else if (!strcasecmp(name, "mainfw_act")) {
return GetVdatString(dest, size, VDAT_STRING_MAINFW_ACT);
- } else if (!strcasecmp(name, "vdat_timers")) {
- return GetVdatString(dest, size, VDAT_STRING_TIMERS);
} else if (!strcasecmp(name, "vdat_lfdebug")) {
return GetVdatString(dest, size,
VDAT_STRING_LOAD_FIRMWARE_DEBUG);
diff --git a/utility/crossystem.c b/utility/crossystem.c
index a799bf16..946e587b 100644
--- a/utility/crossystem.c
+++ b/utility/crossystem.c
@@ -95,7 +95,6 @@ const Param sys_param_list[] = {
"LoadFirmware() debug data (not in print-all)"},
{"vdat_lkdebug", IS_STRING|NO_PRINT_ALL,
"LoadKernel() debug data (not in print-all)"},
- {"vdat_timers", IS_STRING, "Timer values from VbSharedData"},
{"wipeout_request", CAN_WRITE, "Firmware requested factory reset (wipeout)"},
{"wpsw_boot", 0, "Firmware write protect hardware switch position at boot"},
{"wpsw_cur", 0, "Firmware write protect hardware switch current position"},