]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/ProcessorBind: add defines for page allocation granularity
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 3 Mar 2017 15:11:31 +0000 (15:11 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 6 Mar 2017 10:27:00 +0000 (11:27 +0100)
The UEFI spec differs between architectures in the minimum alignment
and granularity of page allocations that are visible to the OS as
EFI_MEMORY_RUNTIME regions.

So define macros that carry these values to the respective ProcessorBind.h
header files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/AArch64/ProcessorBind.h
MdePkg/Include/Arm/ProcessorBind.h
MdePkg/Include/Ebc/ProcessorBind.h
MdePkg/Include/Ia32/ProcessorBind.h
MdePkg/Include/Ipf/ProcessorBind.h
MdePkg/Include/X64/ProcessorBind.h

index f100d96be079d0f4c9c2e0b1c289be3840b3e26d..775e7498c5c9d855a9680f7fc88be248622feaa4 100644 (file)
@@ -104,6 +104,12 @@ typedef INT64   INTN;
 ///\r
 #define CPU_STACK_ALIGNMENT  16\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT  16\r
 \r
+///\r
+/// Page allocation granularity for AARCH64\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x10000)\r
+\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
index a543687e57fdcf057f314cfda74c4dde56ad7e3b..dde1fd1152bab6dba64cb3fea1023903441a177c 100644 (file)
@@ -110,6 +110,12 @@ typedef INT32   INTN;
 ///\r
 #define CPU_STACK_ALIGNMENT  sizeof(UINT64)\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT  sizeof(UINT64)\r
 \r
+///\r
+/// Page allocation granularity for ARM\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
index 075f768c7691b4dd3bc5c227138b7326132f9ddd..da8b1a6d802a995420fd833e8cb69c1f0c1af59b 100644 (file)
@@ -114,6 +114,12 @@ typedef unsigned long         UINTN;
 ///\r
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)\r
 \r
+///\r
+/// Page allocation granularity for EBC\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+\r
 ///\r
 /// Modifier to ensure that all protocol member functions and EFI intrinsics\r
 /// use the correct C calling convention. All protocol member functions and\r
 ///\r
 /// Modifier to ensure that all protocol member functions and EFI intrinsics\r
 /// use the correct C calling convention. All protocol member functions and\r
index 086b1ff7b1b3e594453c8add5b50be2e3a95e055..8ba2348261a2c812275b4f4736f0997a9b050ff9 100644 (file)
@@ -257,6 +257,12 @@ typedef INT32   INTN;
 ///\r
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)\r
 \r
+///\r
+/// Page allocation granularity for IA-32.\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
index c19e47d8f3ca9d566f3c4fc63e99554e97ac6a50..51885ca6135941c5e3d45183ed9126fe772ff840 100644 (file)
@@ -248,6 +248,12 @@ typedef INT64   INTN;
 ///\r
 #define CPU_STACK_ALIGNMENT   16\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT   16\r
 \r
+///\r
+/// Page allocation granularity for Itanium\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x2000)\r
+\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
index 23e6e55abff67cd02df8f9e92db456ea04c16006..72cc85151cba066f1c552772a25cd45bb420e33d 100644 (file)
@@ -271,6 +271,12 @@ typedef INT64   INTN;
 ///\r
 #define CPU_STACK_ALIGNMENT   16\r
 \r
 ///\r
 #define CPU_STACK_ALIGNMENT   16\r
 \r
+///\r
+/// Page allocation granularity for x64\r
+///\r
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)\r
+\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r