File indexing completed on 2025-09-15 09:14:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef VKI_ARM64_FREEBSD_H
0025 #define VKI_ARM64_FREEBSD_H
0026
0027
0028
0029
0030
0031
0032 #define VKI_PAGE_SHIFT 12UL
0033 #define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
0034 #define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
0035 #define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
0036
0037
0038
0039
0040 #define VKI_MINSIGSTKSZ (1024 * 4)
0041
0042
0043
0044
0045 #define _VKI_NSIG_WORDS 4
0046 #define _VKI_NSIG 128
0047 #define _VKI_NSIG_BPW ((_VKI_NSIG) / (_VKI_NSIG_WORDS))
0048
0049 #include "vki-machine-types-arm64-freebsd.h"
0050
0051 typedef struct {
0052 vki_uint32_t sig[_VKI_NSIG_WORDS];
0053 } vki_sigset_t;
0054
0055
0056
0057
0058
0059
0060 #define VKI_PSR_IL 0x00100000UL
0061 #define VKI_PSR_SS 0x00200000UL
0062 #define VKI_PSR_V 0x10000000UL
0063 #define VKI_PSR_C 0x20000000UL
0064 #define VKI_PSR_Z 0x40000000UL
0065 #define VKI_PSR_N 0x80000000UL
0066 #define VKI_PSR_FLAGS 0xf0000000UL
0067
0068
0069
0070
0071
0072
0073 struct vki_dbreg {
0074 vki_uint8_t db_debug_ver;
0075 vki_uint8_t db_nbkpts;
0076 vki_uint8_t db_nwtpts;
0077 vki_uint8_t db_pad[5];
0078
0079 struct {
0080 vki_uint64_t dbr_addr;
0081 vki_uint32_t dbr_ctrl;
0082 vki_uint32_t dbr_pad;
0083 } db_breakregs[16];
0084 struct {
0085 vki_uint64_t dbw_addr;
0086 vki_uint32_t dbw_ctrl;
0087 vki_uint32_t dbw_pad;
0088 } db_watchregs[16];
0089 };
0090
0091
0092
0093
0094
0095
0096 struct vki_gpregs {
0097 __vki_register_t gp_x[30];
0098 __vki_register_t gp_lr;
0099 __vki_register_t gp_sp;
0100 __vki_register_t gp_elr;
0101 vki_uint64_t gp_spsr;
0102 };
0103
0104
0105 #define vki_user_regs_struct vki_gpregs
0106
0107
0108 typedef unsigned long vki_elf_greg_t;
0109 #define VKI_ELF_NGREG (sizeof(struct vki_gpregs) / sizeof(vki_elf_greg_t))
0110 typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
0111
0112 struct vki_fpregs {
0113 __uint128_t fp_q[32];
0114 vki_uint32_t fp_sr;
0115 vki_uint32_t fp_cr;
0116 int fp_flags;
0117 int fp_pad;
0118 };
0119
0120
0121 #define vki_fpreg vki_fpregs
0122
0123
0124
0125
0126
0127
0128 typedef struct vki_fpregs vki_elf_fpregset_t;
0129
0130 struct vki_mcontext {
0131 struct vki_gpregs mc_gpregs;
0132 struct vki_fpregs mc_fpregs;
0133 int mc_flags;
0134 #define _MC_FP_VALID 0x1
0135 int mc_pad;
0136 vki_uint64_t mc_spare[8];
0137 };
0138
0139 struct vki_sigaction_base {
0140 void (*ksa_handler)(int);
0141 int sa_flags;
0142 vki_sigset_t sa_mask;
0143 };
0144 typedef struct vki_sigaction_base vki_sigaction_toK_t;
0145 typedef struct vki_sigaction_base vki_sigaction_fromK_t;
0146
0147
0148
0149
0150 #define VKI_VDSO_TIMEHANDS_MD \
0151 uint32_t th_physical; \
0152 uint32_t th_res[7];
0153
0154 struct vki_bintime {
0155 vki_time_t sec;
0156 vki_uint64_t frac;
0157 };
0158
0159 struct vki_vdso_timehands {
0160 vki_uint32_t th_algo;
0161 vki_uint32_t th_gen;
0162 vki_uint64_t th_scale;
0163 vki_uint32_t th_offset_count;
0164 vki_uint32_t th_counter_mask;
0165 struct vki_bintime th_offset;
0166 struct vki_bintime th_boottime;
0167 VKI_VDSO_TIMEHANDS_MD
0168 };
0169
0170
0171
0172
0173
0174 #define VKI_HWCAP_FP 0x00000001
0175 #define VKI_HWCAP_ASIMD 0x00000002
0176 #define VKI_HWCAP_EVTSTRM 0x00000004
0177 #define VKI_HWCAP_AES 0x00000008
0178 #define VKI_HWCAP_PMULL 0x00000010
0179 #define VKI_HWCAP_SHA1 0x00000020
0180 #define VKI_HWCAP_SHA2 0x00000040
0181 #define VKI_HWCAP_CRC32 0x00000080
0182 #define VKI_HWCAP_ATOMICS 0x00000100
0183 #define VKI_HWCAP_FPHP 0x00000200
0184 #define VKI_HWCAP_ASIMDHP 0x00000400
0185 #define VKI_HWCAP_CPUID 0x00000800
0186 #define VKI_HWCAP_ASIMDRDM 0x00001000
0187 #define VKI_HWCAP_JSCVT 0x00002000
0188 #define VKI_HWCAP_FCMA 0x00004000
0189 #define VKI_HWCAP_LRCPC 0x00008000
0190 #define VKI_HWCAP_DCPOP 0x00010000
0191 #define VKI_HWCAP_SHA3 0x00020000
0192 #define VKI_HWCAP_SM3 0x00040000
0193 #define VKI_HWCAP_SM4 0x00080000
0194 #define VKI_HWCAP_ASIMDDP 0x00100000
0195 #define VKI_HWCAP_SHA512 0x00200000
0196 #define VKI_HWCAP_SVE 0x00400000
0197 #define VKI_HWCAP_ASIMDFHM 0x00800000
0198 #define VKI_HWCAP_DIT 0x01000000
0199 #define VKI_HWCAP_USCAT 0x02000000
0200 #define VKI_HWCAP_ILRCPC 0x04000000
0201 #define VKI_HWCAP_FLAGM 0x08000000
0202 #define VKI_HWCAP_SSBS 0x10000000
0203 #define VKI_HWCAP_SB 0x20000000
0204 #define VKI_HWCAP_PACA 0x40000000
0205 #define VKI_HWCAP_PACG 0x80000000
0206
0207 #define VKI_HWCAP2_DCPODP 0x00000001
0208 #define VKI_HWCAP2_SVE2 0x00000002
0209 #define VKI_HWCAP2_SVEAES 0x00000004
0210 #define VKI_HWCAP2_SVEPMULL 0x00000008
0211 #define VKI_HWCAP2_SVEBITPERM 0x00000010
0212 #define VKI_HWCAP2_SVESHA3 0x00000020
0213 #define VKI_HWCAP2_SVESM4 0x00000040
0214 #define VKI_HWCAP2_FLAGM2 0x00000080
0215 #define VKI_HWCAP2_FRINT 0x00000100
0216 #define VKI_HWCAP2_SVEI8MM 0x00000200
0217 #define VKI_HWCAP2_SVEF32MM 0x00000400
0218 #define VKI_HWCAP2_SVEF64MM 0x00000800
0219 #define VKI_HWCAP2_SVEBF16 0x00001000
0220 #define VKI_HWCAP2_I8MM 0x00002000
0221 #define VKI_HWCAP2_BF16 0x00004000
0222 #define VKI_HWCAP2_DGH 0x00008000
0223 #define VKI_HWCAP2_RNG 0x00010000
0224 #define VKI_HWCAP2_BTI 0x00020000
0225
0226
0227 #endif