aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-03-16 11:44:33 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-03-16 11:44:33 +0000
commitfd8d844f7622a08d362994fde083170ec29088ae (patch)
treeddd401c39ecbacd9a9069413d165c0ba50e2afed /sys/sparc64
parent6f1fe3305a2be0a1395569b2ea5f56a93e491ae0 (diff)
downloadsrc-fd8d844f7622a08d362994fde083170ec29088ae.tar.gz
src-fd8d844f7622a08d362994fde083170ec29088ae.zip
amd64 KPTI: add control from procctl(2).
Add the infrastructure to allow MD procctl(2) commands, and use it to introduce amd64 PTI control and reporting. PTI mode cannot be modified for existing pmap, the knob controls PTI of the new vmspace created on exec. Requested by: jhb Reviewed by: jhb, markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514
Notes
Notes: svn path=/head/; revision=345228
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/procctl.h4
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/sparc64/include/procctl.h b/sys/sparc64/include/procctl.h
new file mode 100644
index 000000000000..5221cfcd7be1
--- /dev/null
+++ b/sys/sparc64/include/procctl.h
@@ -0,0 +1,4 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index a4a316e0bc86..c56555a0120b 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -381,6 +381,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused)
}
int
+cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused,
+ int com __unused, void *data __unused)
+{
+
+ return (EINVAL);
+}
+
+int
is_physical_memory(vm_paddr_t addr)
{
struct ofw_mem_region *mr;