1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Marcel Moolenaar 155dbcacfb Change the startup code to fix a memory leak and to allow us to
accept load options (=command line options).

The call graph changes from *entry*->efi_main->efi_init, where
efi_main is the EFI equivalent of main to *entry*->efi_main->main,
where main is what you'd expect. efi_main now is what efi_init was.
The prototype of main follows that of C. The first argument is argc
and the second is argv. There is no third argument.
Allocation of heap pages is now handled by the EFI library and it
now deallocates the pages when main() returns or when exit() is
called. This allows us to safely return to the boot manager (or
EFI shell) without leaks. EFI applications are responsible to free
all memory themselves.

Handling of the load options is a bit tricky. There are either no
load options, load options in ASCII or load options in Unicode.
The EFI library will translate the ASCII options to Unicode options
as to simplify user code. Since the load options are passed as a
single string (if present) and main() accepts argc and argv, the
startup code also has to split the string into words and build the
argv vector. Here the trickiness starts. When the loader is started
from the EFI shell, argv[0] will automaticly load the program name.
In all other cases (ie through the boot manager), this is not the
case. Unfortunately, there's no trivial way to check. Hence, a
set of conditions is checked to determine if we need to fill in
argv[0] ourselves or not. This checking is not perfect. There are
known cases where it fails to do the right thing. The logic works
for most expected cases, though. This includes the case where no
options are given.

Approved by: re (blanket)
2002-12-10 06:22:25 +00:00
bin Capitalize ASCII code names. 2002-12-05 08:50:00 +00:00
contrib _NIH, __NIH__, __N_I_H__, __nih__, _niH_. 2002-12-05 18:40:24 +00:00
crypto Since OpenSSH drops privileges before calling pam_open_session(3), 2002-12-03 15:48:11 +00:00
etc Avoid using perl in the periodic & security scripts. This brings the 2002-12-07 23:37:44 +00:00
games mdoc(7) police: sweep. 2002-11-29 16:21:33 +00:00
gnu We need to support the bfd_efi_app_ia64_vec vector for loader support. 2002-12-05 18:27:22 +00:00
include Don't install old LOMAC include files; do install new mac_lomac 2002-12-03 15:05:32 +00:00
kerberos5 Update version numbers after import of Heimdal 0.5.1. 2002-11-24 21:00:51 +00:00
kerberosIV update version numbers to (consistenly): 2002-10-23 06:12:21 +00:00
lib mdoc(7) police: tiny nits. 2002-12-09 14:11:37 +00:00
libexec Fix rtld to handle SPARC_R_UA{16,64} relocations correctly. 2002-12-05 16:58:31 +00:00
release Move lang/perl5 from the "want to have on disc1" to the "sysinstall 2002-12-09 16:55:25 +00:00
sbin mdoc(7) police: markup nits. 2002-12-09 13:06:34 +00:00
secure Remove myself as maintainer of openssl; I no longer have enough time to 2002-11-21 08:48:08 +00:00
share Document the following MAC policies: 2002-12-10 00:39:17 +00:00
sys Change the startup code to fix a memory leak and to allow us to 2002-12-10 06:22:25 +00:00
tools Add a test for what was fixed in revisions 1.39 and 1.50 of 2002-11-28 13:21:32 +00:00
usr.bin Add powerpc.h. Still missing powerpc.[ch] in gprof, but this gets 2002-12-10 02:22:01 +00:00
usr.sbin Unhook LOMAC sysinstall twiddle for the time being: mac_lomac requires 2002-12-09 19:06:43 +00:00
COPYRIGHT
MAINTAINERS Note file, one-true-awk, lukemftpd. 2002-11-28 00:02:25 +00:00
Makefile Minor, cosmetic change to buildworld output to make it reflect 2002-12-03 17:49:05 +00:00
Makefile.inc1 For installkernel, use the fresh tools (if we've built them with 2002-12-02 14:03:40 +00:00
Makefile.upgrade
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING Add an entry for sparc64 users to warn them about potential problems 2002-12-06 13:19:35 +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
``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.

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.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

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