From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 0695721A1349E for ; Tue, 9 May 2017 23:58:25 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 09 May 2017 23:58:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="855062395" Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.12]) by FMSMGA003.fm.intel.com with SMTP; 09 May 2017 23:58:25 -0700 Date: Tue, 09 May 2017 23:49:32 -0700 From: lushifex CC: david.wei@intel.com; Sender: lushifex To: edk2-devel@lists.01.org Message-ID: <01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [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 06:58:26 -0000 Content-Type: text/plain; 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/PlatformDxe/PciDevice.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c index b8645a2..421ac10 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c @@ -1,7 +1,7 @@ /** @file Platform PCI Bus Initialization Driver. - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -405,6 +405,8 @@ PciBusEvent ( UINTN Index; UINT8 mCacheLineSize = 0x10; UINTN Seg, Bus, Dev, Fun; + UINT32 AcpiIoPortBaseAddr; + UINT32 CmdValue; while (TRUE) { BufferSize = sizeof (EFI_HANDLE); @@ -448,6 +450,35 @@ PciBusEvent ( // Status = PciIo->GetLocation (PciIo, &Seg, &Bus, &Dev, &Fun); if ((Seg ==0) && (Bus == 0) && (Dev == 13) && (Fun == 1)) { + // + // Set PMC acpi io port address + // + AcpiIoPortBaseAddr = (UINT32) PcdGet16 (PcdScAcpiIoPortBaseAddress); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + 0x20, + 1, + &AcpiIoPortBaseAddr + ); + + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + ); + + CmdValue |= BIT0; + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + ); + Supports |= BIT0; } // -- 2.7.0.windows.1