Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PoC] Change the default pagesize on aarch64 from 4k to 16k to support apple hardware #530

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings/cpu_aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bindings/cpu_ppc64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion bindings/cpu_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

/*
Expand Down
2 changes: 1 addition & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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-*)
Expand Down
6 changes: 3 additions & 3 deletions tenders/common/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tenders/hvt/hvt_cpu_aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

/*
Expand Down