x86: make machine/sysarch.h usable from assembler

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov committed 2026-10-25 05:39:25 +02:00
1 parent a3214d4e9b
commit dc1514eda5
1 file changed
+8 -4
+8 -4
View File
@@ -71,6 +71,8 @@
#define AMD64_PKRU_EXCL 0x0001
#define AMD64_PKRU_PERSIST 0x0002
#ifndef LOCORE
struct i386_ioperm_args {
unsigned int start;
unsigned int length;
@@ -93,7 +95,7 @@ struct i386_get_xfpustate {
void *addr;
int len;
};
#else
#else /* __i386__ */
struct i386_ldt_args {
unsigned int start;
struct user_segment_descriptor *descs __packed;
@@ -116,7 +118,7 @@ struct amd64_get_xfpustate {
void *addr;
int len;
};
#endif
#endif /* __i386__ */
struct amd64_set_pkru {
void *addr;
@@ -153,7 +155,7 @@ int x86_pkru_protect_range(void *addr, unsigned long len, unsigned int keyidx,
int x86_pkru_unprotect_range(void *addr, unsigned long len);
int sysarch(int, void *);
__END_DECLS
#else
#else /* _KERNEL */
struct thread;
union descriptor;
@@ -167,6 +169,8 @@ int amd64_set_ldt(struct thread *, struct i386_ldt_args *,
int amd64_get_ioperm(struct thread *, struct i386_ioperm_args *);
int amd64_set_ioperm(struct thread *, struct i386_ioperm_args *);
int amd64_pkru_update(struct thread *, uintptr_t, size_t, u_int, int, bool);
#endif
#endif /* _KERNEL */
#endif /* LOCORE */
#endif /* !_MACHINE_SYSARCH_H_ */