From: "Isaac Oram" <isaac.w.oram@intel.com>
To: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
"Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Dong, Eric" <eric.dong@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
Benjamin Doron <benjamin.doron00@gmail.com>,
"Kubacki, Michael" <michael.kubacki@microsoft.com>,
"Soller, Jeremy" <jeremy@system76.com>
Subject: Re: [edk2-platforms] [PATCH V2 0/5] KabylakeOpenBoardPkg: HDMI DDC I2C Bus Debugging
Date: Thu, 8 Sep 2022 22:59:36 +0000 [thread overview]
Message-ID: <SA1PR11MB58013FF60614344CA464F3DBD0409@SA1PR11MB5801.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220907062735.5734-1-nathaniel.l.desimone@intel.com>
For the series: Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Sent: Tuesday, September 6, 2022 11:28 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Dong, Eric <eric.dong@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Benjamin Doron <benjamin.doron00@gmail.com>; Kubacki, Michael <michael.kubacki@microsoft.com>; Soller, Jeremy <jeremy@system76.com>
Subject: [edk2-platforms] [PATCH V2 0/5] KabylakeOpenBoardPkg: HDMI DDC I2C Bus Debugging
Changes in V2:
- Use SerialPortTerminalLib from MinPlatformPkg.
- Override SerialPortLib on StatusCodeHandlerSmm not
StatusCodeRouter.
Normally the HDMI DDC I2C bus is used to read the EDID data from the monitor. An unintended but useful property of this interface is that is does not require DMA to perform I/O. This means that this interface can be used to perform I/O before DRAM is initialized.
HDMI video output is a common feature of many laptops.
This makes the HDMI DDC bus the only I/O interface that is often exposed outside of the laptop chassis while simultaneously capable of being used in Pre-Memory.
Oddly... this makes it an ideal and novel way to perform closed chassis debug.
This patch series adds a implementation of using the HDMI DDC I2C Bus as a "poor man's" UART. This is accomplished using the GMBUS that is part of the Intel HD Graphics device. Accordingly, this implementation will only work on systems with the HDMI port routed to the Intel graphics device, and will not work on systems with HDMI routed to a discrete GPU.
In order to use this implementation, one will also need a BusPirate programmed with Nate's Custom Bus Pirate FW for I2C Serial Debug. This firmware is available from:
https://github.com/nate-desimone/Bus_Pirate
This firmware interfaces with the I2C Bus and forwards traffic from it to the FTDI USB Serial Adapter that is integrated with the BusPirate. In combination, this results in the HDMI port appearing to function as a regular UART to the user.
If you would like to see this in action, I made a short YouTube video:
https://www.youtube.com/watch?v=xe7cFhRsr80
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Nate DeSimone (5):
KabylakeOpenBoardPkg: Add I2cHdmiDebugSerialPortLib
KabylakeOpenBoardPkg: Add HdmiDebugGpioInitLib
KabylakeOpenBoardPkg: Add SecBoardInitLib
MinPlatformPkg: Add PcdDefaultTerminalType support to
SerialPortTerminalLib
KabylakeOpenBoardPkg/GalagoPro3: Enable HDMI DDC Debug Port
.../PeiAspireVn7Dash572GInitPreMemLib.c | 3 +-
.../AspireVn7Dash572G/OpenBoardPkg.dsc | 11 +-
.../AspireVn7Dash572G/OpenBoardPkgPcd.dsc | 9 +
.../BoardInitLib/PeiGalagoPro3InitPreMemLib.c | 13 +-
.../GalagoPro3/OpenBoardPkg.dsc | 84 +-
.../GalagoPro3/OpenBoardPkgPcd.dsc | 40 +
.../Include/Library/HdmiDebugGpioInitLib.h | 26 +
.../PeiKabylakeRvp3InitPreMemLib.c | 13 +-
.../KabylakeRvp3/OpenBoardPkg.dsc | 11 +-
.../KabylakeRvp3/OpenBoardPkgPcd.dsc | 9 +
.../HdmiDebugGpioInitLib.c | 221 +++++
.../HdmiDebugGpioInitLib.inf | 42 +
.../DxeI2cHdmiDebugSerialPortLib.inf | 51 ++
.../DxeSmmI2cHdmiDebugSerialPortLib.c | 161 ++++
.../Library/I2cHdmiDebugSerialPortLib/Gmbus.c | 826 ++++++++++++++++++ .../Library/I2cHdmiDebugSerialPortLib/Gmbus.h | 324 +++++++
.../I2cDebugPortProtocol.c | 194 ++++
.../I2cDebugPortProtocol.h | 77 ++
.../I2cDebugPortTplDxe.c | 44 +
.../I2cDebugPortTplNull.c | 36 +
.../I2cHdmiDebugSerialPortLib.c | 201 +++++
.../I2cHdmiDebugSerialPortLib/IgfxI2c.c | 112 +++
.../I2cHdmiDebugSerialPortLib/IgfxI2c.h | 146 ++++
.../PeiI2cHdmiDebugSerialPortLib.c | 237 +++++
.../PeiI2cHdmiDebugSerialPortLib.inf | 52 ++
.../SecI2cHdmiDebugSerialPortLib.c | 134 +++
.../SecI2cHdmiDebugSerialPortLib.inf | 51 ++
.../SmmI2cHdmiDebugSerialPortLib.inf | 51 ++
.../SecBoardInitLib/Ia32/SecBoardInit.nasm | 18 +
.../Library/SecBoardInitLib/SecBoardInitLib.c | 35 +
.../SecBoardInitLib/SecBoardInitLib.inf | 39 +
.../KabylakeOpenBoardPkg/OpenBoardPkg.dec | 33 +-
.../SerialPortTerminalLib.c | 66 +-
.../SerialPortTerminalLib.h | 11 +-
.../SerialPortTerminalLib.inf | 17 +-
35 files changed, 3343 insertions(+), 55 deletions(-) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Include/Library/HdmiDebugGpioInitLib.h
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/HdmiDebugGpioInitLib/HdmiDebugGpioInitLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/HdmiDebugGpioInitLib/HdmiDebugGpioInitLib.inf
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/DxeI2cHdmiDebugSerialPortLib.inf
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/DxeSmmI2cHdmiDebugSerialPortLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/Gmbus.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/Gmbus.h
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/I2cDebugPortProtocol.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/I2cDebugPortProtocol.h
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/I2cDebugPortTplDxe.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/I2cDebugPortTplNull.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/I2cHdmiDebugSerialPortLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/IgfxI2c.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/IgfxI2c.h
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.inf
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.inf
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/SecBoardInitLib/Ia32/SecBoardInit.nasm
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/SecBoardInitLib/SecBoardInitLib.c
create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/SecBoardInitLib/SecBoardInitLib.inf
--
2.27.0.windows.1
prev parent reply other threads:[~2022-09-08 22:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 6:27 [edk2-platforms] [PATCH V2 0/5] KabylakeOpenBoardPkg: HDMI DDC I2C Bus Debugging Nate DeSimone
2022-09-07 6:27 ` [edk2-platforms] [PATCH V2 1/5] KabylakeOpenBoardPkg: Add I2cHdmiDebugSerialPortLib Nate DeSimone
2022-09-07 6:27 ` [edk2-platforms] [PATCH V2 2/5] KabylakeOpenBoardPkg: Add HdmiDebugGpioInitLib Nate DeSimone
2022-09-07 6:27 ` [edk2-platforms] [PATCH V2 3/5] KabylakeOpenBoardPkg: Add SecBoardInitLib Nate DeSimone
2022-09-07 6:27 ` [edk2-platforms] [PATCH V2 4/5] MinPlatformPkg: Add PcdDefaultTerminalType support to SerialPortTerminalLib Nate DeSimone
2022-09-07 6:27 ` [edk2-platforms] [PATCH V2 5/5] KabylakeOpenBoardPkg/GalagoPro3: Enable HDMI DDC Debug Port Nate DeSimone
2022-09-08 22:59 ` Isaac Oram [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SA1PR11MB58013FF60614344CA464F3DBD0409@SA1PR11MB5801.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox