From owner-cvs-src@FreeBSD.ORG Tue May 13 21:10:50 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 905D337B401; Tue, 13 May 2003 21:10:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D22843F75; Tue, 13 May 2003 21:10:50 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E4An0U081682; Tue, 13 May 2003 21:10:49 -0700 (PDT) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E4AnP2081681; Tue, 13 May 2003 21:10:49 -0700 (PDT) Message-Id: <200305140410.h4E4AnP2081681@repoman.freebsd.org> From: Peter Wemm Date: Tue, 13 May 2003 21:10:49 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 cpu_switch.S exception.S genassym.c machdep.c trap.c vm_machdep.c src/sys/amd64/conf GENERIC src/sys/amd64/ia32 ia32_exception.S ia32_genassym.c ia32_misc.c ia32_signal.c ia32_signal.h ia32_sigtramp.S ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 04:10:51 -0000 peter 2003/05/13 21:10:49 PDT FreeBSD src repository Modified files: sys/amd64/amd64 cpu_switch.S exception.S genassym.c machdep.c trap.c vm_machdep.c sys/amd64/conf GENERIC sys/amd64/ia32 ia32_misc.c ia32_sysvec.c ia32_util.h syscalls.master sys/amd64/include cpufunc.h elf.h md_var.h pcb.h segments.h sys/conf files.amd64 options.amd64 Added files: sys/amd64/ia32 ia32_exception.S ia32_genassym.c ia32_signal.c ia32_signal.h ia32_sigtramp.S ia32_syscall.c Log: 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) Revision Changes Path 1.140 +24 -0 src/sys/amd64/amd64/cpu_switch.S 1.110 +1 -34 src/sys/amd64/amd64/exception.S 1.145 +7 -0 src/sys/amd64/amd64/genassym.c 1.577 +32 -8 src/sys/amd64/amd64/machdep.c 1.257 +9 -12 src/sys/amd64/amd64/trap.c 1.208 +1 -1 src/sys/amd64/amd64/vm_machdep.c 1.385 +6 -0 src/sys/amd64/conf/GENERIC 1.1 +69 -0 src/sys/amd64/ia32/ia32_exception.S (new) 1.1 +24 -0 src/sys/amd64/ia32/ia32_genassym.c (new) 1.10 +113 -3 src/sys/amd64/ia32/ia32_misc.c 1.1 +559 -0 src/sys/amd64/ia32/ia32_signal.c (new) 1.1 +164 -0 src/sys/amd64/ia32/ia32_signal.h (new) 1.1 +87 -0 src/sys/amd64/ia32/ia32_sigtramp.S (new) 1.1 +275 -0 src/sys/amd64/ia32/ia32_syscall.c (new) 1.3 +75 -154 src/sys/amd64/ia32/ia32_sysvec.c 1.5 +1 -1 src/sys/amd64/ia32/ia32_util.h 1.22 +9 -7 src/sys/amd64/ia32/syscalls.master 1.135 +12 -1 src/sys/amd64/include/cpufunc.h 1.15 +16 -2 src/sys/amd64/include/elf.h 1.66 +1 -0 src/sys/amd64/include/md_var.h 1.52 +5 -0 src/sys/amd64/include/pcb.h 1.35 +1 -1 src/sys/amd64/include/segments.h 1.14 +21 -1 src/sys/conf/files.amd64 1.7 +1 -0 src/sys/conf/options.amd64