diff --git a/lib/libc/include/aarch64-linux-any/asm/auxvec.h b/lib/libc/include/aarch64-linux-any/asm/auxvec.h deleted file mode 100644 index 9a290cde8d34bcc2508e83735fe3d450c1164ebd..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/auxvec.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_AUXVEC_H -#define __ASM_AUXVEC_H - -/* vDSO location */ -#define AT_SYSINFO_EHDR 33 -#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ - -#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/bitsperlong.h b/lib/libc/include/aarch64-linux-any/asm/bitsperlong.h deleted file mode 100644 index 0f94175240774f2fea25055c0595a50ae4dee399..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/bitsperlong.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_BITSPERLONG_H -#define __ASM_BITSPERLONG_H - -#define __BITS_PER_LONG 64 - -#include - -#endif /* __ASM_BITSPERLONG_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/bpf_perf_event.h b/lib/libc/include/aarch64-linux-any/asm/bpf_perf_event.h deleted file mode 100644 index 7d95d35c3657766d1bcebf94bc9225292e440d05..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/bpf_perf_event.h +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __ASM_BPF_PERF_EVENT_H__ -#define __ASM_BPF_PERF_EVENT_H__ - -#include - -typedef struct user_pt_regs bpf_user_pt_regs_t; - -#endif /* __ASM_BPF_PERF_EVENT_H__ */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/byteorder.h b/lib/libc/include/aarch64-linux-any/asm/byteorder.h deleted file mode 100644 index 6acd73fbc51cf01adc5e39a7ab23fa3c4150f6af..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/byteorder.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_BYTEORDER_H -#define __ASM_BYTEORDER_H - -#ifdef __AARCH64EB__ -#include -#else -#include -#endif - -#endif /* __ASM_BYTEORDER_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/fcntl.h b/lib/libc/include/aarch64-linux-any/asm/fcntl.h deleted file mode 100644 index 9473344a3f432ea322b626856fb63db875c7a487..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/fcntl.h +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_FCNTL_H -#define __ASM_FCNTL_H - -/* - * Using our own definitions for AArch32 (compat) support. - */ -#define O_DIRECTORY 040000 /* must be a directory */ -#define O_NOFOLLOW 0100000 /* don't follow links */ -#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ -#define O_LARGEFILE 0400000 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/hwcap.h b/lib/libc/include/aarch64-linux-any/asm/hwcap.h deleted file mode 100644 index 53c37e3da6208f3b0a3a10348bb56ff9ae7fec2f..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/hwcap.h +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_HWCAP_H -#define __ASM_HWCAP_H - -/* - * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP - */ -#define HWCAP_FP (1 << 0) -#define HWCAP_ASIMD (1 << 1) -#define HWCAP_EVTSTRM (1 << 2) -#define HWCAP_AES (1 << 3) -#define HWCAP_PMULL (1 << 4) -#define HWCAP_SHA1 (1 << 5) -#define HWCAP_SHA2 (1 << 6) -#define HWCAP_CRC32 (1 << 7) -#define HWCAP_ATOMICS (1 << 8) -#define HWCAP_FPHP (1 << 9) -#define HWCAP_ASIMDHP (1 << 10) -#define HWCAP_CPUID (1 << 11) -#define HWCAP_ASIMDRDM (1 << 12) -#define HWCAP_JSCVT (1 << 13) -#define HWCAP_FCMA (1 << 14) -#define HWCAP_LRCPC (1 << 15) -#define HWCAP_DCPOP (1 << 16) -#define HWCAP_SHA3 (1 << 17) -#define HWCAP_SM3 (1 << 18) -#define HWCAP_SM4 (1 << 19) -#define HWCAP_ASIMDDP (1 << 20) -#define HWCAP_SHA512 (1 << 21) -#define HWCAP_SVE (1 << 22) -#define HWCAP_ASIMDFHM (1 << 23) -#define HWCAP_DIT (1 << 24) -#define HWCAP_USCAT (1 << 25) -#define HWCAP_ILRCPC (1 << 26) -#define HWCAP_FLAGM (1 << 27) - -#endif /* __ASM_HWCAP_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/kvm.h b/lib/libc/include/aarch64-linux-any/asm/kvm.h deleted file mode 100644 index 5d0fc926657e08a5ddffd3894bffe8fc60e5c917..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/kvm.h +++ /dev/null @@ -1,310 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012,2013 - ARM Ltd - * Author: Marc Zyngier - * - * Derived from arch/arm/include/uapi/asm/kvm.h: - * Copyright (C) 2012 - Virtual Open Systems and Columbia University - * Author: Christoffer Dall - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ - -#define KVM_SPSR_EL1 0 -#define KVM_SPSR_SVC KVM_SPSR_EL1 -#define KVM_SPSR_ABT 1 -#define KVM_SPSR_UND 2 -#define KVM_SPSR_IRQ 3 -#define KVM_SPSR_FIQ 4 -#define KVM_NR_SPSR 5 - -#ifndef __ASSEMBLY__ -#include -#include -#include - -#define __KVM_HAVE_GUEST_DEBUG -#define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_READONLY_MEM -#define __KVM_HAVE_VCPU_EVENTS - -#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 - -#define KVM_REG_SIZE(id) \ - (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) - -struct kvm_regs { - struct user_pt_regs regs; /* sp = sp_el0 */ - - __u64 sp_el1; - __u64 elr_el1; - - __u64 spsr[KVM_NR_SPSR]; - - struct user_fpsimd_state fp_regs; -}; - -/* - * Supported CPU Targets - Adding a new target type is not recommended, - * unless there are some special registers not supported by the - * genericv8 syreg table. - */ -#define KVM_ARM_TARGET_AEM_V8 0 -#define KVM_ARM_TARGET_FOUNDATION_V8 1 -#define KVM_ARM_TARGET_CORTEX_A57 2 -#define KVM_ARM_TARGET_XGENE_POTENZA 3 -#define KVM_ARM_TARGET_CORTEX_A53 4 -/* Generic ARM v8 target */ -#define KVM_ARM_TARGET_GENERIC_V8 5 - -#define KVM_ARM_NUM_TARGETS 6 - -/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ -#define KVM_ARM_DEVICE_TYPE_SHIFT 0 -#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) -#define KVM_ARM_DEVICE_ID_SHIFT 16 -#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) - -/* Supported device IDs */ -#define KVM_ARM_DEVICE_VGIC_V2 0 - -/* Supported VGIC address types */ -#define KVM_VGIC_V2_ADDR_TYPE_DIST 0 -#define KVM_VGIC_V2_ADDR_TYPE_CPU 1 - -#define KVM_VGIC_V2_DIST_SIZE 0x1000 -#define KVM_VGIC_V2_CPU_SIZE 0x2000 - -/* Supported VGICv3 address types */ -#define KVM_VGIC_V3_ADDR_TYPE_DIST 2 -#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 -#define KVM_VGIC_ITS_ADDR_TYPE 4 -#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5 - -#define KVM_VGIC_V3_DIST_SIZE SZ_64K -#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) -#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K) - -#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ -#define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */ -#define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */ -#define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */ - -struct kvm_vcpu_init { - __u32 target; - __u32 features[7]; -}; - -struct kvm_sregs { -}; - -struct kvm_fpu { -}; - -/* - * See v8 ARM ARM D7.3: Debug Registers - * - * The architectural limit is 16 debug registers of each type although - * in practice there are usually less (see ID_AA64DFR0_EL1). - * - * Although the control registers are architecturally defined as 32 - * bits wide we use a 64 bit structure here to keep parity with - * KVM_GET/SET_ONE_REG behaviour which treats all system registers as - * 64 bit values. It also allows for the possibility of the - * architecture expanding the control registers without having to - * change the userspace ABI. - */ -#define KVM_ARM_MAX_DBG_REGS 16 -struct kvm_guest_debug_arch { - __u64 dbg_bcr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_bvr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_wcr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_wvr[KVM_ARM_MAX_DBG_REGS]; -}; - -struct kvm_debug_exit_arch { - __u32 hsr; - __u64 far; /* used for watchpoints */ -}; - -/* - * Architecture specific defines for kvm_guest_debug->control - */ - -#define KVM_GUESTDBG_USE_SW_BP (1 << 16) -#define KVM_GUESTDBG_USE_HW (1 << 17) - -struct kvm_sync_regs { - /* Used with KVM_CAP_ARM_USER_IRQ */ - __u64 device_irq_level; -}; - -struct kvm_arch_memory_slot { -}; - -/* for KVM_GET/SET_VCPU_EVENTS */ -struct kvm_vcpu_events { - struct { - __u8 serror_pending; - __u8 serror_has_esr; - /* Align it to 8 bytes */ - __u8 pad[6]; - __u64 serror_esr; - } exception; - __u32 reserved[12]; -}; - -/* If you need to interpret the index values, here is the key: */ -#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000 -#define KVM_REG_ARM_COPROC_SHIFT 16 - -/* Normal registers are mapped as coprocessor 16. */ -#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / sizeof(__u32)) - -/* Some registers need more space to represent values. */ -#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00 -#define KVM_REG_ARM_DEMUX_ID_SHIFT 8 -#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT) -#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF -#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0 - -/* AArch64 system registers */ -#define KVM_REG_ARM64_SYSREG (0x0013 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000 -#define KVM_REG_ARM64_SYSREG_OP0_SHIFT 14 -#define KVM_REG_ARM64_SYSREG_OP1_MASK 0x0000000000003800 -#define KVM_REG_ARM64_SYSREG_OP1_SHIFT 11 -#define KVM_REG_ARM64_SYSREG_CRN_MASK 0x0000000000000780 -#define KVM_REG_ARM64_SYSREG_CRN_SHIFT 7 -#define KVM_REG_ARM64_SYSREG_CRM_MASK 0x0000000000000078 -#define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3 -#define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007 -#define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0 - -#define ARM64_SYS_REG_SHIFT_MASK(x,n) \ - (((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & \ - KVM_REG_ARM64_SYSREG_ ## n ## _MASK) - -#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) \ - (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | \ - ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | \ - ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | \ - ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | \ - ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | \ - ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) - -#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) - -/* Physical Timer EL0 Registers */ -#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1) -#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2) -#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1) - -/* EL0 Virtual Timer Registers */ -#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) -#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) -#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) - -/* KVM-as-firmware specific pseudo-registers */ -#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \ - KVM_REG_ARM_FW | ((r) & 0xffff)) -#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) - -/* Device Control API: ARM VGIC */ -#define KVM_DEV_ARM_VGIC_GRP_ADDR 0 -#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 -#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2 -#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32 -#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT) -#define KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT 32 -#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \ - (0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT) -#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 -#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) -#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff) -#define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 -#define KVM_DEV_ARM_VGIC_GRP_CTRL 4 -#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5 -#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 -#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 -#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ - (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff -#define VGIC_LEVEL_INFO_LINE_LEVEL 0 - -#define KVM_DEV_ARM_VGIC_CTRL_INIT 0 -#define KVM_DEV_ARM_ITS_SAVE_TABLES 1 -#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2 -#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3 -#define KVM_DEV_ARM_ITS_CTRL_RESET 4 - -/* Device Control API on vcpu fd */ -#define KVM_ARM_VCPU_PMU_V3_CTRL 0 -#define KVM_ARM_VCPU_PMU_V3_IRQ 0 -#define KVM_ARM_VCPU_PMU_V3_INIT 1 -#define KVM_ARM_VCPU_TIMER_CTRL 1 -#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0 -#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1 - -/* KVM_IRQ_LINE irq field index values */ -#define KVM_ARM_IRQ_TYPE_SHIFT 24 -#define KVM_ARM_IRQ_TYPE_MASK 0xff -#define KVM_ARM_IRQ_VCPU_SHIFT 16 -#define KVM_ARM_IRQ_VCPU_MASK 0xff -#define KVM_ARM_IRQ_NUM_SHIFT 0 -#define KVM_ARM_IRQ_NUM_MASK 0xffff - -/* irq_type field */ -#define KVM_ARM_IRQ_TYPE_CPU 0 -#define KVM_ARM_IRQ_TYPE_SPI 1 -#define KVM_ARM_IRQ_TYPE_PPI 2 - -/* out-of-kernel GIC cpu interrupt injection irq_number field */ -#define KVM_ARM_IRQ_CPU_IRQ 0 -#define KVM_ARM_IRQ_CPU_FIQ 1 - -/* - * This used to hold the highest supported SPI, but it is now obsolete - * and only here to provide source code level compatibility with older - * userland. The highest SPI number can be set via KVM_DEV_ARM_VGIC_GRP_NR_IRQS. - */ -#define KVM_ARM_IRQ_GIC_MAX 127 - -/* One single KVM irqchip, ie. the VGIC */ -#define KVM_NR_IRQCHIPS 1 - -/* PSCI interface */ -#define KVM_PSCI_FN_BASE 0x95c1ba5e -#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) - -#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0) -#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1) -#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) -#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) - -#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS -#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED -#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS -#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED - -#endif - -#endif /* __ARM_KVM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/kvm_para.h b/lib/libc/include/aarch64-linux-any/asm/kvm_para.h deleted file mode 100644 index a2f15b84b87bb8f05a5873d2193b153b142f792b..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/kvm_para.h +++ /dev/null @@ -1 +0,0 @@ -#include \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/param.h b/lib/libc/include/aarch64-linux-any/asm/param.h deleted file mode 100644 index f58c021601fedff10bb342e7caa188111f328e43..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/param.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_PARAM_H -#define __ASM_PARAM_H - -#define EXEC_PAGESIZE 65536 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/perf_regs.h b/lib/libc/include/aarch64-linux-any/asm/perf_regs.h deleted file mode 100644 index d63b945af5a0252dcacee51f670e543c25d178d3..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/perf_regs.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_ARM64_PERF_REGS_H -#define _ASM_ARM64_PERF_REGS_H - -enum perf_event_arm_regs { - PERF_REG_ARM64_X0, - PERF_REG_ARM64_X1, - PERF_REG_ARM64_X2, - PERF_REG_ARM64_X3, - PERF_REG_ARM64_X4, - PERF_REG_ARM64_X5, - PERF_REG_ARM64_X6, - PERF_REG_ARM64_X7, - PERF_REG_ARM64_X8, - PERF_REG_ARM64_X9, - PERF_REG_ARM64_X10, - PERF_REG_ARM64_X11, - PERF_REG_ARM64_X12, - PERF_REG_ARM64_X13, - PERF_REG_ARM64_X14, - PERF_REG_ARM64_X15, - PERF_REG_ARM64_X16, - PERF_REG_ARM64_X17, - PERF_REG_ARM64_X18, - PERF_REG_ARM64_X19, - PERF_REG_ARM64_X20, - PERF_REG_ARM64_X21, - PERF_REG_ARM64_X22, - PERF_REG_ARM64_X23, - PERF_REG_ARM64_X24, - PERF_REG_ARM64_X25, - PERF_REG_ARM64_X26, - PERF_REG_ARM64_X27, - PERF_REG_ARM64_X28, - PERF_REG_ARM64_X29, - PERF_REG_ARM64_LR, - PERF_REG_ARM64_SP, - PERF_REG_ARM64_PC, - PERF_REG_ARM64_MAX, -}; -#endif /* _ASM_ARM64_PERF_REGS_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/posix_types.h b/lib/libc/include/aarch64-linux-any/asm/posix_types.h deleted file mode 100644 index b20f985d3a9fdbeb759ded61119791034ec75b48..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/posix_types.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __ASM_POSIX_TYPES_H -#define __ASM_POSIX_TYPES_H - -typedef unsigned short __kernel_old_uid_t; -typedef unsigned short __kernel_old_gid_t; -#define __kernel_old_uid_t __kernel_old_uid_t - -#include - -#endif /* __ASM_POSIX_TYPES_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/ptrace.h b/lib/libc/include/aarch64-linux-any/asm/ptrace.h deleted file mode 100644 index e866145891a7e24443fc9ddce91e8b1c22dc91fd..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/ptrace.h +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Based on arch/arm/include/asm/ptrace.h - * - * Copyright (C) 1996-2003 Russell King - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_PTRACE_H -#define __ASM_PTRACE_H - -#include - -#include -#include - - -/* - * PSR bits - */ -#define PSR_MODE_EL0t 0x00000000 -#define PSR_MODE_EL1t 0x00000004 -#define PSR_MODE_EL1h 0x00000005 -#define PSR_MODE_EL2t 0x00000008 -#define PSR_MODE_EL2h 0x00000009 -#define PSR_MODE_EL3t 0x0000000c -#define PSR_MODE_EL3h 0x0000000d -#define PSR_MODE_MASK 0x0000000f - -/* AArch32 CPSR bits */ -#define PSR_MODE32_BIT 0x00000010 - -/* AArch64 SPSR bits */ -#define PSR_F_BIT 0x00000040 -#define PSR_I_BIT 0x00000080 -#define PSR_A_BIT 0x00000100 -#define PSR_D_BIT 0x00000200 -#define PSR_PAN_BIT 0x00400000 -#define PSR_UAO_BIT 0x00800000 -#define PSR_V_BIT 0x10000000 -#define PSR_C_BIT 0x20000000 -#define PSR_Z_BIT 0x40000000 -#define PSR_N_BIT 0x80000000 - -/* - * Groups of PSR bits - */ -#define PSR_f 0xff000000 /* Flags */ -#define PSR_s 0x00ff0000 /* Status */ -#define PSR_x 0x0000ff00 /* Extension */ -#define PSR_c 0x000000ff /* Control */ - - -#ifndef __ASSEMBLY__ - -#include - -/* - * User structures for general purpose, floating point and debug registers. - */ -struct user_pt_regs { - __u64 regs[31]; - __u64 sp; - __u64 pc; - __u64 pstate; -}; - -struct user_fpsimd_state { - __uint128_t vregs[32]; - __u32 fpsr; - __u32 fpcr; - __u32 __reserved[2]; -}; - -struct user_hwdebug_state { - __u32 dbg_info; - __u32 pad; - struct { - __u64 addr; - __u32 ctrl; - __u32 pad; - } dbg_regs[16]; -}; - -/* SVE/FP/SIMD state (NT_ARM_SVE) */ - -struct user_sve_header { - __u32 size; /* total meaningful regset content in bytes */ - __u32 max_size; /* maxmium possible size for this thread */ - __u16 vl; /* current vector length */ - __u16 max_vl; /* maximum possible vector length */ - __u16 flags; - __u16 __reserved; -}; - -/* Definitions for user_sve_header.flags: */ -#define SVE_PT_REGS_MASK (1 << 0) - -#define SVE_PT_REGS_FPSIMD 0 -#define SVE_PT_REGS_SVE SVE_PT_REGS_MASK - -/* - * Common SVE_PT_* flags: - * These must be kept in sync with prctl interface in - */ -#define SVE_PT_VL_INHERIT (PR_SVE_VL_INHERIT >> 16) -#define SVE_PT_VL_ONEXEC (PR_SVE_SET_VL_ONEXEC >> 16) - - -/* - * The remainder of the SVE state follows struct user_sve_header. The - * total size of the SVE state (including header) depends on the - * metadata in the header: SVE_PT_SIZE(vq, flags) gives the total size - * of the state in bytes, including the header. - * - * Refer to for details of how to pass the correct - * "vq" argument to these macros. - */ - -/* Offset from the start of struct user_sve_header to the register data */ -#define SVE_PT_REGS_OFFSET \ - ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -/* - * The register data content and layout depends on the value of the - * flags field. - */ - -/* - * (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_FPSIMD case: - * - * The payload starts at offset SVE_PT_FPSIMD_OFFSET, and is of type - * struct user_fpsimd_state. Additional data might be appended in the - * future: use SVE_PT_FPSIMD_SIZE(vq, flags) to compute the total size. - * SVE_PT_FPSIMD_SIZE(vq, flags) will never be less than - * sizeof(struct user_fpsimd_state). - */ - -#define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET - -#define SVE_PT_FPSIMD_SIZE(vq, flags) (sizeof(struct user_fpsimd_state)) - -/* - * (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE case: - * - * The payload starts at offset SVE_PT_SVE_OFFSET, and is of size - * SVE_PT_SVE_SIZE(vq, flags). - * - * Additional macros describe the contents and layout of the payload. - * For each, SVE_PT_SVE_x_OFFSET(args) is the start offset relative to - * the start of struct user_sve_header, and SVE_PT_SVE_x_SIZE(args) is - * the size in bytes: - * - * x type description - * - ---- ----------- - * ZREGS \ - * ZREG | - * PREGS | refer to - * PREG | - * FFR / - * - * FPSR uint32_t FPSR - * FPCR uint32_t FPCR - * - * Additional data might be appended in the future. - */ - -#define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq) -#define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq) -#define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq) -#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32) -#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32) - -#define __SVE_SIG_TO_PT(offset) \ - ((offset) - SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET) - -#define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET - -#define SVE_PT_SVE_ZREGS_OFFSET \ - __SVE_SIG_TO_PT(SVE_SIG_ZREGS_OFFSET) -#define SVE_PT_SVE_ZREG_OFFSET(vq, n) \ - __SVE_SIG_TO_PT(SVE_SIG_ZREG_OFFSET(vq, n)) -#define SVE_PT_SVE_ZREGS_SIZE(vq) \ - (SVE_PT_SVE_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) - -#define SVE_PT_SVE_PREGS_OFFSET(vq) \ - __SVE_SIG_TO_PT(SVE_SIG_PREGS_OFFSET(vq)) -#define SVE_PT_SVE_PREG_OFFSET(vq, n) \ - __SVE_SIG_TO_PT(SVE_SIG_PREG_OFFSET(vq, n)) -#define SVE_PT_SVE_PREGS_SIZE(vq) \ - (SVE_PT_SVE_PREG_OFFSET(vq, SVE_NUM_PREGS) - \ - SVE_PT_SVE_PREGS_OFFSET(vq)) - -#define SVE_PT_SVE_FFR_OFFSET(vq) \ - __SVE_SIG_TO_PT(SVE_SIG_FFR_OFFSET(vq)) - -#define SVE_PT_SVE_FPSR_OFFSET(vq) \ - ((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + \ - (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) -#define SVE_PT_SVE_FPCR_OFFSET(vq) \ - (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) - -/* - * Any future extension appended after FPCR must be aligned to the next - * 128-bit boundary. - */ - -#define SVE_PT_SVE_SIZE(vq, flags) \ - ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \ - - SVE_PT_SVE_OFFSET + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -#define SVE_PT_SIZE(vq, flags) \ - (((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? \ - SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \ - : SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags)) - -#endif /* __ASSEMBLY__ */ - -#endif /* __ASM_PTRACE_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/setup.h b/lib/libc/include/aarch64-linux-any/asm/setup.h deleted file mode 100644 index 32e442aba7cfe229940f334797836c878fd2272b..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/setup.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Based on arch/arm/include/asm/setup.h - * - * Copyright (C) 1997-1999 Russell King - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SETUP_H -#define __ASM_SETUP_H - -#include - -#define COMMAND_LINE_SIZE 2048 - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/sigcontext.h b/lib/libc/include/aarch64-linux-any/asm/sigcontext.h deleted file mode 100644 index eb6f272747a252388a8d073dd00e29f6ca376cec..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/sigcontext.h +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGCONTEXT_H -#define __ASM_SIGCONTEXT_H - -#ifndef __ASSEMBLY__ - -#include - -/* - * Signal context structure - contains all info to do with the state - * before the signal handler was invoked. - */ -struct sigcontext { - __u64 fault_address; - /* AArch64 registers */ - __u64 regs[31]; - __u64 sp; - __u64 pc; - __u64 pstate; - /* 4K reserved for FP/SIMD state and future expansion */ - __u8 __reserved[4096] __attribute__((__aligned__(16))); -}; - -/* - * Allocation of __reserved[]: - * (Note: records do not necessarily occur in the order shown here.) - * - * size description - * - * 0x210 fpsimd_context - * 0x10 esr_context - * 0x8a0 sve_context (vl <= 64) (optional) - * 0x20 extra_context (optional) - * 0x10 terminator (null _aarch64_ctx) - * - * 0x510 (reserved for future allocation) - * - * New records that can exceed this space need to be opt-in for userspace, so - * that an expanded signal frame is not generated unexpectedly. The mechanism - * for opting in will depend on the extension that generates each new record. - * The above table documents the maximum set and sizes of records than can be - * generated when userspace does not opt in for any such extension. - */ - -/* - * Header to be used at the beginning of structures extending the user - * context. Such structures must be placed after the rt_sigframe on the stack - * and be 16-byte aligned. The last structure must be a dummy one with the - * magic and size set to 0. - */ -struct _aarch64_ctx { - __u32 magic; - __u32 size; -}; - -#define FPSIMD_MAGIC 0x46508001 - -struct fpsimd_context { - struct _aarch64_ctx head; - __u32 fpsr; - __u32 fpcr; - __uint128_t vregs[32]; -}; - -/* ESR_EL1 context */ -#define ESR_MAGIC 0x45535201 - -struct esr_context { - struct _aarch64_ctx head; - __u64 esr; -}; - -/* - * extra_context: describes extra space in the signal frame for - * additional structures that don't fit in sigcontext.__reserved[]. - * - * Note: - * - * 1) fpsimd_context, esr_context and extra_context must be placed in - * sigcontext.__reserved[] if present. They cannot be placed in the - * extra space. Any other record can be placed either in the extra - * space or in sigcontext.__reserved[], unless otherwise specified in - * this file. - * - * 2) There must not be more than one extra_context. - * - * 3) If extra_context is present, it must be followed immediately in - * sigcontext.__reserved[] by the terminating null _aarch64_ctx. - * - * 4) The extra space to which datap points must start at the first - * 16-byte aligned address immediately after the terminating null - * _aarch64_ctx that follows the extra_context structure in - * __reserved[]. The extra space may overrun the end of __reserved[], - * as indicated by a sufficiently large value for the size field. - * - * 5) The extra space must itself be terminated with a null - * _aarch64_ctx. - */ -#define EXTRA_MAGIC 0x45585401 - -struct extra_context { - struct _aarch64_ctx head; - __u64 datap; /* 16-byte aligned pointer to extra space cast to __u64 */ - __u32 size; /* size in bytes of the extra space */ - __u32 __reserved[3]; -}; - -#define SVE_MAGIC 0x53564501 - -struct sve_context { - struct _aarch64_ctx head; - __u16 vl; - __u16 __reserved[3]; -}; - -#endif /* !__ASSEMBLY__ */ - -/* - * The SVE architecture leaves space for future expansion of the - * vector length beyond its initial architectural limit of 2048 bits - * (16 quadwords). - * - * See linux/Documentation/arm64/sve.txt for a description of the VL/VQ - * terminology. - */ -#define SVE_VQ_BYTES 16 /* number of bytes per quadword */ - -#define SVE_VQ_MIN 1 -#define SVE_VQ_MAX 512 - -#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES) -#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES) - -#define SVE_NUM_ZREGS 32 -#define SVE_NUM_PREGS 16 - -#define sve_vl_valid(vl) \ - ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX) -#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) -#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) - -/* - * If the SVE registers are currently live for the thread at signal delivery, - * sve_context.head.size >= - * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)) - * and the register data may be accessed using the SVE_SIG_*() macros. - * - * If sve_context.head.size < - * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)), - * the SVE registers were not live for the thread and no register data - * is included: in this case, the SVE_SIG_*() macros should not be - * used except for this check. - * - * The same convention applies when returning from a signal: a caller - * will need to remove or resize the sve_context block if it wants to - * make the SVE registers live when they were previously non-live or - * vice-versa. This may require the the caller to allocate fresh - * memory and/or move other context blocks in the signal frame. - * - * Changing the vector length during signal return is not permitted: - * sve_context.vl must equal the thread's current vector length when - * doing a sigreturn. - * - * - * Note: for all these macros, the "vq" argument denotes the SVE - * vector length in quadwords (i.e., units of 128 bits). - * - * The correct way to obtain vq is to use sve_vq_from_vl(vl). The - * result is valid if and only if sve_vl_valid(vl) is true. This is - * guaranteed for a struct sve_context written by the kernel. - * - * - * Additional macros describe the contents and layout of the payload. - * For each, SVE_SIG_x_OFFSET(args) is the start offset relative to - * the start of struct sve_context, and SVE_SIG_x_SIZE(args) is the - * size in bytes: - * - * x type description - * - ---- ----------- - * REGS the entire SVE context - * - * ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers - * ZREG __uint128_t[vq] individual Z-register Zn - * - * PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers - * PREG uint16_t[vq] individual P-register Pn - * - * FFR uint16_t[vq] first-fault status register - * - * Additional data might be appended in the future. - */ - -#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq) * SVE_VQ_BYTES) -#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8)) -#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq) - -#define SVE_SIG_REGS_OFFSET \ - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET -#define SVE_SIG_ZREG_OFFSET(vq, n) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n)) -#define SVE_SIG_ZREGS_SIZE(vq) \ - (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET) - -#define SVE_SIG_PREGS_OFFSET(vq) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq)) -#define SVE_SIG_PREG_OFFSET(vq, n) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n)) -#define SVE_SIG_PREGS_SIZE(vq) \ - (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq)) - -#define SVE_SIG_FFR_OFFSET(vq) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq)) - -#define SVE_SIG_REGS_SIZE(vq) \ - (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) - -#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) - - -#endif /* __ASM_SIGCONTEXT_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/siginfo.h b/lib/libc/include/aarch64-linux-any/asm/siginfo.h deleted file mode 100644 index 0797d770776bd49fa65f1b36c4970d1554c740ca..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/siginfo.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGINFO_H -#define __ASM_SIGINFO_H - -#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/signal.h b/lib/libc/include/aarch64-linux-any/asm/signal.h deleted file mode 100644 index 167802d3a21a27f1da82fa64364d21d5bb4786aa..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/signal.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGNAL_H -#define __ASM_SIGNAL_H - -/* Required for AArch32 compatibility. */ -#define SA_RESTORER 0x04000000 - -#define MINSIGSTKSZ 5120 -#define SIGSTKSZ 16384 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/stat.h b/lib/libc/include/aarch64-linux-any/asm/stat.h deleted file mode 100644 index 04e59c072eb2667dd5df2537d075a586b01aa9fc..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/stat.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/statfs.h b/lib/libc/include/aarch64-linux-any/asm/statfs.h deleted file mode 100644 index dfa2faa7db74670c39807c261970ff83aae76436..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/statfs.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_STATFS_H -#define __ASM_STATFS_H - -#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/ucontext.h b/lib/libc/include/aarch64-linux-any/asm/ucontext.h deleted file mode 100644 index 87f00793b319167c3d67192961f02caaee33e7d5..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/ucontext.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_UCONTEXT_H -#define __ASM_UCONTEXT_H - -#include - -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - sigset_t uc_sigmask; - /* glibc uses a 1024-bit sigset_t */ - __u8 __unused[1024 / 8 - sizeof(sigset_t)]; - /* last for future expansion */ - struct sigcontext uc_mcontext; -}; - -#endif /* __ASM_UCONTEXT_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-any/asm/unistd.h b/lib/libc/include/aarch64-linux-any/asm/unistd.h deleted file mode 100644 index 198e1aa8f62af4ad653754cf8b27182f1b296b7a..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64-linux-any/asm/unistd.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#define __ARCH_WANT_RENAMEAT - -#include \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/auxvec.h b/lib/libc/include/aarch64_be-linux-any/asm/auxvec.h deleted file mode 100644 index 9a290cde8d34bcc2508e83735fe3d450c1164ebd..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/auxvec.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_AUXVEC_H -#define __ASM_AUXVEC_H - -/* vDSO location */ -#define AT_SYSINFO_EHDR 33 -#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ - -#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/bitsperlong.h b/lib/libc/include/aarch64_be-linux-any/asm/bitsperlong.h deleted file mode 100644 index 0f94175240774f2fea25055c0595a50ae4dee399..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/bitsperlong.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_BITSPERLONG_H -#define __ASM_BITSPERLONG_H - -#define __BITS_PER_LONG 64 - -#include - -#endif /* __ASM_BITSPERLONG_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/bpf_perf_event.h b/lib/libc/include/aarch64_be-linux-any/asm/bpf_perf_event.h deleted file mode 100644 index 7d95d35c3657766d1bcebf94bc9225292e440d05..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/bpf_perf_event.h +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __ASM_BPF_PERF_EVENT_H__ -#define __ASM_BPF_PERF_EVENT_H__ - -#include - -typedef struct user_pt_regs bpf_user_pt_regs_t; - -#endif /* __ASM_BPF_PERF_EVENT_H__ */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/byteorder.h b/lib/libc/include/aarch64_be-linux-any/asm/byteorder.h deleted file mode 100644 index 6acd73fbc51cf01adc5e39a7ab23fa3c4150f6af..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/byteorder.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_BYTEORDER_H -#define __ASM_BYTEORDER_H - -#ifdef __AARCH64EB__ -#include -#else -#include -#endif - -#endif /* __ASM_BYTEORDER_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/fcntl.h b/lib/libc/include/aarch64_be-linux-any/asm/fcntl.h deleted file mode 100644 index 9473344a3f432ea322b626856fb63db875c7a487..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/fcntl.h +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_FCNTL_H -#define __ASM_FCNTL_H - -/* - * Using our own definitions for AArch32 (compat) support. - */ -#define O_DIRECTORY 040000 /* must be a directory */ -#define O_NOFOLLOW 0100000 /* don't follow links */ -#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ -#define O_LARGEFILE 0400000 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/hwcap.h b/lib/libc/include/aarch64_be-linux-any/asm/hwcap.h deleted file mode 100644 index 53c37e3da6208f3b0a3a10348bb56ff9ae7fec2f..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/hwcap.h +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_HWCAP_H -#define __ASM_HWCAP_H - -/* - * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP - */ -#define HWCAP_FP (1 << 0) -#define HWCAP_ASIMD (1 << 1) -#define HWCAP_EVTSTRM (1 << 2) -#define HWCAP_AES (1 << 3) -#define HWCAP_PMULL (1 << 4) -#define HWCAP_SHA1 (1 << 5) -#define HWCAP_SHA2 (1 << 6) -#define HWCAP_CRC32 (1 << 7) -#define HWCAP_ATOMICS (1 << 8) -#define HWCAP_FPHP (1 << 9) -#define HWCAP_ASIMDHP (1 << 10) -#define HWCAP_CPUID (1 << 11) -#define HWCAP_ASIMDRDM (1 << 12) -#define HWCAP_JSCVT (1 << 13) -#define HWCAP_FCMA (1 << 14) -#define HWCAP_LRCPC (1 << 15) -#define HWCAP_DCPOP (1 << 16) -#define HWCAP_SHA3 (1 << 17) -#define HWCAP_SM3 (1 << 18) -#define HWCAP_SM4 (1 << 19) -#define HWCAP_ASIMDDP (1 << 20) -#define HWCAP_SHA512 (1 << 21) -#define HWCAP_SVE (1 << 22) -#define HWCAP_ASIMDFHM (1 << 23) -#define HWCAP_DIT (1 << 24) -#define HWCAP_USCAT (1 << 25) -#define HWCAP_ILRCPC (1 << 26) -#define HWCAP_FLAGM (1 << 27) - -#endif /* __ASM_HWCAP_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/kvm.h b/lib/libc/include/aarch64_be-linux-any/asm/kvm.h deleted file mode 100644 index 5d0fc926657e08a5ddffd3894bffe8fc60e5c917..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/kvm.h +++ /dev/null @@ -1,310 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012,2013 - ARM Ltd - * Author: Marc Zyngier - * - * Derived from arch/arm/include/uapi/asm/kvm.h: - * Copyright (C) 2012 - Virtual Open Systems and Columbia University - * Author: Christoffer Dall - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ - -#define KVM_SPSR_EL1 0 -#define KVM_SPSR_SVC KVM_SPSR_EL1 -#define KVM_SPSR_ABT 1 -#define KVM_SPSR_UND 2 -#define KVM_SPSR_IRQ 3 -#define KVM_SPSR_FIQ 4 -#define KVM_NR_SPSR 5 - -#ifndef __ASSEMBLY__ -#include -#include -#include - -#define __KVM_HAVE_GUEST_DEBUG -#define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_READONLY_MEM -#define __KVM_HAVE_VCPU_EVENTS - -#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 - -#define KVM_REG_SIZE(id) \ - (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) - -struct kvm_regs { - struct user_pt_regs regs; /* sp = sp_el0 */ - - __u64 sp_el1; - __u64 elr_el1; - - __u64 spsr[KVM_NR_SPSR]; - - struct user_fpsimd_state fp_regs; -}; - -/* - * Supported CPU Targets - Adding a new target type is not recommended, - * unless there are some special registers not supported by the - * genericv8 syreg table. - */ -#define KVM_ARM_TARGET_AEM_V8 0 -#define KVM_ARM_TARGET_FOUNDATION_V8 1 -#define KVM_ARM_TARGET_CORTEX_A57 2 -#define KVM_ARM_TARGET_XGENE_POTENZA 3 -#define KVM_ARM_TARGET_CORTEX_A53 4 -/* Generic ARM v8 target */ -#define KVM_ARM_TARGET_GENERIC_V8 5 - -#define KVM_ARM_NUM_TARGETS 6 - -/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ -#define KVM_ARM_DEVICE_TYPE_SHIFT 0 -#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) -#define KVM_ARM_DEVICE_ID_SHIFT 16 -#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) - -/* Supported device IDs */ -#define KVM_ARM_DEVICE_VGIC_V2 0 - -/* Supported VGIC address types */ -#define KVM_VGIC_V2_ADDR_TYPE_DIST 0 -#define KVM_VGIC_V2_ADDR_TYPE_CPU 1 - -#define KVM_VGIC_V2_DIST_SIZE 0x1000 -#define KVM_VGIC_V2_CPU_SIZE 0x2000 - -/* Supported VGICv3 address types */ -#define KVM_VGIC_V3_ADDR_TYPE_DIST 2 -#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 -#define KVM_VGIC_ITS_ADDR_TYPE 4 -#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5 - -#define KVM_VGIC_V3_DIST_SIZE SZ_64K -#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) -#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K) - -#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ -#define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */ -#define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */ -#define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */ - -struct kvm_vcpu_init { - __u32 target; - __u32 features[7]; -}; - -struct kvm_sregs { -}; - -struct kvm_fpu { -}; - -/* - * See v8 ARM ARM D7.3: Debug Registers - * - * The architectural limit is 16 debug registers of each type although - * in practice there are usually less (see ID_AA64DFR0_EL1). - * - * Although the control registers are architecturally defined as 32 - * bits wide we use a 64 bit structure here to keep parity with - * KVM_GET/SET_ONE_REG behaviour which treats all system registers as - * 64 bit values. It also allows for the possibility of the - * architecture expanding the control registers without having to - * change the userspace ABI. - */ -#define KVM_ARM_MAX_DBG_REGS 16 -struct kvm_guest_debug_arch { - __u64 dbg_bcr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_bvr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_wcr[KVM_ARM_MAX_DBG_REGS]; - __u64 dbg_wvr[KVM_ARM_MAX_DBG_REGS]; -}; - -struct kvm_debug_exit_arch { - __u32 hsr; - __u64 far; /* used for watchpoints */ -}; - -/* - * Architecture specific defines for kvm_guest_debug->control - */ - -#define KVM_GUESTDBG_USE_SW_BP (1 << 16) -#define KVM_GUESTDBG_USE_HW (1 << 17) - -struct kvm_sync_regs { - /* Used with KVM_CAP_ARM_USER_IRQ */ - __u64 device_irq_level; -}; - -struct kvm_arch_memory_slot { -}; - -/* for KVM_GET/SET_VCPU_EVENTS */ -struct kvm_vcpu_events { - struct { - __u8 serror_pending; - __u8 serror_has_esr; - /* Align it to 8 bytes */ - __u8 pad[6]; - __u64 serror_esr; - } exception; - __u32 reserved[12]; -}; - -/* If you need to interpret the index values, here is the key: */ -#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000 -#define KVM_REG_ARM_COPROC_SHIFT 16 - -/* Normal registers are mapped as coprocessor 16. */ -#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / sizeof(__u32)) - -/* Some registers need more space to represent values. */ -#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00 -#define KVM_REG_ARM_DEMUX_ID_SHIFT 8 -#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT) -#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF -#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0 - -/* AArch64 system registers */ -#define KVM_REG_ARM64_SYSREG (0x0013 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000 -#define KVM_REG_ARM64_SYSREG_OP0_SHIFT 14 -#define KVM_REG_ARM64_SYSREG_OP1_MASK 0x0000000000003800 -#define KVM_REG_ARM64_SYSREG_OP1_SHIFT 11 -#define KVM_REG_ARM64_SYSREG_CRN_MASK 0x0000000000000780 -#define KVM_REG_ARM64_SYSREG_CRN_SHIFT 7 -#define KVM_REG_ARM64_SYSREG_CRM_MASK 0x0000000000000078 -#define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3 -#define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007 -#define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0 - -#define ARM64_SYS_REG_SHIFT_MASK(x,n) \ - (((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & \ - KVM_REG_ARM64_SYSREG_ ## n ## _MASK) - -#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) \ - (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | \ - ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | \ - ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | \ - ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | \ - ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | \ - ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) - -#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) - -/* Physical Timer EL0 Registers */ -#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1) -#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2) -#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1) - -/* EL0 Virtual Timer Registers */ -#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) -#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) -#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) - -/* KVM-as-firmware specific pseudo-registers */ -#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT) -#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \ - KVM_REG_ARM_FW | ((r) & 0xffff)) -#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) - -/* Device Control API: ARM VGIC */ -#define KVM_DEV_ARM_VGIC_GRP_ADDR 0 -#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 -#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2 -#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32 -#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT) -#define KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT 32 -#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK \ - (0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT) -#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 -#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) -#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff) -#define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 -#define KVM_DEV_ARM_VGIC_GRP_CTRL 4 -#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5 -#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 -#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 -#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ - (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) -#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff -#define VGIC_LEVEL_INFO_LINE_LEVEL 0 - -#define KVM_DEV_ARM_VGIC_CTRL_INIT 0 -#define KVM_DEV_ARM_ITS_SAVE_TABLES 1 -#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2 -#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3 -#define KVM_DEV_ARM_ITS_CTRL_RESET 4 - -/* Device Control API on vcpu fd */ -#define KVM_ARM_VCPU_PMU_V3_CTRL 0 -#define KVM_ARM_VCPU_PMU_V3_IRQ 0 -#define KVM_ARM_VCPU_PMU_V3_INIT 1 -#define KVM_ARM_VCPU_TIMER_CTRL 1 -#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0 -#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1 - -/* KVM_IRQ_LINE irq field index values */ -#define KVM_ARM_IRQ_TYPE_SHIFT 24 -#define KVM_ARM_IRQ_TYPE_MASK 0xff -#define KVM_ARM_IRQ_VCPU_SHIFT 16 -#define KVM_ARM_IRQ_VCPU_MASK 0xff -#define KVM_ARM_IRQ_NUM_SHIFT 0 -#define KVM_ARM_IRQ_NUM_MASK 0xffff - -/* irq_type field */ -#define KVM_ARM_IRQ_TYPE_CPU 0 -#define KVM_ARM_IRQ_TYPE_SPI 1 -#define KVM_ARM_IRQ_TYPE_PPI 2 - -/* out-of-kernel GIC cpu interrupt injection irq_number field */ -#define KVM_ARM_IRQ_CPU_IRQ 0 -#define KVM_ARM_IRQ_CPU_FIQ 1 - -/* - * This used to hold the highest supported SPI, but it is now obsolete - * and only here to provide source code level compatibility with older - * userland. The highest SPI number can be set via KVM_DEV_ARM_VGIC_GRP_NR_IRQS. - */ -#define KVM_ARM_IRQ_GIC_MAX 127 - -/* One single KVM irqchip, ie. the VGIC */ -#define KVM_NR_IRQCHIPS 1 - -/* PSCI interface */ -#define KVM_PSCI_FN_BASE 0x95c1ba5e -#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) - -#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0) -#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1) -#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) -#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) - -#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS -#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED -#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS -#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED - -#endif - -#endif /* __ARM_KVM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/kvm_para.h b/lib/libc/include/aarch64_be-linux-any/asm/kvm_para.h deleted file mode 100644 index a2f15b84b87bb8f05a5873d2193b153b142f792b..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/kvm_para.h +++ /dev/null @@ -1 +0,0 @@ -#include \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/param.h b/lib/libc/include/aarch64_be-linux-any/asm/param.h deleted file mode 100644 index f58c021601fedff10bb342e7caa188111f328e43..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/param.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_PARAM_H -#define __ASM_PARAM_H - -#define EXEC_PAGESIZE 65536 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/perf_regs.h b/lib/libc/include/aarch64_be-linux-any/asm/perf_regs.h deleted file mode 100644 index d63b945af5a0252dcacee51f670e543c25d178d3..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/perf_regs.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_ARM64_PERF_REGS_H -#define _ASM_ARM64_PERF_REGS_H - -enum perf_event_arm_regs { - PERF_REG_ARM64_X0, - PERF_REG_ARM64_X1, - PERF_REG_ARM64_X2, - PERF_REG_ARM64_X3, - PERF_REG_ARM64_X4, - PERF_REG_ARM64_X5, - PERF_REG_ARM64_X6, - PERF_REG_ARM64_X7, - PERF_REG_ARM64_X8, - PERF_REG_ARM64_X9, - PERF_REG_ARM64_X10, - PERF_REG_ARM64_X11, - PERF_REG_ARM64_X12, - PERF_REG_ARM64_X13, - PERF_REG_ARM64_X14, - PERF_REG_ARM64_X15, - PERF_REG_ARM64_X16, - PERF_REG_ARM64_X17, - PERF_REG_ARM64_X18, - PERF_REG_ARM64_X19, - PERF_REG_ARM64_X20, - PERF_REG_ARM64_X21, - PERF_REG_ARM64_X22, - PERF_REG_ARM64_X23, - PERF_REG_ARM64_X24, - PERF_REG_ARM64_X25, - PERF_REG_ARM64_X26, - PERF_REG_ARM64_X27, - PERF_REG_ARM64_X28, - PERF_REG_ARM64_X29, - PERF_REG_ARM64_LR, - PERF_REG_ARM64_SP, - PERF_REG_ARM64_PC, - PERF_REG_ARM64_MAX, -}; -#endif /* _ASM_ARM64_PERF_REGS_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/posix_types.h b/lib/libc/include/aarch64_be-linux-any/asm/posix_types.h deleted file mode 100644 index b20f985d3a9fdbeb759ded61119791034ec75b48..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/posix_types.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __ASM_POSIX_TYPES_H -#define __ASM_POSIX_TYPES_H - -typedef unsigned short __kernel_old_uid_t; -typedef unsigned short __kernel_old_gid_t; -#define __kernel_old_uid_t __kernel_old_uid_t - -#include - -#endif /* __ASM_POSIX_TYPES_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/ptrace.h b/lib/libc/include/aarch64_be-linux-any/asm/ptrace.h deleted file mode 100644 index e866145891a7e24443fc9ddce91e8b1c22dc91fd..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/ptrace.h +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Based on arch/arm/include/asm/ptrace.h - * - * Copyright (C) 1996-2003 Russell King - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_PTRACE_H -#define __ASM_PTRACE_H - -#include - -#include -#include - - -/* - * PSR bits - */ -#define PSR_MODE_EL0t 0x00000000 -#define PSR_MODE_EL1t 0x00000004 -#define PSR_MODE_EL1h 0x00000005 -#define PSR_MODE_EL2t 0x00000008 -#define PSR_MODE_EL2h 0x00000009 -#define PSR_MODE_EL3t 0x0000000c -#define PSR_MODE_EL3h 0x0000000d -#define PSR_MODE_MASK 0x0000000f - -/* AArch32 CPSR bits */ -#define PSR_MODE32_BIT 0x00000010 - -/* AArch64 SPSR bits */ -#define PSR_F_BIT 0x00000040 -#define PSR_I_BIT 0x00000080 -#define PSR_A_BIT 0x00000100 -#define PSR_D_BIT 0x00000200 -#define PSR_PAN_BIT 0x00400000 -#define PSR_UAO_BIT 0x00800000 -#define PSR_V_BIT 0x10000000 -#define PSR_C_BIT 0x20000000 -#define PSR_Z_BIT 0x40000000 -#define PSR_N_BIT 0x80000000 - -/* - * Groups of PSR bits - */ -#define PSR_f 0xff000000 /* Flags */ -#define PSR_s 0x00ff0000 /* Status */ -#define PSR_x 0x0000ff00 /* Extension */ -#define PSR_c 0x000000ff /* Control */ - - -#ifndef __ASSEMBLY__ - -#include - -/* - * User structures for general purpose, floating point and debug registers. - */ -struct user_pt_regs { - __u64 regs[31]; - __u64 sp; - __u64 pc; - __u64 pstate; -}; - -struct user_fpsimd_state { - __uint128_t vregs[32]; - __u32 fpsr; - __u32 fpcr; - __u32 __reserved[2]; -}; - -struct user_hwdebug_state { - __u32 dbg_info; - __u32 pad; - struct { - __u64 addr; - __u32 ctrl; - __u32 pad; - } dbg_regs[16]; -}; - -/* SVE/FP/SIMD state (NT_ARM_SVE) */ - -struct user_sve_header { - __u32 size; /* total meaningful regset content in bytes */ - __u32 max_size; /* maxmium possible size for this thread */ - __u16 vl; /* current vector length */ - __u16 max_vl; /* maximum possible vector length */ - __u16 flags; - __u16 __reserved; -}; - -/* Definitions for user_sve_header.flags: */ -#define SVE_PT_REGS_MASK (1 << 0) - -#define SVE_PT_REGS_FPSIMD 0 -#define SVE_PT_REGS_SVE SVE_PT_REGS_MASK - -/* - * Common SVE_PT_* flags: - * These must be kept in sync with prctl interface in - */ -#define SVE_PT_VL_INHERIT (PR_SVE_VL_INHERIT >> 16) -#define SVE_PT_VL_ONEXEC (PR_SVE_SET_VL_ONEXEC >> 16) - - -/* - * The remainder of the SVE state follows struct user_sve_header. The - * total size of the SVE state (including header) depends on the - * metadata in the header: SVE_PT_SIZE(vq, flags) gives the total size - * of the state in bytes, including the header. - * - * Refer to for details of how to pass the correct - * "vq" argument to these macros. - */ - -/* Offset from the start of struct user_sve_header to the register data */ -#define SVE_PT_REGS_OFFSET \ - ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -/* - * The register data content and layout depends on the value of the - * flags field. - */ - -/* - * (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_FPSIMD case: - * - * The payload starts at offset SVE_PT_FPSIMD_OFFSET, and is of type - * struct user_fpsimd_state. Additional data might be appended in the - * future: use SVE_PT_FPSIMD_SIZE(vq, flags) to compute the total size. - * SVE_PT_FPSIMD_SIZE(vq, flags) will never be less than - * sizeof(struct user_fpsimd_state). - */ - -#define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET - -#define SVE_PT_FPSIMD_SIZE(vq, flags) (sizeof(struct user_fpsimd_state)) - -/* - * (flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE case: - * - * The payload starts at offset SVE_PT_SVE_OFFSET, and is of size - * SVE_PT_SVE_SIZE(vq, flags). - * - * Additional macros describe the contents and layout of the payload. - * For each, SVE_PT_SVE_x_OFFSET(args) is the start offset relative to - * the start of struct user_sve_header, and SVE_PT_SVE_x_SIZE(args) is - * the size in bytes: - * - * x type description - * - ---- ----------- - * ZREGS \ - * ZREG | - * PREGS | refer to - * PREG | - * FFR / - * - * FPSR uint32_t FPSR - * FPCR uint32_t FPCR - * - * Additional data might be appended in the future. - */ - -#define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq) -#define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq) -#define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq) -#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32) -#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32) - -#define __SVE_SIG_TO_PT(offset) \ - ((offset) - SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET) - -#define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET - -#define SVE_PT_SVE_ZREGS_OFFSET \ - __SVE_SIG_TO_PT(SVE_SIG_ZREGS_OFFSET) -#define SVE_PT_SVE_ZREG_OFFSET(vq, n) \ - __SVE_SIG_TO_PT(SVE_SIG_ZREG_OFFSET(vq, n)) -#define SVE_PT_SVE_ZREGS_SIZE(vq) \ - (SVE_PT_SVE_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) - -#define SVE_PT_SVE_PREGS_OFFSET(vq) \ - __SVE_SIG_TO_PT(SVE_SIG_PREGS_OFFSET(vq)) -#define SVE_PT_SVE_PREG_OFFSET(vq, n) \ - __SVE_SIG_TO_PT(SVE_SIG_PREG_OFFSET(vq, n)) -#define SVE_PT_SVE_PREGS_SIZE(vq) \ - (SVE_PT_SVE_PREG_OFFSET(vq, SVE_NUM_PREGS) - \ - SVE_PT_SVE_PREGS_OFFSET(vq)) - -#define SVE_PT_SVE_FFR_OFFSET(vq) \ - __SVE_SIG_TO_PT(SVE_SIG_FFR_OFFSET(vq)) - -#define SVE_PT_SVE_FPSR_OFFSET(vq) \ - ((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + \ - (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) -#define SVE_PT_SVE_FPCR_OFFSET(vq) \ - (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) - -/* - * Any future extension appended after FPCR must be aligned to the next - * 128-bit boundary. - */ - -#define SVE_PT_SVE_SIZE(vq, flags) \ - ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \ - - SVE_PT_SVE_OFFSET + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -#define SVE_PT_SIZE(vq, flags) \ - (((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? \ - SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \ - : SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags)) - -#endif /* __ASSEMBLY__ */ - -#endif /* __ASM_PTRACE_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/setup.h b/lib/libc/include/aarch64_be-linux-any/asm/setup.h deleted file mode 100644 index 32e442aba7cfe229940f334797836c878fd2272b..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/setup.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Based on arch/arm/include/asm/setup.h - * - * Copyright (C) 1997-1999 Russell King - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SETUP_H -#define __ASM_SETUP_H - -#include - -#define COMMAND_LINE_SIZE 2048 - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/sigcontext.h b/lib/libc/include/aarch64_be-linux-any/asm/sigcontext.h deleted file mode 100644 index eb6f272747a252388a8d073dd00e29f6ca376cec..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/sigcontext.h +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGCONTEXT_H -#define __ASM_SIGCONTEXT_H - -#ifndef __ASSEMBLY__ - -#include - -/* - * Signal context structure - contains all info to do with the state - * before the signal handler was invoked. - */ -struct sigcontext { - __u64 fault_address; - /* AArch64 registers */ - __u64 regs[31]; - __u64 sp; - __u64 pc; - __u64 pstate; - /* 4K reserved for FP/SIMD state and future expansion */ - __u8 __reserved[4096] __attribute__((__aligned__(16))); -}; - -/* - * Allocation of __reserved[]: - * (Note: records do not necessarily occur in the order shown here.) - * - * size description - * - * 0x210 fpsimd_context - * 0x10 esr_context - * 0x8a0 sve_context (vl <= 64) (optional) - * 0x20 extra_context (optional) - * 0x10 terminator (null _aarch64_ctx) - * - * 0x510 (reserved for future allocation) - * - * New records that can exceed this space need to be opt-in for userspace, so - * that an expanded signal frame is not generated unexpectedly. The mechanism - * for opting in will depend on the extension that generates each new record. - * The above table documents the maximum set and sizes of records than can be - * generated when userspace does not opt in for any such extension. - */ - -/* - * Header to be used at the beginning of structures extending the user - * context. Such structures must be placed after the rt_sigframe on the stack - * and be 16-byte aligned. The last structure must be a dummy one with the - * magic and size set to 0. - */ -struct _aarch64_ctx { - __u32 magic; - __u32 size; -}; - -#define FPSIMD_MAGIC 0x46508001 - -struct fpsimd_context { - struct _aarch64_ctx head; - __u32 fpsr; - __u32 fpcr; - __uint128_t vregs[32]; -}; - -/* ESR_EL1 context */ -#define ESR_MAGIC 0x45535201 - -struct esr_context { - struct _aarch64_ctx head; - __u64 esr; -}; - -/* - * extra_context: describes extra space in the signal frame for - * additional structures that don't fit in sigcontext.__reserved[]. - * - * Note: - * - * 1) fpsimd_context, esr_context and extra_context must be placed in - * sigcontext.__reserved[] if present. They cannot be placed in the - * extra space. Any other record can be placed either in the extra - * space or in sigcontext.__reserved[], unless otherwise specified in - * this file. - * - * 2) There must not be more than one extra_context. - * - * 3) If extra_context is present, it must be followed immediately in - * sigcontext.__reserved[] by the terminating null _aarch64_ctx. - * - * 4) The extra space to which datap points must start at the first - * 16-byte aligned address immediately after the terminating null - * _aarch64_ctx that follows the extra_context structure in - * __reserved[]. The extra space may overrun the end of __reserved[], - * as indicated by a sufficiently large value for the size field. - * - * 5) The extra space must itself be terminated with a null - * _aarch64_ctx. - */ -#define EXTRA_MAGIC 0x45585401 - -struct extra_context { - struct _aarch64_ctx head; - __u64 datap; /* 16-byte aligned pointer to extra space cast to __u64 */ - __u32 size; /* size in bytes of the extra space */ - __u32 __reserved[3]; -}; - -#define SVE_MAGIC 0x53564501 - -struct sve_context { - struct _aarch64_ctx head; - __u16 vl; - __u16 __reserved[3]; -}; - -#endif /* !__ASSEMBLY__ */ - -/* - * The SVE architecture leaves space for future expansion of the - * vector length beyond its initial architectural limit of 2048 bits - * (16 quadwords). - * - * See linux/Documentation/arm64/sve.txt for a description of the VL/VQ - * terminology. - */ -#define SVE_VQ_BYTES 16 /* number of bytes per quadword */ - -#define SVE_VQ_MIN 1 -#define SVE_VQ_MAX 512 - -#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES) -#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES) - -#define SVE_NUM_ZREGS 32 -#define SVE_NUM_PREGS 16 - -#define sve_vl_valid(vl) \ - ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX) -#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) -#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) - -/* - * If the SVE registers are currently live for the thread at signal delivery, - * sve_context.head.size >= - * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)) - * and the register data may be accessed using the SVE_SIG_*() macros. - * - * If sve_context.head.size < - * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)), - * the SVE registers were not live for the thread and no register data - * is included: in this case, the SVE_SIG_*() macros should not be - * used except for this check. - * - * The same convention applies when returning from a signal: a caller - * will need to remove or resize the sve_context block if it wants to - * make the SVE registers live when they were previously non-live or - * vice-versa. This may require the the caller to allocate fresh - * memory and/or move other context blocks in the signal frame. - * - * Changing the vector length during signal return is not permitted: - * sve_context.vl must equal the thread's current vector length when - * doing a sigreturn. - * - * - * Note: for all these macros, the "vq" argument denotes the SVE - * vector length in quadwords (i.e., units of 128 bits). - * - * The correct way to obtain vq is to use sve_vq_from_vl(vl). The - * result is valid if and only if sve_vl_valid(vl) is true. This is - * guaranteed for a struct sve_context written by the kernel. - * - * - * Additional macros describe the contents and layout of the payload. - * For each, SVE_SIG_x_OFFSET(args) is the start offset relative to - * the start of struct sve_context, and SVE_SIG_x_SIZE(args) is the - * size in bytes: - * - * x type description - * - ---- ----------- - * REGS the entire SVE context - * - * ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers - * ZREG __uint128_t[vq] individual Z-register Zn - * - * PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers - * PREG uint16_t[vq] individual P-register Pn - * - * FFR uint16_t[vq] first-fault status register - * - * Additional data might be appended in the future. - */ - -#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq) * SVE_VQ_BYTES) -#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8)) -#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq) - -#define SVE_SIG_REGS_OFFSET \ - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) - -#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET -#define SVE_SIG_ZREG_OFFSET(vq, n) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n)) -#define SVE_SIG_ZREGS_SIZE(vq) \ - (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET) - -#define SVE_SIG_PREGS_OFFSET(vq) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq)) -#define SVE_SIG_PREG_OFFSET(vq, n) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n)) -#define SVE_SIG_PREGS_SIZE(vq) \ - (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq)) - -#define SVE_SIG_FFR_OFFSET(vq) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq)) - -#define SVE_SIG_REGS_SIZE(vq) \ - (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) - -#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) - - -#endif /* __ASM_SIGCONTEXT_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/siginfo.h b/lib/libc/include/aarch64_be-linux-any/asm/siginfo.h deleted file mode 100644 index 0797d770776bd49fa65f1b36c4970d1554c740ca..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/siginfo.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGINFO_H -#define __ASM_SIGINFO_H - -#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/signal.h b/lib/libc/include/aarch64_be-linux-any/asm/signal.h deleted file mode 100644 index 167802d3a21a27f1da82fa64364d21d5bb4786aa..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/signal.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_SIGNAL_H -#define __ASM_SIGNAL_H - -/* Required for AArch32 compatibility. */ -#define SA_RESTORER 0x04000000 - -#define MINSIGSTKSZ 5120 -#define SIGSTKSZ 16384 - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/stat.h b/lib/libc/include/aarch64_be-linux-any/asm/stat.h deleted file mode 100644 index 04e59c072eb2667dd5df2537d075a586b01aa9fc..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/stat.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/statfs.h b/lib/libc/include/aarch64_be-linux-any/asm/statfs.h deleted file mode 100644 index dfa2faa7db74670c39807c261970ff83aae76436..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/statfs.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_STATFS_H -#define __ASM_STATFS_H - -#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) - -#include - -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/ucontext.h b/lib/libc/include/aarch64_be-linux-any/asm/ucontext.h deleted file mode 100644 index 87f00793b319167c3d67192961f02caaee33e7d5..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/ucontext.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_UCONTEXT_H -#define __ASM_UCONTEXT_H - -#include - -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - sigset_t uc_sigmask; - /* glibc uses a 1024-bit sigset_t */ - __u8 __unused[1024 / 8 - sizeof(sigset_t)]; - /* last for future expansion */ - struct sigcontext uc_mcontext; -}; - -#endif /* __ASM_UCONTEXT_H */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-any/asm/unistd.h b/lib/libc/include/aarch64_be-linux-any/asm/unistd.h deleted file mode 100644 index 198e1aa8f62af4ad653754cf8b27182f1b296b7a..0000000000000000000000000000000000000000 --- a/lib/libc/include/aarch64_be-linux-any/asm/unistd.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#define __ARCH_WANT_RENAMEAT - -#include \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm-generic/fcntl.h b/lib/libc/include/any-linux-any/asm-generic/fcntl.h index b16d9c6bbb06898f11f9c0266c0d2d37709f31ec..f10cd2d88c7dcd8b5da6010fa7d625730bc6c40a 100644 --- a/lib/libc/include/any-linux-any/asm-generic/fcntl.h +++ b/lib/libc/include/any-linux-any/asm-generic/fcntl.h @@ -181,6 +181,10 @@ struct f_owner_ex { blocking */ #define LOCK_UN 8 /* remove lock */ +/* + * LOCK_MAND support has been removed from the kernel. We leave the symbols + * here to not break legacy builds, but these should not be used in new code. + */ #define LOCK_MAND 32 /* This is a mandatory flock ... */ #define LOCK_READ 64 /* which allows concurrent read operations */ #define LOCK_WRITE 128 /* which allows concurrent write operations */ diff --git a/lib/libc/include/any-linux-any/asm-generic/hugetlb_encode.h b/lib/libc/include/any-linux-any/asm-generic/hugetlb_encode.h index 0e5c89d6c390b9fb47710e3d1b298445c135b772..58de1e41239e9faf671a3236984c98a3398adca0 100644 --- a/lib/libc/include/any-linux-any/asm-generic/hugetlb_encode.h +++ b/lib/libc/include/any-linux-any/asm-generic/hugetlb_encode.h @@ -20,6 +20,7 @@ #define HUGETLB_FLAG_ENCODE_SHIFT 26 #define HUGETLB_FLAG_ENCODE_MASK 0x3f +#define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) diff --git a/lib/libc/include/any-linux-any/asm-generic/ioctls.h b/lib/libc/include/any-linux-any/asm-generic/ioctls.h index b43432eed1eaad130b88e941b3e1c6878e188202..d6c96df11a6859830f416342d92ceb48e04f75f5 100644 --- a/lib/libc/include/any-linux-any/asm-generic/ioctls.h +++ b/lib/libc/include/any-linux-any/asm-generic/ioctls.h @@ -79,6 +79,8 @@ #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ +#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) +#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 diff --git a/lib/libc/include/any-linux-any/asm-generic/ipcbuf.h b/lib/libc/include/any-linux-any/asm-generic/ipcbuf.h index 6e9168f28acbc7fb6aff58ae3df41f4e9e050df0..9dfffa0ac87efbcbd772ccf413d6734de7fcf741 100644 --- a/lib/libc/include/any-linux-any/asm-generic/ipcbuf.h +++ b/lib/libc/include/any-linux-any/asm-generic/ipcbuf.h @@ -2,6 +2,8 @@ #ifndef __ASM_GENERIC_IPCBUF_H #define __ASM_GENERIC_IPCBUF_H +#include + /* * The generic ipc64_perm structure: * Note extra padding because this structure is passed back and forth diff --git a/lib/libc/include/any-linux-any/asm-generic/mman-common.h b/lib/libc/include/any-linux-any/asm-generic/mman-common.h index 5d47729959fc47fa2b09cb36b85a6a85e5353f46..9d958863c19c90c3e8c1c4ac1e0aaac589ad0c3d 100644 --- a/lib/libc/include/any-linux-any/asm-generic/mman-common.h +++ b/lib/libc/include/any-linux-any/asm-generic/mman-common.h @@ -11,25 +11,28 @@ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ #define PROT_SEM 0x8 /* page may be used for atomic ops */ +/* 0x10 reserved for arch-specific use */ +/* 0x20 reserved for arch-specific use */ #define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ +/* 0x01 - 0x03 are defined in linux/mman.h */ #define MAP_TYPE 0x0f /* Mask for type of mapping */ #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ -#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED -# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ -#else -# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ -#endif -/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ +/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ +#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x010000 /* do not block on IO */ +#define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ +#define MAP_HUGETLB 0x040000 /* create a huge page mapping */ +#define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ +#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be + * uninitialized */ + /* * Flags for mlock */ @@ -66,6 +69,12 @@ #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ +#define MADV_COLD 20 /* deactivate these pages */ +#define MADV_PAGEOUT 21 /* reclaim these pages */ + +#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */ +#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */ + /* compatibility flags */ #define MAP_FILE 0 diff --git a/lib/libc/include/any-linux-any/asm-generic/mman.h b/lib/libc/include/any-linux-any/asm-generic/mman.h index d9df9688aeb1fb0034b1a630393980eaa4f0eda0..588c8d5ba42bb03a4d7747b828b09abd6f58bb8e 100644 --- a/lib/libc/include/any-linux-any/asm-generic/mman.h +++ b/lib/libc/include/any-linux-any/asm-generic/mman.h @@ -9,13 +9,11 @@ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000 /* do not block on IO */ -#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ -#define MAP_HUGETLB 0x40000 /* create a huge page mapping */ -#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */ -/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ +/* + * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h + * for MAP_HUGETLB usage + */ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ diff --git a/lib/libc/include/any-linux-any/asm-generic/msgbuf.h b/lib/libc/include/any-linux-any/asm-generic/msgbuf.h index 122d3269e6abd5cd2dd867756f47596d3498e0f2..2effb9ce76e716b460f7f8ad2c3a27b5b94eac27 100644 --- a/lib/libc/include/any-linux-any/asm-generic/msgbuf.h +++ b/lib/libc/include/any-linux-any/asm-generic/msgbuf.h @@ -3,6 +3,8 @@ #define __ASM_GENERIC_MSGBUF_H #include +#include + /* * generic msqid64_ds structure. * @@ -13,9 +15,9 @@ * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * - * 64 bit architectures typically define a 64 bit __kernel_time_t, - * so they do not need the first three padding words. - * On big-endian systems, the padding is in the wrong place. + * 64 bit architectures use a 64-bit long time field here, while + * 32 bit architectures have a pair of unsigned long values. + * On big-endian systems, the lower half is in the wrong place. * * Pad space is left for: * - 2 miscellaneous 32-bit values @@ -24,9 +26,9 @@ struct msqid64_ds { struct ipc64_perm msg_perm; #if __BITS_PER_LONG == 64 - __kernel_time_t msg_stime; /* last msgsnd time */ - __kernel_time_t msg_rtime; /* last msgrcv time */ - __kernel_time_t msg_ctime; /* last change time */ + long msg_stime; /* last msgsnd time */ + long msg_rtime; /* last msgrcv time */ + long msg_ctime; /* last change time */ #else unsigned long msg_stime; /* last msgsnd time */ unsigned long msg_stime_high; diff --git a/lib/libc/include/any-linux-any/asm-generic/posix_types.h b/lib/libc/include/any-linux-any/asm-generic/posix_types.h index 43493ba76c3d02d563a14f84f1b69d812da5b3b3..99fb554755b615647c0b42f7f3460f13c9a4fbba 100644 --- a/lib/libc/include/any-linux-any/asm-generic/posix_types.h +++ b/lib/libc/include/any-linux-any/asm-generic/posix_types.h @@ -86,6 +86,7 @@ typedef struct { */ typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; +typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; diff --git a/lib/libc/include/any-linux-any/asm-generic/sembuf.h b/lib/libc/include/any-linux-any/asm-generic/sembuf.h index 06cee9ad618f13a30836083187e3336177bd02fe..c9bbce8f01bdb18780d8acc78926870356de1d34 100644 --- a/lib/libc/include/any-linux-any/asm-generic/sembuf.h +++ b/lib/libc/include/any-linux-any/asm-generic/sembuf.h @@ -3,19 +3,19 @@ #define __ASM_GENERIC_SEMBUF_H #include +#include /* - * The semid64_ds structure for x86 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. + * The semid64_ds structure for most architectures (though it came from x86_32 + * originally). Note extra padding because this structure is passed back and + * forth between kernel and user space. * * semid64_ds was originally meant to be architecture specific, but * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * - * 64 bit architectures use a 64-bit __kernel_time_t here, while + * 64 bit architectures use a 64-bit long time field here, while * 32 bit architectures have a pair of unsigned long values. - * so they do not need the first two padding words. * * On big-endian systems, the padding is in the wrong place for * historic reasons, so user space has to reconstruct a time_t @@ -29,8 +29,8 @@ struct semid64_ds { struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ #if __BITS_PER_LONG == 64 - __kernel_time_t sem_otime; /* last semop time */ - __kernel_time_t sem_ctime; /* last change time */ + long sem_otime; /* last semop time */ + long sem_ctime; /* last change time */ #else unsigned long sem_otime; /* last semop time */ unsigned long sem_otime_high; diff --git a/lib/libc/include/any-linux-any/asm-generic/shmbuf.h b/lib/libc/include/any-linux-any/asm-generic/shmbuf.h index b8065e3823b52872b22e38c1b0bf58cceea267ed..832e861398f023bffe9d17137aa82d9b774ec9fe 100644 --- a/lib/libc/include/any-linux-any/asm-generic/shmbuf.h +++ b/lib/libc/include/any-linux-any/asm-generic/shmbuf.h @@ -13,9 +13,9 @@ * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * - * 64 bit architectures typically define a 64 bit __kernel_time_t, - * so they do not need the first two padding words. - * On big-endian systems, the padding is in the wrong place. + * 64 bit architectures use a 64-bit long time field here, while + * 32 bit architectures have a pair of unsigned long values. + * On big-endian systems, the lower half is in the wrong place. * * * Pad space is left for: @@ -26,9 +26,9 @@ struct shmid64_ds { struct ipc64_perm shm_perm; /* operation perms */ size_t shm_segsz; /* size of segment (bytes) */ #if __BITS_PER_LONG == 64 - __kernel_time_t shm_atime; /* last attach time */ - __kernel_time_t shm_dtime; /* last detach time */ - __kernel_time_t shm_ctime; /* last change time */ + long shm_atime; /* last attach time */ + long shm_dtime; /* last detach time */ + long shm_ctime; /* last change time */ #else unsigned long shm_atime; /* last attach time */ unsigned long shm_atime_high; diff --git a/lib/libc/include/any-linux-any/asm-generic/shmparam.h b/lib/libc/include/any-linux-any/asm-generic/shmparam.h deleted file mode 100644 index 477a2194ae8b32cc48389b6faff758c72c601343..0000000000000000000000000000000000000000 --- a/lib/libc/include/any-linux-any/asm-generic/shmparam.h +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __ASM_GENERIC_SHMPARAM_H -#define __ASM_GENERIC_SHMPARAM_H - -#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ - -#endif /* _ASM_GENERIC_SHMPARAM_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm-generic/siginfo.h b/lib/libc/include/any-linux-any/asm-generic/siginfo.h index 0d0abc57784cbeae6d36c88eb5e071dd6ce11373..3f28b46755cb239103873dde08b6c790076fa11a 100644 --- a/lib/libc/include/any-linux-any/asm-generic/siginfo.h +++ b/lib/libc/include/any-linux-any/asm-generic/siginfo.h @@ -10,18 +10,7 @@ typedef union sigval { void *sival_ptr; } sigval_t; -/* - * This is the size (including padding) of the part of the - * struct siginfo that is before the union. - */ -#ifndef __ARCH_SI_PREAMBLE_SIZE -#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) -#endif - #define SI_MAX_SIZE 128 -#ifndef SI_PAD_SIZE -#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) -#endif /* * The default "si_band" type is "long", as specified by POSIX. @@ -40,96 +29,117 @@ typedef union sigval { #define __ARCH_SI_ATTRIBUTES #endif -typedef struct siginfo { - int si_signo; -#ifndef __ARCH_HAS_SWAPPED_SIGINFO - int si_errno; - int si_code; -#else - int si_code; - int si_errno; -#endif +/* + * Be careful when extending this union. On 32bit siginfo_t is 32bit + * aligned. Which means that a 64bit field or any other field that + * would increase the alignment of siginfo_t will break the ABI. + */ +union __sifields { + /* kill() */ + struct { + __kernel_pid_t _pid; /* sender's pid */ + __kernel_uid32_t _uid; /* sender's uid */ + } _kill; - union { - int _pad[SI_PAD_SIZE]; + /* POSIX.1b timers */ + struct { + __kernel_timer_t _tid; /* timer id */ + int _overrun; /* overrun count */ + sigval_t _sigval; /* same as below */ + int _sys_private; /* not to be passed to user */ + } _timer; - /* kill() */ - struct { - __kernel_pid_t _pid; /* sender's pid */ - __kernel_uid32_t _uid; /* sender's uid */ - } _kill; + /* POSIX.1b signals */ + struct { + __kernel_pid_t _pid; /* sender's pid */ + __kernel_uid32_t _uid; /* sender's uid */ + sigval_t _sigval; + } _rt; - /* POSIX.1b timers */ - struct { - __kernel_timer_t _tid; /* timer id */ - int _overrun; /* overrun count */ - sigval_t _sigval; /* same as below */ - int _sys_private; /* not to be passed to user */ - } _timer; + /* SIGCHLD */ + struct { + __kernel_pid_t _pid; /* which child */ + __kernel_uid32_t _uid; /* sender's uid */ + int _status; /* exit code */ + __ARCH_SI_CLOCK_T _utime; + __ARCH_SI_CLOCK_T _stime; + } _sigchld; - /* POSIX.1b signals */ - struct { - __kernel_pid_t _pid; /* sender's pid */ - __kernel_uid32_t _uid; /* sender's uid */ - sigval_t _sigval; - } _rt; - - /* SIGCHLD */ - struct { - __kernel_pid_t _pid; /* which child */ - __kernel_uid32_t _uid; /* sender's uid */ - int _status; /* exit code */ - __ARCH_SI_CLOCK_T _utime; - __ARCH_SI_CLOCK_T _stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ - struct { - void *_addr; /* faulting insn/memory ref. */ -#ifdef __ARCH_SI_TRAPNO - int _trapno; /* TRAP # which caused the signal */ -#endif + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ + struct { + void *_addr; /* faulting insn/memory ref. */ #ifdef __ia64__ - int _imm; /* immediate value for "break" */ - unsigned int _flags; /* see ia64 si_flags */ - unsigned long _isr; /* isr */ + int _imm; /* immediate value for "break" */ + unsigned int _flags; /* see ia64 si_flags */ + unsigned long _isr; /* isr */ #endif #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ sizeof(short) : __alignof__(void *)) - union { - /* - * used when si_code=BUS_MCEERR_AR or - * used when si_code=BUS_MCEERR_AO - */ - short _addr_lsb; /* LSB of the reported address */ - /* used when si_code=SEGV_BNDERR */ - struct { - char _dummy_bnd[__ADDR_BND_PKEY_PAD]; - void *_lower; - void *_upper; - } _addr_bnd; - /* used when si_code=SEGV_PKUERR */ - struct { - char _dummy_pkey[__ADDR_BND_PKEY_PAD]; - __u32 _pkey; - } _addr_pkey; - }; - } _sigfault; + union { + /* used on alpha and sparc */ + int _trapno; /* TRAP # which caused the signal */ + /* + * used when si_code=BUS_MCEERR_AR or + * used when si_code=BUS_MCEERR_AO + */ + short _addr_lsb; /* LSB of the reported address */ + /* used when si_code=SEGV_BNDERR */ + struct { + char _dummy_bnd[__ADDR_BND_PKEY_PAD]; + void *_lower; + void *_upper; + } _addr_bnd; + /* used when si_code=SEGV_PKUERR */ + struct { + char _dummy_pkey[__ADDR_BND_PKEY_PAD]; + __u32 _pkey; + } _addr_pkey; + /* used when si_code=TRAP_PERF */ + struct { + unsigned long _data; + __u32 _type; + } _perf; + }; + } _sigfault; - /* SIGPOLL */ - struct { - __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ - int _fd; - } _sigpoll; + /* SIGPOLL */ + struct { + __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; - /* SIGSYS */ - struct { - void *_call_addr; /* calling user insn */ - int _syscall; /* triggering system call number */ - unsigned int _arch; /* AUDIT_ARCH_* of syscall */ - } _sigsys; - } _sifields; + /* SIGSYS */ + struct { + void *_call_addr; /* calling user insn */ + int _syscall; /* triggering system call number */ + unsigned int _arch; /* AUDIT_ARCH_* of syscall */ + } _sigsys; +}; + +#ifndef __ARCH_HAS_SWAPPED_SIGINFO +#define __SIGINFO \ +struct { \ + int si_signo; \ + int si_errno; \ + int si_code; \ + union __sifields _sifields; \ +} +#else +#define __SIGINFO \ +struct { \ + int si_signo; \ + int si_code; \ + int si_errno; \ + union __sifields _sifields; \ +} +#endif /* __ARCH_HAS_SWAPPED_SIGINFO */ + +typedef struct siginfo { + union { + __SIGINFO; + int _si_pad[SI_MAX_SIZE/sizeof(int)]; + }; } __ARCH_SI_ATTRIBUTES siginfo_t; /* @@ -147,13 +157,13 @@ typedef struct siginfo { #define si_int _sifields._rt._sigval.sival_int #define si_ptr _sifields._rt._sigval.sival_ptr #define si_addr _sifields._sigfault._addr -#ifdef __ARCH_SI_TRAPNO #define si_trapno _sifields._sigfault._trapno -#endif #define si_addr_lsb _sifields._sigfault._addr_lsb #define si_lower _sifields._sigfault._addr_bnd._lower #define si_upper _sifields._sigfault._addr_bnd._upper #define si_pkey _sifields._sigfault._addr_pkey._pkey +#define si_perf_data _sifields._sigfault._perf._data +#define si_perf_type _sifields._sigfault._perf._type #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd #define si_call_addr _sifields._sigsys._call_addr @@ -228,7 +238,9 @@ typedef struct siginfo { #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ #define SEGV_ADIDERR 6 /* Disrupting MCD error */ #define SEGV_ADIPERR 7 /* Precise MCD exception */ -#define NSIGSEGV 7 +#define SEGV_MTEAERR 8 /* Asynchronous ARM MTE error */ +#define SEGV_MTESERR 9 /* Synchronous ARM MTE exception */ +#define NSIGSEGV 9 /* * SIGBUS si_codes @@ -250,7 +262,8 @@ typedef struct siginfo { #define TRAP_BRANCH 3 /* process taken branch trap */ #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ #define TRAP_UNK 5 /* undiagnosed trap */ -#define NSIGTRAP 5 +#define TRAP_PERF 6 /* perf event with sigtrap=1 */ +#define NSIGTRAP 6 /* * There is an additional set of SIGTRAP si_codes used by ptrace @@ -283,7 +296,14 @@ typedef struct siginfo { * SIGSYS si_codes */ #define SYS_SECCOMP 1 /* seccomp triggered */ -#define NSIGSYS 1 +#define SYS_USER_DISPATCH 2 /* syscall user dispatch triggered */ +#define NSIGSYS 2 + +/* + * SIGEMT si_codes + */ +#define EMT_TAGOVF 1 /* tag overflow */ +#define NSIGEMT 1 /* * sigevent definitions diff --git a/lib/libc/include/any-linux-any/asm-generic/signal-defs.h b/lib/libc/include/any-linux-any/asm-generic/signal-defs.h index e66d2a926efff6c4ee33e331ec200e925c853936..af36653590d5ef6952e94d00d4b84b56f05331fc 100644 --- a/lib/libc/include/any-linux-any/asm-generic/signal-defs.h +++ b/lib/libc/include/any-linux-any/asm-generic/signal-defs.h @@ -4,6 +4,70 @@ +/* + * SA_FLAGS values: + * + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_SIGINFO delivers the signal with SIGINFO structs. + * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_NODEFER prevents the current signal from being masked in the handler. + * SA_RESETHAND clears the handler when the signal is delivered. + * SA_UNSUPPORTED is a flag bit that will never be supported. Kernels from + * before the introduction of SA_UNSUPPORTED did not clear unknown bits from + * sa_flags when read using the oldact argument to sigaction and rt_sigaction, + * so this bit allows flag bit support to be detected from userspace while + * allowing an old kernel to be distinguished from a kernel that supports every + * flag bit. + * SA_EXPOSE_TAGBITS exposes an architecture-defined set of tag bits in + * siginfo.si_addr. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#ifndef SA_NOCLDSTOP +#define SA_NOCLDSTOP 0x00000001 +#endif +#ifndef SA_NOCLDWAIT +#define SA_NOCLDWAIT 0x00000002 +#endif +#ifndef SA_SIGINFO +#define SA_SIGINFO 0x00000004 +#endif +/* 0x00000008 used on alpha, mips, parisc */ +/* 0x00000010 used on alpha, parisc */ +/* 0x00000020 used on alpha, parisc, sparc */ +/* 0x00000040 used on alpha, parisc */ +/* 0x00000080 used on parisc */ +/* 0x00000100 used on sparc */ +/* 0x00000200 used on sparc */ +#define SA_UNSUPPORTED 0x00000400 +#define SA_EXPOSE_TAGBITS 0x00000800 +/* 0x00010000 used on mips */ +/* 0x00800000 used for internal SA_IMMUTABLE */ +/* 0x01000000 used on x86 */ +/* 0x02000000 used on x86 */ +/* + * New architectures should not define the obsolete + * SA_RESTORER 0x04000000 + */ +#ifndef SA_ONSTACK +#define SA_ONSTACK 0x08000000 +#endif +#ifndef SA_RESTART +#define SA_RESTART 0x10000000 +#endif +#ifndef SA_NODEFER +#define SA_NODEFER 0x40000000 +#endif +#ifndef SA_RESETHAND +#define SA_RESETHAND 0x80000000 +#endif + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND + #ifndef SIG_BLOCK #define SIG_BLOCK 0 /* for blocking signals */ #endif diff --git a/lib/libc/include/any-linux-any/asm-generic/signal.h b/lib/libc/include/any-linux-any/asm-generic/signal.h index 4503e631ad1c0531fc5743d1e14564cf6fbc77b5..2613729d3141df0a2877073c25f0060fcb849298 100644 --- a/lib/libc/include/any-linux-any/asm-generic/signal.h +++ b/lib/libc/include/any-linux-any/asm-generic/signal.h @@ -52,35 +52,6 @@ #define SIGRTMAX _NSIG #endif -/* - * SA_FLAGS values: - * - * SA_ONSTACK indicates that a registered stack_t will be used. - * SA_RESTART flag to get restarting signals (which were the default long ago) - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. - * SA_RESETHAND clears the handler when the signal is delivered. - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. - * SA_NODEFER prevents the current signal from being masked in the handler. - * - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single - * Unix names RESETHAND and NODEFER respectively. - */ -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 -#define SA_SIGINFO 0x00000004 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -/* - * New architectures should not define the obsolete - * SA_RESTORER 0x04000000 - */ - #if !defined MINSIGSTKSZ || !defined SIGSTKSZ #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 diff --git a/lib/libc/include/any-linux-any/asm-generic/socket.h b/lib/libc/include/any-linux-any/asm-generic/socket.h index 1829e961c69b1baec5b22f67fca2c4d83722e325..0123e0519c1690e9c7945fb7a38c3ace35d3d08a 100644 --- a/lib/libc/include/any-linux-any/asm-generic/socket.h +++ b/lib/libc/include/any-linux-any/asm-generic/socket.h @@ -2,6 +2,7 @@ #ifndef __ASM_GENERIC_SOCKET_H #define __ASM_GENERIC_SOCKET_H +#include #include /* For setsockopt(2) */ @@ -29,8 +30,8 @@ #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 #define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 +#define SO_RCVTIMEO_OLD 20 +#define SO_SNDTIMEO_OLD 21 #endif /* Security levels - as per NRL IPv6 - don't actually do anything */ @@ -46,21 +47,14 @@ #define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 #define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS #define SO_MARK 36 -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING - #define SO_PROTOCOL 38 #define SO_DOMAIN 39 @@ -110,4 +104,51 @@ #define SO_TXTIME 61 #define SCM_TXTIME SO_TXTIME +#define SO_BINDTOIFINDEX 62 + +#define SO_TIMESTAMP_OLD 29 +#define SO_TIMESTAMPNS_OLD 35 +#define SO_TIMESTAMPING_OLD 37 + +#define SO_TIMESTAMP_NEW 63 +#define SO_TIMESTAMPNS_NEW 64 +#define SO_TIMESTAMPING_NEW 65 + +#define SO_RCVTIMEO_NEW 66 +#define SO_SNDTIMEO_NEW 67 + +#define SO_DETACH_REUSEPORT_BPF 68 + +#define SO_PREFER_BUSY_POLL 69 +#define SO_BUSY_POLL_BUDGET 70 + +#define SO_NETNS_COOKIE 71 + +#define SO_BUF_LOCK 72 + +#define SO_RESERVE_MEM 73 + + +#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) +/* on 64-bit and x32, avoid the ?: operator */ +#define SO_TIMESTAMP SO_TIMESTAMP_OLD +#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD +#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD + +#define SO_RCVTIMEO SO_RCVTIMEO_OLD +#define SO_SNDTIMEO SO_SNDTIMEO_OLD +#else +#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) +#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) +#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) + +#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) +#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) +#endif + +#define SCM_TIMESTAMP SO_TIMESTAMP +#define SCM_TIMESTAMPNS SO_TIMESTAMPNS +#define SCM_TIMESTAMPING SO_TIMESTAMPING + + #endif /* __ASM_GENERIC_SOCKET_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm-generic/sockios.h b/lib/libc/include/any-linux-any/asm-generic/sockios.h index f595e163bd2b8d037cf9757db6e7d542d082b097..314afef42bbccc6178905c80c096c232552e005b 100644 --- a/lib/libc/include/any-linux-any/asm-generic/sockios.h +++ b/lib/libc/include/any-linux-any/asm-generic/sockios.h @@ -8,7 +8,7 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ +#define SIOCGSTAMP_OLD 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS_OLD 0x8907 /* Get stamp (timespec) */ #endif /* __ASM_GENERIC_SOCKIOS_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm-generic/unistd.h b/lib/libc/include/any-linux-any/asm-generic/unistd.h index c11f76bd582738153122f169599370768986cc33..67a82bc104a13140e62f180b24f66d625a06962e 100644 --- a/lib/libc/include/any-linux-any/asm-generic/unistd.h +++ b/lib/libc/include/any-linux-any/asm-generic/unistd.h @@ -38,8 +38,10 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) #define __NR_io_cancel 3 __SYSCALL(__NR_io_cancel, sys_io_cancel) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_io_getevents 4 -__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents) +__SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) +#endif /* fs/xattr.c */ #define __NR_setxattr 5 @@ -138,7 +140,7 @@ __SYSCALL(__NR_renameat, sys_renameat) #define __NR_umount2 39 __SYSCALL(__NR_umount2, sys_umount) #define __NR_mount 40 -__SC_COMP(__NR_mount, sys_mount, compat_sys_mount) +__SYSCALL(__NR_mount, sys_mount) #define __NR_pivot_root 41 __SYSCALL(__NR_pivot_root, sys_pivot_root) @@ -179,7 +181,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat) #define __NR_fchown 55 __SYSCALL(__NR_fchown, sys_fchown) #define __NR_openat 56 -__SC_COMP(__NR_openat, sys_openat, compat_sys_openat) +__SYSCALL(__NR_openat, sys_openat) #define __NR_close 57 __SYSCALL(__NR_close, sys_close) #define __NR_vhangup 58 @@ -205,9 +207,9 @@ __SYSCALL(__NR_read, sys_read) #define __NR_write 64 __SYSCALL(__NR_write, sys_write) #define __NR_readv 65 -__SC_COMP(__NR_readv, sys_readv, compat_sys_readv) +__SC_COMP(__NR_readv, sys_readv, sys_readv) #define __NR_writev 66 -__SC_COMP(__NR_writev, sys_writev, compat_sys_writev) +__SC_COMP(__NR_writev, sys_writev, sys_writev) #define __NR_pread64 67 __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) #define __NR_pwrite64 68 @@ -222,10 +224,12 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) __SYSCALL(__NR3264_sendfile, sys_sendfile64) /* fs/select.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_pselect6 72 -__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6) +__SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) #define __NR_ppoll 73 -__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll) +__SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) +#endif /* fs/signalfd.c */ #define __NR_signalfd4 74 @@ -233,7 +237,7 @@ __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) /* fs/splice.c */ #define __NR_vmsplice 75 -__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) +__SYSCALL(__NR_vmsplice, sys_vmsplice) #define __NR_splice 76 __SYSCALL(__NR_splice, sys_splice) #define __NR_tee 77 @@ -242,10 +246,12 @@ __SYSCALL(__NR_tee, sys_tee) /* fs/stat.c */ #define __NR_readlinkat 78 __SYSCALL(__NR_readlinkat, sys_readlinkat) +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) #define __NR3264_fstatat 79 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) #define __NR3264_fstat 80 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) +#endif /* fs/sync.c */ #define __NR_sync 81 @@ -267,16 +273,20 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ /* fs/timerfd.c */ #define __NR_timerfd_create 85 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timerfd_settime 86 -__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \ - compat_sys_timerfd_settime) +__SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ + sys_timerfd_settime) #define __NR_timerfd_gettime 87 -__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \ - compat_sys_timerfd_gettime) +__SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ + sys_timerfd_gettime) +#endif /* fs/utimes.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_utimensat 88 -__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat) +__SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) +#endif /* kernel/acct.c */ #define __NR_acct 89 @@ -307,8 +317,10 @@ __SYSCALL(__NR_set_tid_address, sys_set_tid_address) __SYSCALL(__NR_unshare, sys_unshare) /* kernel/futex.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_futex 98 -__SC_COMP(__NR_futex, sys_futex, compat_sys_futex) +__SC_3264(__NR_futex, sys_futex_time32, sys_futex) +#endif #define __NR_set_robust_list 99 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ compat_sys_set_robust_list) @@ -317,8 +329,10 @@ __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ compat_sys_get_robust_list) /* kernel/hrtimer.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_nanosleep 101 -__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep) +__SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) +#endif /* kernel/itimer.c */ #define __NR_getitimer 102 @@ -339,23 +353,29 @@ __SYSCALL(__NR_delete_module, sys_delete_module) /* kernel/posix-timers.c */ #define __NR_timer_create 107 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timer_gettime 108 -__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime) +__SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) +#endif #define __NR_timer_getoverrun 109 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timer_settime 110 -__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime) +__SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) +#endif #define __NR_timer_delete 111 __SYSCALL(__NR_timer_delete, sys_timer_delete) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_clock_settime 112 -__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime) +__SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) #define __NR_clock_gettime 113 -__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime) +__SC_3264(__NR_clock_gettime, sys_clock_gettime32, sys_clock_gettime) #define __NR_clock_getres 114 -__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres) +__SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres) #define __NR_clock_nanosleep 115 -__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \ - compat_sys_clock_nanosleep) +__SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ + sys_clock_nanosleep) +#endif /* kernel/printk.c */ #define __NR_syslog 116 @@ -386,9 +406,11 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) #define __NR_sched_get_priority_min 126 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_sched_rr_get_interval 127 -__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \ - compat_sys_sched_rr_get_interval) +__SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ + sys_sched_rr_get_interval) +#endif /* kernel/signal.c */ #define __NR_restart_syscall 128 @@ -409,9 +431,11 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) #define __NR_rt_sigpending 136 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_rt_sigtimedwait 137 -__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ - compat_sys_rt_sigtimedwait) +__SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ + sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) +#endif #define __NR_rt_sigqueueinfo 138 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ compat_sys_rt_sigqueueinfo) @@ -465,10 +489,15 @@ __SYSCALL(__NR_uname, sys_newuname) __SYSCALL(__NR_sethostname, sys_sethostname) #define __NR_setdomainname 162 __SYSCALL(__NR_setdomainname, sys_setdomainname) + +#ifdef __ARCH_WANT_SET_GET_RLIMIT +/* getrlimit and setrlimit are superseded with prlimit64 */ #define __NR_getrlimit 163 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) #define __NR_setrlimit 164 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) +#endif + #define __NR_getrusage 165 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) #define __NR_umask 166 @@ -479,14 +508,16 @@ __SYSCALL(__NR_prctl, sys_prctl) __SYSCALL(__NR_getcpu, sys_getcpu) /* kernel/time.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_gettimeofday 169 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) #define __NR_settimeofday 170 __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) #define __NR_adjtimex 171 -__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex) +__SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) +#endif -/* kernel/timer.c */ +/* kernel/sys.c */ #define __NR_getpid 172 __SYSCALL(__NR_getpid, sys_getpid) #define __NR_getppid 173 @@ -509,11 +540,13 @@ __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) #define __NR_mq_unlink 181 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_mq_timedsend 182 -__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend) +__SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) #define __NR_mq_timedreceive 183 -__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \ - compat_sys_mq_timedreceive) +__SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ + sys_mq_timedreceive) +#endif #define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185 @@ -534,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget) #define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) +#endif #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop) @@ -571,9 +606,9 @@ __SYSCALL(__NR_sendto, sys_sendto) #define __NR_recvfrom 207 __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) #define __NR_setsockopt 208 -__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) +__SC_COMP(__NR_setsockopt, sys_setsockopt, sys_setsockopt) #define __NR_getsockopt 209 -__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) +__SC_COMP(__NR_getsockopt, sys_getsockopt, sys_getsockopt) #define __NR_shutdown 210 __SYSCALL(__NR_shutdown, sys_shutdown) #define __NR_sendmsg 211 @@ -638,15 +673,15 @@ __SYSCALL(__NR_madvise, sys_madvise) #define __NR_remap_file_pages 234 __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) #define __NR_mbind 235 -__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) +__SYSCALL(__NR_mbind, sys_mbind) #define __NR_get_mempolicy 236 -__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) +__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy) #define __NR_set_mempolicy 237 -__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) +__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy) #define __NR_migrate_pages 238 -__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) +__SYSCALL(__NR_migrate_pages, sys_migrate_pages) #define __NR_move_pages 239 -__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) +__SYSCALL(__NR_move_pages, sys_move_pages) #endif #define __NR_rt_tgsigqueueinfo 240 @@ -656,8 +691,10 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ __SYSCALL(__NR_perf_event_open, sys_perf_event_open) #define __NR_accept4 242 __SYSCALL(__NR_accept4, sys_accept4) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_recvmmsg 243 -__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) +__SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) +#endif /* * Architectures may provide up to 16 syscalls of their own @@ -665,8 +702,10 @@ __SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) */ #define __NR_arch_specific_syscall 244 +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_wait4 260 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) +#endif #define __NR_prlimit64 261 __SYSCALL(__NR_prlimit64, sys_prlimit64) #define __NR_fanotify_init 262 @@ -676,10 +715,11 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) #define __NR_name_to_handle_at 264 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) #define __NR_open_by_handle_at 265 -__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ - compat_sys_open_by_handle_at) +__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_clock_adjtime 266 -__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) +__SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) +#endif #define __NR_syncfs 267 __SYSCALL(__NR_syncfs, sys_syncfs) #define __NR_setns 268 @@ -687,11 +727,9 @@ __SYSCALL(__NR_setns, sys_setns) #define __NR_sendmmsg 269 __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) #define __NR_process_vm_readv 270 -__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ - compat_sys_process_vm_readv) +__SYSCALL(__NR_process_vm_readv, sys_process_vm_readv) #define __NR_process_vm_writev 271 -__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ - compat_sys_process_vm_writev) +__SYSCALL(__NR_process_vm_writev, sys_process_vm_writev) #define __NR_kcmp 272 __SYSCALL(__NR_kcmp, sys_kcmp) #define __NR_finit_module 273 @@ -732,13 +770,121 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) __SYSCALL(__NR_pkey_free, sys_pkey_free) #define __NR_statx 291 __SYSCALL(__NR_statx, sys_statx) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_io_pgetevents 292 -__SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents) +__SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) +#endif #define __NR_rseq 293 __SYSCALL(__NR_rseq, sys_rseq) +#define __NR_kexec_file_load 294 +__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) +/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ +#if __BITS_PER_LONG == 32 +#define __NR_clock_gettime64 403 +__SYSCALL(__NR_clock_gettime64, sys_clock_gettime) +#define __NR_clock_settime64 404 +__SYSCALL(__NR_clock_settime64, sys_clock_settime) +#define __NR_clock_adjtime64 405 +__SYSCALL(__NR_clock_adjtime64, sys_clock_adjtime) +#define __NR_clock_getres_time64 406 +__SYSCALL(__NR_clock_getres_time64, sys_clock_getres) +#define __NR_clock_nanosleep_time64 407 +__SYSCALL(__NR_clock_nanosleep_time64, sys_clock_nanosleep) +#define __NR_timer_gettime64 408 +__SYSCALL(__NR_timer_gettime64, sys_timer_gettime) +#define __NR_timer_settime64 409 +__SYSCALL(__NR_timer_settime64, sys_timer_settime) +#define __NR_timerfd_gettime64 410 +__SYSCALL(__NR_timerfd_gettime64, sys_timerfd_gettime) +#define __NR_timerfd_settime64 411 +__SYSCALL(__NR_timerfd_settime64, sys_timerfd_settime) +#define __NR_utimensat_time64 412 +__SYSCALL(__NR_utimensat_time64, sys_utimensat) +#define __NR_pselect6_time64 413 +__SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) +#define __NR_ppoll_time64 414 +__SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64) +#define __NR_io_pgetevents_time64 416 +__SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) +#define __NR_recvmmsg_time64 417 +__SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64) +#define __NR_mq_timedsend_time64 418 +__SYSCALL(__NR_mq_timedsend_time64, sys_mq_timedsend) +#define __NR_mq_timedreceive_time64 419 +__SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive) +#define __NR_semtimedop_time64 420 +__SYSCALL(__NR_semtimedop_time64, sys_semtimedop) +#define __NR_rt_sigtimedwait_time64 421 +__SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time64) +#define __NR_futex_time64 422 +__SYSCALL(__NR_futex_time64, sys_futex) +#define __NR_sched_rr_get_interval_time64 423 +__SYSCALL(__NR_sched_rr_get_interval_time64, sys_sched_rr_get_interval) +#endif + +#define __NR_pidfd_send_signal 424 +__SYSCALL(__NR_pidfd_send_signal, sys_pidfd_send_signal) +#define __NR_io_uring_setup 425 +__SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) +#define __NR_io_uring_enter 426 +__SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) +#define __NR_io_uring_register 427 +__SYSCALL(__NR_io_uring_register, sys_io_uring_register) +#define __NR_open_tree 428 +__SYSCALL(__NR_open_tree, sys_open_tree) +#define __NR_move_mount 429 +__SYSCALL(__NR_move_mount, sys_move_mount) +#define __NR_fsopen 430 +__SYSCALL(__NR_fsopen, sys_fsopen) +#define __NR_fsconfig 431 +__SYSCALL(__NR_fsconfig, sys_fsconfig) +#define __NR_fsmount 432 +__SYSCALL(__NR_fsmount, sys_fsmount) +#define __NR_fspick 433 +__SYSCALL(__NR_fspick, sys_fspick) +#define __NR_pidfd_open 434 +__SYSCALL(__NR_pidfd_open, sys_pidfd_open) +#ifdef __ARCH_WANT_SYS_CLONE3 +#define __NR_clone3 435 +__SYSCALL(__NR_clone3, sys_clone3) +#endif +#define __NR_close_range 436 +__SYSCALL(__NR_close_range, sys_close_range) + +#define __NR_openat2 437 +__SYSCALL(__NR_openat2, sys_openat2) +#define __NR_pidfd_getfd 438 +__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) +#define __NR_faccessat2 439 +__SYSCALL(__NR_faccessat2, sys_faccessat2) +#define __NR_process_madvise 440 +__SYSCALL(__NR_process_madvise, sys_process_madvise) +#define __NR_epoll_pwait2 441 +__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) +#define __NR_mount_setattr 442 +__SYSCALL(__NR_mount_setattr, sys_mount_setattr) +#define __NR_quotactl_fd 443 +__SYSCALL(__NR_quotactl_fd, sys_quotactl_fd) + +#define __NR_landlock_create_ruleset 444 +__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset) +#define __NR_landlock_add_rule 445 +__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule) +#define __NR_landlock_restrict_self 446 +__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self) + +#ifdef __ARCH_WANT_MEMFD_SECRET +#define __NR_memfd_secret 447 +__SYSCALL(__NR_memfd_secret, sys_memfd_secret) +#endif +#define __NR_process_mrelease 448 +__SYSCALL(__NR_process_mrelease, sys_process_mrelease) + +#define __NR_futex_waitv 449 +__SYSCALL(__NR_futex_waitv, sys_futex_waitv) #undef __NR_syscalls -#define __NR_syscalls 294 +#define __NR_syscalls 450 /* * 32 bit systems traditionally used different @@ -758,8 +904,10 @@ __SYSCALL(__NR_rseq, sys_rseq) #define __NR_ftruncate __NR3264_ftruncate #define __NR_lseek __NR3264_lseek #define __NR_sendfile __NR3264_sendfile +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) #define __NR_newfstatat __NR3264_fstatat #define __NR_fstat __NR3264_fstat +#endif #define __NR_mmap __NR3264_mmap #define __NR_fadvise64 __NR3264_fadvise64 #ifdef __NR3264_stat @@ -774,8 +922,10 @@ __SYSCALL(__NR_rseq, sys_rseq) #define __NR_ftruncate64 __NR3264_ftruncate #define __NR_llseek __NR3264_lseek #define __NR_sendfile64 __NR3264_sendfile +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) #define __NR_fstatat64 __NR3264_fstatat #define __NR_fstat64 __NR3264_fstat +#endif #define __NR_mmap2 __NR3264_mmap #define __NR_fadvise64_64 __NR3264_fadvise64 #ifdef __NR3264_stat diff --git a/lib/libc/include/any-linux-any/asm/a.out.h b/lib/libc/include/any-linux-any/asm/a.out.h deleted file mode 100644 index db1281a91c150fac46c8e6e2561648fd41de5191..0000000000000000000000000000000000000000 --- a/lib/libc/include/any-linux-any/asm/a.out.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_X86_A_OUT_H -#define _ASM_X86_A_OUT_H - -struct exec -{ - unsigned int a_info; /* Use macros N_MAGIC, etc for access */ - unsigned a_text; /* length of text, in bytes */ - unsigned a_data; /* length of data, in bytes */ - unsigned a_bss; /* length of uninitialized data area for file, in bytes */ - unsigned a_syms; /* length of symbol table data in file, in bytes */ - unsigned a_entry; /* start address */ - unsigned a_trsize; /* length of relocation info for text, in bytes */ - unsigned a_drsize; /* length of relocation info for data, in bytes */ -}; - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#endif /* _ASM_X86_A_OUT_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm/auxvec.h b/lib/libc/include/any-linux-any/asm/auxvec.h index e971dfca8015c06c0ec9ed185a2cc56d91708d8b..8c139a298d10a2c1e1a65793caf0470659fe68a3 100644 --- a/lib/libc/include/any-linux-any/asm/auxvec.h +++ b/lib/libc/include/any-linux-any/asm/auxvec.h @@ -1,8 +1 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __ASM_AUXVEC_H -#define __ASM_AUXVEC_H - -/* VDSO location */ -#define AT_SYSINFO_EHDR 33 - -#endif \ No newline at end of file +#include \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm/bitfield.h b/lib/libc/include/any-linux-any/asm/bitfield.h deleted file mode 100644 index 5e04a8a9cba7019bdde02fb11335a8bcedab1787..0000000000000000000000000000000000000000 --- a/lib/libc/include/any-linux-any/asm/bitfield.h +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2014 by Ralf Baechle - */ -#ifndef __UAPI_ASM_BITFIELD_H -#define __UAPI_ASM_BITFIELD_H - -/* - * * Damn ... bitfields depend from byteorder :-( - * */ -#ifdef __MIPSEB__ -#define __BITFIELD_FIELD(field, more) \ - field; \ - more - -#elif defined(__MIPSEL__) - -#define __BITFIELD_FIELD(field, more) \ - more \ - field; - -#else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */ -#error "MIPS but neither __MIPSEL__ nor __MIPSEB__?" -#endif - -#endif /* __UAPI_ASM_BITFIELD_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm/boot.h b/lib/libc/include/any-linux-any/asm/boot.h deleted file mode 100644 index 0f676d5549628f66c8240a881830c6cbd0e29ffc..0000000000000000000000000000000000000000 --- a/lib/libc/include/any-linux-any/asm/boot.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_X86_BOOT_H -#define _ASM_X86_BOOT_H - -/* Internal svga startup constants */ -#define NORMAL_VGA 0xffff /* 80x25 mode */ -#define EXTENDED_VGA 0xfffe /* 80x50 mode */ -#define ASK_VGA 0xfffd /* ask for it at bootup */ - - -#endif /* _ASM_X86_BOOT_H */ \ No newline at end of file diff --git a/lib/libc/include/any-linux-any/asm/bootparam.h b/lib/libc/include/any-linux-any/asm/bootparam.h deleted file mode 100644 index 68c947f9f3e7d24fbc90251e52ff4ecc421a6216..0000000000000000000000000000000000000000 --- a/lib/libc/include/any-linux-any/asm/bootparam.h +++ /dev/null @@ -1,249 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_X86_BOOTPARAM_H -#define _ASM_X86_BOOTPARAM_H - -/* setup_data types */ -#define SETUP_NONE 0 -#define SETUP_E820_EXT 1 -#define SETUP_DTB 2 -#define SETUP_PCI 3 -#define SETUP_EFI 4 -#define SETUP_APPLE_PROPERTIES 5 -#define SETUP_JAILHOUSE 6 - -/* ram_size flags */ -#define RAMDISK_IMAGE_START_MASK 0x07FF -#define RAMDISK_PROMPT_FLAG 0x8000 -#define RAMDISK_LOAD_FLAG 0x4000 - -/* loadflags */ -#define LOADED_HIGH (1<<0) -#define KASLR_FLAG (1<<1) -#define QUIET_FLAG (1<<5) -#define KEEP_SEGMENTS (1<<6) -#define CAN_USE_HEAP (1<<7) - -/* xloadflags */ -#define XLF_KERNEL_64 (1<<0) -#define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) -#define XLF_EFI_HANDOVER_32 (1<<2) -#define XLF_EFI_HANDOVER_64 (1<<3) -#define XLF_EFI_KEXEC (1<<4) - -#ifndef __ASSEMBLY__ - -#include -#include -#include -#include -#include -#include