@@ -104,6 +104,12 @@ typedef INT64 INTN;
///
#define CPU_STACK_ALIGNMENT 16
+///
+/// Page allocation granularity for AARCH64
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and
@@ -110,6 +110,12 @@ typedef INT32 INTN;
///
#define CPU_STACK_ALIGNMENT sizeof(UINT64)
+///
+/// Page allocation granularity for ARM
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and
@@ -115,6 +115,12 @@ typedef unsigned long UINTN;
#define CPU_STACK_ALIGNMENT sizeof(UINTN)
///
+/// Page allocation granularity for EBC
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
+
+///
/// Modifier to ensure that all protocol member functions and EFI intrinsics
/// use the correct C calling convention. All protocol member functions and
/// EFI intrinsics are required to modify their member functions with EFIAPI.
@@ -257,6 +257,12 @@ typedef INT32 INTN;
///
#define CPU_STACK_ALIGNMENT sizeof(UINTN)
+///
+/// Page allocation granularity for IA-32.
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and
@@ -248,6 +248,12 @@ typedef INT64 INTN;
///
#define CPU_STACK_ALIGNMENT 16
+///
+/// Page allocation granularity for Itanium
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x2000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and
@@ -271,6 +271,12 @@ typedef INT64 INTN;
///
#define CPU_STACK_ALIGNMENT 16
+///
+/// Page allocation granularity for x64
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and
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> --- MdePkg/Include/AArch64/ProcessorBind.h | 6 ++++++ MdePkg/Include/Arm/ProcessorBind.h | 6 ++++++ MdePkg/Include/Ebc/ProcessorBind.h | 6 ++++++ MdePkg/Include/Ia32/ProcessorBind.h | 6 ++++++ MdePkg/Include/Ipf/ProcessorBind.h | 6 ++++++ MdePkg/Include/X64/ProcessorBind.h | 6 ++++++ 6 files changed, 36 insertions(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel