From 56befd1028b7a58e0a3b6849af5aebf7a5441e1c Mon Sep 17 00:00:00 2001 From: Meng-Huan Yu Date: Thu, 1 Apr 2021 07:05:58 +0000 Subject: Revert "Reland "Reland "vboot: Enable diagnostics on Dirinboz""" This reverts commit 59ae16bcb0208ea0b82dccf4c13476fd23dfffb9. Reason for revert: we have global enabling on zork at CL:2677619 Original change's description: > Reland "Reland "vboot: Enable diagnostics on Dirinboz"" > > This is a reland of 08776c33ef38ccd7a681c4345fc407fae9e13131 > > Replace with > > Original change's description: > > Reland "vboot: Enable diagnostics on Dirinboz" > > > > This is a reland of 442c0b23870ce799140ac962ac2a24dfada81df6 > > > > Replace `strncasecmp()` with `strncmp()` > > > > Original change's description: > > > vboot: Enable diagnostics on Dirinboz > > > > > > Enable diagnostics on Dirinboz only. > > > This CL should not be merged to ToT. > > > > > > BRANCH=zork > > > BUG=b:170789297 > > > TEST=none > > > > > > Cq-Depend: chromium:2484207 > > > Signed-off-by: Hsuan Ting Chen > > > Change-Id: Iacdfbe292b721e430cd5bbc53b435611d0f7a0d0 > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2484206 > > > Tested-by: Martin Roth > > > Reviewed-by: Hung-Te Lin > > > Reviewed-by: Martin Roth > > > Commit-Queue: Martin Roth > > > > Bug: b:170789297 > > Cq-Depend: chromium:2508096 > > Change-Id: I117b839793ae439d4a4e374c7ff2f6d801fdb8be > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2508098 > > Tested-by: Hsuan Ting Chen > > Reviewed-by: Hung-Te Lin > > Commit-Queue: Hsuan Ting Chen > > Bug: b:170789297 > Change-Id: Icac1b3cef027667cc0e35f07144619d0bf514aac > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2525502 > Tested-by: Hsuan Ting Chen > Reviewed-by: Hung-Te Lin > Commit-Queue: Hsuan Ting Chen Bug: b:170789297 Change-Id: I5174922c1153e4e1abfcc553d2aa8b5417eb2014 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2796726 Reviewed-by: Hsuan Ting Chen Reviewed-by: Kangheui Won Tested-by: Meng-Huan Yu Auto-Submit: Meng-Huan Yu Commit-Queue: Kangheui Won --- firmware/2lib/2kernel.c | 23 ----------------------- firmware/2lib/2stub.c | 6 ------ firmware/2lib/include/2api.h | 7 ------- 3 files changed, 36 deletions(-) diff --git a/firmware/2lib/2kernel.c b/firmware/2lib/2kernel.c index 4badb526..8c6d191a 100644 --- a/firmware/2lib/2kernel.c +++ b/firmware/2lib/2kernel.c @@ -5,8 +5,6 @@ * Kernel selection, loading, verification, and booting. */ -#include - #include "2common.h" #include "2kernel.h" #include "2misc.h" @@ -123,26 +121,6 @@ int vb2api_is_developer_signed(struct vb2_context *ctx) return 0; } -/* Enable board-specific flags */ -static void board_modify_flags(uint32_t *flags) -{ - const char *board_name = vb2ex_get_mainboard_name(); - int i; - - /* Enable diagnostics only for Dirinboz */ - const char *list_enable_diagnostics[] = { - "Dirinboz", - }; - for (i = 0; i < ARRAY_SIZE(list_enable_diagnostics); i++) { - const char *enable_diagnostics = list_enable_diagnostics[i]; - if (strncmp(board_name, enable_diagnostics, - strlen(enable_diagnostics))) - continue; - VB2_DEBUG("Enable diagnostics for %s\n", board_name); - *flags &= ~VB2_SECDATA_KERNEL_FLAG_DIAGNOSTIC_UI_DISABLED; - } -} - vb2_error_t vb2api_kernel_phase1(struct vb2_context *ctx) { struct vb2_shared_data *sd = vb2_get_sd(ctx); @@ -172,7 +150,6 @@ vb2_error_t vb2api_kernel_phase1(struct vb2_context *ctx) flags |= VB2_SECDATA_KERNEL_FLAG_PHONE_RECOVERY_UI_DISABLED; flags &= ~VB2_SECDATA_KERNEL_FLAG_DIAGNOSTIC_UI_DISABLED; flags |= VB2_SECDATA_KERNEL_FLAG_HWCRYPTO_ALLOWED; - board_modify_flags(&flags); vb2_secdata_kernel_set(ctx, VB2_SECDATA_KERNEL_FLAGS, flags); } diff --git a/firmware/2lib/2stub.c b/firmware/2lib/2stub.c index 069b61d1..e553c34b 100644 --- a/firmware/2lib/2stub.c +++ b/firmware/2lib/2stub.c @@ -74,12 +74,6 @@ void vb2ex_abort(void) abort(); } -__attribute__((weak)) -const char *vb2ex_get_mainboard_name(void) -{ - return ""; -} - __attribute__((weak)) const char *vb2ex_get_debug_info(struct vb2_context *ctx) { diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index 3d4463f0..4c5e1dc6 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -1005,13 +1005,6 @@ void vb2ex_abort(void); */ vb2_error_t vb2ex_commit_data(struct vb2_context *ctx); -/** - * Get mainboard name. - * - * @return The pointer to the mainboard name string. NULL on error. - */ -const char *vb2ex_get_mainboard_name(void); - /*****************************************************************************/ /* TPM functionality */ -- cgit v1.2.1