Browse Source

KabylakeSiliconPkg: Support DynamicExPCD from FSP.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1864

FSP Dispatch mode can consume DynamicEx PCD from
boot loader so it must include those PCD in PCD database
for FSP to consume.
PeiPostMemSiliconPolicyInitLib.inf (this is for FSP
Dispatch mode) has all PCDs included to ensure they can
be built into PCD database.

Also cleaned up unused PciExpress related
PCD from INFs.

Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Chasel, Chiu 5 years ago
parent
commit
112e9671bc

+ 1 - 6
Silicon/Intel/KabylakeSiliconPkg/Cpu/Library/PeiDxeSmmCpuPlatformLib/PeiDxeSmmCpuPlatformLib.inf

@@ -1,7 +1,7 @@
 ## @file
 # Component description file for CPU Platform Lib
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -34,11 +34,6 @@ MdePkg/MdePkg.dec
 UefiCpuPkg/UefiCpuPkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
-
-[Pcd]
-gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
-
-
 [Sources]
 CpuPlatformLibrary.h
 CpuPlatformLibrary.c

+ 5 - 1
Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc

@@ -47,7 +47,11 @@ gSiPkgTokenSpaceGuid.PcdSiCatalogDebugEnable         |FALSE
 
 [PcdsFixedAtBuild.common]
 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress    |0xE0000000
-gSiPkgTokenSpaceGuid.PcdPciExpressRegionLength       |0x10000000
+gSiPkgTokenSpaceGuid.PcdSiPciExpressRegionLength     |0x10000000
+#
+# This DSC mainly for GreenH Silicon code build so PciExpressBaseAddress can be FixedAtBuild
+#
+gSiPkgTokenSpaceGuid.PcdSiPciExpressBaseAddress|gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 
 [Defines]
   PLATFORM_NAME = KabylakeSiliconPkg

+ 6 - 2
Silicon/Intel/KabylakeSiliconPkg/Library/PeiDxeSmmMmPciLib/PeiDxeSmmMmPciLib.c

@@ -1,7 +1,7 @@
 /** @file
   This file contains routines that get PCI Express Address
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -27,5 +27,9 @@ MmPciBase (
 {
   ASSERT ((Bus <= 0xFF) && (Device <= 0x1F) && (Function <= 0x7));
 
-  return ((UINTN) PcdGet64 (PcdPciExpressBaseAddress) + (UINTN) (Bus << 20) + (UINTN) (Device << 15) + (UINTN) (Function << 12));
+#ifdef FSP_FLAG
+  return ((UINTN) PcdGet64 (PcdSiPciExpressBaseAddress) + (UINTN) (Bus << 20) + (UINTN) (Device << 15) + (UINTN) (Function << 12));
+#else
+  return ((UINTN) PcdGet64 (PcdPciExpressBaseAddress)   + (UINTN) (Bus << 20) + (UINTN) (Device << 15) + (UINTN) (Function << 12));
+#endif
 }

+ 3 - 2
Silicon/Intel/KabylakeSiliconPkg/Library/PeiDxeSmmMmPciLib/PeiDxeSmmMmPciLib.inf

@@ -1,7 +1,7 @@
 ## @file
 # Component description file for the PeiDxeSmmMmPciLib
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -31,11 +31,12 @@ DebugLib
 
 [Packages]
 MdePkg/MdePkg.dec
+KabylakeSiliconPkg/SiPkg.dec
 
 
 [Pcd]
+gSiPkgTokenSpaceGuid.PcdSiPciExpressBaseAddress
 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 
-
 [Sources]
 PeiDxeSmmMmPciLib.c

+ 1 - 2
Silicon/Intel/KabylakeSiliconPkg/Library/SiliconInitLib/SiliconInitLib.inf

@@ -1,6 +1,6 @@
 ### @file
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -44,7 +44,6 @@
   SiliconInitPreMem.c
 
 [Pcd]
-  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress            ## CONSUMES
   gSiPkgTokenSpaceGuid.PcdAcpiBaseAddress                      ## CONSUMES
   gSiPkgTokenSpaceGuid.PcdTcoBaseAddress                       ## CONSUMES
 

+ 6 - 2
Silicon/Intel/KabylakeSiliconPkg/SiPkg.dec

@@ -575,8 +575,12 @@ gSiPkgTokenSpaceGuid.PcdSerialIoUartInputClock  |1843200|UINT32|0x00100003
 ## PCI Express MMIO region length
 ## Valid settings: 0x10000000/256MB, 0x8000000/128MB, 0x4000000/64MB
 ##
-gSiPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x10000000|UINT32|0x0010004
-
+gSiPkgTokenSpaceGuid.PcdSiPciExpressRegionLength|0x10000000|UINT32|0x0010004
+##
+## Typically this should be the same with gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress.
+## This PCD is added for supporting different PCD type in different phases.
+##
+gSiPkgTokenSpaceGuid.PcdSiPciExpressBaseAddress |0xE0000000|UINT64|0x0010008
 
 [PcdsFeatureFlag]
 ##

+ 1 - 6
Silicon/Intel/KabylakeSiliconPkg/SystemAgent/Library/PeiDxeSmmSaPlatformLib/PeiDxeSmmSaPlatformLib.inf

@@ -1,7 +1,7 @@
 ## @file
 # Component description file for SA Platform Lib
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,11 +28,6 @@ IoLib
 MdePkg/MdePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
-
-[Pcd]
-gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
-
-
 [Sources]
 SaPlatformLibrary.h
 SaPlatformLibrary.c

+ 1 - 2
Silicon/Intel/KabylakeSiliconPkg/SystemAgent/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf

@@ -1,7 +1,7 @@
 ## @file
 # Component description file for the PeiSaPolicy library.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -35,7 +35,6 @@ UefiCpuPkg/UefiCpuPkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 [Pcd]
-gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 gSiPkgTokenSpaceGuid.PcdTsegSize
 gSiPkgTokenSpaceGuid.PcdMchBaseAddress
 gSiPkgTokenSpaceGuid.PcdSmbusBaseAddress

+ 1 - 2
Silicon/Intel/KabylakeSiliconPkg/SystemAgent/SaInit/Dxe/SaInitDxe.inf

@@ -1,7 +1,7 @@
 ## @file
 # Component description file for SystemAgent Initialization driver
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -53,7 +53,6 @@ KabylakeSiliconPkg/KabylakeSiliconPrivate.dec
 
 
 [Pcd]
-gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 gSiPkgTokenSpaceGuid.PcdAcpiDefaultOemId
 gSiPkgTokenSpaceGuid.PcdMchBaseAddress