From 5c880e378f2766b24d09c05db73dc3a74cfb3c65 Mon Sep 17 00:00:00 2001 From: caiwei Date: Fri, 10 May 2024 14:50:41 +0800 Subject: [PATCH] Add LoongArch Kernel5.10 UAPI Signed-off-by: caiwei --- .../usr/include/asm-loongarch/asm/auxvec.h | 23 +++ .../include/asm-loongarch/asm/bitsperlong.h | 23 +++ .../asm-loongarch/asm/bpf_perf_event.h | 19 ++ .../usr/include/asm-loongarch/asm/break.h | 35 ++++ .../usr/include/asm-loongarch/asm/byteorder.h | 22 +++ .../usr/include/asm-loongarch/asm/errno.h | 19 ++ .../usr/include/asm-loongarch/asm/fcntl.h | 19 ++ .../usr/include/asm-loongarch/asm/hwcap.h | 34 ++++ .../usr/include/asm-loongarch/asm/ioctl.h | 19 ++ .../usr/include/asm-loongarch/asm/ioctls.h | 19 ++ .../usr/include/asm-loongarch/asm/ipcbuf.h | 19 ++ .../usr/include/asm-loongarch/asm/kvm.h | 181 ++++++++++++++++++ .../usr/include/asm-loongarch/asm/kvm_para.h | 23 +++ .../usr/include/asm-loongarch/asm/mman.h | 19 ++ .../usr/include/asm-loongarch/asm/msgbuf.h | 19 ++ .../usr/include/asm-loongarch/asm/param.h | 19 ++ .../usr/include/asm-loongarch/asm/perf_regs.h | 56 ++++++ .../usr/include/asm-loongarch/asm/poll.h | 19 ++ .../include/asm-loongarch/asm/posix_types.h | 19 ++ .../usr/include/asm-loongarch/asm/ptrace.h | 50 +++++ .../usr/include/asm-loongarch/asm/reg.h | 62 ++++++ .../usr/include/asm-loongarch/asm/resource.h | 19 ++ .../usr/include/asm-loongarch/asm/sembuf.h | 19 ++ .../usr/include/asm-loongarch/asm/setup.h | 19 ++ .../usr/include/asm-loongarch/asm/shmbuf.h | 19 ++ .../include/asm-loongarch/asm/sigcontext.h | 59 ++++++ .../usr/include/asm-loongarch/asm/siginfo.h | 19 ++ .../usr/include/asm-loongarch/asm/signal.h | 24 +++ .../usr/include/asm-loongarch/asm/socket.h | 19 ++ .../usr/include/asm-loongarch/asm/sockios.h | 19 ++ .../usr/include/asm-loongarch/asm/stat.h | 19 ++ .../usr/include/asm-loongarch/asm/statfs.h | 19 ++ .../usr/include/asm-loongarch/asm/swab.h | 19 ++ .../usr/include/asm-loongarch/asm/termbits.h | 19 ++ .../usr/include/asm-loongarch/asm/termios.h | 19 ++ .../usr/include/asm-loongarch/asm/types.h | 19 ++ .../usr/include/asm-loongarch/asm/ucontext.h | 29 +++ .../usr/include/asm-loongarch/asm/unistd.h | 21 ++ 38 files changed, 1098 insertions(+) create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/auxvec.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bitsperlong.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bpf_perf_event.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/break.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/byteorder.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/errno.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/fcntl.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/hwcap.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctl.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctls.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ipcbuf.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm_para.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/mman.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/msgbuf.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/param.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/perf_regs.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/poll.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/posix_types.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ptrace.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/reg.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/resource.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sembuf.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/setup.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/shmbuf.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sigcontext.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/siginfo.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/signal.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/socket.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sockios.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/stat.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/statfs.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/swab.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termbits.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termios.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/types.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ucontext.h create mode 100644 linux-5.10/prebuilts/usr/include/asm-loongarch/asm/unistd.h diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/auxvec.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/auxvec.h new file mode 100644 index 0000000..74fca55 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/auxvec.h @@ -0,0 +1,23 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __ASM_AUXVEC_H +#define __ASM_AUXVEC_H +#define AT_SYSINFO_EHDR 33 +#define AT_VECTOR_SIZE_ARCH 1 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bitsperlong.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bitsperlong.h new file mode 100644 index 0000000..f68cd89 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bitsperlong.h @@ -0,0 +1,23 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __ASM_LOONGARCH_BITSPERLONG_H +#define __ASM_LOONGARCH_BITSPERLONG_H +#define __BITS_PER_LONG (__SIZEOF_LONG__ * 8) +#include +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bpf_perf_event.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bpf_perf_event.h new file mode 100644 index 0000000..fa7bc48 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/bpf_perf_event.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/break.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/break.h new file mode 100644 index 0000000..74860d3 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/break.h @@ -0,0 +1,35 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __UAPI_ASM_BREAK_H +#define __UAPI_ASM_BREAK_H +#define BRK_DEFAULT 0 +#define BRK_BUG 1 +#define BRK_KDB 2 +#define BRK_MATHEMU 3 +#define BRK_USERBP 4 +#define BRK_SSTEPBP 5 +#define BRK_OVERFLOW 6 +#define BRK_DIVZERO 7 +#define BRK_RANGE 8 +#define BRK_MULOVFL 9 +#define BRK_KPROBE_BP 10 +#define BRK_KPROBE_SSTEPBP 11 +#define BRK_UPROBE_BP 12 +#define BRK_UPROBE_XOLBP 13 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/byteorder.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/byteorder.h new file mode 100644 index 0000000..fbca513 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/byteorder.h @@ -0,0 +1,22 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_BYTEORDER_H +#define _ASM_BYTEORDER_H +#include +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/errno.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/errno.h new file mode 100644 index 0000000..392cd94 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/errno.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/fcntl.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/fcntl.h new file mode 100644 index 0000000..518d3a7 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/fcntl.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/hwcap.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/hwcap.h new file mode 100644 index 0000000..81f6931 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/hwcap.h @@ -0,0 +1,34 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_HWCAP_H +#define _ASM_HWCAP_H +#define HWCAP_LOONGARCH_CPUCFG (1 << 0) +#define HWCAP_LOONGARCH_LAM (1 << 1) +#define HWCAP_LOONGARCH_UAL (1 << 2) +#define HWCAP_LOONGARCH_FPU (1 << 3) +#define HWCAP_LOONGARCH_LSX (1 << 4) +#define HWCAP_LOONGARCH_LASX (1 << 5) +#define HWCAP_LOONGARCH_CRC32 (1 << 6) +#define HWCAP_LOONGARCH_COMPLEX (1 << 7) +#define HWCAP_LOONGARCH_CRYPTO (1 << 8) +#define HWCAP_LOONGARCH_LVZ (1 << 9) +#define HWCAP_LOONGARCH_LBT_X86 (1 << 10) +#define HWCAP_LOONGARCH_LBT_ARM (1 << 11) +#define HWCAP_LOONGARCH_LBT_MIPS (1 << 12) +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctl.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctl.h new file mode 100644 index 0000000..7b7bd37 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctl.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctls.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctls.h new file mode 100644 index 0000000..0c66935 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ioctls.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ipcbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ipcbuf.h new file mode 100644 index 0000000..0021f14 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ipcbuf.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm.h new file mode 100644 index 0000000..3f67b69 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm.h @@ -0,0 +1,181 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __LINUX_KVM_LOONGARCH_H +#define __LINUX_KVM_LOONGARCH_H +#include +#include +#define __KVM_HAVE_GUEST_DEBUG +#define KVM_GUESTDBG_USE_SW_BP 0x00010000 +#define KVM_GUESTDBG_USE_HW_BP 0x00020000 +#define KVM_DATA_HW_BREAKPOINT_NUM 8 +#define KVM_INST_HW_BREAKPOINT_NUM 8 +#define __KVM_HAVE_READONLY_MEM +#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 +struct kvm_regs { + __u64 gpr[32]; + __u64 pc; +}; +struct kvm_cpucfg { + __u32 cpucfg[64]; +}; +struct kvm_fpu { + __u32 fcsr; + __u32 none; + __u64 fcc; + struct kvm_fpureg { + __u64 val64[4]; + } fpr[32]; +}; +#define KVM_REG_LOONGARCH_GP (KVM_REG_LOONGARCH | 0x00000ULL) +#define KVM_REG_LOONGARCH_CSR (KVM_REG_LOONGARCH | 0x10000ULL) +#define KVM_REG_LOONGARCH_KVM (KVM_REG_LOONGARCH | 0x20000ULL) +#define KVM_REG_LOONGARCH_FPU (KVM_REG_LOONGARCH | 0x30000ULL) +#define KVM_REG_LOONGARCH_MASK (KVM_REG_LOONGARCH | 0x30000ULL) +#define KVM_CSR_IDX_MASK (0x10000 - 1) +#define KVM_REG_LOONGARCH_COUNTER (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 3) +#define KVM_REG_LOONGARCH_VCPU_RESET (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 4) +#define __KVM_HAVE_IRQ_LINE +struct kvm_debug_exit_arch { + __u64 era; + __u32 fwps; + __u32 mwps; + __u32 exception; +}; +struct hw_breakpoint { + __u64 addr; + __u64 mask; + __u32 asid; + __u32 ctrl; +}; +struct kvm_guest_debug_arch { + struct hw_breakpoint data_breakpoint[KVM_DATA_HW_BREAKPOINT_NUM]; + struct hw_breakpoint inst_breakpoint[KVM_INST_HW_BREAKPOINT_NUM]; + int inst_bp_nums, data_bp_nums; +}; +struct kvm_sync_regs { +}; +struct kvm_sregs { +}; +struct kvm_iocsr_entry { + __u32 addr; + __u32 pad; + __u64 data; +}; +struct kvm_csr_entry { + __u32 index; + __u32 reserved; + __u64 data; +}; +struct kvm_msrs { + __u32 ncsrs; + __u32 pad; + struct kvm_csr_entry entries[0]; +}; +struct kvm_loongarch_interrupt { + __u32 cpu; + __u32 irq; +}; +#define KVM_IRQCHIP_LS7A_IOAPIC 0x0 +#define KVM_IRQCHIP_LS3A_GIPI 0x1 +#define KVM_IRQCHIP_LS3A_HT_IRQ 0x2 +#define KVM_IRQCHIP_LS3A_ROUTE 0x3 +#define KVM_IRQCHIP_LS3A_EXTIRQ 0x4 +#define KVM_IRQCHIP_LS3A_IPMASK 0x5 +#define KVM_NR_IRQCHIPS 1 +#define KVM_IRQCHIP_NUM_PINS 64 +#define KVM_MAX_CORES 256 +#define KVM_EXTIOI_IRQS (256) +#define KVM_EXTIOI_IRQS_BITMAP_SIZE (KVM_EXTIOI_IRQS / 8) +#define KVM_EXTIOI_IRQS_IPMAP_SIZE (KVM_EXTIOI_IRQS / 32) +#define KVM_EXTIOI_IRQS_PER_GROUP 32 +#define KVM_EXTIOI_IRQS_COREMAP_SIZE (KVM_EXTIOI_IRQS) +#define KVM_EXTIOI_IRQS_NODETYPE_SIZE 16 +struct ls7a_ioapic_state { + __u64 int_id; + __u64 int_mask; + __u64 htmsi_en; + __u64 intedge; + __u64 intclr; + __u64 auto_crtl0; + __u64 auto_crtl1; + __u8 route_entry[64]; + __u8 htmsi_vector[64]; + __u64 intisr_chip0; + __u64 intisr_chip1; + __u64 last_intirr; + __u64 intirr; + __u64 intisr; + __u64 int_polarity; +}; +struct loongarch_gipi_single { + __u32 status; + __u32 en; + __u32 set; + __u32 clear; + __u64 buf[4]; +}; +struct loongarch_gipiState { + struct loongarch_gipi_single core[KVM_MAX_CORES]; +}; +struct kvm_loongarch_ls3a_extirq_state { + union ext_en_r { + uint64_t reg_u64[KVM_EXTIOI_IRQS_BITMAP_SIZE / 8]; + uint32_t reg_u32[KVM_EXTIOI_IRQS_BITMAP_SIZE / 4]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_BITMAP_SIZE]; + } ext_en_r; + union bounce_r { + uint64_t reg_u64[KVM_EXTIOI_IRQS_BITMAP_SIZE / 8]; + uint32_t reg_u32[KVM_EXTIOI_IRQS_BITMAP_SIZE / 4]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_BITMAP_SIZE]; + } bounce_r; + union ext_isr_r { + uint64_t reg_u64[KVM_EXTIOI_IRQS_BITMAP_SIZE / 8]; + uint32_t reg_u32[KVM_EXTIOI_IRQS_BITMAP_SIZE / 4]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_BITMAP_SIZE]; + } ext_isr_r; + union ext_core_isr_r { + uint64_t reg_u64[KVM_MAX_CORES][KVM_EXTIOI_IRQS_BITMAP_SIZE / 8]; + uint32_t reg_u32[KVM_MAX_CORES][KVM_EXTIOI_IRQS_BITMAP_SIZE / 4]; + uint8_t reg_u8[KVM_MAX_CORES][KVM_EXTIOI_IRQS_BITMAP_SIZE]; + } ext_core_isr_r; + union ip_map_r { + uint64_t reg_u64; + uint32_t reg_u32[KVM_EXTIOI_IRQS_IPMAP_SIZE / 4]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_IPMAP_SIZE]; + } ip_map_r; + union core_map_r { + uint64_t reg_u64[KVM_EXTIOI_IRQS_COREMAP_SIZE / 8]; + uint32_t reg_u32[KVM_EXTIOI_IRQS_COREMAP_SIZE / 4]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_COREMAP_SIZE]; + } core_map_r; + union node_type_r { + uint64_t reg_u64[KVM_EXTIOI_IRQS_NODETYPE_SIZE / 4]; + uint32_t reg_u32[KVM_EXTIOI_IRQS_NODETYPE_SIZE / 2]; + uint16_t reg_u16[KVM_EXTIOI_IRQS_NODETYPE_SIZE]; + uint8_t reg_u8[KVM_EXTIOI_IRQS_NODETYPE_SIZE * 2]; + } node_type_r; +}; +struct loongarch_kvm_irqchip { + __u16 chip_id; + __u16 len; + __u16 vcpu_id; + __u16 reserved; + char data[0]; +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm_para.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm_para.h new file mode 100644 index 0000000..1eaaeb7 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/kvm_para.h @@ -0,0 +1,23 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_LOONGARCH_KVM_PARA_H +#define _ASM_LOONGARCH_KVM_PARA_H +#define KVM_LARCH_VCPU_PVTIME_CTRL 2 +#define KVM_LARCH_VCPU_PVTIME_IPA 0 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/mman.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/mman.h new file mode 100644 index 0000000..6c23fb6 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/mman.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/msgbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/msgbuf.h new file mode 100644 index 0000000..7809e3c --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/msgbuf.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/param.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/param.h new file mode 100644 index 0000000..5ccf935 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/param.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/perf_regs.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/perf_regs.h new file mode 100644 index 0000000..3b6bbf0 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/perf_regs.h @@ -0,0 +1,56 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_LOONGARCH_PERF_REGS_H +#define _ASM_LOONGARCH_PERF_REGS_H +enum perf_event_loongarch_regs { + PERF_REG_LOONGARCH_PC, + PERF_REG_LOONGARCH_R1, + PERF_REG_LOONGARCH_R2, + PERF_REG_LOONGARCH_R3, + PERF_REG_LOONGARCH_R4, + PERF_REG_LOONGARCH_R5, + PERF_REG_LOONGARCH_R6, + PERF_REG_LOONGARCH_R7, + PERF_REG_LOONGARCH_R8, + PERF_REG_LOONGARCH_R9, + PERF_REG_LOONGARCH_R10, + PERF_REG_LOONGARCH_R11, + PERF_REG_LOONGARCH_R12, + PERF_REG_LOONGARCH_R13, + PERF_REG_LOONGARCH_R14, + PERF_REG_LOONGARCH_R15, + PERF_REG_LOONGARCH_R16, + PERF_REG_LOONGARCH_R17, + PERF_REG_LOONGARCH_R18, + PERF_REG_LOONGARCH_R19, + PERF_REG_LOONGARCH_R20, + PERF_REG_LOONGARCH_R21, + PERF_REG_LOONGARCH_R22, + PERF_REG_LOONGARCH_R23, + PERF_REG_LOONGARCH_R24, + PERF_REG_LOONGARCH_R25, + PERF_REG_LOONGARCH_R26, + PERF_REG_LOONGARCH_R27, + PERF_REG_LOONGARCH_R28, + PERF_REG_LOONGARCH_R29, + PERF_REG_LOONGARCH_R30, + PERF_REG_LOONGARCH_R31, + PERF_REG_LOONGARCH_MAX, +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/poll.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/poll.h new file mode 100644 index 0000000..d7e8adc --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/poll.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/posix_types.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/posix_types.h new file mode 100644 index 0000000..1b89253 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/posix_types.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ptrace.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ptrace.h new file mode 100644 index 0000000..5f8fe91 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ptrace.h @@ -0,0 +1,50 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_PTRACE_H +#define _ASM_PTRACE_H +#include +#include +#define GPR_BASE 0 +#define GPR_NUM 32 +#define GPR_END (GPR_BASE + GPR_NUM - 1) +#define ARG0 (GPR_END + 1) +#define PC (GPR_END + 2) +#define BADVADDR (GPR_END + 3) +#define NUM_FPU_REGS 32 +struct user_pt_regs { + unsigned long regs[32]; + unsigned long orig_a0; + unsigned long csr_era; + unsigned long csr_badv; + unsigned long reserved[10]; +} __attribute__((aligned(8))); +struct user_fp_state { + uint64_t fpr[32]; + uint64_t fcc; + uint32_t fcsr; +}; +struct user_lsx_state { + uint64_t vregs[32 * 2]; +}; +struct user_lasx_state { + uint64_t vregs[32 * 4]; +}; +#define PTRACE_SYSEMU 0x1f +#define PTRACE_SYSEMU_SINGLESTEP 0x20 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/reg.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/reg.h new file mode 100644 index 0000000..7238971 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/reg.h @@ -0,0 +1,62 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __UAPI_ASM_LOONGARCH_REG_H +#define __UAPI_ASM_LOONGARCH_REG_H +#define LOONGARCH_EF_R0 0 +#define LOONGARCH_EF_R1 1 +#define LOONGARCH_EF_R2 2 +#define LOONGARCH_EF_R3 3 +#define LOONGARCH_EF_R4 4 +#define LOONGARCH_EF_R5 5 +#define LOONGARCH_EF_R6 6 +#define LOONGARCH_EF_R7 7 +#define LOONGARCH_EF_R8 8 +#define LOONGARCH_EF_R9 9 +#define LOONGARCH_EF_R10 10 +#define LOONGARCH_EF_R11 11 +#define LOONGARCH_EF_R12 12 +#define LOONGARCH_EF_R13 13 +#define LOONGARCH_EF_R14 14 +#define LOONGARCH_EF_R15 15 +#define LOONGARCH_EF_R16 16 +#define LOONGARCH_EF_R17 17 +#define LOONGARCH_EF_R18 18 +#define LOONGARCH_EF_R19 19 +#define LOONGARCH_EF_R20 20 +#define LOONGARCH_EF_R21 21 +#define LOONGARCH_EF_R22 22 +#define LOONGARCH_EF_R23 23 +#define LOONGARCH_EF_R24 24 +#define LOONGARCH_EF_R25 25 +#define LOONGARCH_EF_R26 26 +#define LOONGARCH_EF_R27 27 +#define LOONGARCH_EF_R28 28 +#define LOONGARCH_EF_R29 29 +#define LOONGARCH_EF_R30 30 +#define LOONGARCH_EF_R31 31 +#define LOONGARCH_EF_ORIG_A0 32 +#define LOONGARCH_EF_CSR_ERA 33 +#define LOONGARCH_EF_CSR_BADV 34 +#define LOONGARCH_EF_CSR_CRMD 35 +#define LOONGARCH_EF_CSR_PRMD 36 +#define LOONGARCH_EF_CSR_EUEN 37 +#define LOONGARCH_EF_CSR_ECFG 38 +#define LOONGARCH_EF_CSR_ESTAT 39 +#define LOONGARCH_EF_SIZE 320 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/resource.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/resource.h new file mode 100644 index 0000000..371adb5 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/resource.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sembuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sembuf.h new file mode 100644 index 0000000..6ce6549 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sembuf.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/setup.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/setup.h new file mode 100644 index 0000000..940c4db --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/setup.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/shmbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/shmbuf.h new file mode 100644 index 0000000..fe8b1be --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/shmbuf.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sigcontext.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sigcontext.h new file mode 100644 index 0000000..18efcb3 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sigcontext.h @@ -0,0 +1,59 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_SIGCONTEXT_H +#define _ASM_SIGCONTEXT_H +#include +#include +#define SC_USED_FP (1 << 0) +#define SC_ADDRERR_RD (1 << 30) +#define SC_ADDRERR_WR (1 << 31) +struct sigcontext { + __u64 sc_pc; + __u64 sc_regs[32]; + __u32 sc_flags; + __u64 sc_extcontext[0] __attribute__((__aligned__(16))); +}; +#define CONTEXT_INFO_ALIGN 16 +struct sctx_info { + __u32 magic; + __u32 size; + __u64 padding; +}; +#define FPU_CTX_MAGIC 0x46505501 +#define FPU_CTX_ALIGN 8 +struct fpu_context { + __u64 regs[32]; + __u64 fcc; + __u32 fcsr; +}; +#define LSX_CTX_MAGIC 0x53580001 +#define LSX_CTX_ALIGN 16 +struct lsx_context { + __u64 regs[2 * 32]; + __u64 fcc; + __u32 fcsr; +}; +#define LASX_CTX_MAGIC 0x41535801 +#define LASX_CTX_ALIGN 32 +struct lasx_context { + __u64 regs[4 * 32]; + __u64 fcc; + __u32 fcsr; +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/siginfo.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/siginfo.h new file mode 100644 index 0000000..a31ebb2 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/siginfo.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/signal.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/signal.h new file mode 100644 index 0000000..3a8f121 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/signal.h @@ -0,0 +1,24 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _ASM_SIGNAL_H +#define _ASM_SIGNAL_H +#define MINSIGSTKSZ 4096 +#define SIGSTKSZ 16384 +#include +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/socket.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/socket.h new file mode 100644 index 0000000..50a9874 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/socket.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sockios.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sockios.h new file mode 100644 index 0000000..710db92 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/sockios.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/stat.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/stat.h new file mode 100644 index 0000000..af7ebfc --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/stat.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/statfs.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/statfs.h new file mode 100644 index 0000000..93de275 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/statfs.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/swab.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/swab.h new file mode 100644 index 0000000..0049f53 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/swab.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termbits.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termbits.h new file mode 100644 index 0000000..42af6fe --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termbits.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termios.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termios.h new file mode 100644 index 0000000..feca4c6 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/termios.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/types.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/types.h new file mode 100644 index 0000000..8250f43 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/types.h @@ -0,0 +1,19 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#include diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ucontext.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ucontext.h new file mode 100644 index 0000000..6b3345b --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/ucontext.h @@ -0,0 +1,29 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __LOONGARCH_UAPI_ASM_UCONTEXT_H +#define __LOONGARCH_UAPI_ASM_UCONTEXT_H +struct ucontext { + unsigned long uc_flags; + struct ucontext * uc_link; + stack_t uc_stack; + sigset_t uc_sigmask; + __u8 __linux_unused[1024 / 8 - sizeof(sigset_t)]; + struct sigcontext uc_mcontext; +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/unistd.h b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/unistd.h new file mode 100644 index 0000000..9ff4d08 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch/asm/unistd.h @@ -0,0 +1,21 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_CLONE3 +#include -- Gitee