public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Jeff Fan <jeff.fan@intel.com>
Subject: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug
Date: Tue,  8 Nov 2016 10:26:21 +0800	[thread overview]
Message-ID: <20161108022621.23500-1-ruiyu.ni@intel.com> (raw)

Upon booting to a legacy OS, LegacyBios driver is responsible to
initialize the BDA region with the correct COM port base address.
But the current logic to get the COM port base address from IsaIo
instance is not correct.
The patch fixes this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
---
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c
index c853377..686a32d 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c
@@ -354,7 +354,7 @@ LegacyBiosBuildSioDataFromIsaIo (
         //
         for (ChildIndex = 0; ChildIndex < EntryCount; ChildIndex++) {
           if ((OpenInfoBuffer[ChildIndex].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {
-            Status = gBS->HandleProtocol (OpenInfoBuffer[ChildIndex].AgentHandle, &gEfiSerialIoProtocolGuid, (VOID **) &SerialIo);
+            Status = gBS->HandleProtocol (OpenInfoBuffer[ChildIndex].ControllerHandle, &gEfiSerialIoProtocolGuid, (VOID **) &SerialIo);
             if (!EFI_ERROR (Status)) {
               SioSerial           = &SioPtr->Serial[ResourceList->Device.UID];
               SioSerial->Address  = (UINT16) IoResource->StartRange;
-- 
2.9.0.windows.1



             reply	other threads:[~2016-11-08  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08  2:26 Ruiyu Ni [this message]
2016-11-10  2:11 ` [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug Fan, Jeff

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=20161108022621.23500-1-ruiyu.ni@intel.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