From patchwork Sat Dec 30 01:45:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 1881264 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=185.125.189.65; helo=lists.ubuntu.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (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 4T24pp3pLYz1ydd for ; Sat, 30 Dec 2023 12:46:25 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rJOQZ-0000Wl-7G; Sat, 30 Dec 2023 01:46:15 +0000 Received: from mail-dm6nam10on2062.outbound.protection.outlook.com ([40.107.93.62] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rJOQW-0000WM-2i for fwts-devel@lists.ubuntu.com; Sat, 30 Dec 2023 01:46:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrVpArxFCOiUgjnEwlneYmRhvcRjGgRfxAA+CwlOjDH79JOYAZP3EJwv3BsUAxGzSx4Ltq0d2NQUm0rPpSe4CX2CRH66TYmkCv9AkTuyoe9JzcXIcpgoKTJmwmg45n2JoDyyXzuzilUbOv1vB4k10PAc/cv0zPmWyMNYtzr0BLDSXa8UxlY3ToEKCuNlqF9GayclN+7fuixM1YpwphITo0QphVKDGJ9JMUjNVWRAmiJ77wOiYUgPbvh34hixxXAxWyZ0S/ReYPgNTelYO3407YqjGjbyKcyseaoa2/NstZ3zQFuhyg3FwCQVNHQuJZ+Gou/zU2WFPdXpNPUlRvC3Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ujvkuYOYOGF41FxUnTmhrPwgAVfyk8x+yW0pGIe9HXk=; b=VliwQUvGlcco+rJDBWXjF396JBzGIvvQ+4cbOJZiPldbiK3rGNaCnTYIoOOj2+y6T/ElAkUaZuNw5SOpi5N0UT8vjS1CzTxZeoTRzl0nHDGOA7s4NKG5jus2Lb6CrXL+BXw/u9jL6IO1I6JVOh2HgXeGnGP5e0zHGL0igz+0PfkNFK1nC2GpAS+1cIc2NPPgbKJsAyQaBkdvjfAqd+uXejBUO0sBjwcqxc6k6185m0xKxj8KbOd3CszX/w4p0tsV0t2gRl6PaYZOc2Fs/xgcquu7pPbJ4DjtTAG/b9e7JtBGnouC3WHmsSDIjf1qaOmTEJIGu72MTAl1o3Smwp3ncw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) Received: from SA0PR11CA0037.namprd11.prod.outlook.com (2603:10b6:806:d0::12) by CY8PR12MB7219.namprd12.prod.outlook.com (2603:10b6:930:59::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21; Sat, 30 Dec 2023 01:46:09 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10b6:806:d0:cafe::16) by SA0PR11CA0037.outlook.office365.com (2603:10b6:806:d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sat, 30 Dec 2023 01:46:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7159.9 via Frontend Transport; Sat, 30 Dec 2023 01:46:09 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 29 Dec 2023 19:46:07 -0600 From: Mario Limonciello To: Subject: [PATCH] Add support for new TCG PfP event types Date: Fri, 29 Dec 2023 19:45:59 -0600 Message-ID: <20231230014559.1345-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231230014559.1345-1-mario.limonciello@amd.com> References: <20231230014559.1345-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CC:EE_|CY8PR12MB7219:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e4e5350-8538-4814-ca98-08dc08d9187d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7/IJEu4ziVGiuLwFg+XEZq60HPjDsGywsv0aX5rU5QB88in5prB33CYyqKXnSTw37j8YwHdStUVz6mCNpfahtEFSYixL8fMV+RRnQi6o8zuXjDBHB7+9RmUW4kIDcfAiHCHxJEa8j3qMicK0g+cmUBUWN497vqrCAmn6oReXUJ475NYVa26rzF9VU7GYcSBBy3+sNiui39PQxza2wZQHv2pw755TIgk20JFiy6FaRiYQI+SV3/zY58/jvC8sCV2KiM/VssrbIfV6YYE3BJOekhcc5xMwsJi+m1S/dIH9VPCruscn6b0ZDVNfJFdXaE2U1fUVVEXHF96CahoMmfj+adLGj5eQ9vrV1KFcZjlNbhtPggNV7rr/E6qaEcH/xMI5QMGIa+4yWcy2Ml2l/0Jxd6Kx/6tncbBZjEQXi8HwPuFSgtiRYRoDuqKQktIjP30k42y80KCTNfBH4fJRws84pvnB7t+tltfh2l0fEDbGoVQrk/29pqytg3tvue1oghxPhUwJ4kaifQEbgBg1KuVMIVNTrPb+w5RdACHSQAjobzb1x/VP7Xd5R0i1nwR0ckMq9Lu0Bg7URD25koT0HtYLMz8CkR9TnLG/FrBGAxIRpMbhdl4BcDJy12pRXLhOGL7ZZ4Had7zj8DGMecAWXoBYMP8P6h5nOnPkNVis8qJhgYxdM2FU9GOr6M3uXsycdOkGd592sJKsI8Mf9ki9ZAzmi0shz6NvfN2Bvg+j6MH1UbItAaOVXEGl4Et6lb+NLgGm9rw5Vg2Yql3rG54H9LOcJAm4xMVdXwi3dexu1MSpT5KhVhBfiL7Y+4tWYZDfcWnRg7dX4QFRsRhPWpeYFZwG0w== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(346002)(136003)(376002)(39860400002)(230922051799003)(64100799003)(1800799012)(82310400011)(186009)(451199024)(36840700001)(40470700004)(46966006)(82740400003)(6666004)(7696005)(356005)(478600001)(81166007)(86362001)(41300700001)(47076005)(4326008)(36756003)(316002)(8936002)(966005)(8676002)(44832011)(40460700003)(26005)(1076003)(36860700001)(426003)(16526019)(336012)(54906003)(6916009)(70206006)(2616005)(70586007)(83380400001)(40480700001)(2906002)(5660300002)(36900700001)(15398625002)(43620500001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Dec 2023 01:46:09.0965 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e4e5350-8538-4814-ca98-08dc08d9187d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7219 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: , Cc: Mario Limonciello , Mario Limonciello Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Mario Limonciello PFP spec Level 00 Version 1.06 Revision 52 has two event types that are not supported by FWTS. Add these new events types. Link: https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Platform-Firmware-Profile-Version-1.06-Revision-52_pub.pdf Signed-off-by: Mario Limonciello Acked-by: Ivan Hu --- src/lib/include/fwts_tpm.h | 4 +++- src/tpm/tpmevlog/tpmevlog.c | 2 ++ src/tpm/tpmevlogdump/tpmevlogdump.c | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/include/fwts_tpm.h b/src/lib/include/fwts_tpm.h index b6240f11..0cc80f0d 100644 --- a/src/lib/include/fwts_tpm.h +++ b/src/lib/include/fwts_tpm.h @@ -116,7 +116,9 @@ typedef enum { EV_EFI_HCRTM_EVENT = 0x80000010, EV_EFI_VARIABLE_AUTHORITY = 0x800000e0, EV_EFI_SPDM_FIRMWARE_BLOB = 0x800000e1, - EV_EFI_SPDM_FIRMWARE_CONFIG = 0x800000e2 + EV_EFI_SPDM_FIRMWARE_CONFIG = 0x800000e2, + EV_EFI_SPDM_DEVICE_POLICY = 0x800000e3, + EV_EFI_SPDM_DEVICE_AUTHORITY = 0x800000e4, } fwts_tpmlog_event_type; diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c index 794b47ca..d58e6e3f 100644 --- a/src/tpm/tpmevlog/tpmevlog.c +++ b/src/tpm/tpmevlog/tpmevlog.c @@ -85,6 +85,8 @@ static int tpmevlog_eventtype_check(fwts_framework *fw, const fwts_tpmlog_event_ case EV_EFI_VARIABLE_AUTHORITY: case EV_EFI_SPDM_FIRMWARE_BLOB: case EV_EFI_SPDM_FIRMWARE_CONFIG: + case EV_EFI_SPDM_DEVICE_POLICY: + case EV_EFI_SPDM_DEVICE_AUTHORITY: case EV_COMPACT_HASH: return FWTS_OK; default: diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c b/src/tpm/tpmevlogdump/tpmevlogdump.c index de242e83..0a59fe34 100644 --- a/src/tpm/tpmevlogdump/tpmevlogdump.c +++ b/src/tpm/tpmevlogdump/tpmevlogdump.c @@ -138,6 +138,12 @@ static char *tpmevlogdump_evtype_to_string(const fwts_tpmlog_event_type event_ty case EV_EFI_SPDM_FIRMWARE_CONFIG: str = "EV_EFI_SPDM_FIRMWARE_CONFIG"; break; + case EV_EFI_SPDM_DEVICE_POLICY: + str = "EV_EFI_SPDM_DEVICE_POLICY"; + break; + case EV_EFI_SPDM_DEVICE_AUTHORITY: + str = "EV_EFI_SPDM_DEVICE_AUTHORITY"; + break; case EV_COMPACT_HASH: str = "EV_COMPACT_HASH"; break;