From owner-cvs-all@FreeBSD.ORG Wed Apr 30 20:56:31 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 069BA37B401; Wed, 30 Apr 2003 20:56:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7832543FCB; Wed, 30 Apr 2003 20:56:30 -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 h413uU0U007385; Wed, 30 Apr 2003 20:56:30 -0700 (PDT) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h413uUQf007384; Wed, 30 Apr 2003 20:56:30 -0700 (PDT) Message-Id: <200305010356.h413uUQf007384@repoman.freebsd.org> From: Peter Wemm Date: Wed, 30 Apr 2003 20:56:30 -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/boot/alpha/libalpha elf_freebsd.csrc/sys/boot/arc/lib elf_freebsd.c src/sys/boot/common Makefile.inc bootstrap.h load_elf.c load_elf32.c load_elf64.c src/sys/boot/efi/libefi elf_freebsd.c src/sys/boot/i386/libi386 Makefile amd64_tramp.S ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 03:56:31 -0000 peter 2003/04/30 20:56:30 PDT FreeBSD src repository Modified files: sys/boot/alpha/libalpha elf_freebsd.c sys/boot/arc/lib elf_freebsd.c sys/boot/common Makefile.inc bootstrap.h load_elf.c sys/boot/efi/libefi elf_freebsd.c sys/boot/i386/libi386 Makefile bootinfo.c bootinfo32.c bootinfo64.c elf32_freebsd.c elf64_freebsd.c libi386.h sys/boot/i386/loader conf.c main.c sys/boot/ia64/libski elf_freebsd.c sys/boot/ofw/libofw elf_freebsd.c Added files: sys/boot/common load_elf32.c load_elf64.c sys/boot/i386/libi386 amd64_tramp.S biossmap.c Log: Enable the i386 loader to load and run an amd64 kernel. If this puts things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set. Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64. Revision Changes Path 1.12 +4 -4 src/sys/boot/alpha/libalpha/elf_freebsd.c 1.4 +4 -4 src/sys/boot/arc/lib/elf_freebsd.c 1.15 +14 -1 src/sys/boot/common/Makefile.inc 1.38 +4 -2 src/sys/boot/common/bootstrap.h 1.27 +64 -53 src/sys/boot/common/load_elf.c 1.1 +3 -0 src/sys/boot/common/load_elf32.c (new) 1.1 +3 -0 src/sys/boot/common/load_elf64.c (new) 1.11 +3 -3 src/sys/boot/efi/libefi/elf_freebsd.c 1.29 +4 -2 src/sys/boot/i386/libi386/Makefile 1.1 +113 -0 src/sys/boot/i386/libi386/amd64_tramp.S (new) 1.1 +107 -0 src/sys/boot/i386/libi386/biossmap.c (new) 1.34 +0 -207 src/sys/boot/i386/libi386/bootinfo.c 1.34 +103 -194 src/sys/boot/i386/libi386/bootinfo32.c 1.34 +77 -233 src/sys/boot/i386/libi386/bootinfo64.c 1.12 +7 -20 src/sys/boot/i386/libi386/elf32_freebsd.c 1.12 +51 -22 src/sys/boot/i386/libi386/elf64_freebsd.c 1.16 +7 -1 src/sys/boot/i386/libi386/libi386.h 1.23 +2 -0 src/sys/boot/i386/loader/conf.c 1.27 +2 -0 src/sys/boot/i386/loader/main.c 1.8 +3 -3 src/sys/boot/ia64/libski/elf_freebsd.c 1.5 +5 -5 src/sys/boot/ofw/libofw/elf_freebsd.c