public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug
@ 2016-11-08  2:26 Ruiyu Ni
  2016-11-10  2:11 ` Fan, Jeff
  0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2016-11-08  2:26 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jeff Fan

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug
  2016-11-08  2:26 [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug Ruiyu Ni
@ 2016-11-10  2:11 ` Fan, Jeff
  0 siblings, 0 replies; 2+ messages in thread
From: Fan, Jeff @ 2016-11-10  2:11 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org

Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Ni, Ruiyu 
Sent: Tuesday, November 08, 2016 10:26 AM
To: edk2-devel@lists.01.org
Cc: Fan, Jeff
Subject: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-10  2:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08  2:26 [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug Ruiyu Ni
2016-11-10  2:11 ` Fan, Jeff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox