From nobody Sat May 11 21:44:33 2024 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+93282+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+93282+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1662485227; cv=none; d=zohomail.com; s=zohoarc; b=eVvwXW00tSegKxOFvcI+XPXg+7MH/lBa8RncRDI/n6VQrkBytLkkNn/uk3TJP0GIt9J3oPgx5blvSjyQnwPlYFELSUgGWDPjdFy7qCBXMJp5B6s/ForC8Go7vSyvJnHzvDr2IQJlgucTdYurUVuLjt7mxZG3PMDx14Z66ht2tVY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662485227; h=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=5mire2rXhN+2dGCGfn2kajM4TauXwu9AwDj5V8MttJA=; b=dpguFagkhgZNRp5QFtzWy2TTIVLfALOJiO7ejC1CLXwrygGlJZhleoJFsGO3ti2KFrzn1C8pR8DnlUEczo3eC+Y9Rp0FwqyFGP4yaQKef3bhEx0nCVwzdzKO+NFmzzoOb6trVSeR5z4y/xfR8KQ7B30s9QHKg7GfpruD+7TispM= 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+93282+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1662485227223374.7111014143919; Tue, 6 Sep 2022 10:27:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9lVcYY1788612xFtbebZbyfH; Tue, 06 Sep 2022 10:27:06 -0700 X-Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mx.groups.io with SMTP id smtpd.web10.2136.1662485226003395857 for ; Tue, 06 Sep 2022 10:27:06 -0700 X-Received: by mail-qv1-f54.google.com with SMTP id l5so8805857qvs.13 for ; Tue, 06 Sep 2022 10:27:05 -0700 (PDT) X-Gm-Message-State: 6Vlm8HtqjJKCNNkzF19i52d5x1787277AA= X-Google-Smtp-Source: AA6agR7PfWCJVgdgD6tDuH7yaW1enInTQ+iytS2eeKk1pJdK9tqWwsRNzU47E5BWWttDxRtE6Iiimw== X-Received: by 2002:a0c:f307:0:b0:4aa:a431:c184 with SMTP id j7-20020a0cf307000000b004aaa431c184mr2508725qvl.76.1662485224901; Tue, 06 Sep 2022 10:27:04 -0700 (PDT) X-Received: from aturtleortwo-benjamindomain.. ([2607:f2c0:e98c:e:46bc:db07:bbf3:df6d]) by smtp.gmail.com with ESMTPSA id j2-20020a05620a410200b006b9ab3364ffsm12169038qko.11.2022.09.06.10.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:27:04 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Isaac Oram , Nate DeSimone , Ankit Sinha , Chasel Chiu , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH v1 1/3] MinPlatformPkg,WhiskeylakeOpenBoardPkg/SecFspWrapperPlatformSecLib: First BoardInitLib Date: Tue, 6 Sep 2022 13:26:52 -0400 Message-Id: <0a6dd32438d554e03fa222a70593f7a99cfc19d1.1662484082.git.benjamin.doron00@gmail.com> In-Reply-To: References: MIME-Version: 1.0 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,benjamin.doron00@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1662485226; bh=SNAZisVcLEg++T9BIMeniSKQO5lLx/Pfn7HHfLAIRXE=; h=Cc:Date:From:Reply-To:Subject:To; b=rRAHditFZWpKxyZEWLjVdZocJcaip6Se9YF0XYRPdeWlfaMknABifIhZIng13cFWjrn VwFFOwG0HjRhUL6Oa3lBmeBt0WQLKFBB0OCWMOZWdZ5IQc28alL2tGAzDv7uHp6QEOzjX XUW9wqWJEG4c62cXw9l9/Oyh1bwAyKj7hes= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1662485227900100004 Content-Type: text/plain; charset="utf-8" SecBoardInitLib is called to enable serial port before SerialPortInitialize and DEBUG(). This is strongly assumed to be necessary for I2cHdmiDebugSerialPortLib in SEC phase, which presently initialises this way. No testing was performed before, it's assumed too risky unless the GPIO happens to have the desired default. Presently, DEBUG() works in SEC phase. Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Ankit Sinha Cc: Chasel Chiu Cc: Liming Gao Cc: Eric Dong Signed-off-by: Benjamin Doron Reviewed-by: Nate DeSimone --- .../Library/SecFspWrapperPlatformSecLib/PlatformInit.c | 8 ++++++-- .../Library/SecFspWrapperPlatformSecLib/PlatformInit.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapper= PlatformSecLib/PlatformInit.c b/Platform/Intel/MinPlatformPkg/FspWrapper/Li= brary/SecFspWrapperPlatformSecLib/PlatformInit.c index ef89e3f31018..d74b07bc062b 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor= mSecLib/PlatformInit.c +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor= mSecLib/PlatformInit.c @@ -28,6 +28,12 @@ PlatformInit ( IN VOID *EndOfRange ) { + // + // Board/Silicon initialization + // Prepare controllers before enabling serial port + // + BoardAfterTempRamInit (); + // // Platform initialization // Enable Serial port here @@ -41,7 +47,5 @@ PlatformInit ( DEBUG ((DEBUG_INFO, "StartOfRange - 0x%x\n", StartOfRange)); DEBUG ((DEBUG_INFO, "EndOfRange - 0x%x\n", EndOfRange)); =20 - BoardAfterTempRamInit (); - TestPointTempMemoryFunction (StartOfRange, EndOfRange); } diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/FspWrapper/Lib= rary/SecFspWrapperPlatformSecLib/PlatformInit.c b/Platform/Intel/Whiskeylak= eOpenBoardPkg/UpXtreme/FspWrapper/Library/SecFspWrapperPlatformSecLib/Platf= ormInit.c index 486c8c72616e..53f95c29bde5 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/FspWrapper/Library/Se= cFspWrapperPlatformSecLib/PlatformInit.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/FspWrapper/Library/Se= cFspWrapperPlatformSecLib/PlatformInit.c @@ -28,6 +28,12 @@ PlatformInit ( IN VOID *EndOfRange ) { + // + // Board/Silicon initialization + // Prepare controllers before enabling serial port + // + BoardAfterTempRamInit (); + // // Platform initialization // Enable Serial port here @@ -41,7 +47,5 @@ PlatformInit ( DEBUG ((DEBUG_INFO, "StartOfRange - 0x%x\n", StartOfRange)); DEBUG ((DEBUG_INFO, "EndOfRange - 0x%x\n", EndOfRange)); =20 - BoardAfterTempRamInit (); - TestPointTempMemoryFunction (StartOfRange, EndOfRange); } --=20 2.37.2 -=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 (#93282): https://edk2.groups.io/g/devel/message/93282 Mute This Topic: https://groups.io/mt/93506700/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- From nobody Sat May 11 21:44:33 2024 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+93283+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+93283+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1662485232; cv=none; d=zohomail.com; s=zohoarc; b=YKcTTlZjR4rDU0dzEFgscdGjpWm2rUpoeUpZmUJvqROdBXg9SSeDY9VpapdToBT+vgFd9xW0TX//61ljaHyUmKZvNY3Lwafankx4h/hthNHH7LjMxXIJVfVZxuHgpBF5dtI9V7t7+kzcKXIV+l2LDsPd12DmbGwUxWVR47boEwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662485232; h=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=v3GtU8cPj/ju/1LCVH5jiIneu0CYZQ7AUVR5XEXDuaw=; b=UeWO1/kVU57GBtkUC/sWoKF927L04jb3ZFK8MV4ulD27PRHIc6poe25oRaSv5n6FRflz4kO+o8bKB/Okv9iIFeK3Eep+EnKQdXqostpoD8dgvfUMVflZ5ZeuNPYHB9/PYWpgyBfwNHMellmLxmiojCqlYR66LLb14Hj78FyRzUU= 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+93283+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1662485232063716.303523066358; Tue, 6 Sep 2022 10:27:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZeblYY1788612x2zQWN3vfwH; Tue, 06 Sep 2022 10:27:11 -0700 X-Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mx.groups.io with SMTP id smtpd.web09.2155.1662485227737167961 for ; Tue, 06 Sep 2022 10:27:08 -0700 X-Received: by mail-qv1-f52.google.com with SMTP id j1so8825353qvv.8 for ; Tue, 06 Sep 2022 10:27:07 -0700 (PDT) X-Gm-Message-State: bI5JQB1y21Q7H2VdnaLPzk7dx1787277AA= X-Google-Smtp-Source: AA6agR55MtKvuRHQQ/ajYaFdY35NGq9+++db2Rr7GR0MW5/AhnTnumhABp8/bSgvrCZaavSQPz+izQ== X-Received: by 2002:ad4:5b87:0:b0:476:c32f:f4e9 with SMTP id 7-20020ad45b87000000b00476c32ff4e9mr45802825qvp.50.1662485226518; Tue, 06 Sep 2022 10:27:06 -0700 (PDT) X-Received: from aturtleortwo-benjamindomain.. ([2607:f2c0:e98c:e:46bc:db07:bbf3:df6d]) by smtp.gmail.com with ESMTPSA id j2-20020a05620a410200b006b9ab3364ffsm12169038qko.11.2022.09.06.10.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:27:05 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Isaac Oram , Nate DeSimone , Ankit Sinha , Chasel Chiu Subject: [edk2-devel][edk2-platforms][PATCH v1 2/3] [WIP] KabylakeOpenBoardPkg/I2cHdmiDebugSerialPortLib: Commit local Date: Tue, 6 Sep 2022 13:26:53 -0400 Message-Id: <667ed46bd371079c17fef615fb46d1fa933f7e0c.1662484082.git.benjamin.doron00@gmail.com> In-Reply-To: References: MIME-Version: 1.0 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,benjamin.doron00@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1662485231; bh=+asb0uKdGlsd9I1ZvkiAkrlQOdm7ohKt6Mk+Ll9lP3s=; h=Cc:Date:From:Reply-To:Subject:To; b=DRlLM9R7azvI5GBdOZNxjZE+mg+jajWchikmf33ToOpU7UnanfldQNsonm4PGcfEzch H/3ATqWcLZIUJb26Cs4pM1CVql/WHckWVZAnwdj6bdhWIBvaYfa+NywS6a+YzgPDEhLm3 MCsGRwN84KTba9SUmsfRB1FQONWB9KpOOws= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1662485234067100002 Content-Type: text/plain; charset="utf-8" While the key patches here should probably be merged into the initial patches for this library, it appears it isn't being merged soon. Therefore, commit the patches that improve the library for S3 use. Other than edits to INF LibraryClasses and header `#include`s, the primary patch here assists runtime by creating events to toggle a boolean such that gBS is not used after end-of-BS. This is necessary for DebugLibSerialPort, but not RSC, which uninstalls the serial port handler at end-of-BS. For S3 resume, a key finding was that this is still insufficient. The image is copied into the lockbox for its own security at DxeSmmReadyToLock, so toggling booleans in the data section is ineffective. Early DXE is fairly single-threaded and testing indicates that simply consuming ..TplNull.c is workable. Also, GCC 12 requires a patch to a `switch` block that improved flow coherency. Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Ankit Sinha Cc: Chasel Chiu Signed-off-by: Benjamin Doron --- ...ptExecutorDxeI2cHdmiDebugSerialPortLib.inf | 48 ++++++++++ .../DxeI2cHdmiDebugSerialPortLib.inf | 8 +- .../DxeSmmI2cHdmiDebugSerialPortLib.c | 2 - .../Library/I2cHdmiDebugSerialPortLib/Gmbus.c | 39 ++++---- .../I2cDebugPortProtocol.c | 2 - .../I2cDebugPortTplDxe.c | 9 ++ .../I2cDebugPortTplRuntimeDxe.c | 93 +++++++++++++++++++ .../I2cHdmiDebugSerialPortLib.c | 3 - .../I2cHdmiDebugSerialPortLib/IgfxI2c.c | 9 +- .../PeiI2cHdmiDebugSerialPortLib.c | 1 - .../PeiI2cHdmiDebugSerialPortLib.inf | 5 +- .../RuntimeDxeI2cHdmiDebugSerialPortLib.inf | 51 ++++++++++ .../SecI2cHdmiDebugSerialPortLib.c | 1 - .../SecI2cHdmiDebugSerialPortLib.inf | 7 +- .../SmmI2cHdmiDebugSerialPortLib.inf | 6 +- 15 files changed, 231 insertions(+), 53 deletions(-) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebu= gSerialPortLib/BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebu= gSerialPortLib/I2cDebugPortTplRuntimeDxe.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebu= gSerialPortLib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf b/Platform/Intel= /KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/BootScriptExecutorD= xeI2cHdmiDebugSerialPortLib.inf new file mode 100644 index 000000000000..995e67bde7d4 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf @@ -0,0 +1,48 @@ +### @file +# Component description file for Serial I/O Port library for the HDMI I2C = Debug Port +# +# Copyright (c) 2022, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D RuntimeDxeI2cHdmiDebugSerialPortLib + FILE_GUID =3D 7E514680-470B-409C-8FC4-2FE62BF010BC + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D DXE_DRIVER + LIBRARY_CLASS =3D SerialPortLib|DXE_CORE DXE_DRIVER DXE= _RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[LibraryClasses] + BaseMemoryLib + PcdLib + TimerLib + IoLib + PciLib + UefiLib + +[Packages] + MdePkg/MdePkg.dec + KabylakeOpenBoardPkg/OpenBoardPkg.dec + +[Sources] + DxeSmmI2cHdmiDebugSerialPortLib.c + Gmbus.c + Gmbus.h + I2cDebugPortProtocol.c + I2cDebugPortProtocol.h + I2cDebugPortTplNull.c + I2cHdmiDebugSerialPortLib.c + IgfxI2c.c + IgfxI2c.h + +[Pcd] + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/DxeI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/DxeI2cHdmiDebugSerialPortLib.inf index 5403d8ae0fd7..5eeee504c7ec 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /DxeI2cHdmiDebugSerialPortLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /DxeI2cHdmiDebugSerialPortLib.inf @@ -21,11 +21,13 @@ # =20 [LibraryClasses] - BaseLib BaseMemoryLib PcdLib TimerLib + IoLib PciLib + UefiBootServicesTableLib + UefiLib =20 [Packages] MdePkg/MdePkg.dec @@ -42,10 +44,6 @@ IgfxI2c.c IgfxI2c.h =20 -[Ppis] - -[Guids] - [Pcd] gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/DxeSmmI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoar= dPkg/Library/I2cHdmiDebugSerialPortLib/DxeSmmI2cHdmiDebugSerialPortLib.c index 5556e09a7419..46827c6cefae 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /DxeSmmI2cHdmiDebugSerialPortLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /DxeSmmI2cHdmiDebugSerialPortLib.c @@ -8,10 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include -#include #include #include -#include =20 #include #include diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/Gmbus.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugS= erialPortLib/Gmbus.c index c04bcd285060..df5dfd70a5f2 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /Gmbus.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /Gmbus.c @@ -7,8 +7,7 @@ **/ =20 #include -#include -#include +//#include #include #include #include @@ -33,6 +32,7 @@ GmbusGetGttMmAdr ( // Check if GTT Memory Mapped BAR has been already assigned, initialize = if not // GttMmPciAddress =3D PCI_LIB_ADDRESS (SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FUN_= 0, R_SA_IGD_GTTMMADR); + // TODO(benjamindoron): TigerLake has 64-bit BAR GttMmAdr =3D PciRead32 (GttMmPciAddress) & 0xFFFFFFF0; //DEBUG ((DEBUG_INFO, "GttMmPciAddress =3D %x\n", (UINTN) GttMmPciAddres= s)); //@TODO //DEBUG ((DEBUG_INFO, "GttMmAdr =3D %x\n", (UINTN) GttMmAdr)); //@TODO @@ -361,6 +361,7 @@ GmbusPrepare ( } // // Wait for GMBUS to complete any pending commands + // - TODO(benjamindoron): GmbusRecoverError() // Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_INUSE, FALSE); if (EFI_ERROR (Status)) { @@ -488,28 +489,28 @@ GmbusRead ( // Input Validation // if ((*ByteCount) <=3D 0) { - DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is 0, no bytes to read.\n= ", __FUNCTION__)); + //DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is 0, no bytes to read.= \n", __FUNCTION__)); return EFI_INVALID_PARAMETER; } if ((*ByteCount) > GMBUS_MAX_BYTES) { - DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is greater than GMBUS_MAX= _BYTES[%d].\n", __FUNCTION__, GMBUS_MAX_BYTES)); + //DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is greater than GMBUS_M= AX_BYTES[%d].\n", __FUNCTION__, GMBUS_MAX_BYTES)); return EFI_INVALID_PARAMETER; } if (ReadBuffer =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "Error: %a() - ReadBuffer is NULL.\n", __FUNCTION_= _)); + //DEBUG ((DEBUG_INFO, "Error: %a() - ReadBuffer is NULL.\n", __FUNCTIO= N__)); return EFI_INVALID_PARAMETER; } if ((SlaveAddress & BIT0) !=3D BIT0) { - DEBUG ((DEBUG_INFO, "Error: %a() - BIT0 of SlaveAddress should be set = for an I2C read.\n", __FUNCTION__)); + //DEBUG ((DEBUG_INFO, "Error: %a() - BIT0 of SlaveAddress should be se= t for an I2C read.\n", __FUNCTION__)); return EFI_INVALID_PARAMETER; } =20 // // Configure Gmbus port and clock speed - // + //GMBUS_CLOCK_RATE_100K @todo Status =3D GmbusPrepare (GMBUS_CLOCK_RATE_50K, (DdcBusPinPair & B_SA_GTT= MMADR_GMBUS0_PIN_PAIR_MASK)); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusPrepare() failed - %r\n", __FU= NCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusPrepare() failed - %r\n", __= FUNCTION__, Status)); goto Done; } =20 @@ -534,7 +535,7 @@ GmbusRead ( // Status =3D SetGmbus1Command (GmbusCmdSts); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - SetGmbus1Command() failed - %r\n", = __FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - SetGmbus1Command() failed - %r\n"= , __FUNCTION__, Status)); goto Done; } =20 @@ -556,7 +557,7 @@ GmbusRead ( // Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_HW_RDY, TRUE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r\n= ", __FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r= \n", __FUNCTION__, Status)); } // // Check the GMBUS2 register for error conditions (NACK or Slave Stall= Timeout) @@ -564,13 +565,13 @@ GmbusRead ( Status2 =3D GetGmbus2Status (&GmbusStatus); if (EFI_ERROR (Status2)) { Status =3D Status2; - DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus2Status() failed - %r\n",= __FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus2Status() failed - %r\n= ", __FUNCTION__, Status)); goto Done; } if (EFI_ERROR (Status) && ((GmbusStatus & B_SA_GTTMMADR_GMBUS2_NACK_IN= DICATOR) =3D=3D 0)) { - DEBUG ((DEBUG_INFO, "Error: %a() - Unexpected behavior detected!\n",= __FUNCTION__)); - DEBUG ((DEBUG_INFO, "The GMBUS controller did not encounter a NACK a= nd it did not set the HW_RDY bit.\n")); - DEBUG ((DEBUG_INFO, "Status =3D %r\n", Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - Unexpected behavior detected!\n= ", __FUNCTION__)); + //DEBUG ((DEBUG_INFO, "The GMBUS controller did not encounter a NACK= and it did not set the HW_RDY bit.\n")); + //DEBUG ((DEBUG_INFO, "Status =3D %r\n", Status)); Status =3D EFI_DEVICE_ERROR; goto Done; } @@ -580,10 +581,10 @@ GmbusRead ( // If a NACK or Slave Stall Timeout occurs, then a bus error has occ= urred. // In the event of a bus error, one must reset the GMBUS controller = to resume normal operation. // - DEBUG ((DEBUG_INFO, "Error: %a() - NACK occurred during read operati= on.\n", __FUNCTION__)); + //DEBUG ((DEBUG_INFO, "Error: %a() - NACK occurred during read opera= tion.\n", __FUNCTION__)); Status =3D GmbusRecoverError (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRecoverError() failed - %r= \n", __FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRecoverError() failed - = %r\n", __FUNCTION__, Status)); goto Done; } Status =3D EFI_DEVICE_ERROR; @@ -594,7 +595,7 @@ GmbusRead ( // Status =3D GetGmbus3Data (&GmbusData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus3Data() failed - %r\n", _= _FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus3Data() failed - %r\n",= __FUNCTION__, Status)); goto Done; } for (Index =3D 0; (Index < sizeof (UINT32)) && (BytesRead < (*ByteCoun= t)); Index++) { @@ -608,7 +609,7 @@ GmbusRead ( // Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_BUS_ACTIVE, FALSE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r\n",= __FUNCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r\n= ", __FUNCTION__, Status)); return Status; } =20 @@ -616,7 +617,7 @@ Done: Status2 =3D GmbusRelease (); if (EFI_ERROR (Status2)) { Status =3D Status2; - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRelease() failed - %r\n", __FU= NCTION__, Status)); + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRelease() failed - %r\n", __= FUNCTION__, Status)); } GmbusResetBusMaster (); =20 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/I2cDebugPortProtocol.c b/Platform/Intel/KabylakeOpenBoardPkg/Librar= y/I2cHdmiDebugSerialPortLib/I2cDebugPortProtocol.c index 1a31c98347db..51eeadd75af9 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cDebugPortProtocol.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cDebugPortProtocol.c @@ -7,9 +7,7 @@ **/ =20 #include -#include #include -#include #include =20 #include diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/I2cDebugPortTplDxe.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/= I2cHdmiDebugSerialPortLib/I2cDebugPortTplDxe.c index 9d69c0365795..d92b8d262793 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cDebugPortTplDxe.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cDebugPortTplDxe.c @@ -22,6 +22,11 @@ RaiseTplForI2cDebugPortAccess ( VOID ) { + // DebugLibSerialPort exposes potential DEBUG bugs, such as early assert= ions + if (gBS =3D=3D NULL) { + return; + } + if (EfiGetCurrentTpl () < TPL_NOTIFY) { mPreviousTpl =3D gBS->RaiseTPL (TPL_NOTIFY); } @@ -37,6 +42,10 @@ RestoreTplAfterI2cDebugPortAccess ( VOID ) { + if (gBS =3D=3D NULL) { + return; + } + if (mPreviousTpl > 0) { gBS->RestoreTPL (mPreviousTpl); mPreviousTpl =3D 0; diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/I2cDebugPortTplRuntimeDxe.c b/Platform/Intel/KabylakeOpenBoardPkg/L= ibrary/I2cHdmiDebugSerialPortLib/I2cDebugPortTplRuntimeDxe.c new file mode 100644 index 000000000000..7aa95157d734 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cDebugPortTplRuntimeDxe.c @@ -0,0 +1,93 @@ +/** @file + Serial I/O Port library implementation for the HDMI I2C Debug Port + DXE Library implementation + +Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include + +STATIC EFI_TPL mPreviousTpl =3D 0; +STATIC EFI_EVENT mEvent =3D NULL; +STATIC UINT8 mEndOfBootServices =3D 0; + +/** + Exit Boot Services Event notification handler. + + @param[in] Event Event whose notification function is being invoked + @param[in] Context Pointer to the notification function's context + +**/ +VOID +EFIAPI +OnExitBootServices ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + mEndOfBootServices =3D 1; + + gBS->CloseEvent (Event); +} + +/** + For boot phases that utilize task priority levels (TPLs), this function = raises + the TPL to the appriopriate level needed to execute I/O to the I2C Debug= Port +**/ +VOID +RaiseTplForI2cDebugPortAccess ( + VOID + ) +{ + // DebugLibSerialPort exposes potential DEBUG bugs, such as early assert= ions + if (gBS =3D=3D NULL || mEndOfBootServices =3D=3D 1) { + return; + } + + // An event is required for a boolean to bypass TPL modification after + // exit-BS. RSC obviates this, requiring it for runtime DebugLibSerialPo= rt. + // - Consider creating a TplRuntimeDxe, although UefiRuntimeLib uses gST? + // - BootScriptExecutorDxe is a special-case, where booleans are ineffec= tive + // + // A constructor would cycle, SerialPortInitialize() takes no arguments, + // and no BootServicesTableLib can be called by AutoGen early enough. + // Therefore, we generate the event here. + if (mEvent =3D=3D NULL) { + gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_NOTIFY, + OnExitBootServices, + NULL, + &gEfiEventExitBootServicesGuid, + &mEvent + ); + } + + if (EfiGetCurrentTpl () < TPL_NOTIFY) { + mPreviousTpl =3D gBS->RaiseTPL (TPL_NOTIFY); + } +} + +/** + For boot phases that utilize task priority levels (TPLs), this function + restores the TPL to the previous level after I/O to the I2C Debug Port is + complete +**/ +VOID +RestoreTplAfterI2cDebugPortAccess ( + VOID + ) +{ + if (gBS =3D=3D NULL || mEndOfBootServices =3D=3D 1) { + return; + } + + if (mPreviousTpl > 0) { + gBS->RestoreTPL (mPreviousTpl); + mPreviousTpl =3D 0; + } +} diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/I2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoardPkg/L= ibrary/I2cHdmiDebugSerialPortLib/I2cHdmiDebugSerialPortLib.c index 89a01b868da3..402b5a3033a9 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cHdmiDebugSerialPortLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /I2cHdmiDebugSerialPortLib.c @@ -7,10 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include -#include #include -#include -#include =20 #include #include diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/IgfxI2c.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebu= gSerialPortLib/IgfxI2c.c index b1273c7a5d10..886351ad4297 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /IgfxI2c.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /IgfxI2c.c @@ -7,8 +7,6 @@ **/ =20 #include -#include -#include #include #include =20 @@ -84,7 +82,6 @@ GetGmbusBusPinPair ( default: return EFI_INVALID_PARAMETER; } - break; // The PCH design lineage from newer CoffeeLake & WhiskeyLake case PchTypeCnlLp: case PchTypeCnlH: @@ -105,8 +102,8 @@ GetGmbusBusPinPair ( default: return EFI_INVALID_PARAMETER; } - break; - } =20 - return EFI_UNSUPPORTED; + default: + return EFI_UNSUPPORTED; + } } diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/PeiI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoardPk= g/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.c index c99821367354..05b2d31bbfc2 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /PeiI2cHdmiDebugSerialPortLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /PeiI2cHdmiDebugSerialPortLib.c @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 -#include #include #include #include diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/PeiI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.inf index 62b3cd3e1e49..64d8f682b786 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /PeiI2cHdmiDebugSerialPortLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /PeiI2cHdmiDebugSerialPortLib.inf @@ -21,10 +21,11 @@ # =20 [LibraryClasses] - BaseLib BaseMemoryLib PcdLib + HobLib TimerLib + IoLib PciLib =20 [Packages] @@ -42,8 +43,6 @@ IgfxI2c.c IgfxI2c.h =20 -[Ppis] - [Guids] gI2cHdmiDebugHobGuid =20 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOp= enBoardPkg/Library/I2cHdmiDebugSerialPortLib/RuntimeDxeI2cHdmiDebugSerialPo= rtLib.inf new file mode 100644 index 000000000000..eefe85f2814c --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /RuntimeDxeI2cHdmiDebugSerialPortLib.inf @@ -0,0 +1,51 @@ +### @file +# Component description file for Serial I/O Port library for the HDMI I2C = Debug Port +# +# Copyright (c) 2022, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D RuntimeDxeI2cHdmiDebugSerialPortLib + FILE_GUID =3D 08891D97-994C-48E9-9983-E99D622D32C8 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D DXE_DRIVER + LIBRARY_CLASS =3D SerialPortLib|DXE_CORE DXE_DRIVER DXE= _RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[LibraryClasses] + BaseMemoryLib + PcdLib + TimerLib + IoLib + PciLib + UefiLib + +[Packages] + MdePkg/MdePkg.dec + KabylakeOpenBoardPkg/OpenBoardPkg.dec + +[Sources] + DxeSmmI2cHdmiDebugSerialPortLib.c + Gmbus.c + Gmbus.h + I2cDebugPortProtocol.c + I2cDebugPortProtocol.h + I2cDebugPortTplRuntimeDxe.c + I2cHdmiDebugSerialPortLib.c + IgfxI2c.c + IgfxI2c.h + +[Guids] + gEfiEventExitBootServicesGuid = ## CONSUMES ## Event + +[Pcd] + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/SecI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoardPk= g/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.c index 416114d4363c..e4a65a66d9c1 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SecI2cHdmiDebugSerialPortLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SecI2cHdmiDebugSerialPortLib.c @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include -#include #include #include =20 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/SecI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.inf index 3ae724926fdd..a9780decd1a7 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SecI2cHdmiDebugSerialPortLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SecI2cHdmiDebugSerialPortLib.inf @@ -21,10 +21,9 @@ # =20 [LibraryClasses] - BaseLib BaseMemoryLib - PcdLib TimerLib + IoLib PciLib =20 [Packages] @@ -42,10 +41,6 @@ IgfxI2c.h SecI2cHdmiDebugSerialPortLib.c =20 -[Ppis] - -[Guids] - [Pcd] gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerial= PortLib/SmmI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf index dcbf43b886c1..65f2b4f5f731 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SmmI2cHdmiDebugSerialPortLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib= /SmmI2cHdmiDebugSerialPortLib.inf @@ -21,10 +21,10 @@ # =20 [LibraryClasses] - BaseLib BaseMemoryLib PcdLib TimerLib + IoLib PciLib =20 [Packages] @@ -42,10 +42,6 @@ IgfxI2c.c IgfxI2c.h =20 -[Ppis] - -[Guids] - [Pcd] gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES --=20 2.37.2 -=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 (#93283): https://edk2.groups.io/g/devel/message/93283 Mute This Topic: https://groups.io/mt/93506703/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- From nobody Sat May 11 21:44:33 2024 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+93284+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+93284+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1662485232; cv=none; d=zohomail.com; s=zohoarc; b=QDqOsgk3wx7Mndm9bz0zziFR3s/qMsnY/4pHM/0pTw3eUtE2ts3pE9YGQhsN8DGtX33jZwz5Z52NGM2JyDU0TRRx9CXUVJ9kXlumVghqgHS5E6K5CjvX8VXjMOzjcOCK4vVQN6T8WfOIK7Eup463fXmTYPslsRfzL4aeeF8L+ZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662485232; h=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=w87mBROMgminzEe2ANNyGnRjExAnGnUv98YRB3Hr1ws=; b=IerxY3x/sidNxuWeYi+4xZk1tNYwAP4uKLMDtWJklDOzoAKTVsHMu5MP08hBCh6Q4ydBaHfjTOK4RBir3ikuN5uA3hRdmP1ZdHbXtCa67jMhwFUPAD1Wft+3G+dv8mSqekh/ybiFRwTBNtLj2jgOyAuDlWaNdvVKjqn3DD+ZB1U= 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+93284+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1662485232598590.9866279415786; Tue, 6 Sep 2022 10:27:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nBPVYY1788612xyA6uGF4K0J; Tue, 06 Sep 2022 10:27:12 -0700 X-Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by mx.groups.io with SMTP id smtpd.web11.2075.1662485229629178676 for ; Tue, 06 Sep 2022 10:27:09 -0700 X-Received: by mail-qt1-f172.google.com with SMTP id y18so8582170qtv.5 for ; Tue, 06 Sep 2022 10:27:09 -0700 (PDT) X-Gm-Message-State: hBazCbohwobR5MIK1jXoqtJox1787277AA= X-Google-Smtp-Source: AA6agR4LqzUU9d+ZEg6DBhJsDGb9htrD63zl9dxpq2JK0bWiGOakNRqhAD8QWqi9m8kXSfpFYJ557w== X-Received: by 2002:ac8:5c8d:0:b0:344:568c:efc4 with SMTP id r13-20020ac85c8d000000b00344568cefc4mr45761153qta.557.1662485228462; Tue, 06 Sep 2022 10:27:08 -0700 (PDT) X-Received: from aturtleortwo-benjamindomain.. ([2607:f2c0:e98c:e:46bc:db07:bbf3:df6d]) by smtp.gmail.com with ESMTPSA id j2-20020a05620a410200b006b9ab3364ffsm12169038qko.11.2022.09.06.10.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:27:07 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Chasel Chiu , Sai Chaganty , Isaac Oram , Nate DeSimone , Ankit Sinha Subject: [edk2-devel][edk2-platforms][PATCH v1 3/3] KabylakeOpenBoardPkg/AspireVn7Dash572G: Hook-up HDMI debug port to build Date: Tue, 6 Sep 2022 13:26:54 -0400 Message-Id: <3760ced8e358f92136308754ab57938f1dd3f9e7.1662484082.git.benjamin.doron00@gmail.com> In-Reply-To: References: MIME-Version: 1.0 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,benjamin.doron00@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1662485232; bh=YgwmhMaFH6Ucn/RHvrDt876miou92Q1IhSPrab/AVC4=; h=Cc:Date:From:Reply-To:Subject:To; b=fDs8GZMhFcbBfr6R+ynG5BbMYpcEdSEJcGZhgcRYAKdhdS1LZF1XEoHNxgjulHvFHbb CE31dTAkK7xT1K//rYJh9ALUAILSHv1ElxVZ2QfvR8iCYQtS+BNqyRkoLMk7BjCOAzPJX hCkVKxtuYnJon7lZtD04bv9uLU4fYpadkCs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1662485234056100001 Content-Type: text/plain; charset="utf-8" HDMI port can be used with I2cHdmiDebugSerialPortLib, for debugging in all phases. Cc: Chasel Chiu Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Ankit Sinha Signed-off-by: Benjamin Doron --- .../AspireVn7Dash572G/OpenBoardPkg.dsc | 85 +++++++++++++++---- .../AspireVn7Dash572G/OpenBoardPkg.fdf | 11 ++- .../AspireVn7Dash572G/OpenBoardPkgPcd.dsc | 54 ++++++++++-- 3 files changed, 121 insertions(+), 29 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardP= kg.dsc index 261f141056f5..c71b7169a38a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.dsc @@ -25,9 +25,10 @@ # # Debug logging # + DEFINE USE_HDMI_DEBUG_PORT =3D FALSE DEFINE USE_PEI_SPI_LOGGING =3D FALSE DEFINE USE_MEMORY_LOGGING =3D FALSE - DEFINE RELEASE_LOGGING =3D ($(USE_PEI_SPI_LOGGING) || $(USE_MEMORY_= LOGGING)) + DEFINE RELEASE_LOGGING =3D ($(USE_HDMI_DEBUG_PORT) || $(USE_PEI_SPI= _LOGGING) || $(USE_MEMORY_LOGGING)) DEFINE TESTING =3D TRUE =20 PLATFORM_NAME =3D $(PLATFORM_PACKAGE) @@ -205,6 +206,15 @@ ####################################### DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf =20 +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + + ####################################### + # Board-specific/Silicon Package + ####################################### + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLi= b/SecI2cHdmiDebugSerialPortLib.inf +!endif + ####################################### # Platform Package ####################################### @@ -277,7 +287,7 @@ # Edk2 Packages ####################################### # In-memory logging may require too many services for early core debug out= put -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf !endif =20 @@ -285,7 +295,7 @@ ####################################### # Edk2 Packages ####################################### -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf !endif =20 @@ -322,7 +332,7 @@ ####################################### # Edk2 Packages ####################################### -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf !endif =20 @@ -336,7 +346,7 @@ # Edk2 Packages ####################################### # In-memory logging may require too many services for early core debug out= put -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf !endif =20 @@ -344,7 +354,7 @@ ####################################### # Edk2 Packages ####################################### -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf !endif =20 @@ -363,7 +373,21 @@ TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Smm= TestPointCheckLib.inf !endif =20 -# TODO: DebugLib override for UEFI_DRIVER and UEFI_APPLICATION? +[LibraryClasses.common.UEFI_DRIVER] + ####################################### + # Edk2 Packages + ####################################### +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf +!endif + +[LibraryClasses.common.UEFI_APPLICATION] + ####################################### + # Edk2 Packages + ####################################### +!if ($(USE_MEMORY_LOGGING) =3D=3D TRUE || $(USE_HDMI_DEBUG_PORT) =3D=3D TR= UE) + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf +!endif =20 # TODO: Add and improve feature support ####################################### @@ -389,6 +413,9 @@ !if $(USE_MEMORY_LOGGING) =3D=3D TRUE SerialPortLib|MdeModulePkg/Library/PeiDxeSerialPortLibMem/PeiSerialP= ortLibMem.inf !endif +!endif +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/PeiI2cHdmiDebugSerialPortLib.inf !endif gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|$(RELEASE_LOGG= ING) @@ -517,14 +544,24 @@ ####################################### # Edk2 Packages ####################################### + MdeModulePkg/Core/Dxe/DxeMain.inf { + + # Can debug CpuExceptionHandlerLib +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/DxeI2cHdmiDebugSerialPortLib.inf +!endif + } MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf { DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf !if $(USE_MEMORY_LOGGING) =3D=3D TRUE SerialPortLib|MdeModulePkg/Library/PeiDxeSerialPortLibMem/DxeSerialP= ortLibMem.inf +!endif +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf !endif - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|$(USE_MEMORY_L= OGGING) + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|($(USE_MEMORY_= LOGGING) || $(USE_HDMI_DEBUG_PORT)) gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|512 } # TODO: Still requires a little more thought @@ -533,9 +570,12 @@ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf !if $(USE_MEMORY_LOGGING) =3D=3D TRUE SerialPortLib|MdeModulePkg/Library/PeiDxeSerialPortLibMem/SmmSerialP= ortLibMem.inf +!endif +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/SmmI2cHdmiDebugSerialPortLib.inf !endif - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|$(USE_MEMORY_L= OGGING) + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|($(USE_MEMORY_= LOGGING) || $(USE_HDMI_DEBUG_PORT)) gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|512 } MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf @@ -548,12 +588,24 @@ MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { NULL|BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf +!if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalE= nable =3D=3D TRUE + NULL|BoardModulePkg/Library/BdsSerialPortTerminalLib/BdsSerialPortTe= rminalLib.inf +!endif } +!if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalE= nable =3D=3D TRUE + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/DxeI2cHdmiDebugSerialPortLib.inf + } + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +!endif + UefiCpuPkg/CpuDxe/CpuDxe.inf { -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE -# TODO/TEST -# SerialPortLib|MdeModulePkg/Library/PeiDxeSerialPortLibMem/DxeSerial= PortLibMem.inf + # Can debug CpuExceptionHandlerLib +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/DxeI2cHdmiDebugSerialPortLib.inf !endif } =20 @@ -589,12 +641,9 @@ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046 - !if $(TARGET) =3D=3D DEBUG - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialP= ort.inf - !endif -!if $(USE_MEMORY_LOGGING) =3D=3D TRUE -# TODO/TEST -# SerialPortLib|MdeModulePkg/Library/PeiDxeSerialPortLibMem/SmmSerial= PortLibMem.inf + # Can debug CpuExceptionHandlerLib +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerial= PortLib/SmmI2cHdmiDebugSerialPortLib.inf !endif } !endif diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardP= kg.fdf index 9eb37e7d230e..864d5561d7d8 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.fdf @@ -353,6 +353,10 @@ INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/= GraphicsOutputDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf +!if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalE= nable =3D=3D TRUE + INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +!endif INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf =20 INF ShellPkg/Application/Shell/Shell.inf @@ -584,12 +588,7 @@ INF IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdD= xe.inf =20 !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly =3D=3D FALSE =20 -INF $(PLATFORM_SI_PACKAGE)/Hsti/Dxe/HstiSiliconDxe.inf - -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly =3D=3D FALSE - +INF $(PLATFORM_SI_PACKAGE)/Hsti/Dxe/HstiSiliconDxe.inf INF $(PLATFORM_PACKAGE)/Hsti/HstiIbvPlatformDxe/HstiIbvPlatformDxe.inf =20 !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable =3D=3D TRUE diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoa= rdPkgPcd.dsc index a9d531a269a5..a4ea524e26bc 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd= .dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd= .dsc @@ -228,7 +228,7 @@ gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 !else gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0 - gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x3 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x03 !endif # $(RELEASE_LOGGING) !else # FIXME: More than just compiler optimisation is hooked to DEBUG builds. @@ -264,6 +264,8 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE !if $(TARGET) =3D=3D RELEASE gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE + # Determine RTS/CTS requirement + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE !else gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE @@ -407,7 +409,37 @@ # 3: DDC channel C # 4: DDC channel D # @Prompt DDC I2C channel to claim as the HDMI debug port - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel|0x0= 0 #@todo - Set to correct value for VN7-572G + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel|0x02 + + ## Enable usage the HDMI DDC channel as a debug port - Causes the BIOS d= ebug log + # to be written to the HDMI DDC channel. + # The value is defined as below. + # FALSE: Do NOT use the HDMI DDC channel as a debug port + # TRUE: Use the HDMI DDC channel as a debug port + # @Prompt Enable usage the HDMI DDC channel as a debug port + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable|$(USE_HDMI= _DEBUG_PORT) + + ## Enable usage the HDMI DDC channel as a serial terminal - Enables usag= e of the + # HDMI DDC channel to display BIOS Setup, UEFI Shell, etc. using a term= inal + # emulator. Useful for cases where video is not operating correctly. + # + # The value is defined as below. + # FALSE: Do NOT use the HDMI DDC channel as a debug port + # TRUE: Use the HDMI DDC channel as a debug port + # @Prompt Enable usage the HDMI DDC channel as a debug port + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalEna= ble|FALSE + + ## Indicates the type of terminal to use. + # If PcdI2cHdmiDebugPortSerialTerminalEnable is TRUE, this PCD will be = used + # to determine which terminal protocol to use. + # 0 - PCANSI + # 1 - VT100 + # 2 - VT100+ + # 3 - UTF8 + # 4 - TTYTERM + # @Prompt Default Terminal Type. + # @ValidRange 0x80000001 | 0 - 4 + gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|3 =20 [PcdsFixedAtBuild.IA32] ###################################### @@ -433,7 +465,16 @@ ###################################### # Edk2 Configuration ###################################### - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 # 0x804800C= 7/0x806A15CF give useful information, but is very noisy + # TODO: Dynamic in HII + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 +!if FALSE + # Filtered DEBUG_POOL, DEBUG_PAGE, DEBUG_GCD and DEBUG_CACHE + # - Unused: DEBUG_VARIABLE, DEBUG_BM and DEBUG_LOADFILE + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x804950CF +!endif +!if ($(TESTING) =3D=3D TRUE && $(USE_HDMI_DEBUG_PORT) =3D=3D FALSE) + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400046 +!endif =20 ###################################### # Silicon Configuration @@ -446,9 +487,9 @@ # Platform Configuration ###################################### !if $(TARGET) =3D=3D DEBUG - gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable|1 + gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable|TRUE !else - gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable|0 + gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable|FALSE !endif =20 [PcdsDynamicDefault] @@ -528,6 +569,9 @@ !else gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|5 # Variable: L"Timeout" !endif +!if $(USE_HDMI_DEBUG_PORT) =3D=3D TRUE + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|15 # Variable: L"Timeout" +!endif !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable =3D=3D TRUE gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_= VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2C= onfigFormSetGuid|0x8|3|NV,BS --=20 2.37.2 -=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 (#93284): https://edk2.groups.io/g/devel/message/93284 Mute This Topic: https://groups.io/mt/93506705/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-