Page MenuHomeFreeBSD

D43308.id144038.diff
No OneTemporary

D43308.id144038.diff

diff --git a/sys/arm64/arm64/sys_machdep.c b/sys/arm64/arm64/sys_machdep.c
--- a/sys/arm64/arm64/sys_machdep.c
+++ b/sys/arm64/arm64/sys_machdep.c
@@ -28,6 +28,7 @@
*/
#include <sys/param.h>
+#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/sysproto.h>
@@ -36,14 +37,19 @@
#include <vm/pmap.h>
#include <vm/vm_map.h>
+#include <machine/pcb.h>
#include <machine/sysarch.h>
#include <machine/vmparam.h>
+#include <security/audit/audit.h>
+
int
sysarch(struct thread *td, struct sysarch_args *uap)
{
struct arm64_guard_page_args gp_args;
+ struct pcb *pcb;
vm_offset_t eva;
+ unsigned long sve_len;
int error;
switch (uap->op) {
@@ -73,6 +79,13 @@
error = pmap_bti_set(vmspace_pmap(td->td_proc->p_vmspace),
trunc_page(gp_args.addr), round_page(eva));
break;
+ case ARM64_GET_SVE_VL:
+ pcb = td->td_pcb;
+ sve_len = pcb->pcb_sve_len;
+ error = EINVAL;
+ if (sve_len != 0)
+ error = copyout(&sve_len, uap->parms, sizeof(sve_len));
+ break;
default:
error = EINVAL;
break;
diff --git a/sys/arm64/include/sysarch.h b/sys/arm64/include/sysarch.h
--- a/sys/arm64/include/sysarch.h
+++ b/sys/arm64/include/sysarch.h
@@ -46,6 +46,9 @@
__size_t len;
};
+#define ARM64_GET_SVE_VL 0x200
+/* Reserved ARM64_SET_SVE_VL 0x201 */
+
#ifndef _KERNEL
__BEGIN_DECLS

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 16, 11:19 PM (9 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34006203
Default Alt Text
D43308.id144038.diff (1 KB)

Event Timeline