]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: make PcdSetNxForStack dynamic
authorLaszlo Ersek <lersek@redhat.com>
Tue, 15 Sep 2015 08:35:03 +0000 (08:35 +0000)
committerlersek <lersek@Edk2>
Tue, 15 Sep 2015 08:35:03 +0000 (08:35 +0000)
Plus, because PcdSetNxForStack is used by the DXE IPL PEIM (in the
HandOffToDxeCore() function, and in the CreateIdentityMappingPageTables()
function called by the former), we must change the PcdLib class resolution
for that module, from the default BasePcdLibNull to PeiPcdLib.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18469 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc

index 685e72a570506ddbcaa65b39e3e068b7220b28ad..0b873f62b6c162a55ab9dbf57c974fc302df3011 100644 (file)
 !endif\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+  # Noexec settings for DXE.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
+\r
 ################################################################################\r
 #\r
 # Components Section - list of all EDK II Modules needed by this Platform.\r
       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
-  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
+  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
   OvmfPkg/PlatformPei/PlatformPei.inf {\r
     <LibraryClasses>\r
index 84cbb7ab4daf21bfb725d843b8fc1392d6eae943..0017b46f20384443d1ef952670151636137aa3f9 100644 (file)
 !endif\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+  # Noexec settings for DXE.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
+\r
 ################################################################################\r
 #\r
 # Components Section - list of all EDK II Modules needed by this Platform.\r
       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
-  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
+  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
   OvmfPkg/PlatformPei/PlatformPei.inf {\r
     <LibraryClasses>\r
index 1d023a7527e02b3ff3aee5945d515ab1d25d5116..5850b61b3823a91e2c5f5b4af1f260faf13a66fe 100644 (file)
 !endif\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+  # Noexec settings for DXE.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
+\r
 ################################################################################\r
 #\r
 # Components Section - list of all EDK II Modules needed by this Platform.\r
       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
-  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
+  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
   OvmfPkg/PlatformPei/PlatformPei.inf {\r
     <LibraryClasses>\r