From nobody Mon Feb 9 16:02:57 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+90596+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+90596+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1655525160; cv=none; d=zohomail.com; s=zohoarc; b=POlAqemZ5jFIZJt7Y1n03D+7Pbvlj5NzNyVkb0Y0rW9q4wJUk6lrFOaJkj129NbSG6h9bZf6xe5gMXnz74zGJK8NQK8+444PLtA/mtGUVWOlLxdK4B4xkLV8pTzntaMJOkOpsRduazWKAJGNDEsH51dmp0FcPkJEYQKT4W+29tQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655525160; 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=mNBekPeSO/xJceRb7PR1AtDUxv2ikcjucwiaVR4x+CE=; b=NcpvUREIWdscq3QokaWj3leXHSOAPGYYJ+DnPz5qw6rq8qWqIKjgWklliL6O9ucR/dIto2mGaD+ue6FD5CNDZNCT3e0ROqddgFgtbw91e/PBZMPoSZxHc3EQmOQ2WrEVoKU3mLnGyt4ENh+G2F51fgyR77QZAFHGXnUnHM8W0zc= 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+90596+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 1655525160085934.3538921437864; Fri, 17 Jun 2022 21:06:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id e0NLYY1788612xEp6kAmmJZ4; Fri, 17 Jun 2022 21:05:59 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.6193.1655525157666528425 for ; Fri, 17 Jun 2022 21:05:58 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="305057853" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="305057853" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 21:05:56 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="613763929" X-Received: from nldesimo-desk1.amr.corp.intel.com ([10.7.159.54]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 21:05:55 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Sai Chaganty , Isaac Oram , Benjamin Doron , Michael Kubacki , Jeremy Soller Subject: [edk2-devel] [edk2-platforms] [PATCH V1 5/5] KabylakeOpenBoardPkg/GalagoPro3: Enable HDMI DDC Debug Port Date: Fri, 17 Jun 2022 21:05:50 -0700 Message-Id: <20220618040550.8467-6-nathaniel.l.desimone@intel.com> In-Reply-To: <20220618040550.8467-1-nathaniel.l.desimone@intel.com> References: <20220618040550.8467-1-nathaniel.l.desimone@intel.com> 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,nathaniel.l.desimone@intel.com X-Gm-Message-State: EL4LpThh87HJmBqY1qs8YlLTx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1655525159; bh=j5+kOKPGDc4+jVmd7rc9ng6qLRwvnR7GVOYeNkg3zbo=; h=Cc:Date:From:Reply-To:Subject:To; b=t1YA+zZCe4Qo2I6PiC14bKiUjoQ22ad8fkjlMII6d3BeRcoU7nyJF4sgfAdoo/+21I0 Pt/3d7olYmnP5GpRX5Rj/hjCvoDaw/eNnRLksVrpd4rui7iy58h4Yutf50o3IcnaL8wvH AwDcePmgt/6+agPHX1CEa3ADy3BqOqmNPMg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1655525160577100014 Content-Type: text/plain; charset="utf-8" Enables usage of the HDMI DDC I2C Bus SerialPortLib implementation on the GalagoPro3 board. Cc: Chasel Chiu Cc: Sai Chaganty Cc: Isaac Oram Cc: Benjamin Doron Cc: Michael Kubacki Cc: Jeremy Soller Signed-off-by: Nate DeSimone --- .../GalagoPro3/OpenBoardPkg.dsc | 78 ++++++++++++++++++- .../GalagoPro3/OpenBoardPkg.fdf | 6 +- .../GalagoPro3/OpenBoardPkgPcd.dsc | 30 +++++++ 3 files changed, 111 insertions(+), 3 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.ds= c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index 5cf2d424ff..2e3c6d3ca5 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -142,6 +142,12 @@ PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHookL= ib.inf SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyUpd= ateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf =20 +[LibraryClasses.common.PEI_CORE] +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHd= miDebugPortEnable =3D=3D TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLi= b/PeiI2cHdmiDebugSerialPortLib.inf +!endif + [LibraryClasses.IA32.SEC] ####################################### # Edk2 Packages @@ -166,7 +172,6 @@ ####################################### DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf - SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrr= LibNull.inf =20 ####################################### # Silicon Package @@ -183,6 +188,7 @@ !if $(TARGET) =3D=3D DEBUG TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Pei= TestPointCheckLib.inf !endif + SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrr= LibNull.inf =20 ####################################### # Board Package @@ -193,7 +199,19 @@ PeiTbtPolicyLib|$(PLATFORM_BOARD_PACKAGE)/Features/Tbt/Library/PeiTbtPol= icyLib/PeiTbtPolicyLib.inf !endif =20 +[LibraryClasses.common.DXE_CORE] +!if $(TARGET) =3D=3D DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf +!endif + [LibraryClasses.common.DXE_DRIVER] + ####################################### + # Edk2 Packages + ####################################### +!if $(TARGET) =3D=3D DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf +!endif + ####################################### # Silicon Initialization Package ####################################### @@ -225,11 +243,24 @@ SiliconPolicyUpdateLib|$(PROJECT)/Policy/Library/DxeSiliconPolicyUpdateL= ib/DxeSiliconPolicyUpdateLib.inf =20 [LibraryClasses.X64.DXE_RUNTIME_DRIVER] + ####################################### + # Edk2 Packages + ####################################### +!if $(TARGET) =3D=3D DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf +!endif + ####################################### # Silicon Initialization Package ####################################### ResetSystemLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/DxeRuntimeResetSystemL= ib/DxeRuntimeResetSystemLib.inf =20 +[LibraryClasses.common.SMM_CORE] +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHd= miDebugPortEnable =3D=3D TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLi= b/SmmI2cHdmiDebugSerialPortLib.inf +!endif + [LibraryClasses.X64.DXE_SMM_DRIVER] ####################################### # Silicon Initialization Package @@ -245,6 +276,14 @@ !if $(TARGET) =3D=3D DEBUG TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Smm= TestPointCheckLib.inf !endif +# @todo DebugLibReportStatusCode isn't working for SMM drivers for some re= ason +# temporary W/A is to link the serial port lib into every SMM driver +# I think the only driver that needs this is PiSmmCpuDxeSmm... +# But more testing is needed. +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHd= miDebugPortEnable =3D=3D TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLi= b/SmmI2cHdmiDebugSerialPortLib.inf +!endif =20 ####################################### # PEI Components @@ -258,11 +297,17 @@ UefiCpuPkg/SecCore/SecCore.inf { PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cH= dmiDebugPortEnable =3D=3D TRUE + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!endif } =20 MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cH= dmiDebugPortEnable =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/PeiI2cHdmiDebugSerialPortLib.inf +!endif } =20 IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf { @@ -333,6 +378,13 @@ ####################################### # Edk2 Packages ####################################### + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHd= miDebugPortEnable =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPo= rtLib/DxeI2cHdmiDebugSerialPortLib.inf +!endif + } IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf @@ -341,9 +393,12 @@ MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf{ + 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 } UefiCpuPkg/CpuDxe/CpuDxe.inf =20 @@ -373,9 +428,20 @@ !if $(TARGET) =3D=3D DEBUG DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialP= ort.inf + !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable = =3D=3D TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSeri= alPortLib/SmmI2cHdmiDebugSerialPortLib.inf + !endif !endif } !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 =20 ####################################### # Silicon Initialization Package @@ -422,6 +488,14 @@ NULL|$(PROJECT)/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.i= nf !endif } + MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouter= Smm.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +# @todo This is causing crashes still... more debug needed. +#!if $(TARGET) =3D=3D DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cH= dmiDebugPortEnable =3D=3D TRUE +# SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialP= ortLib/SmmI2cHdmiDebugSerialPortLib.inf +#!endif + } =20 !endif =20 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fd= f b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index 239b6b720a..6468962730 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf @@ -1,7 +1,7 @@ ## @file # System 76 GalagoPro3 board flash file. # -# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -347,6 +347,10 @@ INF $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitDxe/= PlatformInitDxe.inf INF IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf =20 INF $(PLATFORM_PACKAGE)/Test/TestPointStubDxe/TestPointStubDxe.inf +!if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalE= nable =3D=3D TRUE + INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +!endif =20 [FV.FvUefiBoot] BlockSize =3D $(FLASH_BLOCK_SIZE) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd= .dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc index c05535aab7..4a37d6157b 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc @@ -361,6 +361,36 @@ gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0x00, 0x00, = 0x1F, 0x00} gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress|0xDF000000 =20 + ## 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|FALSE + + ## 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 + ## Specifies the DDC I2C channel to claim as the HDMI debug port # The value is defined as below. # 2: DDC channel B --=20 2.27.0.windows.1 -=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 (#90596): https://edk2.groups.io/g/devel/message/90596 Mute This Topic: https://groups.io/mt/91835977/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-