From patchwork Thu Aug 21 15:35:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 99 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755790554; bh=p0wMcBTU/0HK+OzLjDj39b26rB/VJkDxeNoji9R4KkM=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NKuUU91qAJEs+wukvKet4pVvqtSguOQO6gfuGNHIk7ucyU/3WyuGMUIXWwfpRKNRu ablZdujBVnMkTeoAdO0wwOoh/yhEoAvFMpOe11LGcb5WpKTmq8TWNtkpBIbJMH8XSI tm9ZFaac1aOv1YQiiXV2idwfbId8kJRrjKaawlAfJ7BLiIbEBhkb6lTHXfH8tsu50E 8zQWDMhTqcJTmAols6H5AcjVQaD0+Kq8AxhvMdK5ESKHCu4Wcpjkfl/dy/AlN83YAb 57wVrp2oXoJOKh/3Kt3XqtxMjqMiUnhL6bu3/62faBXHx1kZyhnnkiJj33EOzMGn/R 0eBExkSstF0EA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 26BD767522 for ; Thu, 21 Aug 2025 09:35:54 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qDbVZMRsGLV0 for ; Thu, 21 Aug 2025 09:35:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755790553; bh=p0wMcBTU/0HK+OzLjDj39b26rB/VJkDxeNoji9R4KkM=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HViFaiIpQj8rC63IlzVRCtra1NcznuO0av9epdFArO/t2HYY3d1HNkKkni0nYjGgs 6rZhbXeyiUwr9DwyGeJ7iofaL98OxfgQ8DBONon96AjK1/Y3fTEKI4yIUxAULZr5NC xJldptRZNExVgUmAUwpIKuhBFdX8tdUkMB77rrBtQr6tBVqgP9xbzAzGA3Sk1VfaQx MY6xJFWbUCDCaPLjji6dqSx743ii42hn2i5MNpfOvEkeLBIbOse9e8wtJD/xv3VpOJ FCt1JVkD6VO+broajoFHuBLoBnBzU4rEn6+SZ+4OOj6AO9NlRDyINCM8FPYMwvrS30 47yoD7qc85x6w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 72EFE67533 for ; Thu, 21 Aug 2025 09:35:53 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755790545; bh=5llBomW/kDMQ/XeeEQDwSPWljsUWu/OWXd42POlg8+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HZC9VdTkiiluudTEZ8JSomoZsr56+avKoEj+z+GsIIQ6FoYZ3b+p9jOoW7tcKJh9J Dx/FxJmmrdV1XI5iseDU5YBNwfUofjMTCLCPcgoFvgq8+0Y7qT2jrTZt86m1tNsDLQ gQLXZWHEwlB6y4h5E3ro75JgmQvBYu6/zK/BhXJjgI7qWiZk5zHg/cdxD8RrfMujtw kKGMoE8U4CwP0wKQ0Gg+dK8ZVp1fLlOcHWbnXPiuR2eGSNrFzssSx4fKyJ+250PyxB f8VSZBOd4McS2c3a14p4zB44b2zazL9Cy34DKovCkcbCuUvyGGytZoXjTfIefw6468 5gvgwhCxhaCmA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 44C4C5FC00; Thu, 21 Aug 2025 09:35:45 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 7ReoB1Ybj51I; Thu, 21 Aug 2025 09:35:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755790544; bh=5NDDlZ8EfAwtmFz02GKavyWaccZ4CEyHdLOk2zhPrR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lI//BfBfuWC5qyMH3lfrmAkYA91RV2BNtug86O4/Vw3aLqASgqZSZyyPr0vO9yv+c sWiC3wc2iOQnm/6ZfDaeB1Xrmo0zip+QJMM2ZzjT4RZLsbG30GPGWI/n6bnorMXmfI AUzlBimICPYT+zJuD0AGC7thZyYRfXlRs04gZud9QAVh2GOIL9RkcxLyovHmAqJkzg l2Wx+sXYGzI1Af0Hzcd5gaJ2H5Oe38C6EIA7kzH22rE8PR08ajQqL5Kng8rbM85CyX JExPY0vMBiLLyZ4Q8a/T2yxQF19h6DoQGIt7pC2o9ymCZs0RCMyQ0t4OvOc1veAwP4 Lm5AAmo5yk9Cw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 02F245FC74; Thu, 21 Aug 2025 09:35:43 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 21 Aug 2025 09:35:18 -0600 Message-ID: <20250821153528.141740-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250821153528.141740-1-sjg@u-boot.org> References: <20250821153528.141740-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Y25GR2JCSLW5SLR2IH6XXQG4UWHE3PFE X-Message-ID-Hash: Y25GR2JCSLW5SLR2IH6XXQG4UWHE3PFE X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 1/7] efi: Move guid used for variables to common files List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move efi_guid_image_security_database to a common file so that it can be used by the app. Signed-off-by: Simon Glass --- include/efi.h | 2 ++ include/efi_loader.h | 1 - lib/efi/device_path.c | 3 +++ lib/efi_loader/efi_var_common.c | 3 --- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/efi.h b/include/efi.h index 5e15a87ed3b..3558c03db23 100644 --- a/include/efi.h +++ b/include/efi.h @@ -157,6 +157,8 @@ extern const efi_guid_t efi_guid_fdt; /* GUID of the EFI_DRIVER_BINDING_PROTOCOL */ extern const efi_guid_t efi_guid_driver_binding_protocol; extern const efi_guid_t efi_guid_component_name2; +/* GUIDs for authentication - most of these are still in efi_loader.h */ +extern const efi_guid_t efi_guid_image_security_database; /* Generic EFI table header */ struct efi_table_hdr { diff --git a/include/efi_loader.h b/include/efi_loader.h index a475ebb5413..52314c33533 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -353,7 +353,6 @@ extern const efi_guid_t efi_guid_hii_config_access_protocol; extern const efi_guid_t efi_guid_hii_database_protocol; extern const efi_guid_t efi_guid_hii_string_protocol; /* GUIDs for authentication */ -extern const efi_guid_t efi_guid_image_security_database; extern const efi_guid_t efi_guid_sha256; extern const efi_guid_t efi_guid_cert_x509; extern const efi_guid_t efi_guid_cert_x509_sha256; diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index 449b9d4239b..1dc28f81146 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -39,6 +39,9 @@ const efi_guid_t efi_guid_driver_binding_protocol = EFI_DRIVER_BINDING_PROTOCOL_GUID; const efi_guid_t efi_guid_component_name2 = EFI_COMPONENT_NAME2_PROTOCOL_GUID; +const efi_guid_t efi_guid_image_security_database = + EFI_IMAGE_SECURITY_DATABASE_GUID; + /* template EFI_DP_END node: */ const struct efi_device_path EFI_DP_END = { .type = DEVICE_PATH_TYPE_END, diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c index 4b34a58b4cf..f2fbf67f5ed 100644 --- a/lib/efi_loader/efi_var_common.c +++ b/lib/efi_loader/efi_var_common.c @@ -25,9 +25,6 @@ struct efi_auth_var_name_type { const enum efi_auth_var_type type; }; -const efi_guid_t efi_guid_image_security_database = - EFI_IMAGE_SECURITY_DATABASE_GUID; - static const struct efi_auth_var_name_type name_type[] = { {u"PK", &efi_global_variable_guid, EFI_AUTH_VAR_PK}, {u"KEK", &efi_global_variable_guid, EFI_AUTH_VAR_KEK},