FreeBSD src
Go to file
John Baldwin 7f911abe54 Add support to libkvm for reading vmcores from other architectures.
- Add a kvaddr_type to represent kernel virtual addresses instead of
  unsigned long.
- Add a struct kvm_nlist which is a stripped down version of struct nlist
  that uses kvaddr_t for n_value.
- Add a kvm_native() routine that returns true if an open kvm descriptor
  is for a native kernel and memory image.
- Add a kvm_open2() function similar to kvm_openfiles().  It drops the
  unused 'swapfile' argument and adds a new function pointer argument for
  a symbol resolving function.  Native kernels still use _fdnlist() from
  libc to resolve symbols if a resolver function is not supplied, but cross
  kernels require a resolver.
- Add a kvm_nlist2() function similar to kvm_nlist() except that it uses
  struct kvm_nlist instead of struct nlist.
- Add a kvm_read2() function similar to kvm_read() except that it uses
  kvaddr_t instead of unsigned long for the kernel virtual address.
- Add a new kvm_arch switch of routines needed by a vmcore backend.
  Each backend is responsible for implementing kvm_read2() for a given
  vmcore format.
- Use libelf to read headers from ELF kernels and cores (except for
  powerpc cores).
- Add internal helper routines for the common page offset hash table used
  by the minidump backends.
- Port all of the existing kvm backends to implement a kvm_arch switch and
  to be cross-friendly by using private constants instead of ones that
  vary by platform (e.g. PAGE_SIZE).  Static assertions are present when
  a given backend is compiled natively to ensure the private constants
  match the real ones.
- Enable all of the existing vmcore backends on all platforms.  This means
  that libkvm on any platform should be able to perform KVA translation
  and read data from a vmcore of any platform.

Tested on:	amd64, i386, sparc64 (marius)
Differential Revision:	https://reviews.freebsd.org/D3341
2015-11-27 18:58:26 +00:00
bin META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
cddl Rename Makefile.inc1 to dtrace.test.mk to avoid clash with top-level Makefile.inc1. 2015-11-25 20:43:45 +00:00
contrib [wpa] use IFM_IEEE80211_ADHOC for now on FreeBSD for IBSS operation. 2015-11-26 17:28:40 +00:00
crypto r291198 inadvertantly reverted a local patch for the default location 2015-11-26 23:05:40 +00:00
etc Avoid FSCHG for INSTALL_AS_USER as well. 2015-11-16 20:18:38 +00:00
gnu Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
include Stop building vers.c in include/ and only build the needed osreldate.h. 2015-11-25 19:10:59 +00:00
kerberos5 META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
lib Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
libexec Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
release Fix tmpfs(5) '/tmp' mount point. 2015-11-25 19:10:04 +00:00
rescue Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
sbin Use netbsd usage() implementation in newfs_msdos 2015-11-27 14:40:21 +00:00
secure META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
share Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
sys Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
targets META MODE: Fix 'make bootstrap-tools'. 2015-11-25 19:44:51 +00:00
tests Avoid requiring 'make depend' here. 2015-11-25 20:38:20 +00:00
tools Clean up trailing whitespace 2015-11-26 08:58:13 +00:00
usr.bin Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
usr.sbin vidfont: with vt(4) omit size from vidcontrol -f 2015-11-27 00:04:39 +00:00
.arcconfig Add repository.callsign, to help arcanist figure out what repo it's 2015-07-02 22:23:52 +00:00
.arclint phabricator related changes: 2015-04-20 20:33:22 +00:00
COPYRIGHT Bump copyright year. 2014-12-31 10:00:43 +00:00
LOCKS Explicitly require Security Officer's approval for kernel PRNG bits. 2013-09-17 14:19:05 +00:00
MAINTAINERS Move recently added entry above the "old" line. 2015-11-17 19:03:55 +00:00
Makefile Rename META_MODE option to DIRDEPS_BUILD 2015-11-14 03:24:48 +00:00
Makefile.inc1 Add support to libkvm for reading vmcores from other architectures. 2015-11-27 18:58:26 +00:00
ObsoleteFiles.inc colldef(1) and mklocale(1) reappeared in r291115. 2015-11-23 23:36:57 +00:00
README README: changes and fixups 2015-04-19 07:16:44 +00:00
UPDATING Recommend only to remove the content of /usr/share/locale/ and not the directory 2015-11-18 16:52:19 +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.  See build(7)
and 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.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

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 kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


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.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

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