public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: devel@edk2.groups.io
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Subject: [PATCH 1/3] IntelSiliconPkg: Define PCDs for microcode location in flash
Date: Fri, 26 Mar 2021 15:36:27 +0800	[thread overview]
Message-ID: <20210326073629.1383-2-ray.ni@intel.com> (raw)
In-Reply-To: <20210326073629.1383-1-ray.ni@intel.com>

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


  reply	other threads:[~2021-03-26  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  7:36 [PATCH 0/3] Define microcode location PCDs in IntelSiliconPkg Ni, Ray
2021-03-26  7:36 ` Ni, Ray [this message]
2021-03-30  8:08   ` [PATCH 1/3] IntelSiliconPkg: Define PCDs for microcode location in flash 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

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=20210326073629.1383-2-ray.ni@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