diff --git a/bindings/cpu_aarch64.h b/bindings/cpu_aarch64.h index f1514aa8..5126a3ce 100644 --- a/bindings/cpu_aarch64.h +++ b/bindings/cpu_aarch64.h @@ -21,8 +21,8 @@ #define __CPU_AARCH64_H__ /* memory defines */ -#define PAGE_SIZE 4096 -#define PAGE_SHIFT 12 +#define PAGE_SHIFT 14 +#define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK ~(0xfff) #ifndef _BITUL diff --git a/bindings/cpu_ppc64.h b/bindings/cpu_ppc64.h index 9b323db6..1f3d8e37 100644 --- a/bindings/cpu_ppc64.h +++ b/bindings/cpu_ppc64.h @@ -21,8 +21,8 @@ #define __CPU_PPC64_H__ /* memory defines */ -#define PAGE_SIZE (64 * 1024) #define PAGE_SHIFT 16 +#define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK ~(0xffff) #define CR0_SO (0x80000000 >> 3) /* summary overflow; diff --git a/bindings/cpu_x86_64.h b/bindings/cpu_x86_64.h index ceb51897..d4a58abe 100644 --- a/bindings/cpu_x86_64.h +++ b/bindings/cpu_x86_64.h @@ -72,8 +72,8 @@ #define X86_EFER_NXE_BIT 11 /* No-execute enable */ #define X86_EFER_NXE _BITUL(X86_EFER_NXE_BIT) -#define PAGE_SIZE 4096 #define PAGE_SHIFT 12 +#define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK ~(0xfff) /* diff --git a/configure.sh b/configure.sh index a7b09496..4fb6dda2 100755 --- a/configure.sh +++ b/configure.sh @@ -383,7 +383,7 @@ case ${TARGET_CC_MACHINE} in ;; aarch64-*) TARGET_ARCH=aarch64 - TARGET_LD_MAX_PAGE_SIZE=0x1000 + TARGET_LD_MAX_PAGE_SIZE=0x4000 CONFIG_HVT=1 CONFIG_SPT=1 ;; powerpc64le-*|ppc64le-*) diff --git a/tenders/common/elf.c b/tenders/common/elf.c index 0a93e192..c06fda16 100644 --- a/tenders/common/elf.c +++ b/tenders/common/elf.c @@ -51,13 +51,13 @@ */ #if defined(__x86_64__) #define EM_TARGET EM_X86_64 -#define EM_PAGE_SIZE 0x1000 +#define EM_PAGE_SIZE (1 << 12) #elif defined(__aarch64__) #define EM_TARGET EM_AARCH64 -#define EM_PAGE_SIZE 0x1000 +#define EM_PAGE_SIZE (1 << 14) #elif defined(__powerpc64__) #define EM_TARGET EM_PPC64 -#define EM_PAGE_SIZE 0x10000 +#define EM_PAGE_SIZE (1 << 16) #else #error Unsupported target #endif diff --git a/tenders/hvt/hvt_cpu_aarch64.h b/tenders/hvt/hvt_cpu_aarch64.h index 74cee45f..831ed2f5 100644 --- a/tenders/hvt/hvt_cpu_aarch64.h +++ b/tenders/hvt/hvt_cpu_aarch64.h @@ -88,7 +88,7 @@ (((~0UL) << (l)) & (~0UL >> (63 - (h)))) /* Definitions of Page tables */ -#define PAGE_SHIFT 12 +#define PAGE_SHIFT 14 #define PAGE_SIZE (1 << (PAGE_SHIFT)) /*