freebsd kernel with SKQ
Go to file
jhb f4e46bef98 Add support for FreeBSD/i386 guests under bhyve.
- Similar to the hack for bootinfo32.c in userboot, define
  _MACHINE_ELF_WANT_32BIT in the load_elf32 file handlers in userboot.
  This allows userboot to load 32-bit kernels and modules.
- Copy the SMAP generation code out of bootinfo64.c and into its own
  file so it can be shared with bootinfo32.c to pass an SMAP to the i386
  kernel.
- Use uint32_t instead of u_long when aligning module metadata in
  bootinfo32.c in userboot, as otherwise the metadata used 64-bit
  alignment which corrupted the layout.
- Populate the basemem and extmem members of the bootinfo struct passed
  to 32-bit kernels.
- Fix the 32-bit stack in userboot to start at the top of the stack
  instead of the bottom so that there is room to grow before the
  kernel switches to its own stack.
- Push a fake return address onto the 32-bit stack in addition to the
  arguments normally passed to exec() in the loader.  This return
  address is needed to convince recover_bootinfo() in the 32-bit
  locore code that it is being invoked from a "new" boot block.
- Add a routine to libvmmapi to setup a 32-bit flat mode register state
  including a GDT and TSS that is able to start the i386 kernel and
  update bhyveload to use it when booting an i386 kernel.
- Use the guest register state to determine the CPU's current instruction
  mode (32-bit vs 64-bit) and paging mode (flat, 32-bit, PAE, or long
  mode) in the instruction emulation code.  Update the gla2gpa() routine
  used when fetching instructions to handle flat mode, 32-bit paging, and
  PAE paging in addition to long mode paging.  Don't look for a REX
  prefix when the CPU is in 32-bit mode, and use the detected mode to
  enable the existing 32-bit mode code when decoding the mod r/m byte.

Reviewed by:	grehan, neel
MFC after:	1 month
2014-02-05 04:39:03 +00:00
bin sh: Allow aliases to force alias substitution on the following word. 2014-01-26 21:19:33 +00:00
cddl Only declare `bysz' variable under little endian archs. 2014-01-29 09:58:05 +00:00
contrib Apply patch for CVE-2013-6393 [1] to fix heap-based buffer overflow when 2014-02-03 08:13:44 +00:00
crypto Fix installations that use kernels without CAPABILITIES support. 2014-02-04 21:48:09 +00:00
etc Regenerate usb.conf 2014-02-04 09:11:50 +00:00
games Fix typo in fortune (go -> to) 2013-12-10 19:42:35 +00:00
gnu Add definition for NetBSD 7.0, which is referenced in several manpages. 2014-02-01 10:36:35 +00:00
include Vendor import of libc++ tags/RELEASE_34/final r197960: 2014-01-29 19:30:27 +00:00
kerberos5 Speculatively replace a cp with a cat for gathering data on a 2014-01-28 22:23:39 +00:00
lib Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
libexec Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the 2014-01-20 18:15:06 +00:00
release Add qlxgbe(4) and qlxge(4) to the hardware notes. 2014-02-04 12:34:08 +00:00
rescue
sbin Add a license (1) and do some cleanup. 2014-02-04 22:20:17 +00:00
secure Upgrade to OpenSSH 6.5p1. 2014-01-31 13:12:02 +00:00
share Actually install acpi_rapidstart.4. 2014-02-04 18:54:33 +00:00
sys Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
tests Fix the Makefiles so that the tests I submitted in r261081 will actually 2014-01-24 18:04:16 +00:00
tools The -B flag is intended to take an argument. 2014-01-30 21:47:12 +00:00
usr.bin Merge mdocml v1.12.3 into head 2014-02-01 09:27:57 +00:00
usr.sbin Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
COPYRIGHT Bump copyright year. 2013-12-31 12:18:10 +00:00
LOCKS
MAINTAINERS pkg_install has been removed on 20131031. 2013-11-09 16:20:42 +00:00
Makefile Import mdocml version 1.12.3 2014-01-31 19:59:03 +00:00
Makefile.inc1 Merge from CheriBSD: 2014-01-30 22:26:51 +00:00
ObsoleteFiles.inc Change date again. 2014-01-28 19:07:28 +00:00
README
UPDATING Change date again. 2014-01-28 19:07:28 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html