new file mode 100644
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef LIBURING_ARCH_AARCH64_LIB_H
+#define LIBURING_ARCH_AARCH64_LIB_H
+
+#include <elf.h>
+#include <sys/auxv.h>
+#include "../../syscall.h"
+
+static inline long get_page_size(void)
+{
+ static const long fallback_ret = 4096;
+ static long cache_val = 0;
+ Elf64_Off buf[2];
+ long page_size;
+ int fd;
+
+ if (cache_val)
+ return cache_val;
+
+ fd = __sys_open("/proc/self/auxv", O_RDONLY, 0);
+ if (fd < 0)
+ return fallback_ret;
+
+ while (1) {
+ ssize_t x;
+
+ x = __sys_read(fd, buf, sizeof(buf));
+ if (x < sizeof(buf)) {
+ page_size = fallback_ret;
+ break;
+ }
+
+ if (buf[0] == AT_PAGESZ) {
+ page_size = buf[1];
+ cache_val = page_size;
+ break;
+ }
+ }
+
+ __sys_close(fd);
+ return page_size;
+}
+
+#endif /* #ifndef LIBURING_ARCH_AARCH64_LIB_H */