From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 CB51E21A0BAA8 for ; Wed, 10 May 2017 00:53:26 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2017 00:53:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="100212634" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 10 May 2017 00:53:26 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 10 May 2017 00:53:26 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 10 May 2017 00:53:25 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Wed, 10 May 2017 15:53:22 +0800 From: "Wei, David" To: "Lu, ShifeiX A" , "edk2-devel@lists.01.org" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue. Thread-Index: AQHSyVrX4po5wPBmw0u5miDli9edGqHtMiyQ Date: Wed, 10 May 2017 07:53:21 +0000 Message-ID: <89954A0B46707A448411A627AD4EEE3468F2EF76@SHSMSX101.ccr.corp.intel.com> References: <01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local> In-Reply-To: <01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 07:53:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: zwei4 =20 Thanks, David Wei =20 -----Original Message----- From: Lu, ShifeiX A=20 Sent: Wednesday, May 10, 2017 2:58 PM To: edk2-devel@lists.01.org Cc: Wei, David Subject: [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issu= e. System will hang up when run reconnect -r with SD Card insert. --- .../PlatformSettings/PlatformDxe/PciDevice.c | 33 ++++++++++++++++++= +++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDx= e/PciDevice.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/Platfor= mDxe/PciDevice.c index b8645a2..421ac10 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDe= vice.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDe= vice.c @@ -1,7 +1,7 @@ /** @file Platform PCI Bus Initialization Driver. =20 - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -405,6 +405,8 @@ PciBusEvent ( UINTN Index; UINT8 mCacheLineSize =3D 0x10; UINTN Seg, Bus, Dev, Fun; + UINT32 AcpiIoPortBaseAddr; + UINT32 CmdValue; =20 while (TRUE) { BufferSize =3D sizeof (EFI_HANDLE); @@ -448,6 +450,35 @@ PciBusEvent ( // Status =3D PciIo->GetLocation (PciIo, &Seg, &Bus, &Dev, &Fun); if ((Seg =3D=3D0) && (Bus =3D=3D 0) && (Dev =3D=3D 13) && (Fun =3D= =3D 1)) { + // + // Set PMC acpi io port address + // =20 + AcpiIoPortBaseAddr =3D (UINT32) PcdGet16 (PcdScAcpiIoPortBaseAddre= ss); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + 0x20, + 1, + &AcpiIoPortBaseAddr + ); + + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + ); + + CmdValue |=3D BIT0; + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + );=09 +=09 Supports |=3D BIT0; } // --=20 2.7.0.windows.1