From patchwork Fri Jul 14 03:47:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1807509 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=TTMeoHNA; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R2HVP4MH0z20c1 for ; Fri, 14 Jul 2023 13:47:24 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qK9lz-0007b7-TS; Fri, 14 Jul 2023 03:47:15 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qK9ly-0007au-H4 for fwts-devel@lists.ubuntu.com; Fri, 14 Jul 2023 03:47:14 +0000 Received: from canonical.com (unknown [106.104.136.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 8BD74430BC for ; Fri, 14 Jul 2023 03:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689306433; bh=+VrPX62+EqRpvWhmt26oT+B2+gl5QWJE4Xn8SOdyuVI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=TTMeoHNAtT6ViH/SrJr/NPy0Z6jWAlMyTYq6i3YXW5sWUg75doDmwynlYjRmZxo2r v9Fl0AkCduOITninRReHHztjzkr9UjxKeiJA95Pg36570h6VPvAxsmxFB0n+qBZ2WT ecHHyc3tuH20yC2lSbT6dqPcfNDk6VlC/8itZ6oK+MVby06XJS2sJ4De0Kkp5EzW7L A8IzXSw7v2yQ4UtD+Mbi5tOSF8Lz8YI7osDQT1rOjstsmfQGFSPWxy/VP/Rssp/zqw z/Er7jwx4QX3awUTEH0HlhNJPgv9aUhWX9Qgr9s2hou0V+uJ9V0T35pU/mQrxsBQAX RwHPziEvRsXpw== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] uefi: esrtdump: update the LastAttemptStatus values to UEFI spec 2.10 Date: Fri, 14 Jul 2023 11:47:04 +0800 Message-Id: <20230714034704.30332-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" BuglinK: https://bugs.launchpad.net/fwts/+bug/2027758 The status values deblow have been added in UEFI spec. 2.10 LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES 0x00000008 LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN 0x00001000 LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MAX 0x00004000 Signed-off-by: Ivan Hu --- src/uefi/esrtdump/esrtdump.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/uefi/esrtdump/esrtdump.c b/src/uefi/esrtdump/esrtdump.c index 98ad8ba8..7de17ca1 100644 --- a/src/uefi/esrtdump/esrtdump.c +++ b/src/uefi/esrtdump/esrtdump.c @@ -152,8 +152,15 @@ static int get_entries_info(fwts_framework *fw) case LAST_ATTEMPT_STATUS_ERR_PWR_EVT_BATT: str_info = "(PWR EVT BATT)"; break; + case LAST_ATTEMPT_STATUS_ERR_UNSATISFIED_DEPENDENCIES: + str_info = "(Unsatisfied Dependencies)"; + break; default: - str_info = ""; + if (count >= LAST_ATTEMPT_STATUS_ERR_UNSUCCESSFUL_VENDOR_RANGE_MIN + && count <= LAST_ATTEMPT_STATUS_ERR_UNSUCCESSFUL_VENDOR_RANGE_MAX) + str_info = "(Unsuccessful Vendor Range)"; + else + str_info = ""; break; } fwts_log_info_verbatim(fw, " LastAttemptStatus: %d %s", count, str_info);