add support for the AArch64 architecture
PATCH 1/1 add support for the AArch64 architecture
This patch wires up support for the AArch64 architecture, which has been supported in the mainline kernel (as arm64) since 3.7.
Signed-off-by Will Deacon <[email protected]>
---
If I'm hacking on Alpha, I should probably do AArch64 as well...
include/arch-aarch64.h | 13 +++ include/arch-syscalls.h | 4 +- include/arch.h | 5 + include/syscalls-aarch64.h | 284 +++++++++++++++++++++++++++++++++++++++++++++ ioctls/kvm.c | 2 +- tables.c | 3 + 6 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 include/arch-aarch64.h create mode 100644 include/syscalls-aarch64.h
include/arch-aarch64.h new file +13 -0
@@ -0,0 +1,13 @@ +#define PAGE_OFFSET 0xffffffc000000000UL +#define TASK_SIZE (1UL << 39) +#define MODULE_ADDR (PAGE_OFFSET - 0x04000000) +#define KERNEL_ADDR (PAGE_OFFSET + 0x80000) + +/* PAGE_SHIFT is 16 ifdef CONFIG_ARM64_64K_PAGES */ +#define PAGE_SHIFT 12 +#define PTE_FILE_MAX_BITS 60 + +#define PTRACE_GETREGS 0 +#define PTRACE_GETFPREGS 0 +#define PTRACE_SETREGS 0 +#define PTRACE_SETFPREGS 0
include/arch-syscalls.h +3 -1
@@ -35,5 +35,7 @@#ifdef __alpha__#include "syscalls-alpha.h" #endif - +#ifdef __aarch64__ +#include "syscalls-aarch64.h" +#endif #endif /* _ARCH_SYSCALLS_H */
include/arch.h +5 -0
@@ -36,10 +36,15 @@#ifdef __sh__#include "arch-sh.h" #endif +#ifdef __alpha__#include "arch-alpha.h" #endif +#ifdef __aarch64__ +#include "arch-aarch64.h" +#endif +#ifndef SYSCALL_OFFSET #define SYSCALL_OFFSET 0#endif
include/syscalls-aarch64.h new file +284 -0
284 lines not on this page · raw message
ioctls/kvm.c +1 -1
@@ -79,7 +79,7 @@ static const struct ioctl kvm_ioctls[] = { IOCTL(KVM_ALLOCATE_RMA), IOCTL(KVM_PPC_GET_HTAB_FD),#endif -#if defined(__arm__) +#if defined(__arm__) || defined(__aarch64__) IOCTL(KVM_ARM_SET_DEVICE_ADDR), IOCTL(KVM_ARM_VCPU_INIT),#endif
tables.c +3 -0
@@ -501,6 +501,9 @@ void select_syscall_tables(void)#elif defined(__sh__) syscalls =copy_syscall_table (syscalls_sh,ARRAY_SIZE (syscalls_sh)); max_nr_syscalls =ARRAY_SIZE (syscalls_sh); +#elif defined(__aarch64__) + syscalls =copy_syscall_table (syscalls_aarch64,ARRAY_SIZE (syscalls_aarch64)); + max_nr_syscalls =ARRAY_SIZE (syscalls_aarch64);#else #error Unknown architecture.#endif
Signature · 1 line
1.8.2.2
Quoted 7 lines · Will Deacon
This patch wires up support for the AArch64 architecture, which has been supported in the mainline kernel (as arm64) since 3.7.
Signed-off-by Will Deacon <[email protected]>---
If I'm hacking on Alpha, I should probably do AArch64 as well...
heh, looks good. thanks Will, Applied.
Dave