aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-05-14 04:10:49 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-05-14 04:10:49 +0000
commitd85631c4ac29e17917c0444837225df309fba37e (patch)
tree65e4ac1aca11723390006ee027d286f8177b0ec6 /sys/conf
parent5d5ca6d75e2f83055e723d2269dc0ca9934dfa88 (diff)
downloadsrc-d85631c4ac29e17917c0444837225df309fba37e.tar.gz
src-d85631c4ac29e17917c0444837225df309fba37e.zip
Add BASIC i386 binary support for the amd64 kernel. This is largely
stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket)
Notes
Notes: svn path=/head/; revision=114987
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files.amd6422
-rw-r--r--sys/conf/options.amd641
2 files changed, 22 insertions, 1 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index afa187dbf5f3..63425b636ea5 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -8,6 +8,19 @@
# dependency lines other than the first are silently ignored.
#
+ia32_genassym.o optional ia32 \
+ dependency "$S/amd64/ia32/ia32_genassym.c" \
+ compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
+ no-obj no-implicit-rule \
+ clean "ia32_genassym.o"
+#
+ia32_assym.h optional ia32 \
+ dependency "$S/kern/genassym.sh ia32_genassym.o" \
+ compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \
+ no-obj no-implicit-rule before-depend \
+ clean "ia32_assym.h"
+#
+
dev/kbd/atkbd.c optional atkbd
dev/kbd/atkbdc.c optional atkbdc
dev/kbd/kbd.c optional atkbd
@@ -64,7 +77,14 @@ amd64/isa/npx.c standard
amd64/pci/pci_cfgreg.c optional pci
amd64/pci/pci_bus.c optional pci
-
+amd64/ia32/ia32_misc.c optional ia32
+amd64/ia32/ia32_sysent.c optional ia32
+amd64/ia32/ia32_sysvec.c optional ia32
+amd64/ia32/ia32_signal.c optional ia32
+amd64/ia32/ia32_sigtramp.S optional ia32
+amd64/ia32/ia32_exception.S optional ia32
+amd64/ia32/ia32_syscall.c optional ia32
+kern/imgact_elf32.c optional ia32
# This file tells config what files go into building a kernel,
# files marked standard are always included.
diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64
index ad735889b65a..79a887a256e4 100644
--- a/sys/conf/options.amd64
+++ b/sys/conf/options.amd64
@@ -59,3 +59,4 @@ PPC_DEBUG opt_ppc.h
PSM_HOOKRESUME opt_psm.h
PSM_RESETAFTERSUSPEND opt_psm.h
PSM_DEBUG opt_psm.h
+IA32