From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.4692.1662532077339245951 for ; Tue, 06 Sep 2022 23:27:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Vl+oEZGl; spf=permerror, err=too many SPF records (domain: intel.com, ip: 192.55.52.43, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662532077; x=1694068077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mt69LuBkLUs3LOTB1bXVnLaoF1jQWhKZZUM7INhf6vQ=; b=Vl+oEZGlC6w8C5uEAUQ3s8zClsE8yCM5O1nv0UNkgnuKerlD6IubvAmz 0sNR1YrNPHxWamCeZAT8Nc33hwUAGVS5ObFO/TSSlV7PsWJuL8C10C7dU PXsukHYVNhpvNKE8NrKUvYQa7nCzjYZSBVFQkFxg1tQoIocu/+tz/ON8u 7p8thIVMRIICbhsoR/g2ypAUd3YO1ouAZCinggFZMREBESAfPQLDAOfqg Hu45iAZNc24dOzVM5pt4dmV6m9errUTRdy7twc2KxXIYraaryJAJ3nWFY XHG/LUbxGDUmxudV05nsJaDdSC6jh4zndlbMRlD4hF5t26dLhmG2du80s Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="383088401" X-IronPort-AV: E=Sophos;i="5.93,295,1654585200"; d="scan'208";a="383088401" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 23:27:50 -0700 X-IronPort-AV: E=Sophos;i="5.93,295,1654585200"; d="scan'208";a="682687468" Received: from nldesimo-desk1.amr.corp.intel.com ([10.24.80.62]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 23:27:50 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Sai Chaganty , Isaac Oram , Benjamin Doron , Michael Kubacki , Jeremy Soller Subject: [edk2-platforms] [PATCH V2 5/5] KabylakeOpenBoardPkg/GalagoPro3: Enable HDMI DDC Debug Port Date: Tue, 6 Sep 2022 23:27:35 -0700 Message-Id: <20220907062735.5734-6-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20220907062735.5734-1-nathaniel.l.desimone@intel.com> References: <20220907062735.5734-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 74 ++++++++++++++++++- .../GalagoPro3/OpenBoardPkgPcd.dsc | 31 ++++++++ 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index 5cf2d424ff..642f465f80 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -142,6 +142,12 @@ PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHookLib.inf SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf +[LibraryClasses.common.PEI_CORE] +!if $(TARGET) == DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.inf +!endif + [LibraryClasses.IA32.SEC] ####################################### # Edk2 Packages @@ -164,9 +170,10 @@ ####################################### # Edk2 Packages ####################################### +!if $(TARGET) == DEBUG DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf +!endif SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf - SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf ####################################### # Silicon Package @@ -183,6 +190,7 @@ !if $(TARGET) == DEBUG TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf !endif + SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf ####################################### # Board Package @@ -193,7 +201,19 @@ PeiTbtPolicyLib|$(PLATFORM_BOARD_PACKAGE)/Features/Tbt/Library/PeiTbtPolicyLib/PeiTbtPolicyLib.inf !endif +[LibraryClasses.common.DXE_CORE] +!if $(TARGET) == DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf +!endif + [LibraryClasses.common.DXE_DRIVER] + ####################################### + # Edk2 Packages + ####################################### +!if $(TARGET) == DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf +!endif + ####################################### # Silicon Initialization Package ####################################### @@ -225,11 +245,24 @@ SiliconPolicyUpdateLib|$(PROJECT)/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf [LibraryClasses.X64.DXE_RUNTIME_DRIVER] + ####################################### + # Edk2 Packages + ####################################### +!if $(TARGET) == DEBUG + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf +!endif + ####################################### # Silicon Initialization Package ####################################### ResetSystemLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf +[LibraryClasses.common.SMM_CORE] +!if $(TARGET) == DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf +!endif + [LibraryClasses.X64.DXE_SMM_DRIVER] ####################################### # Silicon Initialization Package @@ -244,6 +277,7 @@ TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/SmmTestPointLib.inf !if $(TARGET) == DEBUG TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.inf + DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf !endif ####################################### @@ -263,6 +297,9 @@ MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!if $(TARGET) == DEBUG && gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.inf +!endif } IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf { @@ -333,6 +370,26 @@ ####################################### # Edk2 Packages ####################################### + !if $(TARGET) == DEBUG + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/DxeI2cHdmiDebugSerialPortLib.inf + !endif + } + MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + } + MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf + !endif + } + !endif IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf @@ -341,9 +398,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 gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE + NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf +!endif } UefiCpuPkg/CpuDxe/CpuDxe.inf @@ -373,9 +433,19 @@ !if $(TARGET) == DEBUG DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortEnable == TRUE + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf + !endif !endif } !endif +!if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalEnable == TRUE + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf { + + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + SerialPortLib|$(PLATFORM_BOARD_PACKAGE)/Library/I2cHdmiDebugSerialPortLib/DxeI2cHdmiDebugSerialPortLib.inf + } +!endif ####################################### # Silicon Initialization Package diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc index 207c1de06d..0a2d08f300 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc @@ -334,6 +334,37 @@ gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0x00, 0x00, 0x1F, 0x00} gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress|0xDF000000 + ## Enable usage the HDMI DDC channel as a debug port - Causes the BIOS debug 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 usage of the + # HDMI DDC channel to display BIOS Setup, UEFI Shell, etc. using a terminal + # 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.PcdI2cHdmiDebugPortSerialTerminalEnable|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortSerialTerminalEnable + + ## 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 -- 2.27.0.windows.1