diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/auxvec.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/auxvec.h new file mode 100755 index 0000000000000000000000000000000000000000..74fca55f3621e704d8b9b9e4b8572aa7b4a2b63f --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/bitfield.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bitfield.h new file mode 100755 index 0000000000000000000000000000000000000000..5c71170f37ffe154b2008fd21a29458284e5c69b --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bitfield.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 __UAPI_ASM_BITFIELD_H +#define __UAPI_ASM_BITFIELD_H +#define __BITFIELD_FIELD(field,more) more field; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bitsperlong.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bitsperlong.h new file mode 100755 index 0000000000000000000000000000000000000000..268c8fa9bca300779afba8c6ecf91e4b507fb6a1 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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 _LOONGARCH_SZLONG +#include +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bpf_perf_event.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bpf_perf_event.h new file mode 100755 index 0000000000000000000000000000000000000000..fd697e0501f439e221c235e85195b54afe168499 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/bpf_perf_event.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_BPF_PERF_EVENT_H__ +#define __ASM_BPF_PERF_EVENT_H__ +#include +typedef struct user_pt_regs bpf_user_pt_regs_t; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/break.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/break.h new file mode 100755 index 0000000000000000000000000000000000000000..74860d3b0f7594779ac197dfa63155a1b164290d --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/byteorder.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/byteorder.h new file mode 100755 index 0000000000000000000000000000000000000000..fbca5139e500dff5d62e41ed06e6f7dfe432061b --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/errno.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/errno.h new file mode 100755 index 0000000000000000000000000000000000000000..392cd94bf82ea5408afa6dd209d39ad9c2eb3955 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/fcntl.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/fcntl.h new file mode 100755 index 0000000000000000000000000000000000000000..518d3a77586b98a0f006327fc37ca9fe53a6f81b --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/hwcap.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/hwcap.h new file mode 100755 index 0000000000000000000000000000000000000000..81f6931bec659e776410722ad82ee26510bea55a --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/inst.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/inst.h new file mode 100755 index 0000000000000000000000000000000000000000..36076bf8a91720111ab82932b03558fd2ece11ce --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/inst.h @@ -0,0 +1,539 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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_INST_H +#define _ASM_INST_H +#include +enum reg0_op { + tlbclr_op = 0x19208, + gtlbclr_op = 0x19208, + tlbflush_op = 0x19209, + gtlbflush_op = 0x19209, + tlbsrch_op = 0x1920a, + gtlbsrch_op = 0x1920a, + tlbrd_op = 0x1920b, + gtlbrd_op = 0x1920b, + tlbwr_op = 0x1920c, + gtlbwr_op = 0x1920c, + tlbfill_op = 0x1920d, + gtlbfill_op = 0x1920d, + ertn_op = 0x1920e, +}; +enum reg0i15_op { + break_op = 0x54, + dbcl_op, + syscall_op, + hypcall_op, + idle_op = 0xc91, + dbar_op = 0x70e4, + ibar_op, +}; +enum reg0i26_op { + b_op = 0x14, + bl_op, +}; +enum reg1i20_op { + lu12iw_op = 0xa, + lu32id_op, + pcaddi_op, + pcalau12i_op, + pcaddu12i_op, + pcaddu18i_op, +}; +enum reg1i21_op { + beqz_op = 0x10, + bnez_op, + bceqz_op, + bcnez_op = 0x12, + jiscr0_op = 0x12, + jiscr1_op = 0x12, +}; +enum reg2_op { + gr2scr_op = 0x2, + scr2gr_op, + clow_op, + clzw_op, + ctow_op, + ctzw_op, + clod_op, + clzd_op, + ctod_op, + ctzd_op, + revb2h_op, + revb4h_op, + revb2w_op, + revbd_op, + revh2w_op, + revhd_op, + bitrev4b_op, + bitrev8b_op, + bitrevw_op, + bitrevd_op, + extwh_op, + extwb_op, + rdtimelw_op, + rdtimehw_op, + rdtimed_op, + cpucfg_op, + iocsrrdb_op = 0x19200, + iocsrrdh_op, + iocsrrdw_op, + iocsrrdd_op, + iocsrwrb_op, + iocsrwrh_op, + iocsrwrw_op, + iocsrwrd_op, + movgr2fcsr_op = 0x4530, + movfcsr2gr_op = 0x4532, + movgr2cf_op = 0x4536, + movcf2gr_op = 0x4537, +}; +enum reg2ui3_op { + rotrib_op = 0x261, + rcrib_op = 0x281, +}; +enum reg2ui4_op { + rotrih_op = 0x131, + rcrih_op = 0x141, +}; +enum reg2ui5_op { + slliw_op = 0x81, + srliw_op = 0x89, + sraiw_op = 0x91, + rotriw_op = 0x99, + rcriw_op = 0xa1, +}; +enum reg2ui6_op { + sllid_op = 0x41, + srlid_op = 0x45, + sraid_op = 0x49, + rotrid_op = 0x4d, + rcrid_op = 0x51, +}; +enum reg2lsbw_op { + bstrinsw_op = 0x3, + bstrpickw_op = 0x3, +}; +enum reg2lsbd_op { + bstrinsd_op = 0x2, + bstrpickd_op = 0x3, +}; +enum reg2i8_op { + lddir_op = 0x190, + ldpte_op, +}; +enum reg2i8idx1_op { + vstelmd_op = 0x622, +}; +enum reg2i8idx2_op { + vstelmw_op = 0x312, + xvstelmd_op = 0x331, +}; +enum reg2i8idx3_op { + vstelmh_op = 0x18a, + xvstelmw_op = 0x199, +}; +enum reg2i8idx4_op { + vstelmb_op = 0xc6, + xvstelmh_op = 0xcd, +}; +enum reg2i8idx5_op { + xvstelmb_op = 0x67, +}; +enum reg2i9_op { + vldrepld_op = 0x602, + xvldrepld_op = 0x642, +}; +enum reg2i10_op { + vldreplw_op = 0x302, + xvldreplw_op = 0x322, +}; +enum reg2i11_op { + vldreplh_op = 0x182, + xvldreplh_op = 0x192, +}; +enum reg2i12_op { + slti_op = 0x8, + sltui_op, + addiw_op, + addid_op, + lu52id_op, + andi_op, + ori_op, + xori_op, + cacop_op = 0x18, + xvldreplb_op = 0xca, + ldb_op = 0xa0, + ldh_op, + ldw_op, + ldd_op, + stb_op, + sth_op, + stw_op, + std_op, + ldbu_op, + ldhu_op, + ldwu_op, + preld_op, + flds_op, + fsts_op, + fldd_op, + fstd_op, + vld_op, + vst_op, + xvld_op, + xvst_op, +}; +enum reg2i14_op { + llw_op = 0x20, + scw_op, + lld_op, + scd_op, + ldptrw_op, + stptrw_op, + ldptrd_op, + stptrd_op, +}; +enum reg2i16_op { + addu16id_op = 0x4, + jirl_op = 0x13, + beq_op = 0x16, + bne_op, + blt_op, + bge_op, + bltu_op, + bgeu_op, +}; +enum reg2csr_op { + csrrd_op = 0x4, + csrwr_op = 0x4, + csrxchg_op = 0x4, + gcsrrd_op = 0x5, + gcsrwr_op = 0x5, + gcsrxchg_op = 0x5, +}; +enum reg3_op { + asrtled_op = 0x2, + asrtgtd_op, + addw_op = 0x20, + addd_op, + subw_op, + subd_op, + slt_op, + sltu_op, + maskeqz_op, + masknez_op, + nor_op, + and_op, + or_op, + xor_op, + orn_op, + andn_op, + sllw_op, + srlw_op, + sraw_op, + slld_op, + srld_op, + srad_op, + rotrb_op, + rotrh_op, + rotrw_op, + rotrd_op, + mulw_op, + mulhw_op, + mulhwu_op, + muld_op, + mulhd_op, + mulhdu_op, + mulwdw_op, + mulwdwu_op, + divw_op, + modw_op, + divwu_op, + modwu_op, + divd_op, + modd_op, + divdu_op, + moddu_op, + crcwbw_op, + crcwhw_op, + crcwww_op, + crcwdw_op, + crccwbw_op, + crccwhw_op, + crccwww_op, + crccwdw_op, + addu12iw_op, + addu12id_op, + adcb_op = 0x60, + adch_op, + adcw_op, + adcd_op, + sbcb_op, + sbch_op, + sbcw_op, + sbcd_op, + rcrb_op, + rcrh_op, + rcrw_op, + rcrd_op, + ldxb_op = 0x7000, + ldxh_op = 0x7008, + ldxw_op = 0x7010, + ldxd_op = 0x7018, + stxb_op = 0x7020, + stxh_op = 0x7028, + stxw_op = 0x7030, + stxd_op = 0x7038, + ldxbu_op = 0x7040, + ldxhu_op = 0x7048, + ldxwu_op = 0x7050, + preldx_op = 0x7058, + fldxs_op = 0x7060, + fldxd_op = 0x7068, + fstxs_op = 0x7070, + fstxd_op = 0x7078, + vldx_op = 0x7080, + vstx_op = 0x7088, + xvldx_op = 0x7090, + xvstx_op = 0x7098, + amswapw_op = 0x70c0, + amswapd_op, + amaddw_op, + amaddd_op, + amandw_op, + amandd_op, + amorw_op, + amord_op, + amxorw_op, + amxord_op, + ammaxw_op, + ammaxd_op, + amminw_op, + ammind_op, + ammaxwu_op, + ammaxdu_op, + amminwu_op, + ammindu_op, + amswap_dbw_op, + amswap_dbd_op, + amadd_dbw_op, + amadd_dbd_op, + amand_dbw_op, + amand_dbd_op, + amor_dbw_op, + amor_dbd_op, + amxor_dbw_op, + amxor_dbd_op, + ammax_dbw_op, + ammax_dbd_op, + ammin_dbw_op, + ammin_dbd_op, + ammax_dbwu_op, + ammax_dbdu_op, + ammin_dbwu_op, + ammin_dbdu_op, + fldgts_op = 0x70e8, + fldgtd_op, + fldles_op, + fldled_op, + fstgts_op, + fstgtd_op, + fstles_op, + fstled_op, + ldgtb_op, + ldgth_op, + ldgtw_op, + ldgtd_op, + ldleb_op, + ldleh_op, + ldlew_op, + ldled_op, + stgtb_op, + stgth_op, + stgtw_op, + stgtd_op, + stleb_op, + stleh_op, + stlew_op, + stled_op, +}; +enum reg3sa2_op { + alslw_op = 0x2, + alslwu_op, + bytepickw_op, + alsld_op = 0x16, +}; +enum reg3sa3_op { + bytepickd_op = 0x3, +}; +struct reg2_format { + __BITFIELD_FIELD(unsigned int opcode : 22, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))) +}; +struct reg2ui3_format { + __BITFIELD_FIELD(unsigned int opcode : 19, __BITFIELD_FIELD(unsigned int simmediate : 3, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2ui4_format { + __BITFIELD_FIELD(unsigned int opcode : 18, __BITFIELD_FIELD(unsigned int simmediate : 4, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2ui5_format { + __BITFIELD_FIELD(unsigned int opcode : 17, __BITFIELD_FIELD(unsigned int simmediate : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2ui6_format { + __BITFIELD_FIELD(unsigned int opcode : 16, __BITFIELD_FIELD(unsigned int simmediate : 6, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2lsbw_format { + __BITFIELD_FIELD(unsigned int opcode : 11, __BITFIELD_FIELD(unsigned int msbw : 5, __BITFIELD_FIELD(unsigned int op : 1, __BITFIELD_FIELD(unsigned int lsbw : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))))) +}; +struct reg2lsbd_format { + __BITFIELD_FIELD(unsigned int opcode : 10, __BITFIELD_FIELD(unsigned int msbd : 6, __BITFIELD_FIELD(unsigned int lsbd : 6, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg3_format { + __BITFIELD_FIELD(unsigned int opcode : 17, __BITFIELD_FIELD(unsigned int rk : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg3sa2_format { + __BITFIELD_FIELD(unsigned int opcode : 15, __BITFIELD_FIELD(unsigned int simmediate : 2, __BITFIELD_FIELD(unsigned int rk : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg3sa3_format { + __BITFIELD_FIELD(unsigned int opcode : 14, __BITFIELD_FIELD(unsigned int simmediate : 3, __BITFIELD_FIELD(unsigned int rk : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg3sa4_format { + __BITFIELD_FIELD(unsigned int opcode : 13, __BITFIELD_FIELD(unsigned int simmediate : 4, __BITFIELD_FIELD(unsigned int rk : 5, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg4_format { + __BITFIELD_FIELD(unsigned int opcode : 12, __BITFIELD_FIELD(unsigned int fa : 5, __BITFIELD_FIELD(unsigned int fk : 5, __BITFIELD_FIELD(unsigned int fj : 5, __BITFIELD_FIELD(unsigned int fd : 5,; + ))))) +}; +struct reg2i8_format { + __BITFIELD_FIELD(unsigned int opcode : 14, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i8idx1_format { + __BITFIELD_FIELD(unsigned int opcode : 13, __BITFIELD_FIELD(unsigned int idx : 1, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg2i8idx2_format { + __BITFIELD_FIELD(unsigned int opcode : 12, __BITFIELD_FIELD(unsigned int idx : 2, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg2i8idx3_format { + __BITFIELD_FIELD(unsigned int opcode : 11, __BITFIELD_FIELD(unsigned int idx : 3, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg2i8idx4_format { + __BITFIELD_FIELD(unsigned int opcode : 10, __BITFIELD_FIELD(unsigned int idx : 4, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg2i8idx5_format { + __BITFIELD_FIELD(unsigned int opcode : 9, __BITFIELD_FIELD(unsigned int idx : 5, __BITFIELD_FIELD(unsigned int simmediate : 8, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + ))))) +}; +struct reg2i9_format { + __BITFIELD_FIELD(unsigned int opcode : 13, __BITFIELD_FIELD(unsigned int simmediate : 9, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i10_format { + __BITFIELD_FIELD(unsigned int opcode : 12, __BITFIELD_FIELD(unsigned int simmediate : 10, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i11_format { + __BITFIELD_FIELD(unsigned int opcode : 11, __BITFIELD_FIELD(unsigned int simmediate : 11, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i12_format { + __BITFIELD_FIELD(unsigned int opcode : 10, __BITFIELD_FIELD(signed int simmediate : 12, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2u12_format { + __BITFIELD_FIELD(unsigned int opcode : 10, __BITFIELD_FIELD(unsigned int simmediate : 12, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i14_format { + __BITFIELD_FIELD(unsigned int opcode : 8, __BITFIELD_FIELD(unsigned int simmediate : 14, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2i16_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int simmediate : 16, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg2csr_format { + __BITFIELD_FIELD(unsigned int opcode : 8, __BITFIELD_FIELD(unsigned int csr : 14, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int rd : 5,; + )))) +}; +struct reg1i21_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int simmediate_l : 16, __BITFIELD_FIELD(unsigned int rj : 5, __BITFIELD_FIELD(unsigned int simmediate_h : 5,; + )))) +}; +struct reg1i20_format { + __BITFIELD_FIELD(unsigned int opcode : 7, __BITFIELD_FIELD(unsigned int simmediate : 20, __BITFIELD_FIELD(unsigned int rd : 5,; + ))) +}; +struct reg0i15_format { + __BITFIELD_FIELD(unsigned int opcode : 17, __BITFIELD_FIELD(unsigned int simmediate : 15,; + )) +}; +struct reg0i26_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int simmediate_l : 16, __BITFIELD_FIELD(unsigned int simmediate_h : 10,; + ))) +}; +union loongarch_instruction { + unsigned int word; + unsigned short halfword[2]; + unsigned char byte[4]; + struct reg2_format reg2_format; + struct reg2ui3_format reg2ui3_format; + struct reg2ui4_format reg2ui4_format; + struct reg2ui5_format reg2ui5_format; + struct reg2ui6_format reg2ui6_format; + struct reg2lsbw_format reg2lsbw_format; + struct reg2lsbd_format reg2lsbd_format; + struct reg3_format reg3_format; + struct reg3sa2_format reg3sa2_format; + struct reg3sa3_format reg3sa3_format; + struct reg3sa4_format reg3sa4_format; + struct reg4_format reg4_format; + struct reg2i8_format reg2i8_format; + struct reg2i8idx1_format reg2i8idx1_format; + struct reg2i8idx2_format reg2i8idx2_format; + struct reg2i8idx3_format reg2i8idx3_format; + struct reg2i8idx4_format reg2i8idx4_format; + struct reg2i8idx5_format reg2i8idx5_format; + struct reg2i9_format reg2i9_format; + struct reg2i10_format reg2i10_format; + struct reg2i11_format reg2i11_format; + struct reg2i12_format reg2i12_format; + struct reg2i14_format reg2i14_format; + struct reg2i16_format reg2i16_format; + struct reg2csr_format reg2csr_format; + struct reg1i21_format reg1i21_format; + struct reg1i20_format reg1i20_format; + struct reg0i15_format reg0i15_format; + struct reg0i26_format reg0i26_format; +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ioctl.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ioctl.h new file mode 100755 index 0000000000000000000000000000000000000000..7b7bd37794536ae77a4bbea2aa5803eac46e1704 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/ioctls.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ioctls.h new file mode 100755 index 0000000000000000000000000000000000000000..0c66935ad0ffa9a483f15fbafb2bb30da1be3f48 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/ipcbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ipcbuf.h new file mode 100755 index 0000000000000000000000000000000000000000..0021f1438ffcfa5e371a8e1ff047c40cec4f089f --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/kvm_para.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/kvm_para.h new file mode 100755 index 0000000000000000000000000000000000000000..e19f7a0f56a9c5691409edd0193726bc88d773ea --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/kvm_para.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-loongarch64/asm/mman.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/mman.h new file mode 100755 index 0000000000000000000000000000000000000000..6c23fb64794cbaf8de9bd477cccf3b6c5a485f98 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/msgbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/msgbuf.h new file mode 100755 index 0000000000000000000000000000000000000000..7809e3cea52eacc7c912e2e9872471e82cf1a83e --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/param.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/param.h new file mode 100755 index 0000000000000000000000000000000000000000..5ccf935cc17ea7247eb67295a6e62cb5bf831c0d --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/perf_regs.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/perf_regs.h new file mode 100755 index 0000000000000000000000000000000000000000..0926a0cc2d1831bdf7e38497eadfe334403f3219 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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 = PERF_REG_LOONGARCH_R31 + 1, +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/poll.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/poll.h new file mode 100755 index 0000000000000000000000000000000000000000..d7e8adca93b2b180c72b562b147e6a973e58d25c --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/posix_types.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/posix_types.h new file mode 100755 index 0000000000000000000000000000000000000000..1b8925316d0cf7d8806a5ceaa792eb16c8decc17 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/ptrace.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ptrace.h new file mode 100755 index 0000000000000000000000000000000000000000..47ee0423b9cee42a9d265f13b486a99594ddcfee --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ptrace.h @@ -0,0 +1,85 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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 PC (GPR_END + 1) +#define BADVADDR (GPR_END + 2) +#define NUM_FPU_REGS 32 +struct user_pt_regs { + unsigned long regs[32]; + unsigned long csr_era; + unsigned long csr_badv; + unsigned long reserved[11]; +} __attribute__((aligned(8))); +struct user_fp_state { + uint64_t fpr[32]; + uint64_t fcc; + uint32_t fcsr; +}; +struct user_lsx_state { + uint64_t regs[32 * 2]; +}; +struct user_lasx_state { + uint64_t regs[32 * 4]; +}; +struct user_lbt_state { + uint64_t regs[5]; +}; +#define NUM_WATCH_REGS 16 +enum pt_watch_style { + pt_watch_style_la32, + pt_watch_style_la64 +}; +struct la32_watch_regs { + uint32_t addr; + uint32_t mask; + uint8_t irw; + uint8_t irwstat; + uint8_t irwmask; +} __attribute__((aligned(8))); +struct la64_watch_regs { + uint64_t addr; + uint64_t mask; + uint8_t irw; + uint8_t irwstat; + uint8_t irwmask; +} __attribute__((aligned(8))); +struct pt_watch_regs { + int16_t max_valid; + int16_t num_valid; + enum pt_watch_style style; + union { + struct la32_watch_regs la32[NUM_WATCH_REGS]; + struct la64_watch_regs la64[NUM_WATCH_REGS]; + }; +}; +#define PTRACE_SYSEMU 0x1f +#define PTRACE_SYSEMU_SINGLESTEP 0x20 +#define PTRACE_GET_WATCH_REGS 0xd0 +#define PTRACE_SET_WATCH_REGS 0xd1 +#define LA_WATCH_W (1 << 0) +#define LA_WATCH_R (1 << 1) +#define LA_WATCH_I (1 << 2) +#define LA_WATCH_IRW (LA_WATCH_W | LA_WATCH_R | LA_WATCH_I) +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/reg.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/reg.h new file mode 100755 index 0000000000000000000000000000000000000000..8d27660c5e462f5ee7a3709aa519137d3edf5e30 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/reg.h @@ -0,0 +1,61 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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_CSR_ERA 32 +#define LOONGARCH_EF_CSR_BADV 33 +#define LOONGARCH_EF_CSR_CRMD 34 +#define LOONGARCH_EF_CSR_PRMD 35 +#define LOONGARCH_EF_CSR_EUEN 36 +#define LOONGARCH_EF_CSR_ECFG 37 +#define LOONGARCH_EF_CSR_ESTAT 38 +#define LOONGARCH_EF_SIZE 312 +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/resource.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/resource.h new file mode 100755 index 0000000000000000000000000000000000000000..371adb52f99aa576ee7b8da2a14a0485ce7f9e31 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/sembuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/sembuf.h new file mode 100755 index 0000000000000000000000000000000000000000..6ce6549b09c4e17cff2886fd24a8e46640896235 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/setup.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/setup.h new file mode 100755 index 0000000000000000000000000000000000000000..940c4db86ac2a01788420408469d71d2787f517e --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/shmbuf.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/shmbuf.h new file mode 100755 index 0000000000000000000000000000000000000000..fe8b1bea0fdab18f3c6d070926a0e4c4defcb891 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/sigcontext.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/sigcontext.h new file mode 100755 index 0000000000000000000000000000000000000000..570d1a5be8b7ae9a8ea2f194aafca04d4c0b4dcb --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/sigcontext.h @@ -0,0 +1,42 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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 USED_FP (1 << 0) +#define ADRERR_RD (1 << 30) +#define ADRERR_WR (1 << 31) +#define FPU_REG_WIDTH 256 +#define FPU_ALIGN __attribute__((aligned(32))) +struct sigcontext { + __u64 sc_pc; + __u64 sc_regs[32]; + __u32 sc_flags; + __u32 sc_fcsr; + __u32 sc_vcsr; + __u64 sc_fcc; + __u64 sc_scr[4]; + union { + __u32 val32[FPU_REG_WIDTH / 32]; + __u64 val64[FPU_REG_WIDTH / 64]; + } sc_fpregs[32] FPU_ALIGN; + __u8 sc_reserved[4096] __attribute__((__aligned__(16))); +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/siginfo.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/siginfo.h new file mode 100755 index 0000000000000000000000000000000000000000..a31ebb2d65ee8b0ddcd311b60e1438f0b2bc4e19 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/signal.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/signal.h new file mode 100755 index 0000000000000000000000000000000000000000..3a8f1217307d8da36cbb11f8112b5cf9121de3c5 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/socket.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/socket.h new file mode 100755 index 0000000000000000000000000000000000000000..50a9874cc601fd98b3562c343f5960ceacc04099 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/sockios.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/sockios.h new file mode 100755 index 0000000000000000000000000000000000000000..710db92bbb2e214394de4bb66ecb2396f0e25c99 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/stat.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/stat.h new file mode 100755 index 0000000000000000000000000000000000000000..af7ebfcbfd29dff665449a93df200ff84a2e0293 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/statfs.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/statfs.h new file mode 100755 index 0000000000000000000000000000000000000000..93de275d127cddb2063cbe41cdb8276301dbebec --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/swab.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/swab.h new file mode 100755 index 0000000000000000000000000000000000000000..41bdb09e3261b6ba0cea9ca81c2430dd0fb3620d --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/swab.h @@ -0,0 +1,28 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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_SWAB_H +#define _ASM_SWAB_H +#include +#define __SWAB_64_THRU_32__ +#define __arch_swab16 __arch_swab16 +#define __arch_swab32 __arch_swab32 +#ifdef __loongarch64 +#define __arch_swab64 __arch_swab64 +#endif +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/termbits.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/termbits.h new file mode 100755 index 0000000000000000000000000000000000000000..42af6fe24e6b7435861df31e7040b893266affe2 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/termios.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/termios.h new file mode 100755 index 0000000000000000000000000000000000000000..feca4c60ef3486c940ade2a9dc2aec2358aa768c --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/types.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/types.h new file mode 100755 index 0000000000000000000000000000000000000000..8250f434578cb206560f3ff28d4b3e3c4635f76b --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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-loongarch64/asm/ucontext.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/ucontext.h new file mode 100755 index 0000000000000000000000000000000000000000..abcd2912196c63b77ae7843b8f33a143e376d238 --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/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; + struct sigcontext uc_mcontext; + sigset_t uc_sigmask; + __u8 __linux_unused[1024 / 8 - sizeof(sigset_t)]; +}; +#endif diff --git a/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/unistd.h b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/unistd.h new file mode 100755 index 0000000000000000000000000000000000000000..aba232f9f6f12cebdd5223c5eed7f2c9ee15156c --- /dev/null +++ b/linux-5.10/prebuilts/usr/include/asm-loongarch64/asm/unistd.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! + *** + **************************************************************************** + ****************************************************************************/ +#define __ARCH_WANT_NEW_STAT +#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_CLONE3 +#include