From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=E2WSQqKu; spf=pass (domain: amazon.de, ip: 52.95.49.90, mailfrom: prvs=139655964=graf@amazon.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1653619425; x=1685155425; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fk4T/Q1et3HBzHhR/ssrT1INwIbYUuJDdXFIOe5ZIfY=; b=E2WSQqKuMn0p+mEhqNoLbHW/b6PbPCgpZ1dV+anIEOk/xdw82Vfbdw8I hW8whjXhffBapWBLN3GReLDQR0t6J7X8ICG7gCwSN/MyDtgHyIYiFy609 vEFTxw433amysXHScinp+LjR9vrm3cPjbYt8Iq3/lg0I5gtOCjt8vmfni M=; X-IronPort-AV: E=Sophos;i="5.91,254,1647302400"; d="scan'208";a="205608160" 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 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) 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 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" To: CC: Ard Biesheuvel , Leif Lindholm , Dandan Bi , Zhichao Gao , Liming Gao Subject: [PATCH 02/12] MdePkg: Add Null BaseDebugBootlog Date: Fri, 27 May 2022 04:43:07 +0200 Message-ID: <20220527024317.13476-3-graf@amazon.com> X-Mailer: git-send-email 2.28.0.394.ge197136389 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) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 = 0x00010005 + BASE_NAME = BaseDebugBootlogNull + FILE_GUID = DF934DA3-CD31-49FE-AF50-B3C87C79325F + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = DebugBootlogLib + +[Sources] + DebugBootlogNull.c + +[Packages] + MdePkg/MdePkg.dec diff --git a/MdePkg/Library/BaseDebugBootlog/DebugBootlogNull.c b/MdePkg/Library/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; +} -- 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