* [PATCH 1/3] IntelSiliconPkg: Define PCDs for microcode location in flash
2021-03-26 7:36 [PATCH 0/3] Define microcode location PCDs in IntelSiliconPkg Ni, Ray
@ 2021-03-26 7:36 ` Ni, Ray
2021-03-30 8:08 ` Chaganty, Rangasai V
2021-03-26 7:36 ` [PATCH 2/3] MinPlatformPkg: Use the microcode PCDs defined in IntelSiliconPkg Ni, Ray
2021-03-26 7:36 ` [PATCH 3/3] MinPlatformPkg: Remove the microcode location PCDs Ni, Ray
2 siblings, 1 reply; 5+ messages in thread
From: Ni, Ray @ 2021-03-26 7:36 UTC (permalink / raw)
To: devel; +Cc: Rangasai V Chaganty
3 PCDs are defined assuming that microcode is put in the end of a FV:
PcdFlashFvMicrocodeBase: The base address of the microcode FV
PcdFlashFvMicrocodeSize: The size of the microcode FV
PcdFlashMicrocodeOffset: The microcode offset relative to the FV
base address
The 3 new PCDs are to replace the following existing PCDs in
MinPlatformPkg and IntelFsp2WrapperPkg.
The ones in MinPlatformPkg will be removed in a separate patch.
The ones in IntelFsp2WrapperPkg will be re-positioned as only using
inside IntelFsp2WrapperPkg\Library\SecFspWrapperPlatformSecLibSample.
Defining PCDs in IntelSiliconPkg is because certain close-source
silicon code depends on these PCDs but the silicon code cannot depend
on MinPlatformPkg.
MinPlatformPkg contains the below 3 PCDs:
PcdFlashFvMicrocodeBase: Same meaning as
IntelSiliconPkg.PcdFlashFvMicrocodeBase
PcdFlashFvMicrocodeSize: Same meaning as
IntelSiliconPkg.PcdFlashFvMicrocodeSize
PcdFlashFvMicrocodeOffset: The FV offset relative to the firmware
base address.
Note: MinPlatformPkg doesn't contain the PCD that tells the microcode
offset relative to the FV base address.
IntelFsp2WrapperPkg contains the below 3 PCDs:
PcdCpuMicrocodePatchAddress: Same meaning as
IntelSiliconPkg.PcdFlashFvMicrocodeBase
PcdCpuMicrocodePatchRegionSize: Same meaning as
IntelSiliconPkg.PcdFlashFvMicrocodeSize
PcdFlashMicrocodeOffset: Same meaning as
IntelSiliconPkg.PcdFlashMicrocodeOffset
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
---
Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
index 4a2cbca5..6611c3af 100644
--- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
+++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
@@ -3,7 +3,7 @@
#
# This package provides common open source Intel silicon modules.
#
-# Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
@@ -90,6 +90,13 @@
# @Prompt Error code for VTd error.
gIntelSiliconPkgTokenSpaceGuid.PcdErrorCodeVTdError|0x02008000|UINT32|0x00000005
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase|0|UINT32|0x00000007
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize|0|UINT32|0x00000008
+
+ ## This is the microcode offset relative to the FV base address.
+ # Microcode address equals to PcdFlashFvMicrocodeBase + PcdFlashMicrocodeOffset.
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeOffset|0|UINT32|0x0000000A
+
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
## This is the GUID of the FFS which contains the Graphics Video BIOS Table (VBT)
# The VBT content is stored as a RAW section which is consumed by GOP PEI/UEFI driver.
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] MinPlatformPkg: Use the microcode PCDs defined in IntelSiliconPkg
2021-03-26 7:36 [PATCH 0/3] Define microcode location PCDs in IntelSiliconPkg Ni, Ray
2021-03-26 7:36 ` [PATCH 1/3] IntelSiliconPkg: Define PCDs for microcode location in flash Ni, Ray
@ 2021-03-26 7:36 ` Ni, Ray
2021-03-26 7:36 ` [PATCH 3/3] MinPlatformPkg: Remove the microcode location PCDs Ni, Ray
2 siblings, 0 replies; 5+ messages in thread
From: Ni, Ray @ 2021-03-26 7:36 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
The microcode PCDs in MinPlatformPkg will be removed in a separate
patch.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
---
.../Flash/SpiFvbService/SpiFvbServiceSmm.inf | 7 ++++---
.../Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf | 7 ++++---
.../SecFspWrapperPlatformSecLib.inf | 9 +++++----
.../Library/SecFspWrapperPlatformSecLib/SecRamInitData.c | 6 +++---
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
index 10e51e11..0028cc99 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
@@ -1,7 +1,7 @@
### @file
# Component description file for the Serial Flash device Runtime driver.
#
-# Copyright (c) 2017-2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017-2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -38,6 +38,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ IntelSiliconPkg/IntelSiliconPkg.dec
MinPlatformPkg/MinPlatformPkg.dec
[Pcd]
@@ -45,8 +46,8 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CONSUMES
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSUMES
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
[Sources]
FvbInfo.c
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
index 9f08d367..8071c6b7 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
@@ -1,7 +1,7 @@
### @file
# Component description file for the Serial Flash device Standalone MM driver.
#
-# Copyright (c) 2017-2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017-2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -37,6 +37,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ IntelSiliconPkg/IntelSiliconPkg.dec
MinPlatformPkg/MinPlatformPkg.dec
[Pcd]
@@ -44,8 +45,8 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CONSUMES
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSUMES
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
[Sources]
FvbInfo.c
diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
index 4f3fa9fa..9fe5960b 100644
--- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
@@ -1,7 +1,7 @@
## @file
# Provide FSP wrapper platform sec related function.
#
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -62,6 +62,7 @@
UefiCpuPkg/UefiCpuPkg.dec
IntelFsp2Pkg/IntelFsp2Pkg.dec
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
+ IntelSiliconPkg/IntelSiliconPkg.dec
MinPlatformPkg/MinPlatformPkg.dec
[LibraryClasses]
@@ -88,9 +89,9 @@
gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable ## CONSUMES
[FixedPcd]
- gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress ## CONSUMES
- gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize ## CONSUMES
- gIntelFsp2WrapperTokenSpaceGuid.PcdFlashMicrocodeOffset ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
+ gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeOffset ## CONSUMES
gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheAddress ## CONSUMES
gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheSize ## CONSUMES
gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES
diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
index b356327b..b4e10cca 100644
--- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
@@ -1,7 +1,7 @@
/** @file
Provide TempRamInitParams data.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -24,8 +24,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA FsptUpdDataPtr = {
}
},
{
- ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchAddress) + FixedPcdGet32 (PcdFlashMicrocodeOffset)),
- ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32 (PcdFlashMicrocodeOffset)),
+ FixedPcdGet32 (PcdFlashFvMicrocodeBase) + FixedPcdGet32 (PcdFlashMicrocodeOffset),
+ FixedPcdGet32 (PcdFlashFvMicrocodeSize) - FixedPcdGet32 (PcdFlashMicrocodeOffset),
0, // Set CodeRegionBase as 0, so that caching will be 4GB-(CodeRegionSize > LLCSize ? LLCSize : CodeRegionSize) will be used.
FixedPcdGet32 (PcdFlashCodeCacheSize),
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] MinPlatformPkg: Remove the microcode location PCDs
2021-03-26 7:36 [PATCH 0/3] Define microcode location PCDs in IntelSiliconPkg Ni, Ray
2021-03-26 7:36 ` [PATCH 1/3] IntelSiliconPkg: Define PCDs for microcode location in flash Ni, Ray
2021-03-26 7:36 ` [PATCH 2/3] MinPlatformPkg: Use the microcode PCDs defined in IntelSiliconPkg Ni, Ray
@ 2021-03-26 7:36 ` Ni, Ray
2 siblings, 0 replies; 5+ messages in thread
From: Ni, Ray @ 2021-03-26 7:36 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
---
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 2b246cf0..72d37d88 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -6,7 +6,7 @@
# INF files to generate AutoGen.c and AutoGen.h files
# for the build infrastructure.
#
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -162,10 +162,6 @@
gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress|0xFF800000|UINT32|0x10000001
gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize|0x00800000|UINT32|0x10000002
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase|0xFFE60000|UINT32|0x30000004
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize|0x000A0000|UINT32|0x30000005
- gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeOffset|0x00660000|UINT32|0x30000006
-
gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase|0x00000000|UINT32|0x20000004
gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemorySize|0x00000000|UINT32|0x20000005
gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryOffset|0x00000000|UINT32|0x20000006
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread