From: zwei4 <david.wei@intel.com>
To: edk2-devel@lists.01.org
Cc: Mike Wu <mike.wu@intel.com>,
Benjamin You <benjamin.you@intel.com>,
Mang Guo <mang.guo@intel.com>, Shifei Lu <shifeix.a.lu@intel.com>,
Ruth Li <ruth.li@intel.com>, Junjie He <junjie.he@intel.com>
Subject: [Patch][edk2-platforms/devel-MinnowBoard3 2/2] Restore P2SB MMIO
Date: Wed, 18 Jan 2017 17:54:22 +0800 [thread overview]
Message-ID: <20170118095422.2696-1-david.wei@intel.com> (raw)
Restore P2SB's, as well as GPIO controllers', MMIO resources to original values which have been overridden by PCI bus driver.
Signed-off-by: zwei4 <david.wei@intel.com>
Cc: Mike Wu <mike.wu@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Cc: Shifei Lu <shifeix.a.lu@intel.com>
Cc: Ruth Li <ruth.li@intel.com>
Cc: Junjie He <junjie.he@intel.com>
---
.../BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit.c b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit.c
index 6fb6c8df4..c4a9d5088 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit.c
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit.c
@@ -1,7 +1,7 @@
/** @file
This is the driver that initializes the Intel SC devices
- Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -111,6 +111,16 @@ ScOnPciEnumComplete (
gBS->CloseEvent (Event);
//
+ // Restore P2SB and GPIO controlers's Base Address to original value which is overridden by PCI BUS driver.
+ // P2SB will be switched to ACPI mode at exit boot service, so it's resource must be allocated from ACPI_MMIO_BASE_ADDRESS
+ // region, to avoid resource conflict with PCI resource used by PCI_HOST.asl.
+ //
+ MmioWrite32 (
+ MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_SC, PCI_DEVICE_NUMBER_P2SB, PCI_FUNCTION_NUMBER_P2SB, R_P2SB_BASE),
+ (UINT32) ((PcdGet32 (PcdP2SBBaseAddress)))
+ );
+
+ //
// Get SC PMC fuction disable reset HOB.
//
HobPtr.Guid = GetFirstGuidHob (&gScPmcFunctionDisableResetHobGuid);
--
2.11.0.windows.1
reply other threads:[~2017-01-18 9:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170118095422.2696-1-david.wei@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