aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2010-07-22 09:13:49 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2010-07-22 09:13:49 +0000
commit87d45a03921c39304b7fe7407f026dd5aea1d005 (patch)
treea1e7b78633c799b8be45f7c7e0bf35589eceef96 /sys/amd64/include
parent1a517c3ec572555fe09cdcb5f0e68749953c0b83 (diff)
downloadsrc-87d45a03921c39304b7fe7407f026dd5aea1d005.tar.gz
src-87d45a03921c39304b7fe7407f026dd5aea1d005.zip
When compat32 binary asks for the value of hw.machine_arch, report the
name of 32bit sibling architecture instead of the host one. Do the same for hw.machine on amd64. Add a safety belt debug.adaptive_machine_arch sysctl, to turn the substitution off. Reviewed by: jhb, nwhitehorn MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=210369
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/param.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h
index c940597efa18..9a742f94e9b9 100644
--- a/sys/amd64/include/param.h
+++ b/sys/amd64/include/param.h
@@ -59,6 +59,9 @@
#ifndef MACHINE_ARCH
#define MACHINE_ARCH "amd64"
#endif
+#ifndef MACHINE_ARCH32
+#define MACHINE_ARCH32 "i386"
+#endif
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU 32