[edk2] [Patch][edk2-platforms/devel-IntelAtomProcessorE3900 3Aligned DXE/SMM drivers on 4KB to avoid runtime warnings.

Guo, Mang posted 1 patch 5 years, 7 months ago
Failed in applying to current master (apply log)
Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc | 18 +++++++++++++++++-
Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc  | 18 +++++++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
[edk2] [Patch][edk2-platforms/devel-IntelAtomProcessorE3900 3Aligned DXE/SMM drivers on 4KB to avoid runtime warnings.
Posted by Guo, Mang 5 years, 7 months ago
Cc: David Wei <david.wei@intel.com>
Cc: Mike Wu  <mike.wu@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Kelly Steele <kelly.steele@intel.com>
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc | 18 +++++++++++++++++-
 Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc  | 18 +++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
index 8e7820f..262aca7 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-#  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -163,6 +163,22 @@
 ################################################################################
 #[BuildOptions.Common]
 
+#
+# Force PE/COFF sections to be aligned at 4KB boundaries to support page level
+# protection of DXE_RUNTIME_DRIVER modules
+#
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
+  MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+
+#
+# Force PE/COFF sections to be aligned at 4KB boundaries to support page level
+# protection of DXE_SMM_DRIVER/SMM_CORE modules
+#
+[BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
+  MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+
 [BuildOptions.Common.EDKII]
    !include $(PLATFORM_NAME)/PlatformDsc/BuildOptions.EDKII.dsc
 
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
index 3797b4a..483d23c 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-#  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -165,6 +165,22 @@
 ################################################################################
 #[BuildOptions.Common]
 
+#
+# Force PE/COFF sections to be aligned at 4KB boundaries to support page level
+# protection of DXE_RUNTIME_DRIVER modules
+#
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
+  MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+
+#
+# Force PE/COFF sections to be aligned at 4KB boundaries to support page level
+# protection of DXE_SMM_DRIVER/SMM_CORE modules
+#
+[BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
+  MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+
 [BuildOptions.Common.EDKII]
    !include $(PLATFORM_NAME)/PlatformDsc/BuildOptions.EDKII.dsc
 
-- 
2.10.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel