]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/UefiCpuPkg.dec: Add two new PCDs for stack switch
authorJian J Wang <jian.j.wang@intel.com>
Thu, 7 Dec 2017 12:13:30 +0000 (20:13 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 8 Dec 2017 06:38:46 +0000 (14:38 +0800)
Stack switch is required by Stack Guard feature. Following two PCDs are
introduced to simplify the resource allocation for initializing stack switch.

  gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList
  gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize

PcdCpuStackSwitchExceptionList is used to specify which exception will
have separate stack for its handler. For Stack Guard feature, #PF must
be specified at least.

PcdCpuKnownGoodStackSize is used to specify the size of knwon good stack for an
exception handler. Cpu driver or other drivers should use this PCD to reserve
new stack memory for exceptions specified by above PCD.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com>
Reviewed-by: Jiewen.yao@intel.com
UefiCpuPkg/UefiCpuPkg.dec

index 6bac23ff52bcc89324fe22a7a8e48b46d3fc6405..f0f786495e82b25c754d04a0b198af3b3f3b85eb 100644 (file)
   # @Prompt Lock SMM Feature Control MSR.\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmFeatureControlMsrLock|TRUE|BOOLEAN|0x3213210B\r
 \r
+[PcdsFixedAtBuild]\r
+  ## List of exception vectors which need switching stack.\r
+  #  This PCD will only take into effect if PcdCpuStackGuard is enabled.\r
+  #  By default exception #DD(8), #PF(14) are supported.\r
+  # @Prompt Specify exception vectors which need switching stack.\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList|{0x08, 0x0E}|VOID*|0x30002000\r
+\r
+  ## Size of good stack for an exception.\r
+  #  This PCD will only take into effect if PcdCpuStackGuard is enabled.\r
+  # @Prompt Specify size of good stack of exception which need switching stack.\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize|2048|UINT32|0x30002001\r
+\r
 [PcdsFixedAtBuild, PcdsPatchableInModule]\r
   ## This value is the CPU Local APIC base address, which aligns the address on a 4-KByte boundary.\r
   # @Prompt Configure base address of CPU Local APIC\r