From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 663C681C8F for ; Wed, 9 Nov 2016 18:12:16 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 09 Nov 2016 18:12:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,616,1473145200"; d="scan'208";a="1083143792" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 09 Nov 2016 18:12:19 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Nov 2016 18:12:19 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 10:11:58 +0800 From: "Fan, Jeff" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug Thread-Index: AQHSOWeGpMuIqx8d8Eq3kvUpb28CBaDRfM2Q Date: Thu, 10 Nov 2016 02:11:57 +0000 Message-ID: <542CF652F8836A4AB8DBFAAD40ED192A4A2D804B@shsmsx102.ccr.corp.intel.com> References: <20161108022621.23500-1-ruiyu.ni@intel.com> In-Reply-To: <20161108022621.23500-1-ruiyu.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzRjNDZhYTAtZDI3OC00NjFmLWFiNzAtMWZmMDBiNTM4ODQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InV6eGltaHloR1lmckRYcWlqOGRmMlpNZUg1QlwvVVFhOHZRd2dpQjhWM0xZPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 02:12:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jeff Fan -----Original Message----- From: Ni, Ruiyu=20 Sent: Tuesday, November 08, 2016 10:26 AM To: edk2-devel@lists.01.org Cc: Fan, Jeff Subject: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redi= rection 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 Cc: Jeff Fan --- IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacySio.c b/IntelF= rameworkModulePkg/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 =3D 0; ChildIndex < EntryCount; ChildIndex++) { if ((OpenInfoBuffer[ChildIndex].Attributes & EFI_OPEN_PROTOCOL_B= Y_CHILD_CONTROLLER) !=3D 0) { - Status =3D gBS->HandleProtocol (OpenInfoBuffer[ChildIndex].Age= ntHandle, &gEfiSerialIoProtocolGuid, (VOID **) &SerialIo); + Status =3D gBS->HandleProtocol=20 + (OpenInfoBuffer[ChildIndex].ControllerHandle,=20 + &gEfiSerialIoProtocolGuid, (VOID **) &SerialIo); if (!EFI_ERROR (Status)) { SioSerial =3D &SioPtr->Serial[ResourceList->Device= .UID]; SioSerial->Address =3D (UINT16) IoResource->StartRange; -- 2.9.0.windows.1