From nobody Tue Feb 10 19:14:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90066+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90066+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1653619426; cv=none; d=zohomail.com; s=zohoarc; b=dRNudE1z4lunUGRSQzOQ2qiH/tO8Wt+jHLAQ7rRxgLndRYAt92EDL7o2y3DLLspMUkdty5GXGmDz0JHywOrThXsO4lvQzQokVwDjCpA3JpScbCsSM81mooSvbnbFkejgP93tvWBOZ2kvk2tGNvro03tRlhV+9EKuwPFjhCIC130= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653619426; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Kw34xZsG3XM54N2oaLE4fVAeogzA/7SL2iX2i0RZiys=; b=YJOr2Eblr6JZv3R4oOo6FZWJU6ErxsFKq4o7UXnyy2NWSVLRhNSlpavX0EEPPX6LtcAGiF+C5SVXvXFmAw9fff6h8fjUvXmayMzkrwFNXptZEdfJ5lK1grLwXE9g/U32uud8BD3GTg/Jd+uqSeo5bhSwiBNDWEnA0RoqaHUut4A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90066+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 165361942684772.50661104198218; Thu, 26 May 2022 19:43:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1gzyYY1788612xPgiMwEqzEv; Thu, 26 May 2022 19:43:46 -0700 X-Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by mx.groups.io with SMTP id smtpd.web09.3214.1653619425652311278 for ; Thu, 26 May 2022 19:43:46 -0700 X-IronPort-AV: E=Sophos;i="5.91,254,1647302400"; d="scan'208";a="205608160" X-Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-iad-1e-8be8ed69.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP; 27 May 2022 02:43:34 +0000 X-Received: from EX13MTAUWC002.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1e-8be8ed69.us-east-1.amazon.com (Postfix) with ESMTPS id BCEC8C083E; Fri, 27 May 2022 02:43:32 +0000 (UTC) X-Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13MTAUWC002.ant.amazon.com (10.43.162.240) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Fri, 27 May 2022 02:43:30 +0000 X-Received: from u79c5a0a55de558.ant.amazon.com (10.43.162.202) by EX13D20UWC001.ant.amazon.com (10.43.162.244) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Fri, 27 May 2022 02:43:28 +0000 From: "Alexander Graf via groups.io" To: CC: Ard Biesheuvel , Leif Lindholm , Dandan Bi , Zhichao Gao , Liming Gao Subject: [edk2-devel] [PATCH 02/12] MdePkg: Add Null BaseDebugBootlog Date: Fri, 27 May 2022 04:43:07 +0200 Message-ID: <20220527024317.13476-3-graf@amazon.com> In-Reply-To: <20220527024317.13476-1-graf@amazon.com> References: <20220527024317.13476-1-graf@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.162.202] X-ClientProxiedBy: EX13D35UWB003.ant.amazon.com (10.43.161.65) To EX13D20UWC001.ant.amazon.com (10.43.162.244) Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,graf@amazon.com X-Gm-Message-State: x54vSc1uCDznPgY8oolPGfSyx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1653619426; bh=24czB8rYsHpUv9522ksM5JVU7wWV31tdHne9s7GGyo8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=umYDlfBTnJZJsm/qTcaTxecPFMkNvUrM6lza1ms8l40RdzzQ3dprgXvCZd6jGpMP/j+ 3mzM0hfFWUMqOEWsricCFa2UU1jMkaKmVDJejzlTS+GOxV/2T+JGaeDcabXa9w7+/Gsi9 hSgpowTpdo7g53H3HAZaFT1rFk7CKLdob4s= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1653619428596100007 Content-Type: text/plain; charset="utf-8" In some situations, we may not want to actually emit any boot log. This commit adds a null bootlog handler. We will use this in situations where we can not maintain a boot log, such as during the SEC phase. Signed-off-by: Alexander Graf --- .../BaseDebugBootlogNullLib.inf | 26 +++++++++++++++ .../BaseDebugBootlog/DebugBootlogNull.c | 32 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 MdePkg/Library/BaseDebugBootlog/BaseDebugBootlogNullLib= .inf create mode 100644 MdePkg/Library/BaseDebugBootlog/DebugBootlogNull.c diff --git a/MdePkg/Library/BaseDebugBootlog/BaseDebugBootlogNullLib.inf b/= MdePkg/Library/BaseDebugBootlog/BaseDebugBootlogNullLib.inf new file mode 100644 index 0000000000..0f650f6260 --- /dev/null +++ b/MdePkg/Library/BaseDebugBootlog/BaseDebugBootlogNullLib.inf @@ -0,0 +1,26 @@ +## @file +# Null Debug library instance for a RAM based boot log. +# It provides function stubs for boot log that do nothing. +# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2012, Red Hat, Inc.
+# Copyright (c) 2022, Amazon Development Center Germany GmbH. All rights = reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D BaseDebugBootlogNull + FILE_GUID =3D DF934DA3-CD31-49FE-AF50-B3C87C79325F + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D DebugBootlogLib + +[Sources] + DebugBootlogNull.c + +[Packages] + MdePkg/MdePkg.dec diff --git a/MdePkg/Library/BaseDebugBootlog/DebugBootlogNull.c b/MdePkg/Li= brary/BaseDebugBootlog/DebugBootlogNull.c new file mode 100644 index 0000000000..fbb304e6e2 --- /dev/null +++ b/MdePkg/Library/BaseDebugBootlog/DebugBootlogNull.c @@ -0,0 +1,32 @@ +/** @file + Null Debug library instance for a RAM based boot log. + It provides function stubs for boot log that do nothing. + + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2012, Red Hat, Inc.
+ Copyright (c) 2022, Amazon Development Center Germany GmbH.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +UINT32 +EFIAPI +GetDebugBootlogErrorLevel ( + VOID + ) +{ + return 0; +} + +RETURN_STATUS +EFIAPI +DebugBootlogAppend ( + IN CONST CHAR8 *String, + IN UINTN Length, + IN UINTN ErrorLevel + ) +{ + return RETURN_SUCCESS; +} --=20 2.28.0.394.ge197136389 Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90066): https://edk2.groups.io/g/devel/message/90066 Mute This Topic: https://groups.io/mt/91368901/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-